1
Methods in Image Analysis – Lecture 3
Fourier
U. Pitt Bioengineering 2630
CMU Robotics Institute 16-725
Spring Term, 2006
George Stetten, M.D., Ph.D.
2
Frequency in time vs. space
• Classical “signals and systems” usually temporal signals.
• Image processing uses “spatial” frequency.• We will review the classic temporal description first,
and then move to 2D and 3D space.
3
Phase vs. Frequency
• Phase, , is angle, usually represented in radians.• (circumference of unit circle)• Frequency, , is the rate of change for phase.
• In a discrete system, the sampling frequency, , is the amount of phase-change per sample.
€
θ
°=360 radians 2πω
t ωθ =sω
ns ωθ =
4
Euler’s Identity
€
e jθ = cosθ + j sinθ
5
Phasor = Complex Number
6
multiplication = rotate and scale
( )( )( )( )
( )
.by scale and by rotate
21
21
21
21
2211
r
err
erer
jyxjyx
rejyxz
j
jj
j
θ
θθ
θθ
θ
+=
=
++
=+=
7
Spinning phasor
f 2πω =
8
9
10
11
Continuous Fourier Series
( ) ∑+∞
−∞=
=k
tjkkeatx 0ω ( )∫ −=
0
0
0
1
T
tjkk dtetx
Ta ω
Synthesis Analysis
0ω is the Fundamental Frequency
12
Selected properties of Fourier Series
( ) kFs atx ⏐ →← ( ) k
Fs bty ⏐ →←
( ) ( ) kkFs BbAatBytAx +⏐ →←+
*kk aa −= ( )txfor real
( )k
Fs ajkdt
tdx0ω⏐ →←
( )∫ ⏐ →← kFs a
jkdttx
0
1
ω
13
Differentiation boosts high frequencies
14
Integration boosts low frequencies
15
Continuous Fourier Transform
Synthesis Analysis
( ) ( )ωXtx F⏐ →←
( ) ( )∫+∞
∞−
= ωωπ
ω deXtx tj
2
1 ( ) ( ) dtetxX tjωω −+∞
∞−∫=
16
( ) ⎟⎠⎞
⎜⎝⎛⏐ →←αω
αα Xtx F 1
Selected properties of Fourier Transform
( ) ( ) ( ) ( )ωω YXtytx F⏐ →←∗
( ) ( )∫∫+∞
∞−
+∞
∞
= ωωπ
dXdttx2
-
2
2
1
17
Special Transform Pairs
• Impulse has all frequences
• Average value is at frequency = 0
• Aperture produces sync function
( ) ( ) ( )ωπω ∂=⏐ →←= 2 1 Xtx F
( ) ( ) ( ) 1 =⏐ →←∂= ωXttx F
( ) ( ) ( )ωωω 1
1
1 sin2
0
,1 TX
Tt
Tttx F =⏐ →←
⎩⎨⎧
>
<=
18
Discrete signals introduce aliasing
Frequency is no longer the rate of phase change in time, but rather the amount of phase change per sample.
19
Sampling > 2 samples per cycle
20
Sampling < 2 samples per cycle
21
Under-sampled sine
( ) stx ωat sampled For
frequency.Nyquist theis 2
sω
22
Discrete Time Fourier Series
[ ] [ ]Nnxnx +=
πωω 2 assume 0 == Ns
Sampling frequency is 1 cycle per second, and fundamental frequency is some multiple of that.
Nkk aa +=Synthesis Analysis
[ ] ∑=
=Nk
tjkkeanx 0ω [ ]∑
=
−=Nk
tjkk enx
Na 0
1 ω
23
Matrix representation Nj
ewπ2
= 1=Nw
24
Fast Fourier Transform
• N must be a power of 2• Makes use of the tremendous
symmetry within the F-1 matrix• O(N log N) rather than O(N2)
25
Discrete Time Fourier Transform
[ ] ( )∫+
−
=π
π
ωω ωπ
deeXnx njj 2
1
( ) ( )( )πωω 2+= jj eXeX
Synthesis Analysis
( ) [ ] nj
n
j enxeX ωω −+∞
−∞=∑=
πω 2 assume =s
Sampling frequency is still 1 cycle per second, but now any frequency are allowed because x[n] is not periodic.
26
The Periodic Spectrum
27
Aliasing Outside the Base Band
sω41
sin−Perceived as
28
2D Fourier TransformAnalysis
Synthesis
or separating dimensions,
€
F u,v( ) = f x, y( ) e− j 2π ux +vy( )dx dy−∞
+∞
∫−∞
+∞
∫
€
F u,v( ) = f x, y( ) e− j 2π uxdx −∞
+∞
∫ ⎡
⎣ ⎢
⎤
⎦ ⎥
−∞
+∞
∫ e− j 2π vydy
€
f x,y( ) = F u,v( ) e j 2π ux +vy( )du dv−∞
+∞
∫−∞
+∞
∫
29
Properties
• Most of the usual properties, such as linearity, etc.• Shift-invariant, rather than Time-invariant• Parsevals relation becomes Rayleigh’s Theorem• Also, Separability, Rotational Invariance, and
Projection (see below)
30
Separability
( ) ( ) ( )( ) ( )
( ) ( ) ( ) ( ) ( )( ) ( )( ) ( )vFyf
uFxf
vuFvFuFyfxf
then
vuFyxf
yfxfyxf
F
F
F
F
22
11
2121
21
,
,,
,
if
⏐ →←
⏐ →←
=⏐ →←
⏐ →←
=
31
Rotation Invariance
( )( )θθθθ
θθθθcossin ,sincos
cossin ,sincos
vuvuF
yxyxf F
+−+
⏐ →←+−+
⎥⎦
⎤⎢⎣
⎡⎥⎦
⎤⎢⎣
⎡−
=⎥⎦
⎤⎢⎣
⎡′′
y
x
y
x
θθ
θθ
cossin
sincos
32
Projection
( ) ( )
( ) ( )0 ,
,
uFuP
dyyxfxp
=
= ∫+∞
∞−
Combine with rotation, have arbitrary projection.
33
Gaussian
( )2
2
2
2
2
22
222 σσσ
yxyx
eee−−+−
=seperable
Since the Fourier Transform is also separable, the spectra of the 1D
Gaussians are, themselves, separable.
€
g x( ) F← → ⏐ G u( )
g1 x( )∗g2 x( ) = g3 x( )
G1 u( )G2 u( ) = G3 u( )
g3 x( ) F← → ⏐ G3 u( )
34
Hankel TransformFor radially symmetrical functions
( ) ( )( ) ( )
( ) ( ) ( )
( ) ( )qFdrrderf
dydxeyxfvuF
vuqqFvuF
yxrrfyxf
rqrj
r
vyuxj
r
r
=⎥⎦
⎤⎢⎣
⎡
==
+==
+==
∫ ∫
∫ ∫∞
−
+−∞+
∞−
∞+
∞−
,,
,,
,,
0
2
0
cos2
2
222
222
θπ
θπ
π
35
Elliptical Fourier Series for 2D Shape
( ) kFs atx ⏐ →←
( ) kFs bty ⏐ →←
Parametric function, usually with constant velocity.
( )00,center ba=
Truncate harmonics to smooth.
36
Fourier shape in 3D
• Fourier surface of 3D shapes (parameterized on surface).
• Spherical Harmonics (parameterized in spherical coordinates).
• Both require coordinate system relative to the object. How to choose? Moments?
• Problem of poles: singularities cannot be avoided
37
Quaternions – 3D phasors
4321 kajaiaaa +++=
1222 −==== ijkkji
4321* kajaiaaa −−−=
Product is defined such that rotation by arbitrary angles from arbitrary starting points become simple multiplication.
( )2
12
42
32
22
1 aaaaa +++=
( ) ( ) ( ) ( )44332211 bakbajbaibaba +++++++=+
38
Summary
• Fourier useful for image “processing”, convolution becomes multiplication.
• Fourier less useful for shape.• Fourier is global, while shape is local.• Fourier requires object-specific coordinate system.