SlideShare une entreprise Scribd logo
1  sur  139
Télécharger pour lire hors ligne
PRACTICING FOURIER 
ANALYSIS WITH DIGITAL 
IMAGES 
MASTERS IN COMPUTER VISION 
Frédéric Morain-Nicolier 
frederic.nicolier@univ-reims.fr 
2014
1. INTRODUCTION 1.1. WHO IS IT ? 
CONTENTS 
1. INTRODUCTION 
1.1 Who is it ? 
1.2 Outline 
1.3 References 
2. FOURIER AND ITS 
REPRESENTATIONS 
3. UNDERSTANDING THE 
FOURIER ANALYSIS 
4. FOURIER ANALYSIS 
APPLICATIONS 
2 / 139
1. INTRODUCTION 1.1. WHO IS IT ? 
WHO IS IT ? 
3 / 139
1. INTRODUCTION 1.1. WHO IS IT ? 
CONTACT INFORMATIONS 
Frédéric Morain-Nicolier 
I http://pixel-shaker.fr 
I frederic.nicolier@univ-reims.fr 
I Dept Geii, IUT Troyes, 9 rue de Québec, 10026 Troyes 
Cedex 
I Phone : 03 25 42 71 68 
4 / 139
1. INTRODUCTION 1.2. OUTLINE 
CONTENTS 
1. INTRODUCTION 
1.1 Who is it ? 
1.2 Outline 
1.3 References 
2. FOURIER AND ITS 
REPRESENTATIONS 
3. UNDERSTANDING THE 
FOURIER ANALYSIS 
4. FOURIER ANALYSIS 
APPLICATIONS 
5 / 139
1. INTRODUCTION 1.2. OUTLINE 
OUTLINE 
I Fourier and its representations 
I Understanding the Fourier Analysis 
I Fourier Analysis Applications 
(Focusing on Magnitude and Phase) 
6 / 139
1. INTRODUCTION 1.3. REFERENCES 
CONTENTS 
1. INTRODUCTION 
1.1 Who is it ? 
1.2 Outline 
1.3 References 
2. FOURIER AND ITS 
REPRESENTATIONS 
3. UNDERSTANDING THE 
FOURIER ANALYSIS 
4. FOURIER ANALYSIS 
APPLICATIONS 
7 / 139
1. INTRODUCTION 1.3. REFERENCES 
WEB 
I Earl F. Glynn - Research Notes 
http://research.stowers-institute.org/efg 
I Nicolas Thome - Introduction to Image Processing 
http://webia.lip6.fr/~thomen/Teaching/BIMA.html 
8 / 139
1. INTRODUCTION 1.3. REFERENCES 
BOOKS 
I D.W. Kammler, A first course in Fourier analysis, 
Cambridge University Press, 2008. 
I Jean Dhombres et Jean-Bernard Robert, Fourier, créateur de 
la physique mathématique, collection “Un savant, une 
époque”, Belin, 1998. 
9 / 139
1. INTRODUCTION 1.3. REFERENCES 
ARTICLES 
I Q. Chen, M. Defrise and F. Deconinck, "Symmetric phase-only 
matched filtering of Fourier-Mellin transforms for image 
registration and recognition", IEEE pattern analysis and machine 
intelligence, vol. 16, 1994, p. 1156-1168. 
I Van des Schaaf A., Van Hateren J., "Modelling the Power Spectra 
of Natural Images : Statistics and Information", Vision Research, 
vol. 36, n°17, p. 2759-2770, 1996 
I Y. Shapiro, and M. Porat, “Image Representation and 
Reconstruction from Spectral Amplitude or Phase,” in IEEE 
International Conference on Electronics, Circuits and Systems 
1998, Lisboa, Portugal, 1998, pp. 461-464 
I F. Nicolier, O. Laligant, F. Truchetet. Discrete wavelet transform 
implementation in fourier domain. Journal of Electronic 
Imaging, 11(3) :338–346, jul 2002 
I N. Skarbnik, The Importance of Phase in Image Processing, 
CCIT Report, 2010 
10 / 139
2. FOURIER AND ITS REPRESENTATIONS 2.1. FOURIER 
CONTENTS 
1. INTRODUCTION 
2. FOURIER AND ITS 
REPRESENTATIONS 
2.1 Fourier 
2.2 Fourier Series and Transform 
2.3 Discrete Fourier Transform 
2.4 Fast Fourier Transform 
2.5 2D DFT 
3. UNDERSTANDING THE 
FOURIER ANALYSIS 
4. FOURIER ANALYSIS 
APPLICATIONS 
11 / 139
2. FOURIER AND ITS REPRESENTATIONS 2.1. FOURIER 
Joseph Fourier 12 
WHO IS FOURIER ? 
1768 (né à Auxerre) - 1830 
Participe à la révolution 
1798 : campagne d’Égypte 
1802 : préfet de l’Isère (destitué à la 
restauration) 
1817 : élu membre de l’Académie des 
Sciences 
1822 : secrétaire perpétuel de l’AS 
1826 : membre de l’Académie française 
1822 : publication de la «théorie analytique 
de la chaleur» 
Jean Dhombres et Jean-Bernard Robert, 
Fourier, créateur de la physique mathématique, 
collection « Un savant, une époque », Belin 
1998), ISBN 2-7011-1213-3. 
septembre 2010 
Jean Baptiste Joseph Fourier (1768-1830) 
I 1768 (born in Auxerre) - 1830 
I Active in French revolution 
I 1798 : Napoleon’s Egypt Campaign 
12 / 139
2. FOURIER AND ITS REPRESENTATIONS 2.1. FOURIER 
WHO IS FOURIER ? 
Where is Auxerre ? 
13 / 139
2. FOURIER AND ITS REPRESENTATIONS 2.1. FOURIER 
WHO IS FOURIER ? 
I 1802 : préfet de l’Isère (dismissed during restauration) 
I On the Propagation of Heat in Solid Bodies, was read to Paris 
Institute on 21 dec 1807. Laplace and Lagrange objected to 
what is now Fourier series : “... his analysis ... leaves 
something to be desired on the score of generality and even 
rigour...” (from report awarding Fourier math prize in 1811) 
14 / 139
2. FOURIER AND ITS REPRESENTATIONS 2.1. FOURIER 
WHO IS FOURIER ? 
I 1802 : préfet de l’Isère (dismissed during restauration) 
I 1817 : member of Académie des Sciences 
I 1822 : perpetual secretary of A.S. 
I 1826 : membre de Académie Française 
I 1822 : publication of La théorie analytique de la chaleur 
(Analytic Theory of Heat) 
15 / 139
2. FOURIER AND ITS REPRESENTATIONS 2.1. FOURIER 
WHO IS FOURIER ? 
I In La Théorie Analytique de la Chaleur (Analytic Theory of 
Heat) (1822), Fourier 
I developed the theory of the series known by his name, 
I and applied it to the solution of boundary-value problems 
in partial differential equations. 
Good Book (in french !) : Jean Dhombres et Jean-Bernard 
Robert, Fourier, créateur de la physique mathématique, collection 
“Un savant, une époque”, Belin, 1998. 
16 / 139
2. FOURIER AND ITS REPRESENTATIONS 2.2. FOURIER SERIES AND TRANSFORM 
CONTENTS 
1. INTRODUCTION 
2. FOURIER AND ITS 
REPRESENTATIONS 
2.1 Fourier 
2.2 Fourier Series and Transform 
2.3 Discrete Fourier Transform 
2.4 Fast Fourier Transform 
2.5 2D DFT 
3. UNDERSTANDING THE 
FOURIER ANALYSIS 
4. FOURIER ANALYSIS 
APPLICATIONS 
17 / 139
2. FOURIER AND ITS REPRESENTATIONS 2.2. FOURIER SERIES AND TRANSFORM 
FOURIER 3c)T RPArNoSFpOaRgMa:tWioHYn? de la chaleur 40 
18 / 139
2. FOURIER AND ITS REPRESENTATIONS 2.2. FOURIER SERIES AND TRANSFORM 
HEAT PROPAGATION 
I The temperature u(x, t) at time t  0 and coordinate x is a 
solution of the partial differential equation (PDE) : 
¶u 
¶t 
(x, t) = a2 ¶2u 
¶x2 (x, y) (2.1) 
(a2 is the thermal diffusivity of the material). 
I Fourier observed that 
e2pisx.e4p2a2s2t (2.2) 
satisfies the PDE for every choice of s. Its idea was to combine 
such elementary solutions. 
19 / 139
2. FOURIER AND ITS REPRESENTATIONS 2.2. FOURIER SERIES AND TRANSFORM 
HEAT PROPAGATION : SOLUTION 
I Fourier wrote the solution as 
u(x, t) = 
Z ¥ 
¥ 
A(s)e2pisxe4p2a2s2tds. (2.3) 
The function A(s) is needed : as the initial temperature is 
known, 
u(x, 0) = 
Z ¥ 
¥ 
A(s)e2pisxds (we recognize the synthesis equation). 
(2.4) 
I A(s) can be computed from 
A(s) = 
Z ¥ 
¥ 
u(x, 0)e2pisxdx. (2.5) 
20 / 139
2. FOURIER AND ITS REPRESENTATIONS 2.2. FOURIER SERIES AND TRANSFORM 
FOURIER SERIES 
I Is only defined on periodic signals : 
x(t + T) = x(t) 
f (t + T) = f (t). (2.6) 
I The fundamental period T0 is the smallest T satisfying (2.6). 
Fundamental frequency f0 and angular frequency w0 are : 
= 2pf0. (2.7) 
6 
Periodic Signals 
-2 -1 0 1 2 
“Biological” Time Series 
T0 
0 π 2 π 3π 2 2π 3π 4π 
t 
x(t) 
(Source : Earl F. Glynn - Research Notes) 
w0 = 
2p 
T0 
Biological time series can be quite complex, and will contain noise. 
21 / 139
2. FOURIER AND ITS REPRESENTATIONS 2.2. FOURIER SERIES AND TRANSFORM 
FOURIER SERIES : REAL COEFFICIENTS 
Expansion of continuous function into weighted sum of sines 
and cosines. 
I A P0-periodic function f , defined on R can be written as 
f (t) = a0 + 
¥å k=1 
(ak cos(kw0t) + bk sin(kw0t)) (2.8) 
with 
a0 = 
1 
P0 
Z 
P0 
f (t)dt, (2.9) 
ak = 
2 
P0 
Z 
P0 
f (t) cos(kwt)dt, (2.10) 
bk = 
2 
P0 
Z 
P0 
f (t) sin(kwt)dt. (2.11) 
22 / 139
2. FOURIER AND ITS REPRESENTATIONS 2.2. FOURIER SERIES AND TRANSFORM 
FOURIER SERIES : AN EXAMPLE 
(Source : http://www.science.org.au/nova/029/029img/wave1.gif) 
23 / 139
2. FOURIER AND ITS REPRESENTATIONS 2.2. FOURIER SERIES AND TRANSFORM 
FOURIER SERIES : COMPLEX COEFFICIENTS 
IWith complex coefficients : 
f (t) = 
¥å 
k=¥ 
ckeikw0t (2.12) 
where 
ck = 
1 
P0 
Z 
P0 
f (t)eikw0tdt. (2.13) 
I If f (t) is real, ck = ck . 
I For k = 0, ck = average value of f (t) over one period. 
I a0/2 = c0 ; ak = ck + ck ; bk = i(ck  ck) 
24 / 139
2. FOURIER AND ITS REPRESENTATIONS 2.2. FOURIER SERIES AND TRANSFORM 
FOURIER SERIES : COMPLEX COEFFICIENTS 
f (t) = 
¥å 
k=¥ 
ckeikw0t 
I Coefficients can be written as 
ck = jckjeifk (keep this in mind). (2.14) 
I ck are the spectral coefficients of f . 
I Plot of jckj vs angular frequency w is the Magnitude 
spectrum. 
I Plot of fk vs w is the phase spectrum. 
I With discrete Fourier frequencies (kw0), both are discrete 
spectra. 
25 / 139
2. FOURIER AND ITS REPRESENTATIONS 2.2. FOURIER SERIES AND TRANSFORM 
FOURIER SERIES : OTHER EXAMPLES 
Given a p-periodic x(t) = t, its Fourier serie is 
x(t) = 2 
 
sin t  
sin 2t 
2 
sin 3 
=  − + − ... 
+ 
sin 3t 
3  . . . 
 
. (2.15) 
 
 
 
sin 2 
Given: x(t) = t Fourier Series: 
14 
Fourier Series 
sin 3 
=  − + − ... 
sin 3 
=  − + − ... 
selected 
 
 
 sin 2 
sin 3 
= − + −  
... 
 
sin 2 
sin 3 
=  − + − ... 
Given: x(t) = t Fourier Series: 
sin 2 
Given: x(t) = t Fourier Series: 
1 
2 
3 
1 
2 
3 
4 
5 6 
sin 2 
4 
5 6 
Approximate any function as truncated Fourier series 
 
3 
2 
( ) 2 sin 
t t 
x t t 
 
 
3 
2 
( ) 2 sin 
t t 
x t t 
-1.0 -0.5 0.0 0.5 1.0 1.5 2.0 
Fourier Terms in Expansion of x(t) = t 
t 
Fourier Terms 
0 π 4 π 2 3π 4 π 
Fourier Series Approximation 
t 
x(t) 
First Six Series Terms 
 
0 π 4 π 2 3π 4 π 
0 1 2 3 
14 
Fourier Series 
selected 
Approximate any function as truncated Fourier series 
 
3 
2 
( ) 2 sin 
t t 
x t t 
 
 
3 
2 
( ) 2 sin 
t t 
x t t 
-1.0 -0.5 0.0 0.5 1.0 1.5 2.0 
Fourier Terms in Expansion of x(t) = t 
t 
Fourier Terms 
0 π 4 π 2 3π 4 π 
Fourier Series Approximation 
t 
x(t) 
First Six Series Terms 
0 π 4 π 2 3π 4 π 
0 1 2 3 
Fourier Series 
=  − + − 3 
selected 
sin 2 
Approximate any function as truncated Fourier series 
 
3 
2 
( ) 2 sin 
t t 
x t t 
 
sin 3 
2 
( ) 2 sin 
t t 
x t t 
Fourier Series Approximation 
t 
x(t) 
0 π 4 π 2 3π 4 π 
0 1 2 3 
100 terms 
200 terms 
(Source : Earl F. Glynn - Research Notes) 
(show animations) 
26 / 139
2. FOURIER AND ITS REPRESENTATIONS 2.2. FOURIER SERIES AND TRANSFORM 
(CONTINUOUS) FOURIER TRANSFORM 
I A non-periodic function, defined on R, can be synthesized 
with 
f (t) = 
1 
2p 
Z +¥ 
¥ 
F(w)eiwtdw. (2.16) 
I The analysis equation being 
F(w) = 
Z +¥ 
¥ 
f (t)eiwtdt. (2.17) 
(Beware to convergence conditions - Gibbs - see Dirichlet theorem) 
27 / 139
2. FOURIER AND ITS REPRESENTATIONS 2.2. FOURIER SERIES AND TRANSFORM 
(CONTINUOUS) FOURIER TRANSFORM : MAIN 
PROPERTIES 
18 
Fourier Transform 
Properties of the Fourier Transform 
(Source : Wikipedia) 
From http://en.wikipedia.org/wiki/Continuous_Fourier_transform 
Also see Schaum’s Theory and Problems: Signals and Systems, Hwei P. Hsu, 1995, pp. 219-223 
28 / 139
2. FOURIER AND ITS REPRESENTATIONS 2.2. FOURIER SERIES AND TRANSFORM 
(CONTINUOUS) FOURIER TRANSFORM : MAIN 
PROPERTIES 
Important properties (for this course) : 
I Shift theorem : 
g(t  a)   eiawG(w). (2.18) 
I Scaling : 
g(at)   1 
jaj 
G( 
w 
a 
). (2.19) 
I Convolution theorem : 
(g  h)(t)   G(w)H(w). (2.20) 
29 / 139
2. FOURIER AND ITS REPRESENTATIONS 2.3. DISCRETE FOURIER TRANSFORM 
CONTENTS 
1. INTRODUCTION 
2. FOURIER AND ITS 
REPRESENTATIONS 
2.1 Fourier 
2.2 Fourier Series and Transform 
2.3 Discrete Fourier Transform 
2.4 Fast Fourier Transform 
2.5 2D DFT 
3. UNDERSTANDING THE 
FOURIER ANALYSIS 
4. FOURIER ANALYSIS 
APPLICATIONS 
30 / 139
2. FOURIER AND ITS REPRESENTATIONS 2.3. DISCRETE FOURIER TRANSFORM 
DISCRETE FOURIER TRANSFORM 
As a digital image is a discrete 2D signal, a discrete version of 
FT is needed. The previous definitions are adapted. 
I A discrete signal s[n] is N-periodic if s[n + N] = s[n]. 
I Fundamental period N0 is the smallest N satisfying above 
equation. 
I Fundamental angular frequency is W0 = 2p 
N0 
. 
31 / 139
2. FOURIER AND ITS REPRESENTATIONS 2.3. DISCRETE FOURIER TRANSFORM 
DISCRETE FOURIER TRANSFORM (DFT) : DEFINITION 
I A discrete signal s[n], n = 0, 1, . . . ,N  1, can be analyzed 
with 
S[k] = DFTfs[n]g = 
N1 
å 
n=0 
s[n]ei2pkn/N. (2.21) 
with k = 0, 1, . . . ,N  1 
I The inverse DFT (IDFT = DFT1 = synthesis equation) is 
s[n] = IDFTfS[k]g = 
1 
N 
N1 
å 
k=0 
S[k]ei2pkn/N. (2.22) 
32 / 139
2. FOURIER AND ITS REPRESENTATIONS 2.3. DISCRETE FOURIER TRANSFORM 
DISCRETE FOURIER TRANSFORM (DFT) 
I One-to-one correspondence between s[n] and S[k] 
I DFT closely related to discrete Fourier series and the 
Fourier Transform 
I DFT is ideal for computer manipulation 
I Share many of the same properties as Fourier Transform 
I Multiplier 1N 
can be used in DFT or IDFT. Sometimes 1 pN 
used in both. 
I Remember that FT (and therefore DFT) is defined on 
periodic signals. 
33 / 139
2. FOURIER AND ITS REPRESENTATIONS 2.4. FAST FOURIER TRANSFORM 
CONTENTS 
1. INTRODUCTION 
2. FOURIER AND ITS 
REPRESENTATIONS 
2.1 Fourier 
2.2 Fourier Series and Transform 
2.3 Discrete Fourier Transform 
2.4 Fast Fourier Transform 
2.5 2D DFT 
3. UNDERSTANDING THE 
FOURIER ANALYSIS 
4. FOURIER ANALYSIS 
APPLICATIONS 
34 / 139
2. FOURIER AND ITS REPRESENTATIONS 2.4. FAST FOURIER TRANSFORM 
FAST FOURIER TRANSFORM 
X[k] = 
N1 
å 
n=0 
x[n]ei2pkn/N. (2.23) 
I The FFT is a computationally efficient algorithm to 
compute the Discrete Fourier Transform and its inverse. 
I Evaluating the sum above directly would take O(N2) 
arithmetic operations. 
35 / 139
2. FOURIER AND ITS REPRESENTATIONS 2.4. FAST FOURIER TRANSFORM 
FAST FOURIER TRANSFORM 
X[k] = 
N1 
å 
n=0 
x[n]ei2pkn/N, (2.24) 
N = ei kwn 
Wkn 
N ) X[k] = 
N1 
å 
n=0 
x[n]Wkn 
N . (2.25) 
Butterfly algorithm 
36 / 139
2. FOURIER AND ITS REPRESENTATIONS 2.4. FAST FOURIER TRANSFORM 
FAST FOURIER TRANSFORM 
I The FFT algorithm reduces the computational burden to 
O(NlogN) arithmetic operations. 
I FFT requires the number of data points to be a power of 2 
(usually 0 padding is used to make this true) 
I FFT requires evenly-spaced time series 
I Even faster FFT with sparse signals (SFFT : Sparse FFT) 
37 / 139
2. FOURIER AND ITS REPRESENTATIONS 2.5. 2D DFT 
CONTENTS 
1. INTRODUCTION 
2. FOURIER AND ITS 
REPRESENTATIONS 
2.1 Fourier 
2.2 Fourier Series and Transform 
2.3 Discrete Fourier Transform 
2.4 Fast Fourier Transform 
2.5 2D DFT 
3. UNDERSTANDING THE 
FOURIER ANALYSIS 
4. FOURIER ANALYSIS 
APPLICATIONS 
38 / 139
Spatial 2. FOURIER Frequency in Images 
AND ITS REPRESENTATIONS 2.5. 2D DFT 
SPATIAL FREQUENCIES 
33 
Frequency = 1 Frequency = 2 
1 Cycle 
2 Cycles 
(Source : Earl F. Glynn - Research Notes) 
39 / 139
2. FOURIER AND ITS REPRESENTATIONS 2.5. 2D DFT 
DFT ON IMAGE 
F[u, v] = 
1 
MN 
M1 
å 
m=0 
N1 
å 
n=0 
I[m, n]ei2p(umM 
+v nN 
) (2.26) 
34 
2D Discrete Fourier Transform 
− 
− 
1 
1 
M 
N 
F u v π 
Σ Σ 
1 
I m n e 
= ⋅ 
= 
= 
0 
0 
[ , ] 
n 
Fourier 
Transform 
um 
−  + 
 
vn 
N 
M 
(0,N/2) 
(0,0) 
 
 
2 
i 
(-M/2,0) (M/2,0) 
[ , ] 
m 
MN 
M pixels 
SM units 
I[m,n] F[u,v] 
(0,-N/2) 
(M,N) 
Spatial Domain Frequency Domain 
(Source : Earl F. Glynn - Research Notes) 
Source: Seul et al, Practical Algorithms for Image Analysis, 2000, p. 249, 262. 
(0,0) 
N pixels 
SN units 
2D FFT can be computed as two discrete Fourier transforms in 1 dimension 
40 / 139
2. FOURIER AND ITS REPRESENTATIONS 2.5. 2D DFT 
DFT ON IMAGE 
I Separable implementation : 
2D DFT (or FFT) is computed as two stages of 1D discrete 
Fourier transforms (matlab : fft2). 
I Ix Ixy 
(process on columns) (process on lines) 
41 / 139
3. UNDERSTANDING THE FOURIER ANALYSIS 3.1. READING THE 2D-DFT 
CONTENTS 
1. INTRODUCTION 
2. FOURIER AND ITS 
REPRESENTATIONS 
3. UNDERSTANDING THE 
FOURIER ANALYSIS 
3.1 Reading the 2D-DFT 
3.2 Magnitude and Phase Spectra 
3.3 Translation and Rotation in 
Fourier Domain 
3.4 Magnitude and Phase 
Information 
3.5 Magnitude and Phase 
Reconstruction 
4. FOURIER ANALYSIS 
APPLICATIONS 
42 / 139
3. UNDERSTANDING THE FOURIER ANALYSIS 3.1. READING THE 2D-DFT 
WHERE IS THE INFORMATION ? 
35 
2D Discrete Fourier Transform 
Fourier 
Transform 
(-M/2,0) (M/2,0) 
I[m,n] F[u,v] 
Spatial Domain Frequency Domain 
(0,0) 
(0,0) 
(0,N/2) 
(0,-N/2) 
(M,N) 
M pixels 
SM units 
N pixels 
SN units 
Edge represents highest frequency, 
smallest resolvable length (2 pixels) 
Center represents lowest frequency, 
which represents average pixel value 
(Source : Earl F. Glynn - Research Notes) 
43 / 139
3. UNDERSTANDING THE FOURIER ANALYSIS 3.1. READING THE 2D-DFT 
EXAMPLE 1 
36 
2D FFT Example 
FFTs Using ImageJ 
ImageJ Steps: (1) File | Open, (2) Process | FFT | FFT 
(0,0) Origin (0,0) Origin 
(Source : Earl F. Glynn - Research Notes) 
Image 2D-DFT (Magnitude) 
Spatial Domain Frequency Domain 
44 / 139
3. UNDERSTANDING THE FOURIER ANALYSIS 3.1. READING THE 2D-DFT 
EXAMPLE - SWAPPING THE QUADRANTS 
37 
2D FFT Example 
FFTs Using ImageJ 
ImageJ Steps: Process | FFT | Swap Quadrants 
(0,0) Origin 
(0,0) Origin 
Default d (Source : Earl F. Glynn - Research Notesis)play is to swap quadrants 
Image 2D-DFT (Magnitude) 
Spatial Domain Frequency Domain 
(matlab : fftshift) 
Regularity in image manifests itself in the degree of order or randomness in FFT pattern. 
45 / 139
3. UNDERSTANDING THE FOURIER ANALYSIS 3.1. READING THE 2D-DFT 
TOY EXAMPLES 
170 The Fourier transform 
Figure 7.1 Examples of Fourier magnitude images (right column) of images containing only 
sinusoids (left and middle column). Axes have been added for clarity. See text for details. 
(Source : Introduction to Image Processing - Univ. Utrecht) 
46 / 139
3. UNDERSTANDING THE FOURIER ANALYSIS 3.1. READING THE 2D-DFT 
REAL EXAMPLE 
Image 2D-DFT (Magnitude) 
38 
2D FFT Example 
FFTs Using ImageJ 
ImageJ Steps: (1) File | Open, (2) Process | FFT | FFT 
Overland Park Arboretum and Botanical Gardens, June 2006 
(Source : Earl F. Glynn - Research Notes) 
Spatial Domain Frequency Domain 
Regularity in image manifests itself in the degree of order or randomness in FFT pattern. 
47 / 139
3. UNDERSTANDING THE FOURIER ANALYSIS 3.1. READING THE 2D-DFT 
REAL EXAMPLES 
7.1 The relation between digital images and sinusoids 171 
Figure 7.2 Examples of Fourier magnitude images (right column) of real images (left column). 
The top example is of a binary image, the other images are grey-valued. See text for details. 
(Source : Introduction to Image Processing - Univ. Utrecht) 
48 / 139
3. UNDERSTANDING THE FOURIER ANALYSIS 3.2. MAGNITUDE AND PHASE SPECTRA 
CONTENTS 
1. INTRODUCTION 
2. FOURIER AND ITS 
REPRESENTATIONS 
3. UNDERSTANDING THE 
FOURIER ANALYSIS 
3.1 Reading the 2D-DFT 
3.2 Magnitude and Phase Spectra 
3.3 Translation and Rotation in 
Fourier Domain 
3.4 Magnitude and Phase 
Information 
3.5 Magnitude and Phase 
Reconstruction 
4. FOURIER ANALYSIS 
APPLICATIONS 
49 / 139
3. UNDERSTANDING THE FOURIER ANALYSIS 3.2. MAGNITUDE AND PHASE SPECTRA 
MAGNITUDE AND PHASE SPECTRA 
The DFT coefficients are complex numbers : 
I Magnitude spectrum is generally considered the most 
readable 
I Phase spectrum is intricated 
50 / 139
3. UNDERSTANDING THE FOURIER ANALYSIS 3.2. MAGNITUDE AND PHASE SPECTRA 
AN EXAMPLE 
1 
0.8 
0.6 
0.4 
0.2 
0 
f 
50 100 150 200 250 
50 
100 
150 
200 
250 
x 104 
3 
2.5 
2 
1.5 
1 
0.5 
50 100 150 200 250 
50 
100 
150 
200 
3 
2 
1 
0 
−1 
−2 
250 −3 
Magnitude : kFk Phase : f(F) 
51 / 139
3. UNDERSTANDING THE FOURIER ANALYSIS 3.2. MAGNITUDE AND PHASE SPECTRA 
ANOTHER EXAMPLE 
1 
0.8 
0.6 
0.4 
0.2 
0 
f 
50 100 150 200 250 
50 
100 
150 
200 
250 
x 104 
3.5 
3 
2.5 
2 
1.5 
1 
0.5 
50 100 150 200 250 
50 
100 
150 
200 
3 
2 
1 
0 
−1 
−2 
250 −3 
Magnitude : kFk Phase : f(F) 
52 / 139
3. UNDERSTANDING THE FOURIER ANALYSIS 3.2. MAGNITUDE AND PHASE SPECTRA 
MAGNITUDE SPECTRUM 
1 
0.8 
0.6 
0.4 
0.2 
0 
50 100 150 200 250 
50 
100 
150 
200 
250 
x 104 
3.5 
3 
2.5 
2 
1.5 
1 
0.5 
I F[0, 0] (at the center) contains the mean value of the image 
F[u, v] = 
1 
MN 
M1 
å 
m=0 
N1 
å 
n=0 
I[m, n]ei2p(umM 
+v nN 
) (3.1) 
) F[0, 0] = 
1 
MN 
M1 
å 
m=0 
N1 
å 
n=0 
I[m, n] (3.2) 
53 / 139
3. UNDERSTANDING THE FOURIER ANALYSIS 3.2. MAGNITUDE AND PHASE SPECTRA 
MAGNITUDE SPECTRUM 
1 
0.8 
0.6 
0.4 
0.2 
0 
50 100 150 200 250 
50 
100 
150 
200 
250 
x 104 
3.5 
3 
2.5 
2 
1.5 
1 
0.5 
f kFk 
I Very high dynamics 
I Low frequencies have a greater magnitude than high 
frequencies 
I It is common to represent log(1 + kFk) 
54 / 139
3. UNDERSTANDING THE FOURIER ANALYSIS 3.2. MAGNITUDE AND PHASE SPECTRA 
LOG MAGNITUDE SPECTRUM 
1 
0.8 
0.6 
0.4 
0.2 
0 
50 100 150 200 250 
50 
100 
150 
200 
250 
x 104 
3.5 
3 
2.5 
2 
1.5 
1 
0.5 
50 100 150 200 250 
50 
100 
150 
200 
250 
10 
9 
8 
7 
6 
5 
4 
3 
2 
1 
kFk log(1 + kFk) 
55 / 139
3. UNDERSTANDING THE FOURIER ANALYSIS 3.2. MAGNITUDE AND PHASE SPECTRA 
LOG MAGNITUDE SPECTRUM #2 
1 
0.8 
0.6 
0.4 
0.2 
0 
50 100 150 200 250 
50 
100 
150 
200 
250 
x 104 
3 
2.5 
2 
1.5 
1 
0.5 
50 100 150 200 250 
50 
100 
150 
200 
250 
10 
9 
8 
7 
6 
5 
4 
3 
2 
1 
kFk log(1 + kFk) 
56 / 139
3. UNDERSTANDING THE FOURIER ANALYSIS 3.2. MAGNITUDE AND PHASE SPECTRA 
STRUCTURES IN MAGNITUDE SPECTRUM 
1 
0.8 
0.6 
0.4 
0.2 
0 
50 100 150 200 250 
50 
100 
150 
200 
250 
10 
9 
8 
7 
6 
5 
4 
3 
2 
1 
f log(1 + kFk) 
I Edge in spatial domain , line in Fourier Domain 
(orthogonal to the edge) 
57 / 139
3. UNDERSTANDING THE FOURIER ANALYSIS 3.2. MAGNITUDE AND PHASE SPECTRA 
STRUCTURES IN MAGNITUDE SPECTRUM 
Image 2D-DFT (Magnitude) 
38 
2D FFT Example 
FFTs Using ImageJ 
ImageJ Steps: (1) File | Open, (2) Process | FFT | FFT 
Overland Park Arboretum and Botanical Gardens, June 2006 
(Source : Earl F. Glynn - Research Notes) 
Spatial Domain Frequency Domain 
Regularity in image manifests itself in the degree of order or randomness in FFT pattern. 
I Where are the vertical and horizontal edges ? 
58 / 139
3. UNDERSTANDING THE FOURIER ANALYSIS 3.2. MAGNITUDE AND PHASE SPECTRA 
STRUCTURES IN MAGNITUDE SPECTRUM 
Image 2D-DFT (Magnitude) 
38 
2D FFT Example 
FFTs Using ImageJ 
ImageJ Steps: (1) File | Open, (2) Process | FFT | FFT 
Overland Park Arboretum and Botanical Gardens, June 2006 
(Source : Earl F. Glynn - Research Notes) 
Spatial Domain Frequency Domain 
Regularity in image manifests itself in the degree of order or randomness in FFT pattern. 
I Where are the vertical and horizontal edges ? 
) Remember the implicit periodicity ! 
59 / 139
3. UNDERSTANDING THE FOURIER ANALYSIS 3.2. MAGNITUDE AND PHASE SPECTRA 
STRUCTURES IN MAGNITUDE SPECTRUM 
I Strong main lines in image are emphasized in Fourier 
40 
Application of FFT 
Pattern/Texture Recognition 
(Source : Earl F. Glynn - Research Notes) 
Source: Lee and Chen, A New Method for Coarse Classification of Textures and Class Weight Estimation 
60 / 139
3. UNDERSTANDING THE FOURIER ANALYSIS 3.2. MAGNITUDE AND PHASE SPECTRA 
STRUCTURES IN MAGNITUDE SPECTRUM 
I Strong main lines in image are emphasized in Fourier 
I 
(Source : N. Thome) 
61 / 139
3. UNDERSTANDING THE FOURIER ANALYSIS 3.3. TRANSLATION AND ROTATION IN FOURIER DOMAIN 
CONTENTS 
1. INTRODUCTION 
2. FOURIER AND ITS 
REPRESENTATIONS 
3. UNDERSTANDING THE 
FOURIER ANALYSIS 
3.1 Reading the 2D-DFT 
3.2 Magnitude and Phase Spectra 
3.3 Translation and Rotation in 
Fourier Domain 
3.4 Magnitude and Phase 
Information 
3.5 Magnitude and Phase 
Reconstruction 
4. FOURIER ANALYSIS 
APPLICATIONS 
62 / 139
3. UNDERSTANDING THE FOURIER ANALYSIS 3.3. TRANSLATION AND ROTATION IN FOURIER DOMAIN 
TRANSLATION EXAMPLE 
50 100 150 200 250 
50 
100 
150 
200 
250 
1 
0.9 
0.8 
0.7 
0.6 
0.5 
0.4 
0.3 
0.2 
0.1 
0 
50 100 150 200 250 
50 
100 
150 
200 
250 
4 
3.5 
3 
2.5 
2 
1.5 
1 
0.5 
0 
f log(1 + kFk) 
50 100 150 200 250 
50 
100 
150 
200 
250 
1 
0.9 
0.8 
0.7 
0.6 
0.5 
0.4 
0.3 
0.2 
0.1 
0 
50 100 150 200 250 
50 
100 
150 
200 
250 
4 
3.5 
3 
2.5 
2 
1.5 
1 
0.5 
0 
fT log(1 + kFTk) 
63 / 139
3. UNDERSTANDING THE FOURIER ANALYSIS 3.3. TRANSLATION AND ROTATION IN FOURIER DOMAIN 
TRANSLATION 
I Shift in spatial domain : 
f [k] ) F[u] ) kF[u]k 
f [k  a] ) ei2pa uN 
F[u] ) kF[u]k. (3.3) 
I Magnitude spectrum is invariant to spatial translation. 
I Localization information is in phase. 
I Remember this for later ! 
64 / 139
3. UNDERSTANDING THE FOURIER ANALYSIS 3.3. TRANSLATION AND ROTATION IN FOURIER DOMAIN 
ROTATION EXAMPLE 
(Source : N. Thome) 
65 / 139
3. UNDERSTANDING THE FOURIER ANALYSIS 3.3. TRANSLATION AND ROTATION IN FOURIER DOMAIN 
ROTATION 
I One can easily shows that 
FT [f [x cos q + y sin q,x sin q + y cos q]] = 
F[u cos q + v sin q,u sin q + v cos q]. (3.4) 
I q-rotation in spatial domain , q-rotation in Fourier 
domain (nice !) 
66 / 139
3. UNDERSTANDING THE FOURIER ANALYSIS 3.3. TRANSLATION AND ROTATION IN FOURIER DOMAIN 
ROTATION : ANOTHER EXAMPLE 
(Source : N. Thome) 
I Pay attention to padding when rotating. 
67 / 139
3. UNDERSTANDING THE FOURIER ANALYSIS 3.4. MAGNITUDE AND PHASE INFORMATION 
CONTENTS 
1. INTRODUCTION 
2. FOURIER AND ITS 
REPRESENTATIONS 
3. UNDERSTANDING THE 
FOURIER ANALYSIS 
3.1 Reading the 2D-DFT 
3.2 Magnitude and Phase Spectra 
3.3 Translation and Rotation in 
Fourier Domain 
3.4 Magnitude and Phase 
Information 
3.5 Magnitude and Phase 
Reconstruction 
4. FOURIER ANALYSIS 
APPLICATIONS 
68 / 139
3. UNDERSTANDING THE FOURIER ANALYSIS 3.4. MAGNITUDE AND PHASE INFORMATION 
MAGNITUDE AND PHASE 
1 
0.8 
0.6 
0.4 
0.2 
0 
50 100 150 200 250 
50 
100 
150 
200 
250 
10 
9 
8 
7 
6 
5 
4 
3 
2 
1 
50 100 150 200 250 
50 
100 
150 
200 
3 
2 
1 
0 
−1 
−2 
250 −3 
I Localization is in Phase, hard to read 
I Frequential content is in Magnitude, easy to read 
I But, what spatial domain information is in magnitude (and 
phase) ? 
69 / 139
3. UNDERSTANDING THE FOURIER ANALYSIS 3.4. MAGNITUDE AND PHASE INFORMATION 
MAGNITUDE AND PHASE 
f 
log(1 + kFk) f(F) 
I Take the IFT with only magnitude or phase. 
70 / 139
3. UNDERSTANDING THE FOURIER ANALYSIS 3.4. MAGNITUDE AND PHASE INFORMATION 
IFT WITH MAGNITUDE AND PHASE ONLY 
I Starting from 
F = FT[f ] = kFk.eif(F) (3.5) 
I two images can be obtained : 
fM = FT1[kFk], (3.6) 
fP = FT1[eif(F)] = FT1[ 
F 
kFk 
]. (3.7) 
71 / 139
3. UNDERSTANDING THE FOURIER ANALYSIS 3.4. MAGNITUDE AND PHASE INFORMATION 
IFT WITH MAGNITUDE AND PHASE ONLY 
fM fP 
I Magnitude contains almost no useful spatial information 
I Main structures can be retrieved from phase 
I Let’s play to mix images ! 
72 / 139
3. UNDERSTANDING THE FOURIER ANALYSIS 3.4. MAGNITUDE AND PHASE INFORMATION 
MAGNITUDE AND PHASE MIXING 
I Take two images : 
f g 
I and their Fourier transforms : 
F = kFk.eif(F), (3.8) 
G = kGk.eif(G) (3.9) 
73 / 139
3. UNDERSTANDING THE FOURIER ANALYSIS 3.4. MAGNITUDE AND PHASE INFORMATION 
MAGNITUDE AND PHASE MIXING 
I Two new images by swapping magnitude and phase : 
I1 = kFk.eif(G), (3.10) 
I2 = kGk.eif(F). (3.11) 
I Guess the result ! 
74 / 139
3. UNDERSTANDING THE FOURIER ANALYSIS 3.4. MAGNITUDE AND PHASE INFORMATION 
MAGNITUDE AND PHASE MIXING 
f g 
kFk.eif(G) kGk.eif(F) 
75 / 139
3. UNDERSTANDING THE FOURIER ANALYSIS 3.4. MAGNITUDE AND PHASE INFORMATION 
We first wish to examine qualitatively- which of the two, magnitude or phase, carries more visual 
information. This can be most vividly demonstrated by the following experiment: the Fourier components- 
(phase and magnitude) are generated for the two images of same dimensions, and then swapped (see figure 
1), whereby the reconstructed images appears to be more similar to the one whose Fourier phase was used 
in the reconstruction. This experiment was previously suggested by Oppenheim in [7] and elsewhere. 
MAGNITUDE AND PHASE MIXING : ANOTHER 
EXAMPLE 
Figure 1: Swapping the Fourier phase and magnitude in images. Top left - original Lena image. 
Top right- original monkey image. Bottom left- IFT of Lena phase and monkey magnitude. 
Bottom right- IFT of monkey phase and Lena magnitude. 
(Source : N. Skarbnik - CCIT Report) 
2 
76 / 139
pronounced by individuals of different gender were recorded. The signals' phase and magnitude were 
swapped. The resulting sentences were played to human listeners- which were able to understand the 
meaning of the sentence, as well as to identify the gender of the speaker. Thus, it appears that most of the 
signal's information is carried by its phase in 1D case as well. The effect of using a swapped magnitude 
resulted in appearance of noise, in a manner similar to the 2D case. 
3. UNDERSTANDING THE FOURIER ANALYSIS 3.4. MAGNITUDE AND PHASE INFORMATION 
MAGNITUDE AND PHASE MIXING : EVEN FOR 
SIGNALS ! 
The reader is encouraged to review figure 2 and to examine the spectrograms similarity, or to use this link 
for the audio files (click images to download the file) in order to evaluate the importance of phase in human 
voice signals. 
Figure 2: Exchanging the Fourier phase and magnitude in voice. Top left - woman voice 
spectrogram. Top right- man voice spectrogram. Bottom left- spectrogram of woman voice phase 
and man voice magnitude. Bottom right- spectrogram of man voice phase and woman voice 
magnitude. Both reconstructions are primarily dominated by Fourier phase, and not the magnitude. 
(Source : N. Skarbnik - CCIT Report) 
Next, let us compare the global phase and magnitude by reviewing their distribution in a realistic image 
(Lena image in this case). 
I Listen the results 
77 / 139
3. UNDERSTANDING THE FOURIER ANALYSIS 3.4. MAGNITUDE AND PHASE INFORMATION 
MAGNITUDE MODELISATION 
I Phase is more informative than magnitude 
I The Magnitude spectra is predictable. For natural images 
(and signals) : 
kF[u, b]k decreases when 
p 
u2 + v2 increases. 
I Some models exists, see [SCH96] 1 
1. Van des Schaaf A., Van Hateren J., Modelling the Power Spectra of Na-tural 
Images : Statistics and Information, Vision Research, vol. 36, n°17, p. 
2759-2770, 1996 
78 / 139
3. UNDERSTANDING THE FOURIER ANALYSIS 3.4. MAGNITUDE AND PHASE INFORMATION 
POWER SPECTRA OF NATURAL IMAGES 
From [SCH96] 2 : 
I It has been found that power spectra of natural (ie not 
artificial) images tends to depend as 1/f 2. 
I From a set of 276 images, taken from a CCD camera 
I Different outdoor environments (woods, fields, parks, 
residential areas), at various times of the day, in various 
seasons, and in various types of weather (sunny, overcast, 
foggy, rainy) 
I Power Spectra : S = 1 
Npixels kFk2 
I Take the average Power Spectra over the 276 images 
2. Van des Schaaf A., Van Hateren J., Modelling the Power Spectra of Na-tural 
Images : Statistics and Information, Vision Research, vol. 36, n°17, p. 
2759-2770, 1996 
79 / 139
3. UNDERSTANDING THE FOURIER ANALYSIS 3.4. MAGNITUDE AND PHASE INFORMATION 
POWER SPECTRA OF NATURAL IMAGES 
FIGURE 2.1: (A) The average power as a function of spatial frequency. Fat dots show the average over the 
complete set of the logarithm of the circularly averaged individual power spectra. Small dots give the 
standard deviation from the average of corresponding plots of individual images. (B) The average power as 
a function of orientation. Here the power spectra are first averaged over spatial frequency, then the 
logarithm is taken, and finally the plots are averaged over the complete set (fat dots). Small dots as in (A). 
(Source : Van des Schaaf A., Van Hateren J., Modelling the Power Spectra of Natural Images : Statistics and 
because it Information, is absent in a Vision set of images Research, without vol. 36, dominant n°17, p. orientations 2759-2770, (1996) 
mostly images 
taken from soil covered with leaves and twigs with the camera pointed vertically at 
random orientations). The small dots in Fig. 2.1A,B show the standard deviation of 
the corresponding plots of individual images in the set. 
80 / 139
3. UNDERSTANDING THE FOURIER ANALYSIS 3.4. MAGNITUDE AND PHASE INFORMATION 
POWER SPECTRA OF NATURAL IMAGES 
FIGURE 2.2: (A) Example traces of the power spectra of five individual natural images. Dots show the 
logarithm of the circularly averaged power spectrum as a function of spatial frequency. The lines show the 
fits of the 1/f α model. The scaling of the vertical axis belongs to the top trace. For clarity, the lower traces 
are shifted -2, -6, -8, and -10 log-units, respectively. (B) Distribution of r.m.s.-contrasts for the entire set of 
276 natural images. (C) Distribution of 1/f-exponents (α) for the entire set. 
(Source : Van des Schaaf A., Van Hateren J., Modelling the Power Spectra of Natural Images : Statistics and 
Information, Vision Research, vol. 36, n°17, p. 2759-2770, 1996) 
Not only the r.m.s.-contrast, and consequently the total power, vary for individual 
images, but also the shape of the power spectrum. As shown in previous studies and 
by the almost straight line in Fig. 2.1A, the spectral power, averaged over many 
images, varies approximately as 1/f α as a function of spatial frequency, with the 1/f-exponent, 
α, close to 2. If we instead inspect the spectra of individual images, 
81 / 139
3. UNDERSTANDING THE FOURIER ANALYSIS 3.5. MAGNITUDE AND PHASE RECONSTRUCTION 
CONTENTS 
1. INTRODUCTION 
2. FOURIER AND ITS 
REPRESENTATIONS 
3. UNDERSTANDING THE 
FOURIER ANALYSIS 
3.1 Reading the 2D-DFT 
3.2 Magnitude and Phase Spectra 
3.3 Translation and Rotation in 
Fourier Domain 
3.4 Magnitude and Phase 
Information 
3.5 Magnitude and Phase 
Reconstruction 
4. FOURIER ANALYSIS 
APPLICATIONS 
82 / 139
where not all FT information is available (like with SAR images and X-ray crystallography) or when it is 
degraded. We wish to demonstrate that the use of local features allows better algorithm performance: 
faster convergence, or usage of less a priory known data. We also intend to demonstrate that phase based 
algorithms sometimes result in a superior outcome compared to magnitude based ones. 
3. UNDERSTANDING THE FOURIER ANALYSIS 3.5. MAGNITUDE AND PHASE RECONSTRUCTION 
PARTIAL MAGNITUDE RECONSTRUCTION 
We will address iterative schemes, as the closed form 
solutions demand solving a large set of linear equations, 
which in turn involves inversion of appropriate matrices. 
Those matrices inversion is impractical for images of 
dimensions above 16X16 pixels. 
I How much magnitude is it 
possible to reconstruct ? 
I Iterative scheme proposed 
in [Sha98] 
I Allow the reconstruction 
of 25% of the image 
I The authors report a 
decent signal 
reconstruction after 50 
iterations 
A Global Magnitude reconstruction scheme presented in 
[2] can be seen in the following figure 5. The proposed 
methods allow the reconstruction of a signal using at least 
25% of the image (half of the signal in each dimension) and 
its Fourier magnitude. As the reader can see, the 
reconstruction is achieved by an iterative detection of the 
unknown part of the signal. The authors of [2] report a 
decent signal reconstruction after 50 iterations. In their 
next paper [3] the authors propose a Local magnitude-based 
Figure 5: A flowchart of image reconstruction 
from global magnitude. Diagram adopted from 
[2]. [SHA98] Y. Shapiro, and M. Porat, “Image Representation and Reconstruction 
from Spectral Amplitude or Phase,” in IEEE International Conference on 
Electronics, Circuits and Systems 1998, Lisboa, Portugal, 1998, pp. 461-464. 
5 
image reconstruction method. While the 
reconstruction process converges faster (fever stages for 
same quality- see figure 7), it demands more computations. 
Out of those stages, the last one, for example, will demand 
the same number of iterations as the whole Global 
Magnitude based method. On the other hand the number 
of spatial points to be known in advance drops to 1 as 
opposed to the ~25% needed by the Global Magnitude 
based method. The proposed method consists of 
application of the Global Magnitude based method to an 
increasing part of the original signal, until whole signal 
reconstruction is achieved. A graphical description can be 
seen in figure 7. 
As can be seen from the following figure, the scheme is applied to a sub signal of the dimensions of [2k, 2k], 
where k is the iteration number (Xk is the appropriate label on the figure). An N by M image will demand 
2 log (max[M, N]) applications of the Global magnitude scheme (which is iterative too) to a sub image of 
[2k, 2k] dimensions. 
83 / 139
3. UNDERSTANDING THE FOURIER ANALYSIS 3.5. MAGNITUDE AND PHASE RECONSTRUCTION 
PARTIAL MAGNITUDE RECONSTRUCTION - 
ALGORITHM 
x 
FFT 
X Phase 
e 
iφX 
insert 
xc 
y 
FFT 
Y 
Mag. 
||Y || 
IFFT 
x cancel 
border xc 
84 / 139
3. UNDERSTANDING THE FOURIER ANALYSIS 3.5. MAGNITUDE AND PHASE RECONSTRUCTION 
PARTIAL MAGNITUDE RECONSTRUCTION - EXAMPLE 
Initial After 50 iterations 
85 / 139
3. UNDERSTANDING THE FOURIER ANALYSIS 3.5. MAGNITUDE AND PHASE RECONSTRUCTION 
PHASE ONLY RECONSTRUCTION 
616 IEEE TRANSACTIONS OAN C OUSTICS ,P EECH, AND SIGNAL PROCESSING, VOLA . SSP-28N , O. 6, DECEMBER 1980 
v. NUMERICAALL GORITHMFSO R RECONSTRUCTION 
FROM SAMPLES OF A PHASE FUNCTION 
In Section 11, we presented two sets of conditions, embodied 
in Theorems 1 and 2 , under which a sequence is uniquely 
specified to within a positive scale factor by the phase of its 
Fourier transform. In this section, we describe two numerical 
algorithms which can be used to reconstruct a sequence satis-fying 
I Is it possible to reconstruct 
an image from phase only ? 
I Iterative scheme proposed 
in [HAY82] 
I Needs an M-point FFT 
(with M  2N). 
the requirements of Theorem 1 from samples of its phase 
function when the location of the first nonzero point of x [ n ] 
and the interval outside of which x [ n ] is zero are known. 
Although these algorithms will only be discussed in terms of 
reconstructing sequences satisfying the conditions of Theorem 
1, the reconstruction of sequences meeting the requirements 
of Theorem 2 may be accomplished by simply reconstructing 
the finite length sequence %In] defined in ( 5 ) using the nega-tive 
of the specified phase samples and then computing the 
convolutional inverse sequence. 
The first algorithm presented below is an iterative technique 
in which the estimate of X [ . ] is improved in each iteration. 
This algorithm is similar to the iterative algorithms developed 
by Gerchberg and Saxton [ 6 ] and Fienup [ 7 ] for reconstruct-ing 
a signal from magnitude information and to the iterative 
algorithm developed by Quatieri [ 8 ] for reconstructing a 
signal from its phase under the assumption that the signal is 
minimum phase. The second algorithm is a closed form solu-tion 
which is obtained by solving a set of linear equations. 
Under the conditions specified in Theorem 1, this algorithm 
provides the desired sequence x [ n ] to within a scale factor 
when the location of the first nonzero point of x [ n ] and the 
interval outside of which x [n] is zero are known. 
In the discussions which follow, x [ n ] is used to denote a 
sequence which satisfies the conditions of Theorem 1 and is 
zero outside the interval 0 d n d N - 1 with x [ O ] # 0. In the 
more general case (see footnote 3), a linear phase term may be 
added to the given phase to accomplish this. 
A. Iterative Algorithm 
The M-point discrete Fourier transform (DFT) of x [ n ] will 
be denoted as 
[HAY82] Hayes, M. The Reconstruction of a Multidimensional Sequence 
From the Phase or Magnitude of Its Fourier Transform. Acoustics, Speech 
i o (k) and Signal Processing, = I X(kI e x IEEE Transactions (2 1) 
on 30, no. 2 (1982) : 140-154 
where it is assumed that M 2 2N. Then, an iterative technique 
to reconstruct the sequence x [ n ] from the M samples of its 
phase e,@), k = 0, 1, - - , M - 1, as illustrated in Fig. 1 and 
may be described as follows. 
Step 1: We begin with I Xo(k)l, an initial guess of the un-known 
DFT magnitude and form the first estimate, X,@), of 
X(k) using the specified phase function, i.e., 
Xl(k) = IXO(k)l e ie,(k) (22) 
Computing the inverse DFT of X,@) provides the first esti-mate, 
x1 [ n ] , of x [ n ] . Since an M-point DFT is used, x1 [ n ] is 
I 
I 
I 
I 
I 
I t r p 
I 
I 
I 
I r-l M-POINT DFT 
I 
II 
I A 
I 
I 
I 
I 
I 
I 
M-POINT IDFT 
I 
I 
Fig. 1. Block diagram of the iterative algorithm for reconstructing a 
signal from its phase. 
From this, a new estimate x z [ n ] is obtained from the inverse 
DFT of X , (k). Repetitive application of Steps 2 and 3 defines 
the iteration. 
In this iterative procedure, the total squared error between 
x [ n ] and its estimate is nonincreasing with each iteration. To 
see this, let x p [ n ]d enote the estimate after the pth iteration 
and define the error Ep as 
From Parseval's theorem, 
86 / 139
3. UNDERSTANDING THE FOURIER ANALYSIS 3.5. MAGNITUDE AND PHASE RECONSTRUCTION 
PHASE ONLY RECONSTRUCTION - ALGORITHM 
x 
FFTM 
X Phase 
e 
iφX 
y 
Y 
Mag. 
||Y || 
IFFT 
N 
0 
M=3N-1 
FFT 
initialize with 
||Y ||=1 
N 
87 / 139
3. UNDERSTANDING THE FOURIER ANALYSIS 3.5. MAGNITUDE AND PHASE RECONSTRUCTION 
PHASE ONLY RECONSTRUCTION - EXAMPLE 
Initial After 10 iterations and 
M = 2N  1 
88 / 139
4. FOURIER ANALYSIS APPLICATIONS 4.1. CLASSIC APPLICATIONS 
CONTENTS 
1. INTRODUCTION 
2. FOURIER AND ITS 
REPRESENTATIONS 
3. UNDERSTANDING THE 
FOURIER ANALYSIS 
4. FOURIER ANALYSIS 
APPLICATIONS 
4.1 Classic Applications 
4.2 Fourier Shape Descriptors 
4.3 Filter Banks in Fourier Domain 
4.4 FMI-SPOMF Image Matching 
4.5 Some final words 
89 / 139
4. FOURIER ANALYSIS APPLICATIONS 4.1. CLASSIC APPLICATIONS 
NOISE REMOVAL 
Application of FFT in Image Processing 
Four Noise 
Spikes Removed 
39 
Noise Removal 
FFT Inverse 
FFT 
Edit FFT 
Noise Pattern 
Stands Out as 
Four Spikes 
(Source : Earl F. Glynn - Research Notes) 
Source: www.mediacy.com/apps/fft.htm, Image Pro Plus FFT Example. Last seen online in 2004. 
90 / 139
4. FOURIER ANALYSIS APPLICATIONS 4.1. CLASSIC APPLICATIONS 
TEXTURE RECOGNITION 
40 
Application of FFT 
Pattern/Texture Recognition 
(Source : Earl F. Glynn - Research Notes) 
Source: Lee and Chen, A New Method for Coarse Classification of Textures and Class Weight Estimation 
91 / 139
4. FOURIER ANALYSIS APPLICATIONS 4.1. CLASSIC APPLICATIONS 
TEXTURE RECOGNITION 
The Drosophila eye is a great example a cellular crystal with its 
hexagonally closed-packed structure. The absolute value of the 
Fourier transform (right) shows its hexagonal structure. 
41 
Application of FFT 
Pattern/Texture Recognition 
The Drosophila eye (Source is a : great Earl F. Glynn example - Research a Notes) 
cellular crystal with 
its hexagonally closed-packed structure. The absolute 
value of the Fourier transform (right) shows its hexagonal 
structure. 
Source: http://www.rpgroup.caltech.edu/courses/PBL/size.htm 
Could FFT of Drosophila eye be used to identify/quantify subtle phenotypes? 
92 / 139
4. FOURIER ANALYSIS APPLICATIONS 4.1. CLASSIC APPLICATIONS 
DEBLURRING - DECONVOLUTION 
Application of FFT 
Deblurring: Deconvolution 
The Point Spread Function (PSF) is the Fourier transform of a filter. 
(the PSP says how much blurring there will be in trying to image a point). 
Hubble image and measured PSF 
Dividing the Fourier transform of the PSF into 
the transform of the blurred image, and 
performing an inverse FFT, recovers the 
unblurred image. 
FFT(Unblurred Image) * FFT(Point Spread Function) = FFT(Blurred Image) 
Unblurred Image = FFT-1[ FFT(Blurred Image) / FFT(Point Spread Function) ] 
45 
(Source : Earl F. Glynn - Research Notes) 
Source: http://www.reindeergraphics.com/index.php?option=com_contenttask=viewid=179Itemid=127 
93 / 139
4. FOURIER ANALYSIS APPLICATIONS 4.1. CLASSIC APPLICATIONS 
Application of FFT 
DEBLURRING - DECONVOLUTION 
Deblurring: Deconvolution 
The Point Spread Function (PSF) is the Fourier transform of a filter. 
(the PSP says how much blurring there will be in trying to image a point). 
Hubble image and measured PSF 
Dividing the Fourier transform of the PSF into 
the transform of the blurred image, and 
performing an inverse FFT, recovers the 
unblurred image. 
46 
Deblurred image 
(Source : Earl F. Glynn - Research Notes) 
Source: http://www.reindeergraphics.com/index.php?option=com_contenttask=viewid=179Itemid=127 
94 / 139
4. FOURIER ANALYSIS APPLICATIONS 4.2. FOURIER SHAPE DESCRIPTORS 
CONTENTS 
1. INTRODUCTION 
2. FOURIER AND ITS 
REPRESENTATIONS 
3. UNDERSTANDING THE 
FOURIER ANALYSIS 
4. FOURIER ANALYSIS 
APPLICATIONS 
4.1 Classic Applications 
4.2 Fourier Shape Descriptors 
4.3 Filter Banks in Fourier Domain 
4.4 FMI-SPOMF Image Matching 
4.5 Some final words 
95 / 139
4. FOURIER ANALYSIS APPLICATIONS 4.2. FOURIER SHAPE DESCRIPTORS 
Fourier DDeessccrriippttoorrss:: OOvveerrvviieeww 
OVERVIEW 
... ... 
(Source : Computer Vision  Remote Sensing - Univ. Berlin) 
● Concise and description of (object) contours 
➔ Contours are represented by vectors 
I Description ● Numerous of application 
(object) contours represented as vectors. 
➔ Contour Processing (filtering, interpolation, morphing) 
I Applications ➔ Image analysis: : 
Characterising and recognising the shapes of object 
I Contour Processing (filtering, interpolation, morphing) 
I Image analysis : characterizing and recognizing the shapes 
of object 
I Shape = closed contour ! 
96 / 139
4. FOURIER ANALYSIS APPLICATIONS 4.2. FOURIER SHAPE DESCRIPTORS 
REPRESENTING RReepprreesseennttAiinnCggO Naa TCCOooUnnRttWoouIuTrrH uuDssFiinnTgg tthhee DDFFTT 
... ... 
(xN,yN): Coordinates of 
the Nth point along the 
circumference 
Pixels on the contour are 
assumed to be ordered (e.g. 
clockwise)! 
1st Step 
Define a complex vector 
using coordinates (x,y). 
2nd Step 
Apply the 1D DFT 
(Source : Computer Vision  Remote Sensing - Univ. Berlin) 
97 / 139
4. FOURIER ANALYSIS APPLICATIONS 4.2. FOURIER SHAPE DESCRIPTORS 
AApppplliiccaattiioonn:: RReeccooggnniissiinngg aanndd ccllaassssiiffyyiinngg 
EXAMPLE 
lleeaavveess 
Database 
Two types of leaves are to be 
recognised and classified 
(Source : Computer Vision  Remote Sensing - Univ. Berlin) 
98 / 139
4. FOURIER ANALYSIS APPLICATIONS 4.2. FOURIER SHAPE DESCRIPTORS 
AApppplliiccaattiioonn:: RReeccooggnniissiinngg aanndd ccllaassssiiffyyiinngg 
EXAMPLE 
lleeaavveess 
Image with unclassified objects 
(Source : Computer Vision  Remote Sensing - Univ. Berlin) 
99 / 139
AApppplliiccaattiioonn:: RReeccooggnniissiinngg aanndd ccllaassssiiffyyiinngg 
4. FOURIER ANALYSIS APPLICATIONS 4.2. FOURIER SHAPE DESCRIPTORS 
EXAMPLE 
lleeaavveess 
Segmented Objects 
(Thresholding) 
(Source : Computer Vision  Remote Sensing - Univ. Berlin) 
100 / 139
4. FOURIER ANALYSIS APPLICATIONS 4.2. FOURIER SHAPE DESCRIPTORS 
AApppplliiccaattiioonn:: RReeccooggnniissiinngg aanndd ccllaassssiiffyyiinngg 
EXAMPLE 
lleeaavveess 
Leaves detected and classified 
(Source : Computer Vision  Remote Sensing - Univ. Berlin) 
101 / 139
4. FOURIER ANALYSIS APPLICATIONS 4.2. FOURIER SHAPE DESCRIPTORS 
TRANSLATION 
TTrraannssllaattiioonn 
t 
t 
Translating U by t: 
(Source : Computer Vision  Remote Sensing - Univ. Berlin) 
I Only on F[0]. 
102 / 139
4. FOURIER ANALYSIS APPLICATIONS 4.2. FOURIER SHAPE DESCRIPTORS 
SCALING CChhaannggeess iinn SSccaallee 
Magnification by factor s: 
(Source : Computer Vision  Remote Sensing - Univ. Berlin) 
103 / 139
4. FOURIER ANALYSIS APPLICATIONS 4.2. FOURIER SHAPE DESCRIPTORS 
ROTATION 
RRoottaattiioonn 
Rotation by an angle θ: 
(Source : Computer Vision  Remote Sensing - Univ. Berlin) 
(Derivation identical to scale change: Multiplication by constant) 
I in Phase 
104 / 139
4. FOURIER ANALYSIS APPLICATIONS 4.3. FILTER BANKS IN FOURIER DOMAIN 
CONTENTS 
1. INTRODUCTION 
2. FOURIER AND ITS 
REPRESENTATIONS 
3. UNDERSTANDING THE 
FOURIER ANALYSIS 
4. FOURIER ANALYSIS 
APPLICATIONS 
4.1 Classic Applications 
4.2 Fourier Shape Descriptors 
4.3 Filter Banks in Fourier Domain 
4.4 FMI-SPOMF Image Matching 
4.5 Some final words 
105 / 139
4. FOURIER ANALYSIS APPLICATIONS 4.3. FILTER BANKS IN FOURIER DOMAIN 
Examples of Fourier’s representation 17 
LINEAR TRANSLATION INVARIANT SYSTEMS 
fi 
Input! 
System 
A 
fo 
Output! 
Figure 1.14. Schematic representation of a system A. 
I Linear System : 
In practice we often deal with systems that are homogeneous and additive, i.e., 
A(cf ) = c(Af ) and (4.1) 
A(cf) = c(Af) 
A(f + g) = (Af) + (Ag) 
A(f + g) = (Af ) + (Af ). (4.2) 
I Shift (or translation) invariance : 
when f, g are arbitrary inputs and c is an arbitrary scalar. Such systems are said be linear. Many common systems also have the property of translation invariance. 
We say that a system is translation invariant if the output 
gi(t) = fi(t + t) (4.3) 
) gi(t) = fo(t + t). (4.4) 
go = Agi 
(the output is shifted by the same amount than the input). 
an arbitrary ! -translate 
gi(t) := fi(t + ! ), −#  t  #, 
106 / 139
4. FOURIER ANALYSIS APPLICATIONS 4.3. FILTER BANKS IN FOURIER DOMAIN 
LINEAR TRANSLATION INVARIANT SYSTEMS 
I An LTI system responds sinusoidally when it is shaken 
sinusoidally 
I The output can be obtained 
I from the impulse response g[n] 
I by a convolution product : 
fo[n] = (fi  g)[n] = 
¥å 
k=¥ 
f [k]g[n  k] (4.5) 
I or in Fourier Domain 
Fo[u] = Fi[u]G[u] (Convolution Theorem) (4.6) 
107 / 139
4. FOURIER ANALYSIS APPLICATIONS 4.3. FILTER BANKS IN FOURIER DOMAIN 
CONVOLUTION IN FOURIER DOMAIN 
Enhanced Image 
Pre-processing 
Post-processing 
FFT{ I[u,v] } FFT-1{ H[u,v] · F[u,v] } 
Fourier Transform 
42 
Application of FFT 
Filtering in the Frequency Domain: Convolution 
I[m,n] 
Raw Image 
I’[m,n] 
Fourier Transform 
F[u,v] 
Filter Function 
H[u,v] 
Inverse 
F[u,v] H[u,v] · F[u,v] 
(Source : Earl F. Glynn - Research Notes) 
Source: Gonzalez and Woods, Digital Image Processing (2nd ed), 2002, p. 159 
108 / 139
4. FOURIER ANALYSIS APPLICATIONS 4.3. FILTER BANKS IN FOURIER DOMAIN 
FILTER BANKS 
I A filter bank is an array of band-pass filters that spans the 
entire frequency spectrum. 
I The bank serves to isolate different frequency components 
in a signal 
(Source : http://www.aamusings.com/project-documentation/wavs/filterBank.html) 
109 / 139
4. FOURIER ANALYSIS APPLICATIONS 4.3. FILTER BANKS IN FOURIER DOMAIN 
FILTER BANKS 
(Source : http://www.aamusings.com/project-documentation/wavs/filterBank.html) 
Frequent scheme : 
I DCT : Discrete Cosine Transform (a special case of DFT), 
I DWT : DiscretWavelet Transform. 
110 / 139
4. FOURIER ANALYSIS APPLICATIONS 4.3. FILTER BANKS IN FOURIER DOMAIN 
FILTER BANKS - FWT 
A common implementation of the DiscreteWavelet Transform 
is the Mallat Algorithm (the Fast WT) : 
I h is a low-pass filter 
I g is a high-pass filter 
111 / 139
4. FOURIER ANALYSIS APPLICATIONS 4.3. FILTER BANKS IN FOURIER DOMAIN 
FWT - B-SPLINE WAVELETS 
Impulse 
Responses 
Frequential 
Responses 
Obtained from the autoconvolution of the box function : 
112 / 139
4. FOURIER ANALYSIS APPLICATIONS 4.3. FILTER BANKS IN FOURIER DOMAIN 
B-SPLINE WAVELETS - EXAMPLE 
113 / 139
4. FOURIER ANALYSIS APPLICATIONS 4.3. FILTER BANKS IN FOURIER DOMAIN 
FILTER BANK IN FOURIER DOMAIN 
The high-pass branch : 
I g is a linear filter (ok in Fourier Domain) 
I the sub-sampling can also be obtained in Fourier Domain : 
(u : zeroing the even samples) 
114 / 139
4. FOURIER ANALYSIS APPLICATIONS 4.3. FILTER BANKS IN FOURIER DOMAIN 
FILTER BANK IN FOURIER DOMAIN 
115 / 139
4. FOURIER ANALYSIS APPLICATIONS 4.3. FILTER BANKS IN FOURIER DOMAIN 
quinconce. 
FWT IN FOURIER DOMAIN 
1.7 – Nous Comparaison avons ainsi de proposé la complexitun algorithme ´e d’algorithmes de calcul des d’analyse coe⇢cients multird’une ´esolution. analyse multiréso-lution 
Rapport d’op´erations où toutes n´ecessaires les opérations dans le (cas filtrage classique et échantillonnages) par rapport aux sont calculs e⇡ectuées intdans ´egralement le domaine 
r´ealisL est la profondeur de l’analyse multir´esolution. Ces rapports sont calcul´es en fonction de images. A gauche : cas s´eparable ; et `a droite : cas quinconce. 
de Fourier discret. Cet algorithme, présenté en figure 5.6 nécessite une FFT en entrée et une 
FFT par signal de détails (coe⇢cients de l’analyse multirésolution). 
As FFT 
filtrage par 
multiplications 
complexes 
sous- 
´echantillonnage 
Ds+1 
filtrage oar 
multiplications 
complexes 
sous- 
´echantillonnage 
Ds+2 
... 
FFT1 FFT1 
1.6 – algorithme de calcul des coe⇥cients d’une analyse multir´esolution dans le domaine discret. 
5.6 – Algorithme de calcul des coe⇢cients d’une analyse multirésolution dans le do-maine 
de Fourier discret. 
1,8 fois moins d’op´erations. De plus, nous avons montr´e que la complexit´e de cet algorithme Figure rapport `a une impl´ementation classique, o`u seul les filtrages seraient effectu´es dans le domaine 
Par rapport à une implémentation classique, où seul les filtrages seraient e⇡ectués dans le 
Fourier, domaine notre algorithme de Fourier, necessite notre algorithme un nombre nécessite plus un faible nombre d’opplus ´erations. faible d’opérations. Les graphiques Les gra-phiques 
de la indiquent que pour une profondeur d’analyse sur quatre ´echelles (un cas fr´equent), notre algorithme 
de la figure 5.7 indiquent que pour une profondeur d’analyse sur quatre échelles (un 
116 / 139 
cas fréquent), notre algorithme nécessite 1,8 fois moins d’opérations. De plus, nous avons mon-tré
des signaux doivent donc être des entiers. Une image X[k] de dimension N⇥N est transformée 
en une image 4. FOURIER de ANALYSIS dimension APPLICATIONS (figure 4.3. 5.5). 
FILTER BANKS IN FOURIER DOMAIN 
Y [k] M ⇥M L’équation (5.34) est donc réécrite de la façon suivante : 
2D-FWT IN FOURIER DOMAIN 
Even for images : 
M Jtm. L’équation peut donc être transformée pour exprimer le sur-échantillonnage 
Figure 5.5 – Sur-échantillonnage d’une image : une rotation et une dilatation sont impliquée 
dans la transformation. 
5.3.2 Notre contribution 
Ces deux équations (5.34 et 5.36) permettent d’exprimer les échantillonnages dans le do-maine 
de Fourier. Cependant les signaux manipulés sont continus ce qui implique que lors de 
l’implémentation, une discrétisation du domaine de Fourier sera nécessaire. Ce passage peut 
être évité en écrivant les équations directement dans le domaine de Fourier discret. Les indices 
des signaux doivent donc être des entiers. Une image X[k] de dimension N⇥N est transformée 
en une image Y [k] de dimension M ⇥M (figure 5.5). 
L’équation (5.34) est donc réécrite de la façon suivante : 
Y () = X(⇥) avec 
⇧ 
 = 2 
Mm 
⇥ = 2 
Mm⇥ 
, (5.37) 
M Jtm. L’équation peut donc être transformée pour exprimer le sur-échantillonnage 
oùm⇥ = N 
de signaux multi-dimensionnels dans le domaine de Fourier discret : 
Y [m] = X 
⇤# 
N 
Jtm 
⇥ 
modN 
⌅ 
. (5.38) 
Y () = X(⇥) avec 
⇧ 
 = 2 
Mm 
⇥ = 2 
Mm⇥ 
, (5.37) 
oùm⇥ = N 
de signaux multi-dimensionnels dans le domaine de Fourier discret : 
Y [m] = X 
⇤# 
N 
M 
Jtm 
⇥ 
modN 
⌅ 
. (5.38) 
L’opérateur modulo (mod) est nécessaire pour tenir compte de la périodicité de transfor-mées 
de Fourier discrètes rapides (FFT) des signaux. Selon une méthode analogue, le sous-échantillonnage 
est : 
Y [m] = 
1 
|detJ| 
|de⌃tJ|−1 
l=0 
X 
⇤# 
N 
M 
J−tm− NJ−tvl 
⇥ 
modN 
⌅ 
. (5.39) 
Dans certains cas particuliers les équations se simplifient fortement, permettant fréquem-ment 
d’exprimer les échantillonnages comme des duplications (sur-échantillonnage) ou des 
sommes de sous-parties des images (sous-échantillonnage). Par exemple dans le cas séparable, 
les sous-échantillonnages bi-dimensionnels s’expriment comme un enchaînement de deux sous-échantillonnages 
mono-dimensionnels. Ou encore, dans le cas quinconce le sous-échantillonnage 
peut s’écrire comme la somme de quatre sous-images. 
50 
I More details in [NIC02] 3. 
3. F. Nicolier, O. Laligant, F. Truchetet. Discrete wavelet transform imple-mentation 
in fourier domain. Journal of Electronic Imaging, 11(3) :338–346, jul 
2002 
117 / 139
4. FOURIER ANALYSIS APPLICATIONS 4.4. FMI-SPOMF IMAGE MATCHING 
CONTENTS 
1. INTRODUCTION 
2. FOURIER AND ITS 
REPRESENTATIONS 
3. UNDERSTANDING THE 
FOURIER ANALYSIS 
4. FOURIER ANALYSIS 
APPLICATIONS 
4.1 Classic Applications 
4.2 Fourier Shape Descriptors 
4.3 Filter Banks in Fourier Domain 
4.4 FMI-SPOMF Image Matching 
4.5 Some final words 
118 / 139
4. FOURIER ANALYSIS APPLICATIONS 4.4. FMI-SPOMF IMAGE MATCHING 
FMI-SPOMF ? 
I SPOMF = Symmetric Phase Only Matched Filters 
I FMI = Fourier-Mellin Invariant 
I FT for matching images 
I Translation, rotation, scaling invariant registering 
I Described in [Chen94] 4 
4. Q. Chen, M. Defrise and F. Deconinck, Symmetric phase-only matched 
filtering of Fourier-Mellin transforms for image registration and recognition, 
IEEE pattern analysis and machine intelligence, vol. 16, 1994, p. 1156-1168. 
119 / 139
4. FOURIER ANALYSIS APPLICATIONS 4.4. FMI-SPOMF IMAGE MATCHING 
IMAGE MATCHING 
I Where is the small bear ? 
120 / 139
4. FOURIER ANALYSIS APPLICATIONS 4.4. FMI-SPOMF IMAGE MATCHING 
IMAGE MATCHING 
From the image and a pattern (reference) : 
The idea is to 
I slide the pattern on the image, 
I compute sum of the product pixel-to-pixel. 
I This is a cross-correlation. 
121 / 139
4. FOURIER ANALYSIS APPLICATIONS 4.4. FMI-SPOMF IMAGE MATCHING 
CC AND SSD RELATION 
I A classical template matching solution is the Sum of Squared 
Differences (SSD) - here with continuous functions : 
SSDW = 
Z 
W 
(f (t)  g(t))2 dt (4.7) 
I SSD is related to CC : 
Z 
W 
(f (t)  g(t))2 dt = 
Z 
W 
 
f (t)2 + g(t)2  2f (t)g(t) 
 
dt (4.8) 
= 
Z 
W 
f (t)2dt + 
Z 
W 
g(t)2dt  2 
Z 
W 
f (t)g(t)dt. 
(4.9) 
I If f is the pattern, the first term is constant ! 
122 / 139
4. FOURIER ANALYSIS APPLICATIONS 4.4. FMI-SPOMF IMAGE MATCHING 
CC AND SSD RELATION 
Z 
W 
(f (t)  g(t))2 dt = Cte + 
Z 
W 
g(t)2  2 
Z 
W 
f (t)g(t)dt. (4.10) 
I If the local energy of the image (g) is constant : 
Z 
W 
(f (t)  g(t))2 = Cte  2 
Z 
W 
f (t)g(t)dt. (4.11) 
I In this case, the SSD is the same as the CC 
I But the local energy of the image must be constant ! 
123 / 139
4. FOURIER ANALYSIS APPLICATIONS 4.4. FMI-SPOMF IMAGE MATCHING 
IMAGE MATCHING - CROSS CORRELATION 
I The Cross-Correlation (CC) is defined as (for real signals) : 
(f ? g)[n] = 
¥å k=¥ 
f [k]g[n + k] (4.12) 
= 
¥å 
k=¥ 
f [n  k]g[n] (4.13) 
I CC is strongly related to convolution : 
(f ? g)[n] = f [n]  g[n] (4.14) 
I CC can also be easily expressed in Fourier Domain (fast 
computations) : 
FT[(f ? g)][u] = F[u]G[u] (4.15) 
so (f ? g) = FT1[FT[f ]FT[g]]. (4.16) 
124 / 139
4. FOURIER ANALYSIS APPLICATIONS 4.4. FMI-SPOMF IMAGE MATCHING 
CROSS-CORRELATION IN FOURIER DOMAIN 
I Remember that the DFT implies the function is periodic 
I The product F[u, v]G[u, v] implies F and G have the same 
size 
The pattern P is thus modified : 
I its size must be the same as I, 
I the origin of the image must corresponds to the center of 
the pattern. 
125 / 139
4. FOURIER ANALYSIS APPLICATIONS 4.4. FMI-SPOMF IMAGE MATCHING 
CROSS-CORRELATION - RESULT 
I Local max at the center (good) but not the absolute one 
I The second bear is not detected (rotation) 
I CC is very sensitive to luminance 
126 / 139
4. FOURIER ANALYSIS APPLICATIONS 4.4. FMI-SPOMF IMAGE MATCHING 
NORMALIZED CROSS-CORRELATION 
I One solution (to luminance sensitivity) is to normalize the 
images before the comparison : 
NCCI,P = 
1 
N,y 
x 
å(I[x, y]  I)(P[x, y]  P) 
sIsP 
(4.17) 
I is the average of I, sI is the standard deviation of I 
I Very classic solution to template matching 
I same as Pearson Correlation Coefficient 
127 / 139
4. FOURIER ANALYSIS APPLICATIONS 4.4. FMI-SPOMF IMAGE MATCHING 
SPOMF 
I Another solution is to only compare the Phase information 
(structures !) 
I The dectector is thus modified : 
DI,P = FT1[ 
FT[I] 
kFT[I]k  
FT[P] 
kFT[P]k 
] (4.18) 
I SPOMF : Symmetric Phase Only Matched Filters 
128 / 139
4. FOURIER ANALYSIS APPLICATIONS 4.4. FMI-SPOMF IMAGE MATCHING 
SPOMF - RESULT 
CC SPOMF 
129 / 139
4. FOURIER ANALYSIS APPLICATIONS 4.4. FMI-SPOMF IMAGE MATCHING 
FMI-SPOMF IMAGE REGISTRATION 
I CC based comparison (NCC and SPOMF) are rotation and 
scaling sensitive 
I Fourier-Mellin Transform is a solution 
I The key point is to 
I reduce rotation and scaling to translations 
I and reduce the dimension of the parameter size. 
I Polar coordinates : Rotation ! Translation 
I Logarithmic scale : Scaling ! Translation 
(log(ax) = log(a) + log(x)) 
130 / 139
4. FOURIER ANALYSIS APPLICATIONS 4.4. FMI-SPOMF IMAGE MATCHING 
FMI-SPOMF - PRINCIPLE 
I 4 parameters : Translation (x and y), Rotation, Scaling 
I Facts : 
I Phase contains localisation 
I Magnitude is insensitive to translation 
I A rotation of the image rotates the spectral magnitude by 
the same angle 
I A scaling by s scales the spectral magnitude by s1 
I Keeping magnitude only allows to isolate rotation and 
scaling 
I Rotation and scaling are transformed into translations ... 
detected by SPOMF. 
I Fourier-Mellin Transform = FT of polar-log magnitude 
spectral image. 
131 / 139
4. FOURIER ANALYSIS APPLICATIONS 4.4. FMI-SPOMF IMAGE MATCHING 
FMI - SPOMF - ALGORITHM 
Given I and P : 
I Compute the log-polar magnitude spectral images of I and 
P 
I Detect the max of the SPOMF image between I and P 
I Identify s and q 
I Re-scale and re-rotate P by (s1, q) 
I Compute the SPOMF between I and the rectified P 
I Locate the max, and identify (x, y) the translation vector. 
132 / 139
4. FOURIER ANALYSIS APPLICATIONS 4.4. FMI-SPOMF IMAGE MATCHING 
LOG-POLAR REPRESENTATION 
I Assuming I is a N  N image, its log-polar representation 
Ilp is : 
Ip(r, q) = I(r cos q + 
N 
2 
, r sin q + 
N 
2 
(4.19) 
Ilp(m, k) = Ip( 
1 
2 
Nm 
N , 
2pk 
N  p). (4.20) 
I m 2 [1,N] is the discrete radial coordinate 
I k 2 [1,N] is the discrete angular coordinate 
I (an interpolation is needed : nearest-neighbor for example) 
133 / 139
4. FOURIER ANALYSIS APPLICATIONS 4.4. FMI-SPOMF IMAGE MATCHING 
LOG-POLAR REPRESENTATION 
More general equations are given in [Chen94] 5 : 
I A N  N image I can be resampled onto a M K polar-log 
grid in one step : 
( 
um,k = N/21 
M1 (M 1) 
m 
M1 cos( pk 
K ) + N2 
vm,k = N/21 
M1 (M 1) 
m 
M1 sin( pk 
K ) + N2 
, (4.21) 
m 2 [0,M 1], k 2 [0,K  1]. 
5. Q. Chen, M. Defrise and F. Deconinck, Symmetric phase-only matched 
filtering of Fourier-Mellin transforms for image registration and recognition, 
IEEE pattern analysis and machine intelligence, vol. 16, 1994, p. 1156-1168. 
134 / 139
4. FOURIER ANALYSIS APPLICATIONS 4.4. FMI-SPOMF IMAGE MATCHING 
LOG-POLAR REPRESENTATION 
I A detection of the max provides two integers m and k. 
I Rotation and scaling : 
q = 
m  N/2 
M  1 (4.22) 
s = (M 1) 
k 
M1 for 0  k  M/2 (enlargement) (4.23) 
s¯1 = (M 1) 
Mk 
M1 for M/2  k  M (shrinkage) (4.24) 
135 / 139
4. FOURIER ANALYSIS APPLICATIONS 4.4. FMI-SPOMF IMAGE MATCHING 
SOME EXAMPLES 
original distorted 
(s = 0.7, q = 30 deg) 
136 / 139
4. FOURIER ANALYSIS APPLICATIONS 4.4. FMI-SPOMF IMAGE MATCHING 
SOME EXAMPLES 
137 / 139
4. FOURIER ANALYSIS APPLICATIONS 4.5. SOME FINAL WORDS 
CONTENTS 
1. INTRODUCTION 
2. FOURIER AND ITS 
REPRESENTATIONS 
3. UNDERSTANDING THE 
FOURIER ANALYSIS 
4. FOURIER ANALYSIS 
APPLICATIONS 
4.1 Classic Applications 
4.2 Fourier Shape Descriptors 
4.3 Filter Banks in Fourier Domain 
4.4 FMI-SPOMF Image Matching 
4.5 Some final words 
138 / 139
4. FOURIER ANALYSIS APPLICATIONS 4.5. SOME FINAL WORDS 
SOME FINAL WORDS 
I Fourier Transform still very popular in science 
I Phase congruency - Local Phase. See Peter Kovesi 
webpage 6 
I Practice with : 
I Playing with phase and magntiude 
I Image Reconstruction 
I Sampling in Fourier domain 
I Template matching with phase spectrum 
I Image registration with FMI-SPOMF 
6. http://www.csse.uwa.edu.au/~pk/research 
139 / 139

Contenu connexe

Tendances

Optics Fourier Transform Ii
Optics Fourier Transform IiOptics Fourier Transform Ii
Optics Fourier Transform Ii
diarmseven
 
fourier transforms
fourier transformsfourier transforms
fourier transforms
Umang Gupta
 
the fourier series
the fourier seriesthe fourier series
the fourier series
safi al amu
 
periodic functions and Fourier series
periodic functions and Fourier seriesperiodic functions and Fourier series
periodic functions and Fourier series
Umang Gupta
 

Tendances (20)

Ft3 new
Ft3 newFt3 new
Ft3 new
 
Fourier series
Fourier series Fourier series
Fourier series
 
1532 fourier series
1532 fourier series1532 fourier series
1532 fourier series
 
Fourier series
Fourier seriesFourier series
Fourier series
 
Optics Fourier Transform Ii
Optics Fourier Transform IiOptics Fourier Transform Ii
Optics Fourier Transform Ii
 
Fourier series
Fourier seriesFourier series
Fourier series
 
fourier transforms
fourier transformsfourier transforms
fourier transforms
 
the fourier series
the fourier seriesthe fourier series
the fourier series
 
Fourier series and fourier integral
Fourier series and fourier integralFourier series and fourier integral
Fourier series and fourier integral
 
Lecture8 Signal and Systems
Lecture8 Signal and SystemsLecture8 Signal and Systems
Lecture8 Signal and Systems
 
Topic: Fourier Series ( Periodic Function to change of interval)
Topic: Fourier Series ( Periodic Function to  change of interval)Topic: Fourier Series ( Periodic Function to  change of interval)
Topic: Fourier Series ( Periodic Function to change of interval)
 
Fourier series 1
Fourier series 1Fourier series 1
Fourier series 1
 
Eece 301 note set 14 fourier transform
Eece 301 note set 14 fourier transformEece 301 note set 14 fourier transform
Eece 301 note set 14 fourier transform
 
Fourier series Introduction
Fourier series IntroductionFourier series Introduction
Fourier series Introduction
 
History and Real Life Applications of Fourier Analaysis
History and Real Life Applications of Fourier AnalaysisHistory and Real Life Applications of Fourier Analaysis
History and Real Life Applications of Fourier Analaysis
 
Application of fourier series to differential equations
Application of fourier series to differential equationsApplication of fourier series to differential equations
Application of fourier series to differential equations
 
Fourier series 1
Fourier series 1Fourier series 1
Fourier series 1
 
periodic functions and Fourier series
periodic functions and Fourier seriesperiodic functions and Fourier series
periodic functions and Fourier series
 
5. fourier properties
5. fourier properties5. fourier properties
5. fourier properties
 
Properties of Fourier transform
Properties of Fourier transformProperties of Fourier transform
Properties of Fourier transform
 

En vedette

2012.09.25 - Local and non-metric similarities between images - why, how and ...
2012.09.25 - Local and non-metric similarities between images - why, how and ...2012.09.25 - Local and non-metric similarities between images - why, how and ...
2012.09.25 - Local and non-metric similarities between images - why, how and ...
Frédéric Morain-Nicolier
 
Mesures de dissimilarités locales et globales entre images, symétriques et as...
Mesures de dissimilarités locales et globales entre images, symétriques et as...Mesures de dissimilarités locales et globales entre images, symétriques et as...
Mesures de dissimilarités locales et globales entre images, symétriques et as...
Frédéric Morain-Nicolier
 
Presentation wpf
Presentation wpfPresentation wpf
Presentation wpf
danishrafiq
 

En vedette (20)

2012.09.25 - Local and non-metric similarities between images - why, how and ...
2012.09.25 - Local and non-metric similarities between images - why, how and ...2012.09.25 - Local and non-metric similarities between images - why, how and ...
2012.09.25 - Local and non-metric similarities between images - why, how and ...
 
Ipta2010
Ipta2010Ipta2010
Ipta2010
 
SRC - SAV - Système Visuel et Auditif Humain
SRC - SAV - Système Visuel et Auditif HumainSRC - SAV - Système Visuel et Auditif Humain
SRC - SAV - Système Visuel et Auditif Humain
 
SRC - SAV - La lumière
SRC - SAV - La lumièreSRC - SAV - La lumière
SRC - SAV - La lumière
 
GEII - Ma3 - Suites et séries
GEII - Ma3 - Suites et sériesGEII - Ma3 - Suites et séries
GEII - Ma3 - Suites et séries
 
CCD
CCDCCD
CCD
 
GEII - Ma3 - Matrices
GEII - Ma3 - MatricesGEII - Ma3 - Matrices
GEII - Ma3 - Matrices
 
Mesures de dissimilarités locales et globales entre images, symétriques et as...
Mesures de dissimilarités locales et globales entre images, symétriques et as...Mesures de dissimilarités locales et globales entre images, symétriques et as...
Mesures de dissimilarités locales et globales entre images, symétriques et as...
 
GEII - Ma3 - Représentations de Fourier et convolution
GEII - Ma3 - Représentations de Fourier et convolutionGEII - Ma3 - Représentations de Fourier et convolution
GEII - Ma3 - Représentations de Fourier et convolution
 
Capteurs de positions
Capteurs de positionsCapteurs de positions
Capteurs de positions
 
2 signaux et systèmes slideshare
2 signaux et systèmes slideshare2 signaux et systèmes slideshare
2 signaux et systèmes slideshare
 
Batel f re v66
Batel f re v66Batel f re v66
Batel f re v66
 
Cours1
Cours1Cours1
Cours1
 
Ccna day5
Ccna day5Ccna day5
Ccna day5
 
Ccna day4
Ccna day4Ccna day4
Ccna day4
 
Ccna day2
Ccna day2Ccna day2
Ccna day2
 
Ccna day1
Ccna day1Ccna day1
Ccna day1
 
Ccna day3
Ccna day3Ccna day3
Ccna day3
 
Presentation wpf
Presentation wpfPresentation wpf
Presentation wpf
 
1 introduction générale à l'automatique slideshare
1 introduction générale à l'automatique slideshare1 introduction générale à l'automatique slideshare
1 introduction générale à l'automatique slideshare
 

Similaire à Practising Fourier Analysis with Digital Images

Fourier Specturm via MATLAB
Fourier Specturm via MATLABFourier Specturm via MATLAB
Fourier Specturm via MATLAB
ZunAib Ali
 

Similaire à Practising Fourier Analysis with Digital Images (20)

Fourier slide
Fourier slideFourier slide
Fourier slide
 
SP_SNS_C2.pptx
SP_SNS_C2.pptxSP_SNS_C2.pptx
SP_SNS_C2.pptx
 
8169399.ppt
8169399.ppt8169399.ppt
8169399.ppt
 
DISP-2003_L01B_20Feb03.ppt
DISP-2003_L01B_20Feb03.pptDISP-2003_L01B_20Feb03.ppt
DISP-2003_L01B_20Feb03.ppt
 
Lecture7 Signal and Systems
Lecture7 Signal and SystemsLecture7 Signal and Systems
Lecture7 Signal and Systems
 
Ch1 representation of signal pg 130
Ch1 representation of signal pg 130Ch1 representation of signal pg 130
Ch1 representation of signal pg 130
 
lecture_6_-_fourier_series_0.pdf
lecture_6_-_fourier_series_0.pdflecture_6_-_fourier_series_0.pdf
lecture_6_-_fourier_series_0.pdf
 
CVD020 - Lecture Week 2
CVD020 - Lecture Week 2CVD020 - Lecture Week 2
CVD020 - Lecture Week 2
 
Master Thesis on Rotating Cryostats and FFT, DRAFT VERSION
Master Thesis on Rotating Cryostats and FFT, DRAFT VERSIONMaster Thesis on Rotating Cryostats and FFT, DRAFT VERSION
Master Thesis on Rotating Cryostats and FFT, DRAFT VERSION
 
Signals and Systems-Fourier Series and Transform
Signals and Systems-Fourier Series and TransformSignals and Systems-Fourier Series and Transform
Signals and Systems-Fourier Series and Transform
 
SDEE: Lectures 3 and 4
SDEE: Lectures 3 and 4SDEE: Lectures 3 and 4
SDEE: Lectures 3 and 4
 
Circuit Network Analysis - [Chapter3] Fourier Analysis
Circuit Network Analysis - [Chapter3] Fourier AnalysisCircuit Network Analysis - [Chapter3] Fourier Analysis
Circuit Network Analysis - [Chapter3] Fourier Analysis
 
02_signals.pdf
02_signals.pdf02_signals.pdf
02_signals.pdf
 
Fourier analysis
Fourier analysisFourier analysis
Fourier analysis
 
Fourier Specturm via MATLAB
Fourier Specturm via MATLABFourier Specturm via MATLAB
Fourier Specturm via MATLAB
 
Lecture 9
Lecture 9Lecture 9
Lecture 9
 
Ist module 3
Ist module 3Ist module 3
Ist module 3
 
CH3-1.pdf
CH3-1.pdfCH3-1.pdf
CH3-1.pdf
 
160280102001 c1 aem
160280102001 c1 aem160280102001 c1 aem
160280102001 c1 aem
 
IVR - Chapter 3 - Basics of filtering II: Spectral filters
IVR - Chapter 3 - Basics of filtering II: Spectral filtersIVR - Chapter 3 - Basics of filtering II: Spectral filters
IVR - Chapter 3 - Basics of filtering II: Spectral filters
 

Dernier

Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
kauryashika82
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
ciinovamais
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
QucHHunhnh
 
Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.
MateoGardella
 
Gardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch LetterGardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch Letter
MateoGardella
 

Dernier (20)

Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdf
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
Advance Mobile Application Development class 07
Advance Mobile Application Development class 07Advance Mobile Application Development class 07
Advance Mobile Application Development class 07
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docx
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
Gardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch LetterGardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch Letter
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 

Practising Fourier Analysis with Digital Images

  • 1. PRACTICING FOURIER ANALYSIS WITH DIGITAL IMAGES MASTERS IN COMPUTER VISION Frédéric Morain-Nicolier frederic.nicolier@univ-reims.fr 2014
  • 2. 1. INTRODUCTION 1.1. WHO IS IT ? CONTENTS 1. INTRODUCTION 1.1 Who is it ? 1.2 Outline 1.3 References 2. FOURIER AND ITS REPRESENTATIONS 3. UNDERSTANDING THE FOURIER ANALYSIS 4. FOURIER ANALYSIS APPLICATIONS 2 / 139
  • 3. 1. INTRODUCTION 1.1. WHO IS IT ? WHO IS IT ? 3 / 139
  • 4. 1. INTRODUCTION 1.1. WHO IS IT ? CONTACT INFORMATIONS Frédéric Morain-Nicolier I http://pixel-shaker.fr I frederic.nicolier@univ-reims.fr I Dept Geii, IUT Troyes, 9 rue de Québec, 10026 Troyes Cedex I Phone : 03 25 42 71 68 4 / 139
  • 5. 1. INTRODUCTION 1.2. OUTLINE CONTENTS 1. INTRODUCTION 1.1 Who is it ? 1.2 Outline 1.3 References 2. FOURIER AND ITS REPRESENTATIONS 3. UNDERSTANDING THE FOURIER ANALYSIS 4. FOURIER ANALYSIS APPLICATIONS 5 / 139
  • 6. 1. INTRODUCTION 1.2. OUTLINE OUTLINE I Fourier and its representations I Understanding the Fourier Analysis I Fourier Analysis Applications (Focusing on Magnitude and Phase) 6 / 139
  • 7. 1. INTRODUCTION 1.3. REFERENCES CONTENTS 1. INTRODUCTION 1.1 Who is it ? 1.2 Outline 1.3 References 2. FOURIER AND ITS REPRESENTATIONS 3. UNDERSTANDING THE FOURIER ANALYSIS 4. FOURIER ANALYSIS APPLICATIONS 7 / 139
  • 8. 1. INTRODUCTION 1.3. REFERENCES WEB I Earl F. Glynn - Research Notes http://research.stowers-institute.org/efg I Nicolas Thome - Introduction to Image Processing http://webia.lip6.fr/~thomen/Teaching/BIMA.html 8 / 139
  • 9. 1. INTRODUCTION 1.3. REFERENCES BOOKS I D.W. Kammler, A first course in Fourier analysis, Cambridge University Press, 2008. I Jean Dhombres et Jean-Bernard Robert, Fourier, créateur de la physique mathématique, collection “Un savant, une époque”, Belin, 1998. 9 / 139
  • 10. 1. INTRODUCTION 1.3. REFERENCES ARTICLES I Q. Chen, M. Defrise and F. Deconinck, "Symmetric phase-only matched filtering of Fourier-Mellin transforms for image registration and recognition", IEEE pattern analysis and machine intelligence, vol. 16, 1994, p. 1156-1168. I Van des Schaaf A., Van Hateren J., "Modelling the Power Spectra of Natural Images : Statistics and Information", Vision Research, vol. 36, n°17, p. 2759-2770, 1996 I Y. Shapiro, and M. Porat, “Image Representation and Reconstruction from Spectral Amplitude or Phase,” in IEEE International Conference on Electronics, Circuits and Systems 1998, Lisboa, Portugal, 1998, pp. 461-464 I F. Nicolier, O. Laligant, F. Truchetet. Discrete wavelet transform implementation in fourier domain. Journal of Electronic Imaging, 11(3) :338–346, jul 2002 I N. Skarbnik, The Importance of Phase in Image Processing, CCIT Report, 2010 10 / 139
  • 11. 2. FOURIER AND ITS REPRESENTATIONS 2.1. FOURIER CONTENTS 1. INTRODUCTION 2. FOURIER AND ITS REPRESENTATIONS 2.1 Fourier 2.2 Fourier Series and Transform 2.3 Discrete Fourier Transform 2.4 Fast Fourier Transform 2.5 2D DFT 3. UNDERSTANDING THE FOURIER ANALYSIS 4. FOURIER ANALYSIS APPLICATIONS 11 / 139
  • 12. 2. FOURIER AND ITS REPRESENTATIONS 2.1. FOURIER Joseph Fourier 12 WHO IS FOURIER ? 1768 (né à Auxerre) - 1830 Participe à la révolution 1798 : campagne d’Égypte 1802 : préfet de l’Isère (destitué à la restauration) 1817 : élu membre de l’Académie des Sciences 1822 : secrétaire perpétuel de l’AS 1826 : membre de l’Académie française 1822 : publication de la «théorie analytique de la chaleur» Jean Dhombres et Jean-Bernard Robert, Fourier, créateur de la physique mathématique, collection « Un savant, une époque », Belin 1998), ISBN 2-7011-1213-3. septembre 2010 Jean Baptiste Joseph Fourier (1768-1830) I 1768 (born in Auxerre) - 1830 I Active in French revolution I 1798 : Napoleon’s Egypt Campaign 12 / 139
  • 13. 2. FOURIER AND ITS REPRESENTATIONS 2.1. FOURIER WHO IS FOURIER ? Where is Auxerre ? 13 / 139
  • 14. 2. FOURIER AND ITS REPRESENTATIONS 2.1. FOURIER WHO IS FOURIER ? I 1802 : préfet de l’Isère (dismissed during restauration) I On the Propagation of Heat in Solid Bodies, was read to Paris Institute on 21 dec 1807. Laplace and Lagrange objected to what is now Fourier series : “... his analysis ... leaves something to be desired on the score of generality and even rigour...” (from report awarding Fourier math prize in 1811) 14 / 139
  • 15. 2. FOURIER AND ITS REPRESENTATIONS 2.1. FOURIER WHO IS FOURIER ? I 1802 : préfet de l’Isère (dismissed during restauration) I 1817 : member of Académie des Sciences I 1822 : perpetual secretary of A.S. I 1826 : membre de Académie Française I 1822 : publication of La théorie analytique de la chaleur (Analytic Theory of Heat) 15 / 139
  • 16. 2. FOURIER AND ITS REPRESENTATIONS 2.1. FOURIER WHO IS FOURIER ? I In La Théorie Analytique de la Chaleur (Analytic Theory of Heat) (1822), Fourier I developed the theory of the series known by his name, I and applied it to the solution of boundary-value problems in partial differential equations. Good Book (in french !) : Jean Dhombres et Jean-Bernard Robert, Fourier, créateur de la physique mathématique, collection “Un savant, une époque”, Belin, 1998. 16 / 139
  • 17. 2. FOURIER AND ITS REPRESENTATIONS 2.2. FOURIER SERIES AND TRANSFORM CONTENTS 1. INTRODUCTION 2. FOURIER AND ITS REPRESENTATIONS 2.1 Fourier 2.2 Fourier Series and Transform 2.3 Discrete Fourier Transform 2.4 Fast Fourier Transform 2.5 2D DFT 3. UNDERSTANDING THE FOURIER ANALYSIS 4. FOURIER ANALYSIS APPLICATIONS 17 / 139
  • 18. 2. FOURIER AND ITS REPRESENTATIONS 2.2. FOURIER SERIES AND TRANSFORM FOURIER 3c)T RPArNoSFpOaRgMa:tWioHYn? de la chaleur 40 18 / 139
  • 19. 2. FOURIER AND ITS REPRESENTATIONS 2.2. FOURIER SERIES AND TRANSFORM HEAT PROPAGATION I The temperature u(x, t) at time t 0 and coordinate x is a solution of the partial differential equation (PDE) : ¶u ¶t (x, t) = a2 ¶2u ¶x2 (x, y) (2.1) (a2 is the thermal diffusivity of the material). I Fourier observed that e2pisx.e4p2a2s2t (2.2) satisfies the PDE for every choice of s. Its idea was to combine such elementary solutions. 19 / 139
  • 20. 2. FOURIER AND ITS REPRESENTATIONS 2.2. FOURIER SERIES AND TRANSFORM HEAT PROPAGATION : SOLUTION I Fourier wrote the solution as u(x, t) = Z ¥ ¥ A(s)e2pisxe4p2a2s2tds. (2.3) The function A(s) is needed : as the initial temperature is known, u(x, 0) = Z ¥ ¥ A(s)e2pisxds (we recognize the synthesis equation). (2.4) I A(s) can be computed from A(s) = Z ¥ ¥ u(x, 0)e2pisxdx. (2.5) 20 / 139
  • 21. 2. FOURIER AND ITS REPRESENTATIONS 2.2. FOURIER SERIES AND TRANSFORM FOURIER SERIES I Is only defined on periodic signals : x(t + T) = x(t) f (t + T) = f (t). (2.6) I The fundamental period T0 is the smallest T satisfying (2.6). Fundamental frequency f0 and angular frequency w0 are : = 2pf0. (2.7) 6 Periodic Signals -2 -1 0 1 2 “Biological” Time Series T0 0 π 2 π 3π 2 2π 3π 4π t x(t) (Source : Earl F. Glynn - Research Notes) w0 = 2p T0 Biological time series can be quite complex, and will contain noise. 21 / 139
  • 22. 2. FOURIER AND ITS REPRESENTATIONS 2.2. FOURIER SERIES AND TRANSFORM FOURIER SERIES : REAL COEFFICIENTS Expansion of continuous function into weighted sum of sines and cosines. I A P0-periodic function f , defined on R can be written as f (t) = a0 + ¥å k=1 (ak cos(kw0t) + bk sin(kw0t)) (2.8) with a0 = 1 P0 Z P0 f (t)dt, (2.9) ak = 2 P0 Z P0 f (t) cos(kwt)dt, (2.10) bk = 2 P0 Z P0 f (t) sin(kwt)dt. (2.11) 22 / 139
  • 23. 2. FOURIER AND ITS REPRESENTATIONS 2.2. FOURIER SERIES AND TRANSFORM FOURIER SERIES : AN EXAMPLE (Source : http://www.science.org.au/nova/029/029img/wave1.gif) 23 / 139
  • 24. 2. FOURIER AND ITS REPRESENTATIONS 2.2. FOURIER SERIES AND TRANSFORM FOURIER SERIES : COMPLEX COEFFICIENTS IWith complex coefficients : f (t) = ¥å k=¥ ckeikw0t (2.12) where ck = 1 P0 Z P0 f (t)eikw0tdt. (2.13) I If f (t) is real, ck = ck . I For k = 0, ck = average value of f (t) over one period. I a0/2 = c0 ; ak = ck + ck ; bk = i(ck ck) 24 / 139
  • 25. 2. FOURIER AND ITS REPRESENTATIONS 2.2. FOURIER SERIES AND TRANSFORM FOURIER SERIES : COMPLEX COEFFICIENTS f (t) = ¥å k=¥ ckeikw0t I Coefficients can be written as ck = jckjeifk (keep this in mind). (2.14) I ck are the spectral coefficients of f . I Plot of jckj vs angular frequency w is the Magnitude spectrum. I Plot of fk vs w is the phase spectrum. I With discrete Fourier frequencies (kw0), both are discrete spectra. 25 / 139
  • 26. 2. FOURIER AND ITS REPRESENTATIONS 2.2. FOURIER SERIES AND TRANSFORM FOURIER SERIES : OTHER EXAMPLES Given a p-periodic x(t) = t, its Fourier serie is x(t) = 2 sin t sin 2t 2 sin 3 =  − + − ... + sin 3t 3 . . . . (2.15)    sin 2 Given: x(t) = t Fourier Series: 14 Fourier Series sin 3 =  − + − ... sin 3 =  − + − ... selected    sin 2 sin 3 = − + −  ...  sin 2 sin 3 =  − + − ... Given: x(t) = t Fourier Series: sin 2 Given: x(t) = t Fourier Series: 1 2 3 1 2 3 4 5 6 sin 2 4 5 6 Approximate any function as truncated Fourier series  3 2 ( ) 2 sin t t x t t   3 2 ( ) 2 sin t t x t t -1.0 -0.5 0.0 0.5 1.0 1.5 2.0 Fourier Terms in Expansion of x(t) = t t Fourier Terms 0 π 4 π 2 3π 4 π Fourier Series Approximation t x(t) First Six Series Terms  0 π 4 π 2 3π 4 π 0 1 2 3 14 Fourier Series selected Approximate any function as truncated Fourier series  3 2 ( ) 2 sin t t x t t   3 2 ( ) 2 sin t t x t t -1.0 -0.5 0.0 0.5 1.0 1.5 2.0 Fourier Terms in Expansion of x(t) = t t Fourier Terms 0 π 4 π 2 3π 4 π Fourier Series Approximation t x(t) First Six Series Terms 0 π 4 π 2 3π 4 π 0 1 2 3 Fourier Series =  − + − 3 selected sin 2 Approximate any function as truncated Fourier series  3 2 ( ) 2 sin t t x t t  sin 3 2 ( ) 2 sin t t x t t Fourier Series Approximation t x(t) 0 π 4 π 2 3π 4 π 0 1 2 3 100 terms 200 terms (Source : Earl F. Glynn - Research Notes) (show animations) 26 / 139
  • 27. 2. FOURIER AND ITS REPRESENTATIONS 2.2. FOURIER SERIES AND TRANSFORM (CONTINUOUS) FOURIER TRANSFORM I A non-periodic function, defined on R, can be synthesized with f (t) = 1 2p Z +¥ ¥ F(w)eiwtdw. (2.16) I The analysis equation being F(w) = Z +¥ ¥ f (t)eiwtdt. (2.17) (Beware to convergence conditions - Gibbs - see Dirichlet theorem) 27 / 139
  • 28. 2. FOURIER AND ITS REPRESENTATIONS 2.2. FOURIER SERIES AND TRANSFORM (CONTINUOUS) FOURIER TRANSFORM : MAIN PROPERTIES 18 Fourier Transform Properties of the Fourier Transform (Source : Wikipedia) From http://en.wikipedia.org/wiki/Continuous_Fourier_transform Also see Schaum’s Theory and Problems: Signals and Systems, Hwei P. Hsu, 1995, pp. 219-223 28 / 139
  • 29. 2. FOURIER AND ITS REPRESENTATIONS 2.2. FOURIER SERIES AND TRANSFORM (CONTINUOUS) FOURIER TRANSFORM : MAIN PROPERTIES Important properties (for this course) : I Shift theorem : g(t a) eiawG(w). (2.18) I Scaling : g(at) 1 jaj G( w a ). (2.19) I Convolution theorem : (g h)(t) G(w)H(w). (2.20) 29 / 139
  • 30. 2. FOURIER AND ITS REPRESENTATIONS 2.3. DISCRETE FOURIER TRANSFORM CONTENTS 1. INTRODUCTION 2. FOURIER AND ITS REPRESENTATIONS 2.1 Fourier 2.2 Fourier Series and Transform 2.3 Discrete Fourier Transform 2.4 Fast Fourier Transform 2.5 2D DFT 3. UNDERSTANDING THE FOURIER ANALYSIS 4. FOURIER ANALYSIS APPLICATIONS 30 / 139
  • 31. 2. FOURIER AND ITS REPRESENTATIONS 2.3. DISCRETE FOURIER TRANSFORM DISCRETE FOURIER TRANSFORM As a digital image is a discrete 2D signal, a discrete version of FT is needed. The previous definitions are adapted. I A discrete signal s[n] is N-periodic if s[n + N] = s[n]. I Fundamental period N0 is the smallest N satisfying above equation. I Fundamental angular frequency is W0 = 2p N0 . 31 / 139
  • 32. 2. FOURIER AND ITS REPRESENTATIONS 2.3. DISCRETE FOURIER TRANSFORM DISCRETE FOURIER TRANSFORM (DFT) : DEFINITION I A discrete signal s[n], n = 0, 1, . . . ,N 1, can be analyzed with S[k] = DFTfs[n]g = N1 å n=0 s[n]ei2pkn/N. (2.21) with k = 0, 1, . . . ,N 1 I The inverse DFT (IDFT = DFT1 = synthesis equation) is s[n] = IDFTfS[k]g = 1 N N1 å k=0 S[k]ei2pkn/N. (2.22) 32 / 139
  • 33. 2. FOURIER AND ITS REPRESENTATIONS 2.3. DISCRETE FOURIER TRANSFORM DISCRETE FOURIER TRANSFORM (DFT) I One-to-one correspondence between s[n] and S[k] I DFT closely related to discrete Fourier series and the Fourier Transform I DFT is ideal for computer manipulation I Share many of the same properties as Fourier Transform I Multiplier 1N can be used in DFT or IDFT. Sometimes 1 pN used in both. I Remember that FT (and therefore DFT) is defined on periodic signals. 33 / 139
  • 34. 2. FOURIER AND ITS REPRESENTATIONS 2.4. FAST FOURIER TRANSFORM CONTENTS 1. INTRODUCTION 2. FOURIER AND ITS REPRESENTATIONS 2.1 Fourier 2.2 Fourier Series and Transform 2.3 Discrete Fourier Transform 2.4 Fast Fourier Transform 2.5 2D DFT 3. UNDERSTANDING THE FOURIER ANALYSIS 4. FOURIER ANALYSIS APPLICATIONS 34 / 139
  • 35. 2. FOURIER AND ITS REPRESENTATIONS 2.4. FAST FOURIER TRANSFORM FAST FOURIER TRANSFORM X[k] = N1 å n=0 x[n]ei2pkn/N. (2.23) I The FFT is a computationally efficient algorithm to compute the Discrete Fourier Transform and its inverse. I Evaluating the sum above directly would take O(N2) arithmetic operations. 35 / 139
  • 36. 2. FOURIER AND ITS REPRESENTATIONS 2.4. FAST FOURIER TRANSFORM FAST FOURIER TRANSFORM X[k] = N1 å n=0 x[n]ei2pkn/N, (2.24) N = ei kwn Wkn N ) X[k] = N1 å n=0 x[n]Wkn N . (2.25) Butterfly algorithm 36 / 139
  • 37. 2. FOURIER AND ITS REPRESENTATIONS 2.4. FAST FOURIER TRANSFORM FAST FOURIER TRANSFORM I The FFT algorithm reduces the computational burden to O(NlogN) arithmetic operations. I FFT requires the number of data points to be a power of 2 (usually 0 padding is used to make this true) I FFT requires evenly-spaced time series I Even faster FFT with sparse signals (SFFT : Sparse FFT) 37 / 139
  • 38. 2. FOURIER AND ITS REPRESENTATIONS 2.5. 2D DFT CONTENTS 1. INTRODUCTION 2. FOURIER AND ITS REPRESENTATIONS 2.1 Fourier 2.2 Fourier Series and Transform 2.3 Discrete Fourier Transform 2.4 Fast Fourier Transform 2.5 2D DFT 3. UNDERSTANDING THE FOURIER ANALYSIS 4. FOURIER ANALYSIS APPLICATIONS 38 / 139
  • 39. Spatial 2. FOURIER Frequency in Images AND ITS REPRESENTATIONS 2.5. 2D DFT SPATIAL FREQUENCIES 33 Frequency = 1 Frequency = 2 1 Cycle 2 Cycles (Source : Earl F. Glynn - Research Notes) 39 / 139
  • 40. 2. FOURIER AND ITS REPRESENTATIONS 2.5. 2D DFT DFT ON IMAGE F[u, v] = 1 MN M1 å m=0 N1 å n=0 I[m, n]ei2p(umM +v nN ) (2.26) 34 2D Discrete Fourier Transform − − 1 1 M N F u v π Σ Σ 1 I m n e = ⋅ = = 0 0 [ , ] n Fourier Transform um −  +  vn N M (0,N/2) (0,0)   2 i (-M/2,0) (M/2,0) [ , ] m MN M pixels SM units I[m,n] F[u,v] (0,-N/2) (M,N) Spatial Domain Frequency Domain (Source : Earl F. Glynn - Research Notes) Source: Seul et al, Practical Algorithms for Image Analysis, 2000, p. 249, 262. (0,0) N pixels SN units 2D FFT can be computed as two discrete Fourier transforms in 1 dimension 40 / 139
  • 41. 2. FOURIER AND ITS REPRESENTATIONS 2.5. 2D DFT DFT ON IMAGE I Separable implementation : 2D DFT (or FFT) is computed as two stages of 1D discrete Fourier transforms (matlab : fft2). I Ix Ixy (process on columns) (process on lines) 41 / 139
  • 42. 3. UNDERSTANDING THE FOURIER ANALYSIS 3.1. READING THE 2D-DFT CONTENTS 1. INTRODUCTION 2. FOURIER AND ITS REPRESENTATIONS 3. UNDERSTANDING THE FOURIER ANALYSIS 3.1 Reading the 2D-DFT 3.2 Magnitude and Phase Spectra 3.3 Translation and Rotation in Fourier Domain 3.4 Magnitude and Phase Information 3.5 Magnitude and Phase Reconstruction 4. FOURIER ANALYSIS APPLICATIONS 42 / 139
  • 43. 3. UNDERSTANDING THE FOURIER ANALYSIS 3.1. READING THE 2D-DFT WHERE IS THE INFORMATION ? 35 2D Discrete Fourier Transform Fourier Transform (-M/2,0) (M/2,0) I[m,n] F[u,v] Spatial Domain Frequency Domain (0,0) (0,0) (0,N/2) (0,-N/2) (M,N) M pixels SM units N pixels SN units Edge represents highest frequency, smallest resolvable length (2 pixels) Center represents lowest frequency, which represents average pixel value (Source : Earl F. Glynn - Research Notes) 43 / 139
  • 44. 3. UNDERSTANDING THE FOURIER ANALYSIS 3.1. READING THE 2D-DFT EXAMPLE 1 36 2D FFT Example FFTs Using ImageJ ImageJ Steps: (1) File | Open, (2) Process | FFT | FFT (0,0) Origin (0,0) Origin (Source : Earl F. Glynn - Research Notes) Image 2D-DFT (Magnitude) Spatial Domain Frequency Domain 44 / 139
  • 45. 3. UNDERSTANDING THE FOURIER ANALYSIS 3.1. READING THE 2D-DFT EXAMPLE - SWAPPING THE QUADRANTS 37 2D FFT Example FFTs Using ImageJ ImageJ Steps: Process | FFT | Swap Quadrants (0,0) Origin (0,0) Origin Default d (Source : Earl F. Glynn - Research Notesis)play is to swap quadrants Image 2D-DFT (Magnitude) Spatial Domain Frequency Domain (matlab : fftshift) Regularity in image manifests itself in the degree of order or randomness in FFT pattern. 45 / 139
  • 46. 3. UNDERSTANDING THE FOURIER ANALYSIS 3.1. READING THE 2D-DFT TOY EXAMPLES 170 The Fourier transform Figure 7.1 Examples of Fourier magnitude images (right column) of images containing only sinusoids (left and middle column). Axes have been added for clarity. See text for details. (Source : Introduction to Image Processing - Univ. Utrecht) 46 / 139
  • 47. 3. UNDERSTANDING THE FOURIER ANALYSIS 3.1. READING THE 2D-DFT REAL EXAMPLE Image 2D-DFT (Magnitude) 38 2D FFT Example FFTs Using ImageJ ImageJ Steps: (1) File | Open, (2) Process | FFT | FFT Overland Park Arboretum and Botanical Gardens, June 2006 (Source : Earl F. Glynn - Research Notes) Spatial Domain Frequency Domain Regularity in image manifests itself in the degree of order or randomness in FFT pattern. 47 / 139
  • 48. 3. UNDERSTANDING THE FOURIER ANALYSIS 3.1. READING THE 2D-DFT REAL EXAMPLES 7.1 The relation between digital images and sinusoids 171 Figure 7.2 Examples of Fourier magnitude images (right column) of real images (left column). The top example is of a binary image, the other images are grey-valued. See text for details. (Source : Introduction to Image Processing - Univ. Utrecht) 48 / 139
  • 49. 3. UNDERSTANDING THE FOURIER ANALYSIS 3.2. MAGNITUDE AND PHASE SPECTRA CONTENTS 1. INTRODUCTION 2. FOURIER AND ITS REPRESENTATIONS 3. UNDERSTANDING THE FOURIER ANALYSIS 3.1 Reading the 2D-DFT 3.2 Magnitude and Phase Spectra 3.3 Translation and Rotation in Fourier Domain 3.4 Magnitude and Phase Information 3.5 Magnitude and Phase Reconstruction 4. FOURIER ANALYSIS APPLICATIONS 49 / 139
  • 50. 3. UNDERSTANDING THE FOURIER ANALYSIS 3.2. MAGNITUDE AND PHASE SPECTRA MAGNITUDE AND PHASE SPECTRA The DFT coefficients are complex numbers : I Magnitude spectrum is generally considered the most readable I Phase spectrum is intricated 50 / 139
  • 51. 3. UNDERSTANDING THE FOURIER ANALYSIS 3.2. MAGNITUDE AND PHASE SPECTRA AN EXAMPLE 1 0.8 0.6 0.4 0.2 0 f 50 100 150 200 250 50 100 150 200 250 x 104 3 2.5 2 1.5 1 0.5 50 100 150 200 250 50 100 150 200 3 2 1 0 −1 −2 250 −3 Magnitude : kFk Phase : f(F) 51 / 139
  • 52. 3. UNDERSTANDING THE FOURIER ANALYSIS 3.2. MAGNITUDE AND PHASE SPECTRA ANOTHER EXAMPLE 1 0.8 0.6 0.4 0.2 0 f 50 100 150 200 250 50 100 150 200 250 x 104 3.5 3 2.5 2 1.5 1 0.5 50 100 150 200 250 50 100 150 200 3 2 1 0 −1 −2 250 −3 Magnitude : kFk Phase : f(F) 52 / 139
  • 53. 3. UNDERSTANDING THE FOURIER ANALYSIS 3.2. MAGNITUDE AND PHASE SPECTRA MAGNITUDE SPECTRUM 1 0.8 0.6 0.4 0.2 0 50 100 150 200 250 50 100 150 200 250 x 104 3.5 3 2.5 2 1.5 1 0.5 I F[0, 0] (at the center) contains the mean value of the image F[u, v] = 1 MN M1 å m=0 N1 å n=0 I[m, n]ei2p(umM +v nN ) (3.1) ) F[0, 0] = 1 MN M1 å m=0 N1 å n=0 I[m, n] (3.2) 53 / 139
  • 54. 3. UNDERSTANDING THE FOURIER ANALYSIS 3.2. MAGNITUDE AND PHASE SPECTRA MAGNITUDE SPECTRUM 1 0.8 0.6 0.4 0.2 0 50 100 150 200 250 50 100 150 200 250 x 104 3.5 3 2.5 2 1.5 1 0.5 f kFk I Very high dynamics I Low frequencies have a greater magnitude than high frequencies I It is common to represent log(1 + kFk) 54 / 139
  • 55. 3. UNDERSTANDING THE FOURIER ANALYSIS 3.2. MAGNITUDE AND PHASE SPECTRA LOG MAGNITUDE SPECTRUM 1 0.8 0.6 0.4 0.2 0 50 100 150 200 250 50 100 150 200 250 x 104 3.5 3 2.5 2 1.5 1 0.5 50 100 150 200 250 50 100 150 200 250 10 9 8 7 6 5 4 3 2 1 kFk log(1 + kFk) 55 / 139
  • 56. 3. UNDERSTANDING THE FOURIER ANALYSIS 3.2. MAGNITUDE AND PHASE SPECTRA LOG MAGNITUDE SPECTRUM #2 1 0.8 0.6 0.4 0.2 0 50 100 150 200 250 50 100 150 200 250 x 104 3 2.5 2 1.5 1 0.5 50 100 150 200 250 50 100 150 200 250 10 9 8 7 6 5 4 3 2 1 kFk log(1 + kFk) 56 / 139
  • 57. 3. UNDERSTANDING THE FOURIER ANALYSIS 3.2. MAGNITUDE AND PHASE SPECTRA STRUCTURES IN MAGNITUDE SPECTRUM 1 0.8 0.6 0.4 0.2 0 50 100 150 200 250 50 100 150 200 250 10 9 8 7 6 5 4 3 2 1 f log(1 + kFk) I Edge in spatial domain , line in Fourier Domain (orthogonal to the edge) 57 / 139
  • 58. 3. UNDERSTANDING THE FOURIER ANALYSIS 3.2. MAGNITUDE AND PHASE SPECTRA STRUCTURES IN MAGNITUDE SPECTRUM Image 2D-DFT (Magnitude) 38 2D FFT Example FFTs Using ImageJ ImageJ Steps: (1) File | Open, (2) Process | FFT | FFT Overland Park Arboretum and Botanical Gardens, June 2006 (Source : Earl F. Glynn - Research Notes) Spatial Domain Frequency Domain Regularity in image manifests itself in the degree of order or randomness in FFT pattern. I Where are the vertical and horizontal edges ? 58 / 139
  • 59. 3. UNDERSTANDING THE FOURIER ANALYSIS 3.2. MAGNITUDE AND PHASE SPECTRA STRUCTURES IN MAGNITUDE SPECTRUM Image 2D-DFT (Magnitude) 38 2D FFT Example FFTs Using ImageJ ImageJ Steps: (1) File | Open, (2) Process | FFT | FFT Overland Park Arboretum and Botanical Gardens, June 2006 (Source : Earl F. Glynn - Research Notes) Spatial Domain Frequency Domain Regularity in image manifests itself in the degree of order or randomness in FFT pattern. I Where are the vertical and horizontal edges ? ) Remember the implicit periodicity ! 59 / 139
  • 60. 3. UNDERSTANDING THE FOURIER ANALYSIS 3.2. MAGNITUDE AND PHASE SPECTRA STRUCTURES IN MAGNITUDE SPECTRUM I Strong main lines in image are emphasized in Fourier 40 Application of FFT Pattern/Texture Recognition (Source : Earl F. Glynn - Research Notes) Source: Lee and Chen, A New Method for Coarse Classification of Textures and Class Weight Estimation 60 / 139
  • 61. 3. UNDERSTANDING THE FOURIER ANALYSIS 3.2. MAGNITUDE AND PHASE SPECTRA STRUCTURES IN MAGNITUDE SPECTRUM I Strong main lines in image are emphasized in Fourier I (Source : N. Thome) 61 / 139
  • 62. 3. UNDERSTANDING THE FOURIER ANALYSIS 3.3. TRANSLATION AND ROTATION IN FOURIER DOMAIN CONTENTS 1. INTRODUCTION 2. FOURIER AND ITS REPRESENTATIONS 3. UNDERSTANDING THE FOURIER ANALYSIS 3.1 Reading the 2D-DFT 3.2 Magnitude and Phase Spectra 3.3 Translation and Rotation in Fourier Domain 3.4 Magnitude and Phase Information 3.5 Magnitude and Phase Reconstruction 4. FOURIER ANALYSIS APPLICATIONS 62 / 139
  • 63. 3. UNDERSTANDING THE FOURIER ANALYSIS 3.3. TRANSLATION AND ROTATION IN FOURIER DOMAIN TRANSLATION EXAMPLE 50 100 150 200 250 50 100 150 200 250 1 0.9 0.8 0.7 0.6 0.5 0.4 0.3 0.2 0.1 0 50 100 150 200 250 50 100 150 200 250 4 3.5 3 2.5 2 1.5 1 0.5 0 f log(1 + kFk) 50 100 150 200 250 50 100 150 200 250 1 0.9 0.8 0.7 0.6 0.5 0.4 0.3 0.2 0.1 0 50 100 150 200 250 50 100 150 200 250 4 3.5 3 2.5 2 1.5 1 0.5 0 fT log(1 + kFTk) 63 / 139
  • 64. 3. UNDERSTANDING THE FOURIER ANALYSIS 3.3. TRANSLATION AND ROTATION IN FOURIER DOMAIN TRANSLATION I Shift in spatial domain : f [k] ) F[u] ) kF[u]k f [k a] ) ei2pa uN F[u] ) kF[u]k. (3.3) I Magnitude spectrum is invariant to spatial translation. I Localization information is in phase. I Remember this for later ! 64 / 139
  • 65. 3. UNDERSTANDING THE FOURIER ANALYSIS 3.3. TRANSLATION AND ROTATION IN FOURIER DOMAIN ROTATION EXAMPLE (Source : N. Thome) 65 / 139
  • 66. 3. UNDERSTANDING THE FOURIER ANALYSIS 3.3. TRANSLATION AND ROTATION IN FOURIER DOMAIN ROTATION I One can easily shows that FT [f [x cos q + y sin q,x sin q + y cos q]] = F[u cos q + v sin q,u sin q + v cos q]. (3.4) I q-rotation in spatial domain , q-rotation in Fourier domain (nice !) 66 / 139
  • 67. 3. UNDERSTANDING THE FOURIER ANALYSIS 3.3. TRANSLATION AND ROTATION IN FOURIER DOMAIN ROTATION : ANOTHER EXAMPLE (Source : N. Thome) I Pay attention to padding when rotating. 67 / 139
  • 68. 3. UNDERSTANDING THE FOURIER ANALYSIS 3.4. MAGNITUDE AND PHASE INFORMATION CONTENTS 1. INTRODUCTION 2. FOURIER AND ITS REPRESENTATIONS 3. UNDERSTANDING THE FOURIER ANALYSIS 3.1 Reading the 2D-DFT 3.2 Magnitude and Phase Spectra 3.3 Translation and Rotation in Fourier Domain 3.4 Magnitude and Phase Information 3.5 Magnitude and Phase Reconstruction 4. FOURIER ANALYSIS APPLICATIONS 68 / 139
  • 69. 3. UNDERSTANDING THE FOURIER ANALYSIS 3.4. MAGNITUDE AND PHASE INFORMATION MAGNITUDE AND PHASE 1 0.8 0.6 0.4 0.2 0 50 100 150 200 250 50 100 150 200 250 10 9 8 7 6 5 4 3 2 1 50 100 150 200 250 50 100 150 200 3 2 1 0 −1 −2 250 −3 I Localization is in Phase, hard to read I Frequential content is in Magnitude, easy to read I But, what spatial domain information is in magnitude (and phase) ? 69 / 139
  • 70. 3. UNDERSTANDING THE FOURIER ANALYSIS 3.4. MAGNITUDE AND PHASE INFORMATION MAGNITUDE AND PHASE f log(1 + kFk) f(F) I Take the IFT with only magnitude or phase. 70 / 139
  • 71. 3. UNDERSTANDING THE FOURIER ANALYSIS 3.4. MAGNITUDE AND PHASE INFORMATION IFT WITH MAGNITUDE AND PHASE ONLY I Starting from F = FT[f ] = kFk.eif(F) (3.5) I two images can be obtained : fM = FT1[kFk], (3.6) fP = FT1[eif(F)] = FT1[ F kFk ]. (3.7) 71 / 139
  • 72. 3. UNDERSTANDING THE FOURIER ANALYSIS 3.4. MAGNITUDE AND PHASE INFORMATION IFT WITH MAGNITUDE AND PHASE ONLY fM fP I Magnitude contains almost no useful spatial information I Main structures can be retrieved from phase I Let’s play to mix images ! 72 / 139
  • 73. 3. UNDERSTANDING THE FOURIER ANALYSIS 3.4. MAGNITUDE AND PHASE INFORMATION MAGNITUDE AND PHASE MIXING I Take two images : f g I and their Fourier transforms : F = kFk.eif(F), (3.8) G = kGk.eif(G) (3.9) 73 / 139
  • 74. 3. UNDERSTANDING THE FOURIER ANALYSIS 3.4. MAGNITUDE AND PHASE INFORMATION MAGNITUDE AND PHASE MIXING I Two new images by swapping magnitude and phase : I1 = kFk.eif(G), (3.10) I2 = kGk.eif(F). (3.11) I Guess the result ! 74 / 139
  • 75. 3. UNDERSTANDING THE FOURIER ANALYSIS 3.4. MAGNITUDE AND PHASE INFORMATION MAGNITUDE AND PHASE MIXING f g kFk.eif(G) kGk.eif(F) 75 / 139
  • 76. 3. UNDERSTANDING THE FOURIER ANALYSIS 3.4. MAGNITUDE AND PHASE INFORMATION We first wish to examine qualitatively- which of the two, magnitude or phase, carries more visual information. This can be most vividly demonstrated by the following experiment: the Fourier components- (phase and magnitude) are generated for the two images of same dimensions, and then swapped (see figure 1), whereby the reconstructed images appears to be more similar to the one whose Fourier phase was used in the reconstruction. This experiment was previously suggested by Oppenheim in [7] and elsewhere. MAGNITUDE AND PHASE MIXING : ANOTHER EXAMPLE Figure 1: Swapping the Fourier phase and magnitude in images. Top left - original Lena image. Top right- original monkey image. Bottom left- IFT of Lena phase and monkey magnitude. Bottom right- IFT of monkey phase and Lena magnitude. (Source : N. Skarbnik - CCIT Report) 2 76 / 139
  • 77. pronounced by individuals of different gender were recorded. The signals' phase and magnitude were swapped. The resulting sentences were played to human listeners- which were able to understand the meaning of the sentence, as well as to identify the gender of the speaker. Thus, it appears that most of the signal's information is carried by its phase in 1D case as well. The effect of using a swapped magnitude resulted in appearance of noise, in a manner similar to the 2D case. 3. UNDERSTANDING THE FOURIER ANALYSIS 3.4. MAGNITUDE AND PHASE INFORMATION MAGNITUDE AND PHASE MIXING : EVEN FOR SIGNALS ! The reader is encouraged to review figure 2 and to examine the spectrograms similarity, or to use this link for the audio files (click images to download the file) in order to evaluate the importance of phase in human voice signals. Figure 2: Exchanging the Fourier phase and magnitude in voice. Top left - woman voice spectrogram. Top right- man voice spectrogram. Bottom left- spectrogram of woman voice phase and man voice magnitude. Bottom right- spectrogram of man voice phase and woman voice magnitude. Both reconstructions are primarily dominated by Fourier phase, and not the magnitude. (Source : N. Skarbnik - CCIT Report) Next, let us compare the global phase and magnitude by reviewing their distribution in a realistic image (Lena image in this case). I Listen the results 77 / 139
  • 78. 3. UNDERSTANDING THE FOURIER ANALYSIS 3.4. MAGNITUDE AND PHASE INFORMATION MAGNITUDE MODELISATION I Phase is more informative than magnitude I The Magnitude spectra is predictable. For natural images (and signals) : kF[u, b]k decreases when p u2 + v2 increases. I Some models exists, see [SCH96] 1 1. Van des Schaaf A., Van Hateren J., Modelling the Power Spectra of Na-tural Images : Statistics and Information, Vision Research, vol. 36, n°17, p. 2759-2770, 1996 78 / 139
  • 79. 3. UNDERSTANDING THE FOURIER ANALYSIS 3.4. MAGNITUDE AND PHASE INFORMATION POWER SPECTRA OF NATURAL IMAGES From [SCH96] 2 : I It has been found that power spectra of natural (ie not artificial) images tends to depend as 1/f 2. I From a set of 276 images, taken from a CCD camera I Different outdoor environments (woods, fields, parks, residential areas), at various times of the day, in various seasons, and in various types of weather (sunny, overcast, foggy, rainy) I Power Spectra : S = 1 Npixels kFk2 I Take the average Power Spectra over the 276 images 2. Van des Schaaf A., Van Hateren J., Modelling the Power Spectra of Na-tural Images : Statistics and Information, Vision Research, vol. 36, n°17, p. 2759-2770, 1996 79 / 139
  • 80. 3. UNDERSTANDING THE FOURIER ANALYSIS 3.4. MAGNITUDE AND PHASE INFORMATION POWER SPECTRA OF NATURAL IMAGES FIGURE 2.1: (A) The average power as a function of spatial frequency. Fat dots show the average over the complete set of the logarithm of the circularly averaged individual power spectra. Small dots give the standard deviation from the average of corresponding plots of individual images. (B) The average power as a function of orientation. Here the power spectra are first averaged over spatial frequency, then the logarithm is taken, and finally the plots are averaged over the complete set (fat dots). Small dots as in (A). (Source : Van des Schaaf A., Van Hateren J., Modelling the Power Spectra of Natural Images : Statistics and because it Information, is absent in a Vision set of images Research, without vol. 36, dominant n°17, p. orientations 2759-2770, (1996) mostly images taken from soil covered with leaves and twigs with the camera pointed vertically at random orientations). The small dots in Fig. 2.1A,B show the standard deviation of the corresponding plots of individual images in the set. 80 / 139
  • 81. 3. UNDERSTANDING THE FOURIER ANALYSIS 3.4. MAGNITUDE AND PHASE INFORMATION POWER SPECTRA OF NATURAL IMAGES FIGURE 2.2: (A) Example traces of the power spectra of five individual natural images. Dots show the logarithm of the circularly averaged power spectrum as a function of spatial frequency. The lines show the fits of the 1/f α model. The scaling of the vertical axis belongs to the top trace. For clarity, the lower traces are shifted -2, -6, -8, and -10 log-units, respectively. (B) Distribution of r.m.s.-contrasts for the entire set of 276 natural images. (C) Distribution of 1/f-exponents (α) for the entire set. (Source : Van des Schaaf A., Van Hateren J., Modelling the Power Spectra of Natural Images : Statistics and Information, Vision Research, vol. 36, n°17, p. 2759-2770, 1996) Not only the r.m.s.-contrast, and consequently the total power, vary for individual images, but also the shape of the power spectrum. As shown in previous studies and by the almost straight line in Fig. 2.1A, the spectral power, averaged over many images, varies approximately as 1/f α as a function of spatial frequency, with the 1/f-exponent, α, close to 2. If we instead inspect the spectra of individual images, 81 / 139
  • 82. 3. UNDERSTANDING THE FOURIER ANALYSIS 3.5. MAGNITUDE AND PHASE RECONSTRUCTION CONTENTS 1. INTRODUCTION 2. FOURIER AND ITS REPRESENTATIONS 3. UNDERSTANDING THE FOURIER ANALYSIS 3.1 Reading the 2D-DFT 3.2 Magnitude and Phase Spectra 3.3 Translation and Rotation in Fourier Domain 3.4 Magnitude and Phase Information 3.5 Magnitude and Phase Reconstruction 4. FOURIER ANALYSIS APPLICATIONS 82 / 139
  • 83. where not all FT information is available (like with SAR images and X-ray crystallography) or when it is degraded. We wish to demonstrate that the use of local features allows better algorithm performance: faster convergence, or usage of less a priory known data. We also intend to demonstrate that phase based algorithms sometimes result in a superior outcome compared to magnitude based ones. 3. UNDERSTANDING THE FOURIER ANALYSIS 3.5. MAGNITUDE AND PHASE RECONSTRUCTION PARTIAL MAGNITUDE RECONSTRUCTION We will address iterative schemes, as the closed form solutions demand solving a large set of linear equations, which in turn involves inversion of appropriate matrices. Those matrices inversion is impractical for images of dimensions above 16X16 pixels. I How much magnitude is it possible to reconstruct ? I Iterative scheme proposed in [Sha98] I Allow the reconstruction of 25% of the image I The authors report a decent signal reconstruction after 50 iterations A Global Magnitude reconstruction scheme presented in [2] can be seen in the following figure 5. The proposed methods allow the reconstruction of a signal using at least 25% of the image (half of the signal in each dimension) and its Fourier magnitude. As the reader can see, the reconstruction is achieved by an iterative detection of the unknown part of the signal. The authors of [2] report a decent signal reconstruction after 50 iterations. In their next paper [3] the authors propose a Local magnitude-based Figure 5: A flowchart of image reconstruction from global magnitude. Diagram adopted from [2]. [SHA98] Y. Shapiro, and M. Porat, “Image Representation and Reconstruction from Spectral Amplitude or Phase,” in IEEE International Conference on Electronics, Circuits and Systems 1998, Lisboa, Portugal, 1998, pp. 461-464. 5 image reconstruction method. While the reconstruction process converges faster (fever stages for same quality- see figure 7), it demands more computations. Out of those stages, the last one, for example, will demand the same number of iterations as the whole Global Magnitude based method. On the other hand the number of spatial points to be known in advance drops to 1 as opposed to the ~25% needed by the Global Magnitude based method. The proposed method consists of application of the Global Magnitude based method to an increasing part of the original signal, until whole signal reconstruction is achieved. A graphical description can be seen in figure 7. As can be seen from the following figure, the scheme is applied to a sub signal of the dimensions of [2k, 2k], where k is the iteration number (Xk is the appropriate label on the figure). An N by M image will demand 2 log (max[M, N]) applications of the Global magnitude scheme (which is iterative too) to a sub image of [2k, 2k] dimensions. 83 / 139
  • 84. 3. UNDERSTANDING THE FOURIER ANALYSIS 3.5. MAGNITUDE AND PHASE RECONSTRUCTION PARTIAL MAGNITUDE RECONSTRUCTION - ALGORITHM x FFT X Phase e iφX insert xc y FFT Y Mag. ||Y || IFFT x cancel border xc 84 / 139
  • 85. 3. UNDERSTANDING THE FOURIER ANALYSIS 3.5. MAGNITUDE AND PHASE RECONSTRUCTION PARTIAL MAGNITUDE RECONSTRUCTION - EXAMPLE Initial After 50 iterations 85 / 139
  • 86. 3. UNDERSTANDING THE FOURIER ANALYSIS 3.5. MAGNITUDE AND PHASE RECONSTRUCTION PHASE ONLY RECONSTRUCTION 616 IEEE TRANSACTIONS OAN C OUSTICS ,P EECH, AND SIGNAL PROCESSING, VOLA . SSP-28N , O. 6, DECEMBER 1980 v. NUMERICAALL GORITHMFSO R RECONSTRUCTION FROM SAMPLES OF A PHASE FUNCTION In Section 11, we presented two sets of conditions, embodied in Theorems 1 and 2 , under which a sequence is uniquely specified to within a positive scale factor by the phase of its Fourier transform. In this section, we describe two numerical algorithms which can be used to reconstruct a sequence satis-fying I Is it possible to reconstruct an image from phase only ? I Iterative scheme proposed in [HAY82] I Needs an M-point FFT (with M 2N). the requirements of Theorem 1 from samples of its phase function when the location of the first nonzero point of x [ n ] and the interval outside of which x [ n ] is zero are known. Although these algorithms will only be discussed in terms of reconstructing sequences satisfying the conditions of Theorem 1, the reconstruction of sequences meeting the requirements of Theorem 2 may be accomplished by simply reconstructing the finite length sequence %In] defined in ( 5 ) using the nega-tive of the specified phase samples and then computing the convolutional inverse sequence. The first algorithm presented below is an iterative technique in which the estimate of X [ . ] is improved in each iteration. This algorithm is similar to the iterative algorithms developed by Gerchberg and Saxton [ 6 ] and Fienup [ 7 ] for reconstruct-ing a signal from magnitude information and to the iterative algorithm developed by Quatieri [ 8 ] for reconstructing a signal from its phase under the assumption that the signal is minimum phase. The second algorithm is a closed form solu-tion which is obtained by solving a set of linear equations. Under the conditions specified in Theorem 1, this algorithm provides the desired sequence x [ n ] to within a scale factor when the location of the first nonzero point of x [ n ] and the interval outside of which x [n] is zero are known. In the discussions which follow, x [ n ] is used to denote a sequence which satisfies the conditions of Theorem 1 and is zero outside the interval 0 d n d N - 1 with x [ O ] # 0. In the more general case (see footnote 3), a linear phase term may be added to the given phase to accomplish this. A. Iterative Algorithm The M-point discrete Fourier transform (DFT) of x [ n ] will be denoted as [HAY82] Hayes, M. The Reconstruction of a Multidimensional Sequence From the Phase or Magnitude of Its Fourier Transform. Acoustics, Speech i o (k) and Signal Processing, = I X(kI e x IEEE Transactions (2 1) on 30, no. 2 (1982) : 140-154 where it is assumed that M 2 2N. Then, an iterative technique to reconstruct the sequence x [ n ] from the M samples of its phase e,@), k = 0, 1, - - , M - 1, as illustrated in Fig. 1 and may be described as follows. Step 1: We begin with I Xo(k)l, an initial guess of the un-known DFT magnitude and form the first estimate, X,@), of X(k) using the specified phase function, i.e., Xl(k) = IXO(k)l e ie,(k) (22) Computing the inverse DFT of X,@) provides the first esti-mate, x1 [ n ] , of x [ n ] . Since an M-point DFT is used, x1 [ n ] is I I I I I I t r p I I I I r-l M-POINT DFT I II I A I I I I I I M-POINT IDFT I I Fig. 1. Block diagram of the iterative algorithm for reconstructing a signal from its phase. From this, a new estimate x z [ n ] is obtained from the inverse DFT of X , (k). Repetitive application of Steps 2 and 3 defines the iteration. In this iterative procedure, the total squared error between x [ n ] and its estimate is nonincreasing with each iteration. To see this, let x p [ n ]d enote the estimate after the pth iteration and define the error Ep as From Parseval's theorem, 86 / 139
  • 87. 3. UNDERSTANDING THE FOURIER ANALYSIS 3.5. MAGNITUDE AND PHASE RECONSTRUCTION PHASE ONLY RECONSTRUCTION - ALGORITHM x FFTM X Phase e iφX y Y Mag. ||Y || IFFT N 0 M=3N-1 FFT initialize with ||Y ||=1 N 87 / 139
  • 88. 3. UNDERSTANDING THE FOURIER ANALYSIS 3.5. MAGNITUDE AND PHASE RECONSTRUCTION PHASE ONLY RECONSTRUCTION - EXAMPLE Initial After 10 iterations and M = 2N 1 88 / 139
  • 89. 4. FOURIER ANALYSIS APPLICATIONS 4.1. CLASSIC APPLICATIONS CONTENTS 1. INTRODUCTION 2. FOURIER AND ITS REPRESENTATIONS 3. UNDERSTANDING THE FOURIER ANALYSIS 4. FOURIER ANALYSIS APPLICATIONS 4.1 Classic Applications 4.2 Fourier Shape Descriptors 4.3 Filter Banks in Fourier Domain 4.4 FMI-SPOMF Image Matching 4.5 Some final words 89 / 139
  • 90. 4. FOURIER ANALYSIS APPLICATIONS 4.1. CLASSIC APPLICATIONS NOISE REMOVAL Application of FFT in Image Processing Four Noise Spikes Removed 39 Noise Removal FFT Inverse FFT Edit FFT Noise Pattern Stands Out as Four Spikes (Source : Earl F. Glynn - Research Notes) Source: www.mediacy.com/apps/fft.htm, Image Pro Plus FFT Example. Last seen online in 2004. 90 / 139
  • 91. 4. FOURIER ANALYSIS APPLICATIONS 4.1. CLASSIC APPLICATIONS TEXTURE RECOGNITION 40 Application of FFT Pattern/Texture Recognition (Source : Earl F. Glynn - Research Notes) Source: Lee and Chen, A New Method for Coarse Classification of Textures and Class Weight Estimation 91 / 139
  • 92. 4. FOURIER ANALYSIS APPLICATIONS 4.1. CLASSIC APPLICATIONS TEXTURE RECOGNITION The Drosophila eye is a great example a cellular crystal with its hexagonally closed-packed structure. The absolute value of the Fourier transform (right) shows its hexagonal structure. 41 Application of FFT Pattern/Texture Recognition The Drosophila eye (Source is a : great Earl F. Glynn example - Research a Notes) cellular crystal with its hexagonally closed-packed structure. The absolute value of the Fourier transform (right) shows its hexagonal structure. Source: http://www.rpgroup.caltech.edu/courses/PBL/size.htm Could FFT of Drosophila eye be used to identify/quantify subtle phenotypes? 92 / 139
  • 93. 4. FOURIER ANALYSIS APPLICATIONS 4.1. CLASSIC APPLICATIONS DEBLURRING - DECONVOLUTION Application of FFT Deblurring: Deconvolution The Point Spread Function (PSF) is the Fourier transform of a filter. (the PSP says how much blurring there will be in trying to image a point). Hubble image and measured PSF Dividing the Fourier transform of the PSF into the transform of the blurred image, and performing an inverse FFT, recovers the unblurred image. FFT(Unblurred Image) * FFT(Point Spread Function) = FFT(Blurred Image) Unblurred Image = FFT-1[ FFT(Blurred Image) / FFT(Point Spread Function) ] 45 (Source : Earl F. Glynn - Research Notes) Source: http://www.reindeergraphics.com/index.php?option=com_contenttask=viewid=179Itemid=127 93 / 139
  • 94. 4. FOURIER ANALYSIS APPLICATIONS 4.1. CLASSIC APPLICATIONS Application of FFT DEBLURRING - DECONVOLUTION Deblurring: Deconvolution The Point Spread Function (PSF) is the Fourier transform of a filter. (the PSP says how much blurring there will be in trying to image a point). Hubble image and measured PSF Dividing the Fourier transform of the PSF into the transform of the blurred image, and performing an inverse FFT, recovers the unblurred image. 46 Deblurred image (Source : Earl F. Glynn - Research Notes) Source: http://www.reindeergraphics.com/index.php?option=com_contenttask=viewid=179Itemid=127 94 / 139
  • 95. 4. FOURIER ANALYSIS APPLICATIONS 4.2. FOURIER SHAPE DESCRIPTORS CONTENTS 1. INTRODUCTION 2. FOURIER AND ITS REPRESENTATIONS 3. UNDERSTANDING THE FOURIER ANALYSIS 4. FOURIER ANALYSIS APPLICATIONS 4.1 Classic Applications 4.2 Fourier Shape Descriptors 4.3 Filter Banks in Fourier Domain 4.4 FMI-SPOMF Image Matching 4.5 Some final words 95 / 139
  • 96. 4. FOURIER ANALYSIS APPLICATIONS 4.2. FOURIER SHAPE DESCRIPTORS Fourier DDeessccrriippttoorrss:: OOvveerrvviieeww OVERVIEW ... ... (Source : Computer Vision Remote Sensing - Univ. Berlin) ● Concise and description of (object) contours ➔ Contours are represented by vectors I Description ● Numerous of application (object) contours represented as vectors. ➔ Contour Processing (filtering, interpolation, morphing) I Applications ➔ Image analysis: : Characterising and recognising the shapes of object I Contour Processing (filtering, interpolation, morphing) I Image analysis : characterizing and recognizing the shapes of object I Shape = closed contour ! 96 / 139
  • 97. 4. FOURIER ANALYSIS APPLICATIONS 4.2. FOURIER SHAPE DESCRIPTORS REPRESENTING RReepprreesseennttAiinnCggO Naa TCCOooUnnRttWoouIuTrrH uuDssFiinnTgg tthhee DDFFTT ... ... (xN,yN): Coordinates of the Nth point along the circumference Pixels on the contour are assumed to be ordered (e.g. clockwise)! 1st Step Define a complex vector using coordinates (x,y). 2nd Step Apply the 1D DFT (Source : Computer Vision Remote Sensing - Univ. Berlin) 97 / 139
  • 98. 4. FOURIER ANALYSIS APPLICATIONS 4.2. FOURIER SHAPE DESCRIPTORS AApppplliiccaattiioonn:: RReeccooggnniissiinngg aanndd ccllaassssiiffyyiinngg EXAMPLE lleeaavveess Database Two types of leaves are to be recognised and classified (Source : Computer Vision Remote Sensing - Univ. Berlin) 98 / 139
  • 99. 4. FOURIER ANALYSIS APPLICATIONS 4.2. FOURIER SHAPE DESCRIPTORS AApppplliiccaattiioonn:: RReeccooggnniissiinngg aanndd ccllaassssiiffyyiinngg EXAMPLE lleeaavveess Image with unclassified objects (Source : Computer Vision Remote Sensing - Univ. Berlin) 99 / 139
  • 100. AApppplliiccaattiioonn:: RReeccooggnniissiinngg aanndd ccllaassssiiffyyiinngg 4. FOURIER ANALYSIS APPLICATIONS 4.2. FOURIER SHAPE DESCRIPTORS EXAMPLE lleeaavveess Segmented Objects (Thresholding) (Source : Computer Vision Remote Sensing - Univ. Berlin) 100 / 139
  • 101. 4. FOURIER ANALYSIS APPLICATIONS 4.2. FOURIER SHAPE DESCRIPTORS AApppplliiccaattiioonn:: RReeccooggnniissiinngg aanndd ccllaassssiiffyyiinngg EXAMPLE lleeaavveess Leaves detected and classified (Source : Computer Vision Remote Sensing - Univ. Berlin) 101 / 139
  • 102. 4. FOURIER ANALYSIS APPLICATIONS 4.2. FOURIER SHAPE DESCRIPTORS TRANSLATION TTrraannssllaattiioonn t t Translating U by t: (Source : Computer Vision Remote Sensing - Univ. Berlin) I Only on F[0]. 102 / 139
  • 103. 4. FOURIER ANALYSIS APPLICATIONS 4.2. FOURIER SHAPE DESCRIPTORS SCALING CChhaannggeess iinn SSccaallee Magnification by factor s: (Source : Computer Vision Remote Sensing - Univ. Berlin) 103 / 139
  • 104. 4. FOURIER ANALYSIS APPLICATIONS 4.2. FOURIER SHAPE DESCRIPTORS ROTATION RRoottaattiioonn Rotation by an angle θ: (Source : Computer Vision Remote Sensing - Univ. Berlin) (Derivation identical to scale change: Multiplication by constant) I in Phase 104 / 139
  • 105. 4. FOURIER ANALYSIS APPLICATIONS 4.3. FILTER BANKS IN FOURIER DOMAIN CONTENTS 1. INTRODUCTION 2. FOURIER AND ITS REPRESENTATIONS 3. UNDERSTANDING THE FOURIER ANALYSIS 4. FOURIER ANALYSIS APPLICATIONS 4.1 Classic Applications 4.2 Fourier Shape Descriptors 4.3 Filter Banks in Fourier Domain 4.4 FMI-SPOMF Image Matching 4.5 Some final words 105 / 139
  • 106. 4. FOURIER ANALYSIS APPLICATIONS 4.3. FILTER BANKS IN FOURIER DOMAIN Examples of Fourier’s representation 17 LINEAR TRANSLATION INVARIANT SYSTEMS fi Input! System A fo Output! Figure 1.14. Schematic representation of a system A. I Linear System : In practice we often deal with systems that are homogeneous and additive, i.e., A(cf ) = c(Af ) and (4.1) A(cf) = c(Af) A(f + g) = (Af) + (Ag) A(f + g) = (Af ) + (Af ). (4.2) I Shift (or translation) invariance : when f, g are arbitrary inputs and c is an arbitrary scalar. Such systems are said be linear. Many common systems also have the property of translation invariance. We say that a system is translation invariant if the output gi(t) = fi(t + t) (4.3) ) gi(t) = fo(t + t). (4.4) go = Agi (the output is shifted by the same amount than the input). an arbitrary ! -translate gi(t) := fi(t + ! ), −# t #, 106 / 139
  • 107. 4. FOURIER ANALYSIS APPLICATIONS 4.3. FILTER BANKS IN FOURIER DOMAIN LINEAR TRANSLATION INVARIANT SYSTEMS I An LTI system responds sinusoidally when it is shaken sinusoidally I The output can be obtained I from the impulse response g[n] I by a convolution product : fo[n] = (fi g)[n] = ¥å k=¥ f [k]g[n k] (4.5) I or in Fourier Domain Fo[u] = Fi[u]G[u] (Convolution Theorem) (4.6) 107 / 139
  • 108. 4. FOURIER ANALYSIS APPLICATIONS 4.3. FILTER BANKS IN FOURIER DOMAIN CONVOLUTION IN FOURIER DOMAIN Enhanced Image Pre-processing Post-processing FFT{ I[u,v] } FFT-1{ H[u,v] · F[u,v] } Fourier Transform 42 Application of FFT Filtering in the Frequency Domain: Convolution I[m,n] Raw Image I’[m,n] Fourier Transform F[u,v] Filter Function H[u,v] Inverse F[u,v] H[u,v] · F[u,v] (Source : Earl F. Glynn - Research Notes) Source: Gonzalez and Woods, Digital Image Processing (2nd ed), 2002, p. 159 108 / 139
  • 109. 4. FOURIER ANALYSIS APPLICATIONS 4.3. FILTER BANKS IN FOURIER DOMAIN FILTER BANKS I A filter bank is an array of band-pass filters that spans the entire frequency spectrum. I The bank serves to isolate different frequency components in a signal (Source : http://www.aamusings.com/project-documentation/wavs/filterBank.html) 109 / 139
  • 110. 4. FOURIER ANALYSIS APPLICATIONS 4.3. FILTER BANKS IN FOURIER DOMAIN FILTER BANKS (Source : http://www.aamusings.com/project-documentation/wavs/filterBank.html) Frequent scheme : I DCT : Discrete Cosine Transform (a special case of DFT), I DWT : DiscretWavelet Transform. 110 / 139
  • 111. 4. FOURIER ANALYSIS APPLICATIONS 4.3. FILTER BANKS IN FOURIER DOMAIN FILTER BANKS - FWT A common implementation of the DiscreteWavelet Transform is the Mallat Algorithm (the Fast WT) : I h is a low-pass filter I g is a high-pass filter 111 / 139
  • 112. 4. FOURIER ANALYSIS APPLICATIONS 4.3. FILTER BANKS IN FOURIER DOMAIN FWT - B-SPLINE WAVELETS Impulse Responses Frequential Responses Obtained from the autoconvolution of the box function : 112 / 139
  • 113. 4. FOURIER ANALYSIS APPLICATIONS 4.3. FILTER BANKS IN FOURIER DOMAIN B-SPLINE WAVELETS - EXAMPLE 113 / 139
  • 114. 4. FOURIER ANALYSIS APPLICATIONS 4.3. FILTER BANKS IN FOURIER DOMAIN FILTER BANK IN FOURIER DOMAIN The high-pass branch : I g is a linear filter (ok in Fourier Domain) I the sub-sampling can also be obtained in Fourier Domain : (u : zeroing the even samples) 114 / 139
  • 115. 4. FOURIER ANALYSIS APPLICATIONS 4.3. FILTER BANKS IN FOURIER DOMAIN FILTER BANK IN FOURIER DOMAIN 115 / 139
  • 116. 4. FOURIER ANALYSIS APPLICATIONS 4.3. FILTER BANKS IN FOURIER DOMAIN quinconce. FWT IN FOURIER DOMAIN 1.7 – Nous Comparaison avons ainsi de proposé la complexitun algorithme ´e d’algorithmes de calcul des d’analyse coe⇢cients multird’une ´esolution. analyse multiréso-lution Rapport d’op´erations où toutes n´ecessaires les opérations dans le (cas filtrage classique et échantillonnages) par rapport aux sont calculs e⇡ectuées intdans ´egralement le domaine r´ealisL est la profondeur de l’analyse multir´esolution. Ces rapports sont calcul´es en fonction de images. A gauche : cas s´eparable ; et `a droite : cas quinconce. de Fourier discret. Cet algorithme, présenté en figure 5.6 nécessite une FFT en entrée et une FFT par signal de détails (coe⇢cients de l’analyse multirésolution). As FFT filtrage par multiplications complexes sous- ´echantillonnage Ds+1 filtrage oar multiplications complexes sous- ´echantillonnage Ds+2 ... FFT1 FFT1 1.6 – algorithme de calcul des coe⇥cients d’une analyse multir´esolution dans le domaine discret. 5.6 – Algorithme de calcul des coe⇢cients d’une analyse multirésolution dans le do-maine de Fourier discret. 1,8 fois moins d’op´erations. De plus, nous avons montr´e que la complexit´e de cet algorithme Figure rapport `a une impl´ementation classique, o`u seul les filtrages seraient effectu´es dans le domaine Par rapport à une implémentation classique, où seul les filtrages seraient e⇡ectués dans le Fourier, domaine notre algorithme de Fourier, necessite notre algorithme un nombre nécessite plus un faible nombre d’opplus ´erations. faible d’opérations. Les graphiques Les gra-phiques de la indiquent que pour une profondeur d’analyse sur quatre ´echelles (un cas fr´equent), notre algorithme de la figure 5.7 indiquent que pour une profondeur d’analyse sur quatre échelles (un 116 / 139 cas fréquent), notre algorithme nécessite 1,8 fois moins d’opérations. De plus, nous avons mon-tré
  • 117. des signaux doivent donc être des entiers. Une image X[k] de dimension N⇥N est transformée en une image 4. FOURIER de ANALYSIS dimension APPLICATIONS (figure 4.3. 5.5). FILTER BANKS IN FOURIER DOMAIN Y [k] M ⇥M L’équation (5.34) est donc réécrite de la façon suivante : 2D-FWT IN FOURIER DOMAIN Even for images : M Jtm. L’équation peut donc être transformée pour exprimer le sur-échantillonnage Figure 5.5 – Sur-échantillonnage d’une image : une rotation et une dilatation sont impliquée dans la transformation. 5.3.2 Notre contribution Ces deux équations (5.34 et 5.36) permettent d’exprimer les échantillonnages dans le do-maine de Fourier. Cependant les signaux manipulés sont continus ce qui implique que lors de l’implémentation, une discrétisation du domaine de Fourier sera nécessaire. Ce passage peut être évité en écrivant les équations directement dans le domaine de Fourier discret. Les indices des signaux doivent donc être des entiers. Une image X[k] de dimension N⇥N est transformée en une image Y [k] de dimension M ⇥M (figure 5.5). L’équation (5.34) est donc réécrite de la façon suivante : Y () = X(⇥) avec ⇧ = 2 Mm ⇥ = 2 Mm⇥ , (5.37) M Jtm. L’équation peut donc être transformée pour exprimer le sur-échantillonnage oùm⇥ = N de signaux multi-dimensionnels dans le domaine de Fourier discret : Y [m] = X ⇤# N Jtm ⇥ modN ⌅ . (5.38) Y () = X(⇥) avec ⇧ = 2 Mm ⇥ = 2 Mm⇥ , (5.37) oùm⇥ = N de signaux multi-dimensionnels dans le domaine de Fourier discret : Y [m] = X ⇤# N M Jtm ⇥ modN ⌅ . (5.38) L’opérateur modulo (mod) est nécessaire pour tenir compte de la périodicité de transfor-mées de Fourier discrètes rapides (FFT) des signaux. Selon une méthode analogue, le sous-échantillonnage est : Y [m] = 1 |detJ| |de⌃tJ|−1 l=0 X ⇤# N M J−tm− NJ−tvl ⇥ modN ⌅ . (5.39) Dans certains cas particuliers les équations se simplifient fortement, permettant fréquem-ment d’exprimer les échantillonnages comme des duplications (sur-échantillonnage) ou des sommes de sous-parties des images (sous-échantillonnage). Par exemple dans le cas séparable, les sous-échantillonnages bi-dimensionnels s’expriment comme un enchaînement de deux sous-échantillonnages mono-dimensionnels. Ou encore, dans le cas quinconce le sous-échantillonnage peut s’écrire comme la somme de quatre sous-images. 50 I More details in [NIC02] 3. 3. F. Nicolier, O. Laligant, F. Truchetet. Discrete wavelet transform imple-mentation in fourier domain. Journal of Electronic Imaging, 11(3) :338–346, jul 2002 117 / 139
  • 118. 4. FOURIER ANALYSIS APPLICATIONS 4.4. FMI-SPOMF IMAGE MATCHING CONTENTS 1. INTRODUCTION 2. FOURIER AND ITS REPRESENTATIONS 3. UNDERSTANDING THE FOURIER ANALYSIS 4. FOURIER ANALYSIS APPLICATIONS 4.1 Classic Applications 4.2 Fourier Shape Descriptors 4.3 Filter Banks in Fourier Domain 4.4 FMI-SPOMF Image Matching 4.5 Some final words 118 / 139
  • 119. 4. FOURIER ANALYSIS APPLICATIONS 4.4. FMI-SPOMF IMAGE MATCHING FMI-SPOMF ? I SPOMF = Symmetric Phase Only Matched Filters I FMI = Fourier-Mellin Invariant I FT for matching images I Translation, rotation, scaling invariant registering I Described in [Chen94] 4 4. Q. Chen, M. Defrise and F. Deconinck, Symmetric phase-only matched filtering of Fourier-Mellin transforms for image registration and recognition, IEEE pattern analysis and machine intelligence, vol. 16, 1994, p. 1156-1168. 119 / 139
  • 120. 4. FOURIER ANALYSIS APPLICATIONS 4.4. FMI-SPOMF IMAGE MATCHING IMAGE MATCHING I Where is the small bear ? 120 / 139
  • 121. 4. FOURIER ANALYSIS APPLICATIONS 4.4. FMI-SPOMF IMAGE MATCHING IMAGE MATCHING From the image and a pattern (reference) : The idea is to I slide the pattern on the image, I compute sum of the product pixel-to-pixel. I This is a cross-correlation. 121 / 139
  • 122. 4. FOURIER ANALYSIS APPLICATIONS 4.4. FMI-SPOMF IMAGE MATCHING CC AND SSD RELATION I A classical template matching solution is the Sum of Squared Differences (SSD) - here with continuous functions : SSDW = Z W (f (t) g(t))2 dt (4.7) I SSD is related to CC : Z W (f (t) g(t))2 dt = Z W f (t)2 + g(t)2 2f (t)g(t) dt (4.8) = Z W f (t)2dt + Z W g(t)2dt 2 Z W f (t)g(t)dt. (4.9) I If f is the pattern, the first term is constant ! 122 / 139
  • 123. 4. FOURIER ANALYSIS APPLICATIONS 4.4. FMI-SPOMF IMAGE MATCHING CC AND SSD RELATION Z W (f (t) g(t))2 dt = Cte + Z W g(t)2 2 Z W f (t)g(t)dt. (4.10) I If the local energy of the image (g) is constant : Z W (f (t) g(t))2 = Cte 2 Z W f (t)g(t)dt. (4.11) I In this case, the SSD is the same as the CC I But the local energy of the image must be constant ! 123 / 139
  • 124. 4. FOURIER ANALYSIS APPLICATIONS 4.4. FMI-SPOMF IMAGE MATCHING IMAGE MATCHING - CROSS CORRELATION I The Cross-Correlation (CC) is defined as (for real signals) : (f ? g)[n] = ¥å k=¥ f [k]g[n + k] (4.12) = ¥å k=¥ f [n k]g[n] (4.13) I CC is strongly related to convolution : (f ? g)[n] = f [n] g[n] (4.14) I CC can also be easily expressed in Fourier Domain (fast computations) : FT[(f ? g)][u] = F[u]G[u] (4.15) so (f ? g) = FT1[FT[f ]FT[g]]. (4.16) 124 / 139
  • 125. 4. FOURIER ANALYSIS APPLICATIONS 4.4. FMI-SPOMF IMAGE MATCHING CROSS-CORRELATION IN FOURIER DOMAIN I Remember that the DFT implies the function is periodic I The product F[u, v]G[u, v] implies F and G have the same size The pattern P is thus modified : I its size must be the same as I, I the origin of the image must corresponds to the center of the pattern. 125 / 139
  • 126. 4. FOURIER ANALYSIS APPLICATIONS 4.4. FMI-SPOMF IMAGE MATCHING CROSS-CORRELATION - RESULT I Local max at the center (good) but not the absolute one I The second bear is not detected (rotation) I CC is very sensitive to luminance 126 / 139
  • 127. 4. FOURIER ANALYSIS APPLICATIONS 4.4. FMI-SPOMF IMAGE MATCHING NORMALIZED CROSS-CORRELATION I One solution (to luminance sensitivity) is to normalize the images before the comparison : NCCI,P = 1 N,y x å(I[x, y] I)(P[x, y] P) sIsP (4.17) I is the average of I, sI is the standard deviation of I I Very classic solution to template matching I same as Pearson Correlation Coefficient 127 / 139
  • 128. 4. FOURIER ANALYSIS APPLICATIONS 4.4. FMI-SPOMF IMAGE MATCHING SPOMF I Another solution is to only compare the Phase information (structures !) I The dectector is thus modified : DI,P = FT1[ FT[I] kFT[I]k FT[P] kFT[P]k ] (4.18) I SPOMF : Symmetric Phase Only Matched Filters 128 / 139
  • 129. 4. FOURIER ANALYSIS APPLICATIONS 4.4. FMI-SPOMF IMAGE MATCHING SPOMF - RESULT CC SPOMF 129 / 139
  • 130. 4. FOURIER ANALYSIS APPLICATIONS 4.4. FMI-SPOMF IMAGE MATCHING FMI-SPOMF IMAGE REGISTRATION I CC based comparison (NCC and SPOMF) are rotation and scaling sensitive I Fourier-Mellin Transform is a solution I The key point is to I reduce rotation and scaling to translations I and reduce the dimension of the parameter size. I Polar coordinates : Rotation ! Translation I Logarithmic scale : Scaling ! Translation (log(ax) = log(a) + log(x)) 130 / 139
  • 131. 4. FOURIER ANALYSIS APPLICATIONS 4.4. FMI-SPOMF IMAGE MATCHING FMI-SPOMF - PRINCIPLE I 4 parameters : Translation (x and y), Rotation, Scaling I Facts : I Phase contains localisation I Magnitude is insensitive to translation I A rotation of the image rotates the spectral magnitude by the same angle I A scaling by s scales the spectral magnitude by s1 I Keeping magnitude only allows to isolate rotation and scaling I Rotation and scaling are transformed into translations ... detected by SPOMF. I Fourier-Mellin Transform = FT of polar-log magnitude spectral image. 131 / 139
  • 132. 4. FOURIER ANALYSIS APPLICATIONS 4.4. FMI-SPOMF IMAGE MATCHING FMI - SPOMF - ALGORITHM Given I and P : I Compute the log-polar magnitude spectral images of I and P I Detect the max of the SPOMF image between I and P I Identify s and q I Re-scale and re-rotate P by (s1, q) I Compute the SPOMF between I and the rectified P I Locate the max, and identify (x, y) the translation vector. 132 / 139
  • 133. 4. FOURIER ANALYSIS APPLICATIONS 4.4. FMI-SPOMF IMAGE MATCHING LOG-POLAR REPRESENTATION I Assuming I is a N N image, its log-polar representation Ilp is : Ip(r, q) = I(r cos q + N 2 , r sin q + N 2 (4.19) Ilp(m, k) = Ip( 1 2 Nm N , 2pk N p). (4.20) I m 2 [1,N] is the discrete radial coordinate I k 2 [1,N] is the discrete angular coordinate I (an interpolation is needed : nearest-neighbor for example) 133 / 139
  • 134. 4. FOURIER ANALYSIS APPLICATIONS 4.4. FMI-SPOMF IMAGE MATCHING LOG-POLAR REPRESENTATION More general equations are given in [Chen94] 5 : I A N N image I can be resampled onto a M K polar-log grid in one step : ( um,k = N/21 M1 (M 1) m M1 cos( pk K ) + N2 vm,k = N/21 M1 (M 1) m M1 sin( pk K ) + N2 , (4.21) m 2 [0,M 1], k 2 [0,K 1]. 5. Q. Chen, M. Defrise and F. Deconinck, Symmetric phase-only matched filtering of Fourier-Mellin transforms for image registration and recognition, IEEE pattern analysis and machine intelligence, vol. 16, 1994, p. 1156-1168. 134 / 139
  • 135. 4. FOURIER ANALYSIS APPLICATIONS 4.4. FMI-SPOMF IMAGE MATCHING LOG-POLAR REPRESENTATION I A detection of the max provides two integers m and k. I Rotation and scaling : q = m N/2 M 1 (4.22) s = (M 1) k M1 for 0 k M/2 (enlargement) (4.23) s¯1 = (M 1) Mk M1 for M/2 k M (shrinkage) (4.24) 135 / 139
  • 136. 4. FOURIER ANALYSIS APPLICATIONS 4.4. FMI-SPOMF IMAGE MATCHING SOME EXAMPLES original distorted (s = 0.7, q = 30 deg) 136 / 139
  • 137. 4. FOURIER ANALYSIS APPLICATIONS 4.4. FMI-SPOMF IMAGE MATCHING SOME EXAMPLES 137 / 139
  • 138. 4. FOURIER ANALYSIS APPLICATIONS 4.5. SOME FINAL WORDS CONTENTS 1. INTRODUCTION 2. FOURIER AND ITS REPRESENTATIONS 3. UNDERSTANDING THE FOURIER ANALYSIS 4. FOURIER ANALYSIS APPLICATIONS 4.1 Classic Applications 4.2 Fourier Shape Descriptors 4.3 Filter Banks in Fourier Domain 4.4 FMI-SPOMF Image Matching 4.5 Some final words 138 / 139
  • 139. 4. FOURIER ANALYSIS APPLICATIONS 4.5. SOME FINAL WORDS SOME FINAL WORDS I Fourier Transform still very popular in science I Phase congruency - Local Phase. See Peter Kovesi webpage 6 I Practice with : I Playing with phase and magntiude I Image Reconstruction I Sampling in Fourier domain I Template matching with phase spectrum I Image registration with FMI-SPOMF 6. http://www.csse.uwa.edu.au/~pk/research 139 / 139