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!