フィルターのクリア

constructing a 1D using ifft

3 ビュー (過去 30 日間)
Azza Ahmed
Azza Ahmed 2012 年 12 月 19 日
Hi there,
I get confused with all the website explaining how to construct an image from k-space using inverse fourier transform. I understand I need use abs(ifftshift(ifft(sig))) in order to produce a 2D image. Can someone please tell what I need to use in order to get a 1D image instead?
Best wishes
AA
  2 件のコメント
Matt J
Matt J 2012 年 12 月 19 日
I assume you really meant
abs(ifftshift(ifft2(sig)))
Azza Ahmed
Azza Ahmed 2012 年 12 月 20 日
I guess you are right. But I found some people constructing a 2D using : abs(ifftshift(ifft(fftshift(sig)))) not abs(ifftshift(ifft2(sig))) and this where I am confused.

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

採用された回答

Matt J
Matt J 2012 年 12 月 19 日
編集済み: Matt J 2012 年 12 月 19 日
As long as sig is 1D, you should be getting 1D output.
>> sig=1:5; %1D signal
>> abs(ifftshift(ifft(sig))) %1D output
ans =
0.5257 0.5257 0.8507 3.0000 0.8507

その他の回答 (1 件)

Image Analyst
Image Analyst 2012 年 12 月 19 日
What is k-space? Do you mean "frequency space," or the "Fourier domain"? And your code will give a 1D "image" - it does not produce a 2D image. If you are dealing with 2D images, you would use the "2" version, such as fft2() and ifft2(). Why do you think you're getting a 2D image when you use those 1D functions like you showed? What does "whos" show for your output?
  2 件のコメント
Azza Ahmed
Azza Ahmed 2012 年 12 月 20 日
Yes, indeed. I am constructing a 1D from my output. But why do people sometime use abs(ifftshift(ifft(fftshift(sig)))) to construct a 2D?
Highly appreciate your help with this
AA
Image Analyst
Image Analyst 2012 年 12 月 20 日
sig must have already been run through fftshift(). And you don't get a 2D image from that so you'd have to do it for every line and every column of your image - that essentially what fft2() does. Don't bother with that unnecessary complicated way of doing it, just use fft2 and make it easy.

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

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by