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!