Why isn't the inverse Fourier transform giving the correct results?

那年仲夏 提交于 2019-12-23 06:02:06

问题


I took the Fourier transform of an image in Matlab and now I want to take the inverse fourier but the result is a completely black picture instead of the original image. I think there is some step that I need to do before taking the inverse. Thank you for any help. The code:

nasa=imread('nasaNoise _1_','jpg');
N_Fourier=fft2(nasa);
N_Fourier=fftshift(N_Fourier);
N_Fourier=abs(N_Fourier);
N_Fourier=log(N_Fourier+1);
N_Fourier=mat2gray(N_Fourier);

%Now doing the inverse
N_inverse=ifft2(N_Fourier);
N_inverse=abs(N_inverse);
N_inverse=uint8(N_inverse);
imshow(N_inverse);

来源:https://stackoverflow.com/questions/19744543/why-isnt-the-inverse-fourier-transform-giving-the-correct-results

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!