How to find wavelength of a wave in an image
19 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
I had asked this question in MATLAB Answers: http://www.mathworks.com/matlabcentral/answers/13896-fftshift-of-an-image
I got an answer and it helped me a lot. Nevertheless, I have two more doubts:
1) I did the 2D FFT and cleared the DC component. Image is seen here: http://www.flickr.com/photos/paultjohn/6062522739/
Now, how can I relate the peaks in the spectral image to the colour waves and also to the grids - which peak corresponds to which?
2) Also, once I find out the Fx and Fy of the peak and get the wavelength in each direction, how can I find the resultant wavelength of the propagating wave?
These questions may sound naive, but please bear with me and kindly give some insight into the problem.
Regards, Paul T John
0 Commenti
Risposte (4)
Rick Rosson
il 27 Ago 2011
Hi Paul,
I don't think I can help you. Maybe someone else can.
Best of luck,
Rick
Rick Rosson
il 26 Ago 2011
To answer Question (2):
Once you find Fx and Fy, you can use the Pythagorean Theorem to find the overall frequency F:
F = sqrt(Fx^2 + Fy^2); % cycles per centimeter
In looking at the source image, however, it seems like the waves are primarily traveling in the X-direction, particularly in the middle part of the image (crop the image by eliminating the top 40 percent and bottom 25 percent of the image, and then you are left with just the middle part). So that suggests that Fy should be essentially zero, in which case the overall frequency F is approximately equal to just Fx.
Once you have computed F, you can then find the wavelength:
L = 1/F; % centimeters
So, to answer Question (1):
I would suggest that you break the image up into three sub-images, called top, middle, and bottom:
[M,N,P] = size(cimg);
h = floor(0.40*M);
k = floor(0.75*M);
top = cimg(1:h,:,:);
middle = cimg(h+1:k,:,:);
bottom = cimg(k+1:end,:,:);
Then, I would repeat your analysis on each of these three sub-images. I think you will find that the peaks in each image will be much more obvious. For the middle image in particular, you should see three definite peaks: one located at Fx = 0, and two others at Fx=+Fo and Fx=-Fo. There will be no major peaks in Fy except at Fy=0.
HTH.
Rick
2 Commenti
Rick Rosson
il 26 Ago 2011
I have updated my previous answer to include a method for addressing Question (1).
Vedere anche
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!