Upload
pierce-randall
View
216
Download
0
Tags:
Embed Size (px)
Citation preview
G52IIP, School of Computer Science, University of Nottingham
1
Image Transforms
Fourier TransformBasic idea
G52IIP, School of Computer Science, University of Nottingham
2
Image Transforms
Fourier transform theory Let f(x) be a continuous function of a real variable x.
The Fourier transform of f(x) is
Given F(u), f(x) can be obtained by using the inverse Fourier transform
dxuxjxfuF 2exp)(
duuxjuFxf 2exp)(
G52IIP, School of Computer Science, University of Nottingham
3
Image Transforms
Fourier transform theoryThe Fourier transform F(u) is in general
complex
It is often convenient to write it in the form
uieuFujuIuRuF exp)()()( 2
122
)()()( ujIuRuF
G52IIP, School of Computer Science, University of Nottingham
4
Image Transforms
Fourier transform theoryMagnitude and Phase
21
22 )()( uIuRuF
uR
uIu 1tan
Fourier Spectrum of f(x)
Phase angle
)()( 22 uIuRuP Power Spectrum
(spectrum density function) of f(x)
G52IIP, School of Computer Science, University of Nottingham
5
Image Transforms
Fourier transform theory Frequency
Euler’s formula
21
22 )()( uIuRuF
uR
uIu 1tan
u is called the
frequency variable
uxjuxuxj 2sin2cos2exp
G52IIP, School of Computer Science, University of Nottingham
6
Image Transforms
Fourier transform theory Intuitive interpretation
dxuxjxfuF 2exp)(
duuxjuFxf 2exp)(
An infinite sum of sine and cosine terms,
each u determines the frequency of its
corresponding sine cosine pair
G52IIP, School of Computer Science, University of Nottingham
7
Image Transforms
Fourier transform
G52IIP, School of Computer Science, University of Nottingham
8
Image Transforms
Fourier transformWhen W become smaller, what will
happen to the spectrum?
G52IIP, School of Computer Science, University of Nottingham
9
Image Transforms
Discrete Fourier transformContinuous function f(x) is discretized
into a sequence
by taking N samples x units apart
xNxfxxfxxfxf )1(,,2,, 0000
G52IIP, School of Computer Science, University of Nottingham
10
Image Transforms
Discrete Fourier transform pair of the sampled function
1,...,2,1,0
2exp
1 1
00
Nufor
N
uxjxxxf
NuF
N
x
1,...,2,1,0
2exp
1
0
Nxfor
N
uxjuFxf
N
u
G52IIP, School of Computer Science, University of Nottingham
11
Image Transforms
Fourier transform of unit impulse function
0
00)(
t
tt and 1)(
dtt
0 t
G52IIP, School of Computer Science, University of Nottingham
12
Image Transforms
Fourier transform of unit impulse function
dxexx jux)()]([ F 10
x
juxe
0 x
(x)
0 u
1
F(ju)
F
G52IIP, School of Computer Science, University of Nottingham
13
Image Transforms
Fourier transform of unit impulse train
Here t = x and = u
G52IIP, School of Computer Science, University of Nottingham
14
Convolution
ConvolutionThe convolution of two functions f(x) and
g(x), denote f(x)*g(x)
daaxgafxgxf )()()()(
G52IIP, School of Computer Science, University of Nottingham
15
Convolution
ConvolutionAn example
G52IIP, School of Computer Science, University of Nottingham
16
Convolution
Convolution and Spatial Filtering
f(x,y)
w(x,y)
f(x,y)*w(x,y)
G52IIP, School of Computer Science, University of Nottingham
17
Convolution
Convolution theorem
uGuFxgxf
uGuFxgxf
G52IIP, School of Computer Science, University of Nottingham
18
Sampling
Sampling
FT
FT
FT
t
-w w
t t
t
f(t) F(u)
s(t) S(u)
s(t)f(t) S(u)*F(u)
G52IIP, School of Computer Science, University of Nottingham
19
Sampling
Sampling
FT
FT
t
t-w w
G(u)
G(u)[S(u)*F(u)]= F(u)]f(t)
-w w
G52IIP, School of Computer Science, University of Nottingham
20
Sampling Theorem
Bandwidth, Sample Rate, and Nyquist Theorem
The sampling rate (Nyquist rate) must be at least two times the bandwidth of a bandlimited signal
wtw
t 2
12
1
t
-w w
G(u)
G(u)[S(u)*F(u)]= F(u)]
-w w
G52IIP, School of Computer Science, University of Nottingham
21
Aliasing
Over- and under-samplingAnti-aliasing filtering
G52IIP, School of Computer Science, University of Nottingham
22
Aliasing
Consider an image with 512 alternating vertical black and white stripes. (You may not even be able to see the alternating stripes because of poor screen resolution. But take my word for it, they are there.) Source:http://www.cs.unm.edu/~brayer/vision/perception.html
G52IIP, School of Computer Science, University of Nottingham
23
Aliasing
The image is created by sampling an image with 512 alternating values of black (gray = 0) and white (gray = 255). Starting in row 0, 512 samples of the image are taken. For each successive row, 1 fewer sample is taken from row 0, (i.e. for row 1, take 511 samples, for row 2, take 510 samples, ... for row 511, take 1 sample). The whole row is then reconstructed from the samples by pixel replication. The result is a colossal aliasing pattern.
Source:http://www.cs.unm.edu/~brayer/vision/perception.html
G52IIP, School of Computer Science, University of Nottingham
24
Aliasing
More examples
G52IIP, School of Computer Science, University of Nottingham
25
Aliasing
More examples
G52IIP, School of Computer Science, University of Nottingham
26
Aliasing
More examples
G52IIP, School of Computer Science, University of Nottingham
27
Image Transforms
2D Fourier Transform (Fourier Transform of Images)
dxdyvyuxjyxfvuF )(2exp),(,
dudvvyuxjvuFyxf )(2exp),(,
G52IIP, School of Computer Science, University of Nottingham
28
Image Transforms
2D Fourier Transform (Fourier Transform of Images)
21
22 ),(),(, vuIvuRvuF
vuR
vuIvu
,
,tan, 1
Fourier Spectrum of f(x)
Phase angle
),(),(, 22 vuIvuRvuP Power Spectrum
(spectrum density function) of f(x)
G52IIP, School of Computer Science, University of Nottingham
29
Image Transforms
2D Discrete Fourier Transform (Fourier Transform of Digital Images)
1,...,2,1,01,...,2,1,0
2exp,1
,1
0
1
000
NvMufor
N
vy
M
uxjyyxxxxf
MNvuF
M
x
N
y
1,...,2,1,01,...,2,1,0
2exp,,1
0
1
0
NyMxfor
N
vy
M
uxjvvuuFyxf
M
u
N
v
G52IIP, School of Computer Science, University of Nottingham
30
Frequency Domain Processing
What does frequency mean in an image?
G52IIP, School of Computer Science, University of Nottingham
31
Frequency Domain Processing
What does frequency mean in an image?
G52IIP, School of Computer Science, University of Nottingham
32
Frequency Domain Processing
What does frequency mean in an image?
G52IIP, School of Computer Science, University of Nottingham
33
Frequency Domain Processing
What does frequency mean in an image?
High frequency components – fast changing/sharp features
Low frequency components – slow changing/smooth features
G52IIP, School of Computer Science, University of Nottingham
34
Frequency Domain Processing
The foundation of frequency domain techniques is the convolution theorem
vuGvuFyxgyxf ,,,,
G52IIP, School of Computer Science, University of Nottingham
35
Frequency Domain Processing
H(u, v) is called the transfer
function
G52IIP, School of Computer Science, University of Nottingham
36
Frequency Domain Processing
Typical lowpass filters and their transfer functions
G52IIP, School of Computer Science, University of Nottingham
37
Frequency Domain Processing
Typical lowpass filters and their transfer functions
G52IIP, School of Computer Science, University of Nottingham
38
Frequency Domain Processing
Example
G52IIP, School of Computer Science, University of Nottingham
39
Frequency Domain Processing
Example
G52IIP, School of Computer Science, University of Nottingham
40
Frequency Domain Processing
Typical lowpass filters and their transfer functions
G52IIP, School of Computer Science, University of Nottingham
41
Frequency Domain Processing
Example
G52IIP, School of Computer Science, University of Nottingham
42
Frequency Domain Processing
Typical lowpass filters and their transfer functions
G52IIP, School of Computer Science, University of Nottingham
43
Frequency Domain Processing
Example
G52IIP, School of Computer Science, University of Nottingham
44
Frequency Domain Processing
Example
G52IIP, School of Computer Science, University of Nottingham
45
Frequency Domain Processing
Example
G52IIP, School of Computer Science, University of Nottingham
46
Frequency Domain Processing
Typical highpass filters and their transfer functions
G52IIP, School of Computer Science, University of Nottingham
47
Frequency Domain Processing
Typical highpass filters and their transfer functions
G52IIP, School of Computer Science, University of Nottingham
48
Frequency Domain Processing
Typical highpass filters and their transfer functions
G52IIP, School of Computer Science, University of Nottingham
49
Frequency Domain Processing
Examples
G52IIP, School of Computer Science, University of Nottingham
50
Frequency Domain Processing
Examples
G52IIP, School of Computer Science, University of Nottingham
51
Frequency Domain Processing
Examples
G52IIP, School of Computer Science, University of Nottingham
52
Frequency Domain Processing
More examples
G52IIP, School of Computer Science, University of Nottingham
53
Frequency Domain Processing
Examples
G52IIP, School of Computer Science, University of Nottingham
54
Frequency Domain Processing
Examples
G52IIP, School of Computer Science, University of Nottingham
55
Frequency Domain Processing
Spatial vs frequency domain
G52IIP, School of Computer Science, University of Nottingham
56
Frequency Domain Processing
Spatial vs frequency domain
G52IIP, School of Computer Science, University of Nottingham
57
Frequency Domain Processing
Examples