TITLE: The mathematics behind Fourier Transform for Image Processing
QUESTION [5 upvotes]: I am following http://homepages.inf.ed.ac.uk/rbf/HIPR2/fourier.htm . I understand the application of Fourier Transform behind Image Processing, but right now, I am curious about the mathematics behind it, and it is giving me a bit of a hard time.
For example:

In this formula, where do all these equations come from? Could somebody please elaborate the mathematics behind the scene in layman's term?

REPLY [2 votes]: The discrete Fourier transform (which is a function from $\mathbb C^N$ to $\mathbb C^N$) simply changes basis, to a special basis known as the discrete Fourier basis.
And what's so special about this basis?  It's a basis of eigenvectors for the shift operator $S$, which maps $\begin{bmatrix} x_0 & x_1 & x_2 &\ldots & x_{N-1} \end{bmatrix}^T$ to $\begin{bmatrix} x_{N-1} & x_0 & x_1& \ldots & x_{N-2} \end{bmatrix}^T$.
Each basis vector is constructed by taking an $N$th root of unity $\omega$ and forming the vector $v = \begin{bmatrix} 1 & \omega & \omega^2 & \ldots & \omega^{N-1} \end{bmatrix}^T$.  It's easy to check that $v$ is an eigenvector of $S$:
\begin{align*}
S(v) &= \begin{bmatrix} \omega^{N-1} & 1 & \omega & \ldots & \omega^{N-2} \end{bmatrix}^T \\
&= \omega^{-1} v.
\end{align*}
We have one discrete Fourier basis vector for each $N$th root of unity.
Because $S$ is unitary (it clearly preserves norms), we have that $S$ is normal, so there is an orthonormal basis of eigenvectors for $S$.  This explains why the discrete Fourier basis (once normalized) is orthonormal and why the discrete Fourier transform preserves norms.
Any convolution operator on $\mathbb C^N$ can be expressed as a linear combination of powers of $S$.  This explains why the discrete Fourier basis diagonalizes any convolution operator on $\mathbb C^N$.
The 2D discrete Fourier transform is analogous.  We have two shift operators on $\mathbb C^{M \times N}$, $S_1$ (which shifts each row to the right) and $S_2$ (which shifts each column down).  $S_1$ and $S_2$ are normal operators and they commute, so there is an orthonormal basis of eigenvectors that simultaneously diagonalizes $S_1$ and $S_2$.  This gives us the 2D discrete Fourier basis.