MATLAB程序
defocus_aa=imread('defocus_aa.tif');
fft_aa=double(fft2(defocus_aa));
%% 加窗
defocus_aa=double(defocus_aa);
Windows_1=hanning(length(defocus_aa)/2);
% figure;
% plot(abs(Windows_1))
%改变窗函数形状
Windows_fft=fft(Windows_1,length(defocus_aa));
% Windows_fft=fft(Windows_1);
% Windows_fft1=fftshift(Windows_fft);
Windows=fftshift(Windows_fft);
Windows=ifft2(Windows);
figure;
plot(abs(Windows))
时域的窗函数图是前面是汉宁窗的形状,后面是零,现在想改成中心为汉宁窗,两边为零 qing'q