how to find fourier transformation in intensity values

7 views (last 30 days)
please help me

Accepted Answer

Youssef  Khmou
Youssef Khmou on 23 Dec 2013
engineer 01,
If you have one dimensional signal, you can use fft(signal,N) with N being the number of points for evaluating the transformation, if it is an image , then use fft2(signal,N), or fftn(signal,N) for multidimensional signal, next you visualize a graph with :
plot(abs(fft(signal)));
% or
F=fft(signal,N);
Power=F.*conj(F); plot(Power)
Frequency axis adjustment is another issue, not discussed here, but it is easy to control it .

More Answers (1)

Image Analyst
Image Analyst on 22 Dec 2013
  5 Comments
Youssef  Khmou
Youssef Khmou on 23 Dec 2013
1.read an image called ram.jpg.
2.transformation from rgb(NxMx3) to grayscale (NxM).
3.compute its fourier transform with shifting the elements to have peak in
the center .
4.make in the inverse Fourier transform ( verification of the reversibility).
5.showing results.
Image Analyst
Image Analyst on 23 Dec 2013
Yes, having Youssef's explanations as comments would have been helpful. Also having titles above the images would help. I always encourage people to do things like that to make their code maintainable, especially by other people who may not know the author's thought process. On the other hand, I always do that to try to be helpful and people always say my demos are too complicated. Can't win I guess.
I just thought I'd explain why the Fourier Transform image doesn't look right. It looks like random noise garbage. That is because it was displayed with
imshow(meltem);
Now, meltem is a floating point image. And when imshow displays a floating point image it expects it to be normalized so that it's in the range 0-1. Anything less than 0 will show up as black and anything more than 1 will show up as white. Most of the meltem values are outside of the 0-1 range so that's why your meltem image looks like salt and pepper noise. To prevent that, use [] to scale the display to the max and min of meltem:
imshow(meltem, []);
But that, like almost all images will show a large central spike that makes it hard to see the higher spatial frequencies. So that is why people often take the log of the image before display to suppress the height of the central frequencies and let you see what's going on with the higher frequencies, because they won't be squashed to tiny values anymore:
imshow(log(meltem), []);

Sign in to comment.

Tags

Community Treasure Hunt

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

Start Hunting!