Image Processing: Understanding DFT Basics

In summary, the DFT tells you the spatial frequency content of an image, and by increasing or decreasing the brightness of the image you can change the power at (0,0) of the DFT.
  • #1
Shadow_7
5
0
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?
 
Physics news on Phys.org
  • #2
Shadow_7 said:
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?

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 traveling 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.
 
  • #3
For more detailed image processing info, check this image sdk site...
 

FAQ: Image Processing: Understanding DFT Basics

What is DFT in image processing?

DFT stands for Discrete Fourier Transform and it is a mathematical tool used in image processing to convert a signal from its original domain (often space or time) to a representation in the frequency domain. This allows for analysis of the frequency components present in an image.

How does DFT work?

DFT works by breaking down an image into its component frequencies and representing them as complex numbers. It then uses a mathematical formula to calculate the magnitude and phase of each frequency component. This process is repeated for all frequencies present in the image.

What are some applications of DFT in image processing?

DFT has many applications in image processing, including image enhancement, image compression, and image filtering. It is also commonly used in image analysis and pattern recognition.

What is the difference between DFT and FFT?

DFT (Discrete Fourier Transform) and FFT (Fast Fourier Transform) are two different algorithms used to calculate the Fourier Transform of a signal. DFT is a more general and slower method, while FFT is a faster and more efficient algorithm that is based on the principles of DFT.

Are there any limitations of DFT in image processing?

One limitation of DFT in image processing is that it assumes the image is periodic, meaning it repeats itself infinitely. This can lead to artifacts in the reconstructed image. Additionally, DFT can be computationally expensive for larger images, making it less practical for real-time image processing applications.

Similar threads

Replies
1
Views
1K
Replies
7
Views
3K
Replies
1
Views
4K
Replies
1
Views
1K
Replies
9
Views
2K
Replies
13
Views
2K
Back
Top