1 %灰度图像的傅里叶变换和反变换 2 clear all; close all; 3 I=imread('onion.png'); 4 J=rgb2gray(I); 5 K=fft2(J); %傅里叶变换 6 L=fftshift(K); %平移 7 M=ifft2(K); %傅里叶反变换 8 figure; 9 subplot(121);imshow(uint8(abs(L)/198)); %显示频谱图 10 subplot(122);im...