Having some trouble with 2-D Image Fourier Transform

1 view (last 30 days)
Hi Everybody!
I'm trying to perform a 2-D Fourier Transform of an image, but I'm not getting it as I'm getting using ImageJ app. When I did it using Matlab, I've got a spectrum having much more high intensity components than when I used the imageJ. I believe there is some mistake when I call the image file to Matlab, but i can't realize it. Can someone help me please?
There's the code:
A = imread('lesao.jpg'); % when I did it, i got an 100x100 uint8 image
B = im2double(A);
fourier = abs(fftshift(fft2(B,256,256)));
imshow(fourier)
------------------------------------------
There's the two spectrums:
first, the spectrum gotten by imageJ
then, the matlab spectrum:
Thanks!

Answers (1)

Image Analyst
Image Analyst on 7 Jan 2013
Try
imshow(fourier, []);
  2 Comments
Image Analyst
Image Analyst on 7 Jan 2013
Are both imageJ and MATLAB displaying the same thing? Why don't you use the variable editor to look at the real and imaginary parts. Any why don't you display the real and imaginary parts separately?

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!