8

In terms of images.

Fourier transform converts spatial to frequency (Fourier) domain. DC value = average of sinusoids (sine waves), F(0,0) and average brightness/graylevel of image. Fourier has a complex number output....you can get the [magnitude and phase] or [real and imaginary] outputs.

What I don't get is what the complex number output actually represents when you do FFT? I know an image in the fourier domain is the sum of weighted sine waves but what does the output actually mean.

What is spatial frequency? When I look at definitions it states it as the rate of change of pixel values., what does this mean?

Paul R
  • 208,748
  • 37
  • 389
  • 560
Cheetah
  • 13,785
  • 31
  • 106
  • 190

3 Answers3

3

The complex number outputs give you the magnitude and phase of the different fourier basis vectors/signals.

In the case of a onedimensional signal, e.g. audio, these basis vectors are complex sinusoids, spinning around the unit circle with different (spatial) frequencies (which are integer multiples of the fundamental frequency) as time advances.

Complex Sinusoid

In the case of an image the basis vectors are twodimensional (complex) planewaves. Now the components can also have different directions. So every pixel in fourier space equals a specific combination of direction and frequency. Put simply, the direction and frequency of a planewave in the spatial domain starting in the upper left corner finishes one full period by the time it reaches the position of the corresponding fourier domain pixel (in the most direct way).

Complex planewave

To model a real-valued sinewave or planewave, two complex basis vectors with frequencies of the same magnitude but negative frequency are superimposed so that their imaginary parts cancel.

Complex planewave with two fourier components, which causes cancellation of imaginary parts

Thies Heidecke
  • 2,497
  • 1
  • 23
  • 25
  • Thank you for the effort with the pictures...cleared up something I actually had my wires crossed with. – Cheetah May 05 '11 at 22:14
2

So you can visualise it better if you parameterise the complex number information to a magnitude and phase value, it respresents the magnitude of the frequency component and phase gives you the position of the component in the image.

Spatial frequency typically refers to change in intensity value when you traverse across pixels. So an edge in your image would have a high spatial frequency due to the sharp change in pixel values

jajo87
  • 1,388
  • 2
  • 11
  • 15
  • By intensity value....I take it you mean, for example, RGB value for each pixel? So the complex number output is just the frequency of each pixel...and you can get the magnitude and phase of that frequency? – Cheetah May 05 '11 at 10:14
  • 1. Intensity value refers to RGB value. Yes, – jajo87 May 05 '11 at 13:18
  • So spatial frequency only related to the spatial domain....but a higher spatial frequency leads to a higher frequency in the Fourier domain....correct? – Cheetah May 05 '11 at 13:55
  • Yes spatial frequency is related to spatial domain. A very high spatial frequency will result in high frequency components in frequency domain with a significant magnitude. Even a low spatial frequency can result in high frequency components but the magnitude would be so low that we can ignore it. – jajo87 May 05 '11 at 17:25
  • By component...you mean sine wave right? – Cheetah May 05 '11 at 21:46
  • Right things are really starting to click...Thank you...I may have more questions later, but I marked you as the "correct". Thanks again. – Cheetah May 05 '11 at 22:12
1

The result is complex because the sinusoids can be a mix of orthogonal sine waves and cosine waves, and a complex number is a mathematically nice way to represent this sine+cosine mix.

Think of a picket fence of evenly spaced pickets across an entire image. The spatial frequency is the number of pickets across the image (horizontally or vertically). Shift the picket fence in the image by half a picket (one quarter of the periodicity) and the fence might switch between looking more like a sine wave to more like a cosine wave. The complex number representation will rotate.

What's it mean? Fourier's surprising theory is that every image (barring some perverse mathematical constructions) can be represented by, or deconstructed into, a bunch of orthogonal spatial frequency sinusoids. (Every image. Not just images of picket fences!) After you convert images to frequencies, you can do all sorts of DSP on them, similar to audio processing or filtering, and then convert back.

hotpaw2
  • 70,107
  • 14
  • 90
  • 153