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 ?
Signal Processing Stack Exchange is a question and answer site for practitioners of the art and science of signal, image and video processing. It only takes a minute to sign up.
Sign up to join this communityAssume 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 ?
They perform two different mathematical operations
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)')'$$
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
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.