
CodePudding user response:


CodePudding user response:
I=imread (' 1. Tif);Imshow (I);
J1=imnoise (I, 'salt & amp; Pepper ', 0.02);
Figure, imshow (J1);
F=double (J1);
G=fft2 (f);
G=fftshift (g);
[M, N]=size (g);
Nn=2;
D0=30;
M=fix (m/2); N=fix (n/2);
For I=1: M
For j=1: N
D=SQRT ((I - m ^ 2 + (j - n) ^ 2);
H=1/(1 + 0.414 * (d/d0) ^ (2 * nn));
The result (I, j)=h * g (I, j);
End
End
Result=ifftshift (result);
J2=ifft2 (result);
J3=uint8 (real (J2));
Figure, imshow (J3);
This is program
I don't know is what size, will change
CodePudding user response:
May be modified the image matrix, step through it and see