MATLAB 图像的傅里叶变换

clc;
clear all;
close all;
img=imread('C:/lena.jpg');
f=fft2(img);                 %对图像进行傅里叶变换
f=fftshift(f);              %将频谱中心移到中心
r=real(f);
i=imag(f);

fudu=log(abs(f));      %图像得幅度
xiangwei=log(angle(f)*180/pi); %了图像的相位

pinpu=log(f);                  %图像频谱
subplot(2,2,1)
imshow(img);
subplot(2,2,2)
imshow(pinpu,[])
subplot(2,2,3)
imshow(fudu,[])
subplot(2,2,4)
imshow(xiangwei,[])

你可能感兴趣的:(MATLAB 图像的傅里叶变换)