The Fourier Transform CS/BIOEN 4640: Image Processing Basics March - - PowerPoint PPT Presentation
The Fourier Transform CS/BIOEN 4640: Image Processing Basics March - - PowerPoint PPT Presentation
The Fourier Transform CS/BIOEN 4640: Image Processing Basics March 20, 2012 Why Study Spectral Methods? Is often more efficient method for filtering than convolution Helps us understand image sampling, filtering, and aliasing Used
Why Study Spectral Methods?
◮ Is often more efficient method for filtering than
convolution
◮ Helps us understand image sampling, filtering, and
aliasing
◮ Used in image compression ◮ Important for solving PDEs in image processing ◮ Fourier transform used in MRI
Harmonic Analysis
◮ Decompose a function into
basic waves called “harmonics”
◮ Any signal can be written as a
summation of harmonics
◮ Think of sound waves and
music: harmonics are pure tones
1 1/2 1/3 1/4 1/5 1/6 1/7
Sine and Cosine Functions
Harmonics are given by sine and cosine functions
1 2 3 4 5 6 7 −1.0 −0.5 0.0 0.5 1.0 sin cos
Wave Properties: Frequency
1 2 3 4 5 6 −1.0 −0.5 0.0 0.5 1.0 sin(t) sin(2t) sin(3t)
Frequency is how many times a wave repeats.
cos(ωx)
and
sin(ωx) ω is the frequency
Wave Properties: Amplitude
1 2 3 4 5 6 −3 −2 −1 1 2 3 sin(t) 2 sin(t) 3 sin(t)
Amplitude is the height of the wave.
a·cos(x)
and
a·sin(x) a is the amplitude
Wave Properties: Phase
1 2 3 4 5 6 −1.0 −0.5 0.0 0.5 1.0 sin(t) sin(t − pi/4) sin(t − pi/2)
Phase is the horizon- tal shift of the wave.
cos(x−φ) and sin(x−φ) φ is the phase shift
Who’s This Guy?
Jean Baptiste Joseph de Fourier (1768 - 1830)
While studying heat conduc- tion, Fourier discovered that functions could be decom- posed into summations
- f
cosine waves with different amplitudes and frequencies. Trivia fact: Fourier also first described the greenhouse ef- fect!
Fourier Series
Definition
Consider a function g(x) that is periodic on [0, 2π
ω0]
It’s Fourier series is given as
g(x) =
∞
- k=0
[ Ak cos(kω0x) + Bk sin(kω0x)] ,
where Ak, Bk are constants called the Fourier coefficients.
Complex Numbers
Definition
A complex number is an ordered pair of real numbers,
z = (a, b), with a the real part and b the imaginary
part. Also written as
z = a + ib,
where i =
√ −1 is the imaginary unit.
The set of complex numbers is denoted C.
Complex Numbers as 2D Coordinates
Im Re b a+bi a The real and imaginary parts of
z = a + ib are the coordinates: Re{z} = a Im{z} = b
Complex Number Arithmetic
Take two complex numbers z1 = (a1, b1) and
z2 = (a2, b2).
◮ Addition
z1 + z2 = (a1 + a2, b1 + b2)
◮ Multiplication
z1 · z2 = (a1 + ib1) · (a2 + ib2) = (a1a2 − b1b2) + i(a1b2 + a2b1)
Conjugation and Absolute Value
Consider a complex number z = (a, b)
◮ Conjugation: Simply negate the imaginary part:
z∗ = a − ib
◮ Absolute value: Same as 2D vector length:
|z| =
- a2 + b2
Also given by |z| = √z · z∗
Euler’s Representation of Complex Numbers
Im Re φ r
◮ A complex number can be
given as an angle φ and a radius r
◮ Think 2D polar coordinates ◮ Exponential form:
reiφ = r cos(φ) + i (r sin(φ))
Operations in Euler’s Notation
Take z1 = r1eiθ1 and z2 = r2eiθ2.
◮ Multiplication:
z1 · z2 = r1r2ei(θ1+θ2)
◮ Conjugation:
z∗
1 = r1e−iθ1
◮ Absolute value:
|z1| = r1
Fourier Integral
For periodic functions we have the Fourier series:
g(x) =
∞
- k=0
[ Ak cos(kω0x) + Bk sin(kω0x)] ,
But for nonperiodic functions we need a continuum of
- frequencies. So, our Fourier series becomes an integral:
g(x) = ∞ Aω cos(ωx) + Bω sin(ωx) dω
Computing Fourier Coefficients
Fourier coefficients describe how much a particular frequency ω contributes to the function g. They are computed by just multiplying and integrating with cos/sin waves:
Aω = A(ω) = 1 π ∞
−∞
g(x) · cos(ωx) dx Bω = B(ω) = 1 π ∞
−∞
g(x) · sin(ωx) dx
Fourier Transform
Now, let’s put the B coefficient (the sine part) into the imaginary part of a complex number
G(ω) = π 2
- A(ω) − i · B(ω)
- =
1 √ 2π ∞
−∞
g(x) ·
- cos(ωx) − i · sin(ωx)
- dx