image - 绘制相位和幅度图像傅里叶

标签 image matlab plot fft phase

如何在 MATLAB 中绘制 2D 图像傅里叶变换的相位和幅度? 我使用 angleabs,然后使用 imshow,但我得到了黑色图像。
在此绘图中 fftshift 有什么用?

最佳答案

F = fft2(I); where I is the input
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

试试这个。代码取自:How to plot a 2D FFT in Matlab?

关于image - 绘制相位和幅度图像傅里叶,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22235080/

相关文章:

html - 图像边框未正确对齐

matlab - 如何在Matlab中将音频文件拆分为1秒长的音频文件?

matlab - 我如何知道 Matlab 中的 parfor 循环中还剩下多少次迭代?

python - 将多个图分组在一个图中python

javascript - 一屏显示图片的CSS/Javascript框架

Java,在框架的背景图像上放置一个面板

python - 使用 pyinstaller 创建 EXE 后将图像转换为视频的 Python 脚本问题

python - 使 numpy ndarray 矩阵对称

python - 求曲线中的线性部分和斜率

plot - Gnuplot:网格后面多图中的第二个图例