Title: Fourier Transform (Chapter 4)
1Fourier Transform (Chapter 4)
2Mathematical BackgroundComplex Numbers
- A complex number x is of the form
-
-
- a real part, b imaginary
part - Addition
-
- Multiplication
-
3Mathematical BackgroundComplex Numbers (contd)
- Magnitude-Phase (i.e., vector) representation
-
-
Magnitude -
- Phase
f
Magnitude-Phase notation
4Mathematical BackgroundComplex Numbers (contd)
- Multiplication using magnitude-phase
representation - Complex conjugate
- Properties
5Mathematical BackgroundComplex Numbers (contd)
- Eulers formula
- Properties
6Mathematical BackgroundSine and Cosine Functions
- Periodic functions
- General form of sine and cosine functions
y(t)Asin(atb) y(t)Acos(atb)
7Mathematical BackgroundSine and Cosine Functions
Special case A1, b0, a1
period2p
p
3p/2
p/2
p
3p/2
p/2
8Mathematical BackgroundSine and Cosine
Functions (contd)
- Changing the phase shift b
Note cosine is a shifted sine function
9Mathematical BackgroundSine and Cosine
Functions (contd)
10Mathematical BackgroundSine and Cosine
Functions (contd)
- Changing the period T2p/a
- Asssume A1, b0 ycos(at)
a 4
period 2p/4p/2
shorter period higher frequency (i.e.,
oscillates faster)
frequency is defined as f1/T
Alternative notation cos(at) or cos(2pt/T) or
cos(t/T) or cos(2pft) or cos(ft)
11Basis Functions
- Given a vector space of functions, S, then if any
f(t) ? S can be expressed as - the set of functions fk(t) are called the
expansion set of S. - If the expansion is unique, the set fk(t) is a
basis.
12Image Transforms
- Many times, image processing tasks are best
performed in a domain other than the spatial
domain. - Key steps
- (1) Transform the image
- (2) Carry the task(s) in the transformed domain.
- (3) Apply inverse transform to return to the
spatial domain.
13Transformation Kernels
forward transformation kernel
- Forward Transformation
- Inverse Transformation
inverse transformation kernel
14Kernel Properties
- A kernel is said to be separable if
- A kernel is said to be symmetric if
15Fourier Series Theorem
- Any periodic function f(t) can be expressed as a
weighted sum (infinite) of sine and cosine
functions of varying frequency
is called the fundamental frequency
Â
Â
16Fourier Series (contd)
a1
a2
a3
17Continuous Fourier Transform (FT)
- Transforms a signal (i.e., function) from the
spatial (x) domain to the frequency (u) domain.
where
18Definitions
- F(u) is a complex function
- Magnitude of FT (spectrum)
- Phase of FT
- Magnitude-Phase representation
- Power of f(x) P(u)F(u)2
-
19Why is FT Useful?
- Easier to remove undesirable frequencies in the
frequency domain. - Faster to perform certain operations in the
frequency domain than in the spatial domain.
20Example Removing undesirable frequencies
frequencies
noisy signal
remove high frequencies
reconstructed signal
To remove certain frequencies, set
their corresponding F(u) coefficients to zero!
21How do frequencies show up in an image?
- Low frequencies correspond to slowly varying
pixel intensities (e.g., continuous surface). - High frequencies correspond to quickly varying
pixel intensities (e.g., edges)
Original Image
Low-passed
22Example of noise reduction using FT
Input image
Spectrum (frequency domain)
Output image
Band-reject filter
23Frequency Filtering Main Steps
- 1. Take the FT of f(x)
- 2. Remove undesired frequencies
- 3. Convert back to a signal
Well talk more about these steps later .....
24Example rectangular pulse
rect(x) function
sinc(x)sin(x)/x
25Example impulse or delta function
- Definition of delta function
- Properties
Â
26Example impulse or delta function (contd)
27Example spatial/frequency shifts
Special Cases
28Example sine and cosine functions
- FT of the cosine function
cos(2pu0x)
F(u)
1/2
29Example sine and cosine functions (contd)
Â
jF(u)
sin(2pu0x)
30Extending FT in 2D
31Example 2D rectangle function
- FT of 2D rectangle function
2D sinc()
top view
32Discrete Fourier Transform (DFT)
33Discrete Fourier Transform (DFT) (contd)
34Example
35Extending DFT to 2D
- Assume that f(x,y) is M x N.
- Forward DFT
- Inverse DFT
36Extending DFT to 2D (contd)
- Special case f(x,y) is N x N.
- Forward DFT
- Inverse DFT
u,v 0,1,2, , N-1
x,y 0,1,2, , N-1
37Extending DFT to 2D (contd)
2D cos/sin functions
Interpretation
38Visualizing DFT
- Typically, we visualize F(u,v)
- The dynamic range of F(u,v) is typically very
large - Apply streching
(c is const)
D(u,v)
F(u,v)
original image
before stretching
after stretching
39DFT Properties (1) Separability
- The 2D DFT can be computed using 1D transforms
only - Forward DFT
kernel is separable
40DFT Properties (1) Separability (contd)
- Rewrite F(u,v) as follows
- Lets set
- Then
41DFT Properties (1) Separability (contd)
- How can we compute F(x,v)?
-
- How can we compute F(u,v)?
N x DFT of rows of f(x,y)
DFT of cols of F(x,v)
42DFT Properties (1) Separability (contd)
43DFT Properties (2) Periodicity
- The DFT and its inverse are periodic with period
N
44DFT Properties (3) Symmetry
45DFT Properties (4) Translation
- Translation in spatial domain
- Translation in frequency domain
46DFT Properties (4) Translation (contd)
- To show a full period, we need to translate the
origin of the transform at uN/2 (or at (N/2,N/2)
in 2D)
47DFT Properties (4) Translation (contd)
- To move F(u,v) at (N/2, N/2), take
48DFT Properties (4) Translation (contd)
sinc
sinc
no translation
after translation
49DFT Properties (5) Rotation
- Rotating f(x,y) by ? rotates F(u,v) by ?
50DFT Properties (6) Addition/Multiplication
but
51DFT Properties (7) Scale
52DFT Properties (8) Average value
Average
F(u,v) at u0, v0
So
53Magnitude and Phase of DFT
- What is more important?
- Hint use the inverse DFT to reconstruct the
input image using only magnitude or phase
information
magnitude
phase
54Magnitude and Phase of DFT (contd)
Reconstructed image using magnitude only (i.e.,
magnitude determines the strength of each
component)
Reconstructed image using phase only (i.e.,
phase determines the phase of each component)
55Magnitude and Phase of DFT (contd)
only phase
only magnitude
phase (woman) magnitude (rectangle)
phase (rectangle) magnitude (woman)