# Finding amplitudes from FFT data of a 2D image

I'm working on experiments with 2D - wrinkled surfaces. Basically I am getting a bunch of images like this. This example is hand-made.

Edit: The test image was made by sampling a cosine function something like $4*\cos{2\pi(3x+4y)}$

Is there a method to find the amplitudes of the first few dominant sinusoids in the image?

I've seen for simple 1-D examples how to get to the amplitudes. It seems to require that the coefficients of the expansion cancel out just right.

Here is a sample image from experiment:

If you can adjust the orientation of your image so that the sinusoid pattern runs vertically to the image, then you can obtain a vertical slice, perhaps at the middle of the image and use that as a 1D waveform for further analysis.

If the waves can come out of your experiment in any orientation you basically have two options:

1) Estimate the angle of rotation ($a$), apply a rotation by $-a$ and then select a slice of the image (just as in the introduction). To estimate the angle of rotation you can look at the output of the Hough Transform which will give you strong "spots" at a given angle for each line (or line-looking) form within your image. That would be the elongated folds of the wrinkles in your image. For more information please see: http://en.wikipedia.org/wiki/Hough_transform

2) Do a straightforward 2D Fourier Transform to recover both orientation and amplitude spectra (at least for the example you provide). The sinusoidal-like form will appear as a linear feature of some orientation in your FFT spectrum which you could pick up with a simple thresholding operation. For more information please see http://www.robots.ox.ac.uk/~az/lectures/ia/lect2.pdf

Hope this helps.

• Yes, the current experiments are designed so that wrinkles should form predominantly in two-directions separated by angle lets say a $\in (0,\pi/2)$. Thanks for the response, I will take a look at the Hough transform and see how it goes. – wgwz Mar 27 '15 at 15:25
• Will I have to worry about "periodicity constraints"? Suppose I take the image data above and do an 2d-FFT using SciPy, will it give me the correct Fourier coefficients? Or is there some processing needed to adjust the image before doing the FFT? – wgwz Apr 2 '15 at 4:40
• Yes, it will yield the correct coefficients. You might, however, have to shift the "origin" of the transform ('fftshift') to its conventional 2D position (at the centre of the image). Please see cs.unm.edu/~brayer/vision/fourier.html – A_A Apr 2 '15 at 5:58
• If I used the same functional form that created the above image, except I extend the range, so that it is just showing more cycles, how does that effect the Fourier coefficients? It should give me the same functional form right? The same functional form being the expansion terms from like the first few dominant sinusoids as evidenced by the magnitude of the fourier coefficients. Does that make sense? – wgwz Apr 2 '15 at 16:16
• I am sorry but I don't quite understand the question. Is the image on your post the result of an IFFT with a few coefficients? Can you post an example image from your experiments? If you "enlarged" the picture, to show more cycles, the FT coefs will adjust proportionally. – A_A Apr 2 '15 at 20:09

This can be thought of a pitch detection problem, consider taking an auto-correlation of the image and finding the 1st zero crossing. This will tell you the frequency of the most prominent signal.

• Can you give a reference on pitch detection problems and auto-correlation for images? – wgwz Apr 11 '15 at 19:17