function [immask,imfourier]=stripeeraser(img,radius,filter) immask=fftshift(fft2(img)); max1=max(immask(:)); for x=1:640 for y=1:480 d=sqrt((x-320)^2+(y-240)^2); if d>radius %Outside the central frequency. if abs(immask(y,x))>max1*(10^(-filter)); %The filter works like a neutral desity filter. immask(y,x)=immask(y,x)*exp(-(d/radius)^2); %Erase the frequency of the stripes. end; end; end; end; imfourier=immask; immask=ifft2(ifftshift(immask));