IFFT of a Hanning windowed FFT Image

90 ビュー (過去 30 日間)
Luke Dineen-Woolnough
Luke Dineen-Woolnough 2016 年 1 月 27 日
コメント済み: rashmi deshpande 2021 年 8 月 26 日
Hi, Im Trying to IFFT a Hanning Windowed FFT Image for the code below, to obtain the original image.
w = hanning(434)*hanning(362)'; fft = fftshift(fft2(Pixel_Reassign)); fft = abs(fft); [24 100000]; colormap gray; fftimage = log(fft+1).*w; figure, imshow(fftimage,[]);
Can anyone suggest how i go about this, i've tried to simply IFFT the fft output but i dont seem to get the original image back.
Thanks
Luke
  2 件のコメント
Luke Dineen-Woolnough
Luke Dineen-Woolnough 2016 年 1 月 28 日
The beggining of my ifft line looks like this
ifft = fftshift(ifft2(ifftshift(fft1))); ifft1 = log(abs(ifft));[24 100000]; colormap gray;
but there seems to be something inherently wrong with it.
any help would really be appreciated.
rashmi deshpande
rashmi deshpande 2021 年 8 月 26 日
Thanks a lot

サインインしてコメントする。

採用された回答

Mona Mahboob Kanafi
Mona Mahboob Kanafi 2016 年 1 月 28 日
編集済み: Mona Mahboob Kanafi 2016 年 1 月 28 日
Hello,
You have used your absolute values to plot your image. Now, to reverse the operation you need the full fft results which is a complex matrix for regenerating your input image. Otherwise, you get something else!
Each fft component has value and phase. You shouldn't ignore the phase component which is ignored when you only use absolute values.
This is what you should do:
w = hanning(434)*hanning(362)';
FFT = fftshift(fft2(w)); % complex matrix
FFT_abs = abs(FFT); % absolut values of fft
imagesc(1+log10(FFT_abs)) % show fft results
w_new = ifft2(ifftshift(FFT)); % you need fft not fft_abs
Hope it helps,
Mona
  1 件のコメント
Luke Dineen-Woolnough
Luke Dineen-Woolnough 2016 年 1 月 28 日
Thank You So much Mona, that helps a lot.
Take Care
Luke

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeFourier Analysis and Filtering についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by