diff options
Diffstat (limited to 'stripeeraser.m')
-rw-r--r-- | stripeeraser.m | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/stripeeraser.m b/stripeeraser.m index 5d472fe..c7290ed 100644 --- a/stripeeraser.m +++ b/stripeeraser.m @@ -8,7 +8,7 @@ function [img_cleaned,imfourier]=stripeeraser(img,radius,threshold_power) % from the center i.e. zero spatial frequencies. immask=fftshift(fft2(img)); % move to Fourier space -max1=max(immask(:)); +max1=max(abs(immask(:))); for x=1:640 for y=1:480 d=sqrt((x-320)^2+(y-240)^2); @@ -25,4 +25,4 @@ for x=1:640 end; end; imfourier=immask; -img_cleaned=ifft2(ifftshift(immask)); +img_cleaned = abs( ifft2(ifftshift(immask)) ); |