赞
踩
- pi=3.14159;
- image=imread('C:\gs.jpg');
- image=im2double(rgb2gray(image));
- % figure
- % imshow(image);
-
- a=double(image);
- %b=ones(500,500);
- for x=1:1:500
- for y=1:1:500
- a(x,y)=a(x,y)*exp(j*(2*pi*rand-pi));
- end
- end
- x=11;
-
- while x>10
- A=fft2(a);
- A=A./abs(A);
- a=ifft2(A);
- a=image.*(a./abs(a));
- x=x-1;
- end
- A=fft2(a);
- A=A./abs(A);
- a=ifft2(A);
- a1=abs(a)./max(max(abs(a)));
- subplot(1,3,1);
- imshow(real(a1));
- title('1');
-
-
- x=60;
- while x>10
- A=fft2(a);
- A=A./abs(A);
- a=ifft2(A);
- a=image.*(a./abs(a));
- x=x-1;
- end
- %A=angle(fftshift(fft2(a)));
- %A=A./abs(A);
- %a=ifft2(A);
- %a=image.*a./abs(a);
- % a=a./abs(a);
- A=fft2(a);
- A=A./abs(A);
- a=ifft2(A);
- a=abs(a)./max(max(abs(a)));
- subplot(1,3,2);
- imshow(real(a));
- title('50');
- subplot(1,3,3);
- imshow(image);
- title('object');
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。