FFT图像及其逆 [英] FFT Images and its Inverse

查看:225
本文介绍了FFT图像及其逆的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有256x256图像数组(名为 Mydata ),我将FFT转换应用为 fftshift(log1p(abs(fft2(Mydata)))) ;

I have 256x256 image array (named Mydata) and I applied FFT transformation as fftshift(log1p(abs(fft2(Mydata))));

如何反转变换并在MATLAB中对结果进行成像?

How to inverse the transformation and image the results in MATLAB?

推荐答案

要完全重建图像,您还需要相位。如果您回想起傅里叶变换的属性,您可以将任何信号分解为其幅度和相位对应物。你在这段代码中所拥有的只是幅度。如果没有相位,则无法忠实地重建信号。因此,您需要将阶段存储在某处。请记住,任何复数 num 都可以用欧拉形式表示,例如:

To fully reconstruct the image you will also need the phase. If you recall the properties of the Fourier Transform, you can decompose any signal into its magnitude and phase counterparts. What you have in this code is just the magnitude. Without the phase, you cannot faithfully reconstruct your signal. As such, you'll need to store the phase somewhere. Remember that any complex number num can be represented in Euler form, such that:

 num <-> abs(num)*exp(j*angle(num));

abs 是<$ c的幅度$ c> num 和 angle num 的阶段。现在,假设您存储了幅度和阶段:

abs is the magnitude of num and angle is the phase of num. Now, supposing you stored the magnitude and phase:

  magData = abs(MyData);
  phaseData = angle(MyData);

巧合的是, angle 是MATLAB函数确定复值矩阵中每个元素的相位。要实现逆操作,您只需反转上面执行的操作即可获得原始图像:

Coincidentally, angle is the MATLAB function that determines the phase of every element in a complex-valued matrix. To achieve the inverse operation, you would simply reverse the operations that you did above to achieve the original image:

  ifft2(expm1(ifftshift(magData.*exp(j*phaseData))));

expm1 是执行以下操作的MATLAB操作逆$ log1p 。

expm1 is the MATLAB operation that performs the inverse of log1p.

这篇关于FFT图像及其逆的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆