2. 读入图像cameraman.tif,计算该图像的频谱,并将频谱原点移到中心位置显示。
程序:cameraman=imread('d:\test_images\cameraman.tif','tif'); S=log(abs(fft2(cameraman)));
subplot(1,2,1);mesh(S);title('orign'); fc=log(abs(fftshift(fft2(cameraman))));
subplot(1,2,2);mesh(fc);title('move to center');
结果: