1

I have a texture image, which has some local shape distribute evenly or unevenly. I want to compute the period of these local shapes by FFT. Can anybody help me?

Here is the image: enter image description here

Magnitude after FFT: enter image description here

Phase after FFT: enter image description here

Cody Gray - on strike
  • 239,200
  • 50
  • 490
  • 574
Jie
  • 387
  • 1
  • 4
  • 9
  • Yes, I did FFT using matlab. However, I did not get any idea since I am mot familiar about the applications of FFT except that the mathimatics formula . – Jie Jan 28 '14 at 11:22
  • Sorry, I did not get your idea. I attached the results of magnitude and phase after FFT. How can I get the period for the local shape (e.g., in pixel)? – Jie Jan 28 '14 at 12:16

3 Answers3

1

The magnitude is what you need. The strong East-West lines in the FFT are the result of a repetition in that direction. Indeed, when you look at the actual texture, you see that the bands indeed repeat.

There's a limited structure orthogonal to those bands, as we can see from the fact that we have 3 evenly spaced East-West lines.

The 3 lines aren't exactly East-West; they're rotated by about 10 degrees clockwise. That's also true of the initial image, where the bands are also rotated. The period of the texture is given by the distances between the 3 lines as well as the intensity changes along those lines.

MSalters
  • 173,980
  • 10
  • 155
  • 350
  • Thank you very much for your kindly answer although I still did not understand your idea. Here I have some questions. 1) why "The strong East-West lines in the FFT are the result of a repetition in that direction"? 2) the three strong East-West lines in the FFT are from the bands and two limited structure orthogonal to those bands? 3) why the period of the texture is given by the distances between the 3 lines ? 4) why the intensity changes along those lines? 5) is there any books or papers or ppt or tutorial talked about these topics? I know little about this domain. Thanks. – Jie Jan 29 '14 at 00:03
  • @Jie: None of these are programming questions, so off-topic here. There are literally thousands of books that cover Fourier Transforms, and almost all of them should answer your questions. – MSalters Jan 29 '14 at 08:35
  • MSalters: could you please answer my questions briefly although they are off-topic here? I will go to read some books to understand it. – Jie Jan 29 '14 at 15:17
1

Adding to the discussion of reducing the data to point sets to corners, you would need edges or another method to do that.

There is an edge detector which uses the principles of fourier transforms and monogenic filters operating in the frequency domain, transformed to the spatial domain.

The work of Peter Kovesi on phase congruency is available http://www.peterkovesi.com/matlabfns/PhaseCongruency/phasecongmono.m

The code produces a phase angle image which can be used with a thinned phase congruency image to find edges.

If you set the parameters to allow more "noise" the smaller textures are picked up too.

NOTE: I'm trying to consolidate information I added in the next comments and what got added as a separate answer, that should both be part of this so there will be some redundancy with those:

if you're confused about FFTs, can read about them as 1 D signals to understand spatial domain and frequency domain. Then you might be interested in topics such as phase congruency which attempt to look at the frequency of signals to design frequency domain filters which operate on the spatial domain. With respect to your texture question, I think reducing it to keypoints such as corners reduces the information to significant spatial information. I recently used phase congruency to find "noise" in my image of a building, then made a representative patch of the roof texture out of that, then made a frequency domain filter from that and applied it to the spatial domain image. Application of color and maybe intensity filters in the spatial domain then led to a decent finding of the roof texture throughout the image....so FFT of sparse significant points is probably more helpful to you in answering your questing.

nichole
  • 121
  • 1
  • 6
  • I added to this using the stackover flow structure of a new answer instead of adding to this, so just in case they get separated here's a condensation of points... – nichole Nov 05 '16 at 19:57
0

The fourier or fast fourier transforms are superpositions of patterns of spacing. Your image has a point for each pixel and that results in the superposition of many many signals in your FFT. You probably want to reduce the image to corners or junctions and then make an FFT image of those points. For example, make a FFT from an image of a simple grid of points (all zeroes except your points having values > 0). You can see that a vertical slice of horizontal slice through the FFT image will show you the components of spacing present in the original image. You can rotate the grid of points to see how quickly the FFT becomes a more complex superposition.

  • You should probably assure that you rectify the set of points to the same reference frame orientation before the 2D FFT image is made. Then choose the slices that best represent your pattern (e.g. possibly max amplitude in horizontal and same in vertical). Comparing the frequency curves of one dataset to another is comparing model to data, so chi-square minimization is one technique. You might choose other methods than FFT for your goal... – Nichole Dec 03 '15 at 06:37