# How to analyze images with Fast Fourier Transform method?

I am learning about analyzing images with the method of FFT(Fast Fourier Transform). The image I am analyzing is attached below:

Portrait of woman posing on grass, by George Marks. Getty Images.

And the result of the FFT analysis of this picture is presented below:

On the FFT image, the low frequency area is in the center of the image and the high frequency areas are at the corners of the image. Can someone tell me about the formation of the FFT image? For example, why is there a horizontal white line passing through the center? Also, why is the FFT image like a "sun" emitting beams?

• Remember that the result of a Fourier transform is complex--it has both real and imaginary parts. I think you've plotted the magnitude of the FFT results, which hides the phase information. The phase information is at least as critical as the magnitude in terms of carrying image data; see imagemagick.org/Usage/fourier/#fft_partial for an example. In a simple sense, it's the phase of the FFT that tells you where features occur in the original image. Mar 28, 2012 at 16:29
• While this is an interesting question, I don't think it's a good fit for Photo.SE - there's nothing which is actually anything to do with photography here; the question is mostly about the properties of Fourier Transforms. I suspect there's a good home for this somewhere in the SE network, but Photo.SE isn't it. Jun 26, 2013 at 7:33
• The FFT is not that good for image processing, try wavelets or the cosine transform ;) Aug 30, 2013 at 9:03
• We also have a great answer giving a technique for using FFT for image restoration. Oct 10, 2013 at 2:17
• "why is there a horizontal white line passing through the center" - this is because there is a significant, very low frequency difference along the vertical of the image typical of images containing sky. See Francesco's answer which details it.
– doug
Sep 17, 2018 at 23:41

You have a function of the spatial coordinates (x, y), the coordinates of the original image. Suppose, for clarity, that we are talking about a value from 0 to 255 for each (x, y) point in your original image. The transform is a function, again from 0 to 255, of the momentum coordinates (k1, k2) . The point (0, 0) - the sun - corresponds to the intensity of the constant part of the original function. Don't think, for a moment, to the fact that it represents an image, think of it like... a 2d bar chart or something like that. The constant is the average over the (periodically arranged) image. As you progress from the center you are sampling at higher frequencies (with sinusoidal and cosinusoidal function of increasing frequency). Given the spatial resolution of the details of your original image, you can see that the corners (high k1 frequency, high k2 frequency) are black (that is, the intensity of the transfor is low), and the central zone, lighter, correesponds to the "typical" spatial lenght of the details of your image. If you had took a picture of a more regular object (a grid?) you would have found a "typical" k corresponding to your "typycal" lenght (for example, this is the process that is used in physics to reconstructs the features of cristals).

The central line corresponds to the average values along the y direction for the various sampling frequencies along the x direction. It is roughly constant: this means that the average value of the image along the short side, independently of the frequency of sampling along the long side, is the same. This should be because the image exhibits a symmetry (the horizon) with a single feature (the girl) in a very concentrated region of space. It is relatively bright because the average value is influenced by the sky, which is mostly uniform and bright.

As an exercise, you could try to take a picture of a single/a few light object against a dark background and compare the results.

If you're still out there, please check out http://reindeergraphics.com/. They have a product called Fovea 4 that is a series of photoshop plug-ins for fourier and other frequency domain transforms.

Actually, you can do amazing stuff to images with fourier transform operations, including: (1) re-focus out of focus images (2) remove pattern noise in a picture, such as a half-tone mask (3) remove a repeating pattern like taking a picture through a screen door or off a piece of embossed paper (4) find an image so deeply buried in noise you cannot see it. (5) find multiple recurrences of a shape (e.g. a letter of the alphabet) in the image of a printed page (6) remove (or add) motion blur

--- and much much more! You should check it out - despite what was said above, it is highly relevant to photography and is used significantly in scientific and military image processing. This "technology" is also finding it's way into the main-stream photography market in products such as Focus Magic.

• I would love to see examples of each of those things. Aug 31, 2013 at 4:11

If you want to learn about Fourier Transform Image Processing, you should start with learning about basic Fourier Transforms (time domain to frequency domain mapping) and then you can go on to 2-dimensional Fourier Transforms.

Any number of pages will give you an overview, e.g.:

http://homepages.inf.ed.ac.uk/rbf/HIPR2/fourier.htm

• I can only say that I hope it will not be closed :) Mar 27, 2012 at 21:17
• @Ward Thanks for your reply and I am studing the stuff on that website. Mar 28, 2012 at 1:20
• @Ward Another question. Can you tell me the area where can I apply this technique ? Mar 28, 2012 at 1:23
• @ChuckWang I have no idea... I remember doing experiments w/ FT optics in a Physics class in University. I forget the setup, but with a laser as light source and the right lens arrangement, you can put a screen in a position and see the FT of the image. Then you can do some image processing on the image, e.g. filter out dust. Mar 28, 2012 at 3:46