Digital images, Fourier Transformation




    In order to be analysed, a signal need to be digitized, i.e. represented as a sequence of numbers (real, integer... values) as a function of time, position etc.
In the present illustration, the reference signal is a digital photograph of statue from the 'Avenue of the Chinese Musicians, Allerton Park, University of Illinois at Urbana-Champaign, IL, USA (2004) :


 256*256 pixels digital photograph

 8 bits gray scale
(allowing to code 28=256
different gray levels)



This image can be seen as an array of 256*256 cells (pixels), each containing an integer number comprised between 0 (black) and 255 (white) coding for the corresponding gray level :


 Value of the integer coding the gray level:             0                                   128                                  255


    In a first step, for simplification consider a second image also in 8 bits gray scale but composed only of 4*4 pixels, each identified by their row m and column n numbers:
   
m\n 0 1 2 3
0
1
2
3
m\n 0 1 2 3
0 127 46 255 241
1 176 179 70 241
2 183 5 190 243
3 196 157 136 94
     Gray scale image                                                                                Pixels values

Then, when digitized, this image is the array I(n,m), with n the column number and m the row number (e.g.  I(2,0)=255).

The Fourier Transform (noted FT) of this N*N pixels images (here N=4) is:


where h and k are two integers from -N/2 à N/2-1.

The inverse tranformation (Inverse Fourier Transform) allowing to form back the original image is:



    Often the original signal I(n,m) is real (and we will limit ourself to such signals), and this implies a symmetry in its Fourier Transform F(h,k). Indeed:




    The Fourier Transform F(h,k) of the image I(n,m) is usually displayed as an array F(h,k) of N*N pixels containing complex numbers, named the Fourier Coefficients of the image I(n,m) :

k\h -2 -1 0 1
-2 313
+0i
-301
+434i
41
+0i
-301
-434i
-1 -30
+255i
4
-89i
48
-83i
-246
-3i
0 127
+0i
31
+432i
2539
+0i
31
-432i
1 -30
-255i
-246
+3i
48
+83i
4
+89i


    Each of these cartesian (x+iy) complex numbers can be written on polar form |F(h,k)|.ei.φ(h,k), where |F(h,k)| is the modulus and φ(h,k) the phase of the Fourier coefficient F(h,k), leading to a graphical representation of the Fourier Transform through gray scale maps of moduli and phases:

k\h -2 -1 0 1
-2
-1
0
1
k\h -2 -1 0 1
-2
-1
0
1
Moduli of the Fourier coefficients. Black (white) codes for a low (high) modulus. Symmetry of the moduli is visible around (h,k)=(0,0) Phases of the Fourier coefficients. Black (white) codes for  -π( π) phase.  Antisymmetry of the phases is visible around (h,k)=(0,0)


The diplay of the Fourier Transform is centered around F(h=0,k=0) (due to the symmetry F(-h,-k)=F*(h,k)). The central coefficent F(h=0,k=0) is particular since it is always a real value and is equal to the sum of the pixel values of I(n,m) image: 
 
Fourier coefficients in first column and row k=-2 and h=-2 are also particuliar since they correspond to the highest possible absolute values of the h and k indices. In order to work with arrays of same sizes for the image and its Fourier Transform only the coefficients with k and K negative are displayed (here column h=-2 and row k=-2).

Note : with the definition of the Fourier Transform we used here N should be a even number (h have to be an integer ranging from N/2 to N/2-1), and in order to use the software employed to make the illustrations in these pages (DigitalMicrograph @ Gatan; Fast Fourier Transform) N should be equal to 2j with j another integer.