inverse Fourier transform error
이전 댓글 표시
Dear all, I have a question regarding inverser fourier transform.
I have the following code:
Test=imread('test.png');
FFT_Test=fft2(Test);
IFFT_Test=ifft2(FFT_Test);
Abs_FFT=abs(FFT_Test);
Angle_FFT=angle(FFT_Test);
Recon_FFT=Abs_FFT.*exp(i*Angle_FFT);
Result=ifft2(Recon_FFT);
I assume that "Result" and "IFFT_Test"/"Test" should be exactly the same, without imaginary part. However, it is not. The "abs(Result)" is the same as "IFFT_Test"/"Test", however, there appears some random phase in the "Result", which is really weird. On the left is my test image, and on the right is the random phase I get in the "Result". Can anybody help me?
Thanks a lot!

채택된 답변
추가 답변 (1개)
Albatross
2015년 6월 11일
0 개 추천
Matlab fft and ifft calculates the discrete Fourier transform column-wise on a multi-dimensional array. I think you may need to do a non-conjugate transpose on your result array 'IFFT_Test' (.' is non-conjugate transpose) and then calculate the magnitude and phase of the transposed array. You will also need to do an fftshift but I don't know the order in which you will need to this, fftshift then transpose or transpose then fftshift. You will have to do this by trial and error.
It might be easier to use the dim argument in the (i)fft to perform the Fourier transform row-wise on your input array: (from Matlab help)
Y = fft(X,[],dim) and Y = fft(X,n,dim) applies the FFT operation across the dimension dim.
Use the dim argument on both the fft and ifft. If you do this then you should not need to transpose your array nor will you need to use fftshift (I think).
카테고리
도움말 센터 및 File Exchange에서 Fourier Analysis and Filtering에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!