next up previous
Next: A 2D DFT Example Up: Fourier_Analysis Previous: Physical Meaning of 2DFT

Matrix Form of 2D DFT

Consider the 2D DFT:

\begin{displaymath}
X[k,l] = \frac{1}{\sqrt{N}}\sum_{n=0}^{N-1} [ \frac{1}{\sqr...
...sum_{n=0}^{N-1} w_N[n,l] [ \sum_{m=0}^{M-1} w_M[m,k] x[m,n] ]
\end{displaymath}

where, as defined before

\begin{displaymath}w_M[m,k]\stackrel{\triangle}{=} \frac{1}{\sqrt{M}}e^{-j2\pi m...
...[n,l]\stackrel{\triangle}{=} \frac{1}{\sqrt{N}}e^{-j2\pi nl/N} \end{displaymath}

We further define

\begin{displaymath}X'[k,n]\stackrel{\triangle}{=} \sum_{m=0}^{M-1} w_M[m,k] x[m,n],
\;\;\;(k=0,1,\cdots,M-1) \end{displaymath}

and rewrite the 2D transform as

\begin{displaymath}X[k,l] = \sum_{n=0}^{N-1} w_N[n,l] X'[k,n],
\;\;\;(l=0,1,\cdots,N-1) \end{displaymath}

The above two equations are the two steps for a 2D transform:
  1. Column Transform:

    First consider the expression for $X'[k,n]$. As the summation is with respect to the row index $m$ of $x[m,n]$, the column index $n$ can be treated as a parameter, and the expression is the 1D Fourier transform of the nth column vector of ${\bf x}$, which can be written in column vector (vertical) form for the nth column:

    \begin{displaymath}\left[ \begin{array}{c}X'[0,n]  \cdots  X'[M-1,n]\end{arr...
...c} x[0,n]  \cdots  x[M-1,n]\end{array} \right]_{M\times 1}
\end{displaymath}

    or more concisely

    \begin{displaymath}{\bf X'}_n={\bf W}_M{\bf x}_n,\;\;\;\;(n=0,\cdots,N-1) \end{displaymath}

    i.e., the nth column of ${\bf X'}$ is the 1D FT of the nth column of ${\bf x}$. Putting all $N$ columns together, we have

    \begin{displaymath}[ {\bf X'}_0,\cdots,{\bf X'}_{N-1}]=
{\bf W}_M   [ {\bf x}_0,\cdots,{\bf x}_{N-1} ] \end{displaymath}

    or more concisely

    \begin{displaymath}{\bf X'}= {\bf W}_M   {\bf x} \end{displaymath}

    where ${\bf W}_M$ is a $M$ by $M$ Fourier transform matrix.

  2. Row Transform:

    Now we reconsider the 2DFT expression above

    \begin{displaymath}X[k,l] = \sum_{n=0}^{N-1} w_N[n,l] X'[k,n] \end{displaymath}

    As the summation is with respective to the column index n of $X'[k,n]$, the row index $k$ can be treated as a parameter, and the expression is the 1D Fourier transform of the kth row vector of ${\bf X'}$, which can be written in row vector (horizontal) form for the kth row:

    \begin{displaymath}[ X[k,0], \cdots, X'[k,N-1] ]=[ X'[k,0], \cdots, X'[k,N-1] ]
...
...[n,l] & \cdots  \cdots & \cdots & \cdots \end{array} \right]
\end{displaymath}

    or more concisely

    \begin{displaymath}{\bf X}_k^T= {\bf X'}_k^T {\bf W}_N,\;\;\;\;(k=0,\cdots,M-1) \end{displaymath}

    i.e., the kth row of ${\bf X}$ is the 1D FT of the kth row of ${\bf X'}$. Putting all $M$ rows together, we have

    \begin{displaymath}\left[ \begin{array}{c}
{\bf X}_0^T  . . {\bf X}_{M-1}...
...^T  . . {\bf X'}_{M-1}^T \end{array} \right]
{\bf W}_N
\end{displaymath}

    or more concisely

    \begin{displaymath}{\bf X} = {\bf X'} {\bf W}_N \end{displaymath}

    But as $ {\bf X'} = {\bf W}_M   {\bf x} $, we finally have

    \begin{displaymath}{\bf X} ={\bf W}_M   {\bf x}   {\bf W}_N \end{displaymath}

This expression indicates that 2D DFT can be carried out by 1D transforming all the rows of the 2D signal ${\bf x}$ and then 1D transforming all the columns of the resulting matrix. The order of the steps is not important. The transform can also be carried out by the column transform followed by the row transform.

Similarly, the inverse 2D DFT can be written as

\begin{displaymath}{\bf x}= {\bf W}_M^*   {\bf X}  {\bf W_N}^* \end{displaymath}

It is obvious that the complexity of 2D DFT is $O(N^3)$ (assuming $M=N$), which can be reduced to $O(N^2 log_2 N)$ if FFT is used.


next up previous
Next: A 2D DFT Example Up: Fourier_Analysis Previous: Physical Meaning of 2DFT
Ruye Wang 2003-11-17