2
$\begingroup$

In case of 1-D FFT it is far more easier to find number of harmonics and their Respective frequencies and amplitudes. Lets say if i have 8 points signal the harmonics of it then would be 7 with one DC point i.e,

enter image description here

the harmonics after 4th points would have negative imaginary part as it below the nyquist rate.

but if I've 2D signal of 8x8 Matrix there would be total of 64 harmonics and the Nyquist rate will then be on the 32nd point. Am i right ?

If my above statement is correct, the fractional frequency for the first harmonic then would be ,

0 -> Dc 1st Harmonic - > 1/64 -> 64 samples in 1 cycle

Number of Cycle 1. Number of samples = 64 Sampling rate = 0.015625

What would then be the actual frequency of this Harmonic , I am asking this because i couldn't be able to identify it when i am plotting it on Matlab.

$\endgroup$
3
  • 2
    $\begingroup$ 1. you're assuming that the fundamental is in bin 1, which is only true if it happens to be that specific frequency. 2. I would consider there to be 4 harmonics in that case, not 7. The negative frequencies contribute to the same harmonics as the positive frequencies. 3. remember that the same thing is happening in the n direction as is happening in the k direction. So k = 4 is the Nyquist frequency for y data, but n = 4 is the Nyquist frequency for x data. $\endgroup$
    – endolith
    Oct 1, 2012 at 16:26
  • $\begingroup$ could you please elaborate and tell me how could i find the specific frequenices in those harmonics $\endgroup$ Oct 1, 2012 at 20:49
  • 3
    $\begingroup$ @Efected: Don't even try to do a 2D FFT until you understand the 1D FFT. To understand 1D FFT, do FFTs with more samples, like >100. Try simple sine waves first, of varying frequencies, to see that they produce two spikes in the FFT (positive and negative frequency), and that the location of the spikes varies with the frequency. Then try things like triangle waves or sawtooth waves to see how they produce harmonics, etc. $\endgroup$
    – endolith
    Oct 1, 2012 at 21:46

1 Answer 1

9
+50
$\begingroup$

Your diagram is incorrect. Computing the 2D-FFT of a 8x8 matrix is not the same as computing the 1D-FFT of a 1x64 vector. A 2D-FFT is "probing" your signal with templates which have both an horizontal and vertical frequency. A signal with a low horizontal frequency and a null vertical frequency is a progressive horizontal gradient. A signal whose vertical and horizontal frequency are both the nyquist frequency is a checkerboard pattern...

If you take an image and perform a 2D-FFT on it, you will find in the resulting matrix the following elements:

  • Cell (1, 1): DC component (average of all values in the matrix).
  • Cell (2, 1): first horizontal harmonic; frequency 1/8.
  • Cell (3, 1): second horizontal harmonic; frequency 2/8.
  • Cell (4, 1): third horizontal harmonic; frequency 3/8.
  • Cell (5, 1): fourth horizontal harmonic; frequency 4/8 (Nyquist).
  • Cell (6, 1): third horizontal negative freq. harmonic; frequency -3/8.
  • Cell (7, 1): second horizontal negative freq. harmonic; frequency -2/8.
  • Cell (8, 1): first horizontal negative freq. harmonic; frequency -1/8.
  • Cell (1, 2): first vertical harmonic; frequency 1/8.
  • Cell (1, 3): second vertical harmonic; frequency 2/8. ...
  • Cell (5, 5): fourth horizontal/vertical harmonic (Checkerboard pattern). ...

A good way to visualize this is to compute the 2D IFFT of a single pixel at each of the 64 positions of the matrix, and look at the real part.

2D-FFT of a 8x8 matrix

$\endgroup$
4
  • $\begingroup$ why my diagram is incorrect, actually it isn't mine , have a look here, katjaas.nl/fourier/fourier.html and also how can i plot and clearly see those frequency like we do for 1D signal as mentioned here, codeproject.com/Articles/317054/… $\endgroup$ Oct 6, 2012 at 10:59
  • $\begingroup$ This diagram is related to 1D FFT. It describes the 8x8 matrix which can be used to compute the 1D Discrete Fourier Transform of a 8x1 column vector. It does not explain what is happening when you perform a 2D FFT. $\endgroup$ Oct 6, 2012 at 11:48
  • 1
    $\begingroup$ What you are interested in is 2D-FFT, right? Then the operation is not a matrix multiplication but a higher-order tensor multiplication. What I have posted is the interpretation of the 8x8 coefficients that you will get by performing a 2D-FFT on a 8x8 matrix. $\endgroup$ Oct 6, 2012 at 11:49
  • $\begingroup$ A 1D DFT decomposes your signal into a sum of 1D signals. Similarly a 2D DFT decomposes your signal into a sum of 2D signals - that's why they are characterized by 2 frequencies. These are the signals I have plotted in my answer. These are not 1D functions; but 2D signals (matrices/images). $\endgroup$ Oct 6, 2012 at 11:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.