1
$\begingroup$

Assume we have a matrix x of size (8,8), . As known, FFT(x) performs 1D-FFT transformation, column wise. However, FFT2(x), performs 2D-FFT transformation.

In that case, what's the advantage of using 2D-FFT over 1D-FFT ?

$\endgroup$
  • 2
    $\begingroup$ here You will get the detailed answer of your question. $\endgroup$ – Zeyad_Zeyad Mar 2 at 11:00
  • $\begingroup$ That's a bit like asking: What's the advantage of a hammer over a pair of scissors? It depends: if you need to cut a circle out of a piece of paper, your hammer will not be of use, vice versa for driving in a nail. $\endgroup$ – Florian Mar 2 at 15:47
  • $\begingroup$ The metaphor is closer to a utility knife vs a pair of scissors $\endgroup$ – Laurent Duval Mar 2 at 16:48
3
$\begingroup$

They perform two different mathematical operations

  1. FFT executes a 1-dimensional Discrete Fourier Transform one each column of the input matrix (or the first non-singleton dimension)
  2. FFT2 executes a full 2-dimensional Discrete Fourier Transfrom on the entire matrix.

Which one you want to use depends on your specific application. One is not inherently "better" than the other, they are just two different things. In particular

$$\mathcal{F}_{2D}(X) = \mathcal{F}(\mathcal{F}(X)')'$$

| improve this answer | |
$\endgroup$
  • $\begingroup$ Perfect, I'd just propose you to add the notion of separability $\endgroup$ – Laurent Duval Mar 2 at 14:31
1
$\begingroup$

For 2-d input that is of similar nature in both dimensions (ie spatial pixels) and where you want to achieve something similar in both (eg find low frequency components) you probably want fft2().

As noted above, fft2() is functionally equivalent to doing a 1-d fft on the rows, then another 1-d fft one the resulting columns.

-k

| improve this answer | |
$\endgroup$
1
$\begingroup$

Caveat: @Hilmar's answer is neat, I just offer a talkative version.

A role of Fourier operations on data in any dimension is to provide an alternative (dual) description as "quantity of information" (let us say energy) per "frequency components". And frequency components can be defined in several ways (across each dimension, radially, etc.)

The role of FFTs in general is to perform the above calculations faster (fast, the first F of FFT) than the direct operations, at the expense of a few known side effects.

FFT often describes either the generic concept, or a standard fast Fourier transform in 1 dimension. To keep them faster in more dimensions, they are often implemented in a separable way: using a 1D FFT separably (independently) in each dimension (row, column, depth, etc.). One often call them FFT2 or FFT2D for 2D images (with horizontal and vertical frequencies), or FFT$N$, FFT-$N$D in more dimensions.

| improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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