Skip to content

Commit

Permalink
different handling of preserving frequency (0,0) background constant …
Browse files Browse the repository at this point in the history
…intensity
  • Loading branch information
jklebes committed Jan 19, 2023
1 parent f7c9598 commit f2e5c42
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion imbandpass.m
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,8 @@
end

end
%restore central pixel
mask(masksize_x/2+1,masksize_y/2+1)=1;
%loop over possibly three channels
image_out=zeros(dims(1), dims(2), channels);
for i=1:channels
Expand All @@ -141,7 +143,7 @@
top_border+1:top_border+dims(2));
% results may have range shifted into the negatives, shift back into
% 0 to 255 range
image_out(:,:,i) = image_out_ch-min(image_out_ch, [], 'all');
image_out(:,:,i) = image_out_ch;
end
%in case there was just one channel, supress the dimension
image_out=squeeze(image_out);
Expand Down

0 comments on commit f2e5c42

Please sign in to comment.