
%Wiener Image Deconvolution:
clear;load letters.mat;
H=exp(-[-10:10].*[-10:10]/20);
FH=fft2(H'*H,280,280);
FX=fft2(X,280,280);FY=FH.*FX;
Y=real(ifft2(FY));%Blurred image.
Y=Y+500*randn(280,280);%Add noise.
figure,imagesc(Y),colormap(gray),axis off
FY=fft2(Y);Z=real(ifft2(FY./FH));
figure,imagesc(Z),colormap(gray),axis off
FW=conj(FH)./(abs(FH).*abs(FH)+5);
W=real(ifft2(FY.*FW));
figure,imagesc(W),colormap(gray),axis off
