我正在使用 fft2 在 MATLAB 中计算灰度图像的傅立叶变换。
绘制结果大小的常用方法是什么?
最佳答案
假设 I
是您的输入图像,F
是它的傅里叶变换(即 F = fft2(I)
)
您可以使用此代码:
F = fftshift(F); % Center FFT
F = abs(F); % Get the magnitude
F = log(F+1); % Use log, for perceptual scaling, and +1 since log(0) is undefined
F = mat2gray(F); % Use mat2gray to scale the image between 0 and 1
imshow(F,[]); % Display the result
关于matlab - 如何在 Matlab 中绘制二维 FFT?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13549186/