用matlab编程1、读取给定图像文件‘cameramantif’对图像作傅立叶变换;将零频率分量移位至图形中心;在一个图形窗口中显示图像、其傅里叶幅度谱、相位谱
% 读取图像文件 I = imread('cameraman.tif');
% 傅里叶变换 F = fft2(I);
% 零频率分量移位至图形中心 F_shift = fftshift(F);
% 傅里叶幅度谱 F_mag = abs(F_shift);
% 相位谱 F_phase = angle(F_shift);
% 显示图像和傅里叶变换结果 figure; subplot(2,2,1); imshow(I); title('Original Image'); subplot(2,2,2); imshow(log(1+F_mag),[]); title('Magnitude Spectrum'); subplot(2,2,3); imshow(F_phase,[]); title('Phase Spectrum'); subplot(2,2,4); imshow(ifft2(ifftshift(F_shift)),[]); title('Reconstructed Image');
原文地址: https://www.cveoy.top/t/topic/eGIR 著作权归作者所有。请勿转载和采集!