Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Homework Help: Image Processing

  1. Mar 20, 2012 #1
    I am trying to understand some really basics of image processing. One of them is the DFT ( Discrte Fourier Tranform). I have seen code segments, read stuff but still I don't get how the image produced is related to the first one. For example, I take an image with vertical black and white stripes, and I get an image (after applying DFT) that has some dots in it. Now how does the mapping works? What do I mean? How does point (1,0) of the first image relates to point (1,0) of the DFT image? How does the mapping works?
  2. jcsd
  3. Mar 21, 2012 #2


    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    You probably already know that any 1D signal that is a function of time (t) can be represented as a sum of sines and cosines (Fourier decomposition), each of which has a frequency measured in 1/s (or Hz). This temporal frequency represents how many full cycles occur per unit of time, or, stated another way, how many cycles you will get through in one second.

    Similarly, any 2D signal (also known as an image) that is a function of position coordinates x and y can be represented as a sum of two orthogonal sets of sines and cosines that represent the frequency components of the image. Each of these components has a spatial frequency kx or ky measured in units of 1/m that represents how many cycles you get per unit of length, or stated another way, how many cycles you will go through in travelling one metre (along either the x-direction or the y-direction). So hopefully this gives you some intuition on what spatial frequency represents. You need high spatial frequency components to represent sharp features in which the signal level changes over a very small area of the image. Broader features that change more gradually (i.e. over longer distances) can be represented using lower spatial frequencies. If you apply a low pass filter that blocks out the higher spatial frequencies, you will not be able to represent the sharper features in the image. The result will be a blurring of the image.

    So, after doing a DFT, the horizontal and vertical coordinate values in the transformed image represent horizontal and vertical spatial frequency axes. So the (0,0) point is the power contained in zero spatial frequency i.e. a constant level. For this reason, this component of the DFT is sometimes called the "DC level" of the image. You can increase or decrease the overall brightness of the image just by changing the value of the DC level ( the value at (0,0) ) of the DFT.

    If you have an image with vertical stripes, you can consider this to be a sine wave oriented in the horizontal direction. In other words, your image only has ONE spatial frequency component, and it is the frequency of the sine wave (which is the inverse of the distance between white stripes or black stripes). If your stripes are spaced at 2 cm apart, then your spatial frequency will be (1 / 2 cm) = 0.5 cm-1. So, in your DFT image, you'll have dots (i.e. pulses or peaks) along the x-axis at ±0.5 i.e. at (0.5,0) and (-0.5,0). The DFT tells you the spatial frequency content of your image. In this case, since your image can be represented using only one spatial frequency, the result is that only two coordinate points in Fourier space have any power.

    The reason why there would be points at both +0.5 and -0.5 is because with an FT you're actually decomposing your image into complex exponentials, rather than sinusoids. As a result, you have both positive and negative spatial frequencies.
  4. Feb 25, 2013 #3
    For more detailed image processing info, check this image sdk site....
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted