Skip to content

Commit f2e5c42

Browse files
author
jklebes
committed
different handling of preserving frequency (0,0) background constant intensity
1 parent f7c9598 commit f2e5c42

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

imbandpass.m

+3-1
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,8 @@
121121
end
122122

123123
end
124+
%restore central pixel
125+
mask(masksize_x/2+1,masksize_y/2+1)=1;
124126
%loop over possibly three channels
125127
image_out=zeros(dims(1), dims(2), channels);
126128
for i=1:channels
@@ -141,7 +143,7 @@
141143
top_border+1:top_border+dims(2));
142144
% results may have range shifted into the negatives, shift back into
143145
% 0 to 255 range
144-
image_out(:,:,i) = image_out_ch-min(image_out_ch, [], 'all');
146+
image_out(:,:,i) = image_out_ch;
145147
end
146148
%in case there was just one channel, supress the dimension
147149
image_out=squeeze(image_out);

0 commit comments

Comments
 (0)