IA=imread('lena.bmp');
IB=imread('babarra.bmp');
[f1,f2]=freqspace(size(IA),'meshgrid');
%D=100/size(IA,1);
D=0.3;
r=f1.^2+f2.^2;
for i=1:size(IA,1)
for j=1:size(IA,2)
t=r(i,j)/(D*D);
Hd(i,j)=1-exp(-t);
end
end
Y=fft2(double(IA));
Y=fftshift(Y);
Ya=Y.*Hd;
Ya=ifftshift(Ya);
Ia=real(ifft2(Ya));
figure
subplot(2,2,1),imshow(uint8(IA));
subplot(2,2,2),imshow(uint8(Ia));
figure
surf(Hd,'Facecolor','interp','Edgecolor','none','Facelighting','phong');
- 1
- 2
前往页