
clear;load clown;FX=fft2(X);L=4;WMAX=100/L;
FX(WMAX+2:200-WMAX,:)=0;FX(:,WMAX:200-WMAX)=0;X=real(ifft2(FX));
figure,imagesc(X),colormap(gray),axis off %L=2,4,5,10.
figure,imagesc(fftshift(log10(abs(FX)))),colormap(gray),axis off
Y=X(1:L:200,1:L:200);Z(200,200)=0;Z(1:L:200,1:L:200)=Y;
FZ=fft2(Z);FW=FZ;
figure,imagesc(Z),colormap(gray),axis off
figure,imagesc(fftshift(log10(abs(FZ)))),colormap(gray),axis off
H=ones(L,L)*L*L;Q=conv2(Z,H);FQ=fft2(Q);FH=fft2(H,200,200);
figure,imagesc(Q),colormap(gray),axis off
figure,imagesc(fftshift(14+log10(abs(FQ)))),colormap(gray),axis off
figure,imagesc(fftshift(abs(FH))),colormap(gray),axis off
HH(200,200)=0;HH(11:14,11:14)=H;
figure,imagesc(HH),colormap(gray),axis off