Two dimensional fourier transform
古いコメントを表示
How to determine and display the two dimensional fourier transform of a thin, rectangular object? The object should be 2 by 10 pixels in size and solid white against a black background. The size of the image should bye 22x30 pixels and the rectangular object should be placed in the center of the image. fft2 and n=128 as a mesh plot as well as an image plot. Before plotting log of [Fmat(u,v)] needs to be done to improve the details.
採用された回答
その他の回答 (1 件)
Well, a few hints since it's obviously homework
- Use ifftshift and fftshift in appropriate places
- Know where the origin is and where the "center" of the rectangle should be
A 1D example
>> x=[0 0 1 1 1 1 1 0]; fftshift( fft(ifftshift(x)) )
ans =
1.0000 -0.4142 -1.0000 2.4142 5.0000 2.4142 -1.0000 -0.4142
8 件のコメント
P
2013 年 1 月 27 日
P
2013 年 1 月 27 日
Image Analyst
2013 年 1 月 27 日
I'd guess that n=128 was supposed to be your image size (128 rows by 128 columns), not 22 x 30 as you have it.
P
2013 年 1 月 27 日
Image Analyst
2013 年 1 月 27 日
I don't know what she means by a mesh plot. You can't use an fft with 128 samples on an image with less than 128 samples (like 22 or 30) - it just won't fit. Regarding the black display, since you're displaying a floating point image, make sure you use [] in imshow:
imshow(theImage, []);
P
2013 年 1 月 28 日
カテゴリ
ヘルプ センター および File Exchange で Matched Filter and Ambiguity Function についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!