diff options
-rw-r--r-- | stripeeraser.m | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/stripeeraser.m b/stripeeraser.m index c7290ed..a8ecf22 100644 --- a/stripeeraser.m +++ b/stripeeraser.m @@ -9,9 +9,10 @@ function [img_cleaned,imfourier]=stripeeraser(img,radius,threshold_power) immask=fftshift(fft2(img)); % move to Fourier space max1=max(abs(immask(:))); -for x=1:640 - for y=1:480 - d=sqrt((x-320)^2+(y-240)^2); +[Ny, Nx] = size (img); % image size +for x=1:Nx + for y=1:Ny + d=sqrt((x-Nx/2)^2+(y-Ny/2)^2); if d>radius % for high enough frequency components %The filter works like a neutral density filter. |