Wavelet Based Methods in Image Processing Lecture 2.a -

advertisement
0
0
50
50
100
100
150
150
200
200
250
0
250
50
100
150
200
250
300
350
0
50
100
150
200
250
300
350
Wavelet Based Methods in Image
Processing
Lecture 2.a - Fourier Transform
Applied Mathematics Seminar
S. Allen Broughton
1
Lecture 2.a
•
•
•
•
•
•
•
signal samples and time domain
model wave forms and frequency domain
signal analysis & synthesis
Discrete Fourier transform - DFT
extension to 2D
convolution theorem
restoration
2
Signal Samples and
Time Domain
•
•
•
•
X = [X(0),...,X(N-1)] vector of length N
X(i) = f(i/N): sample analog signal f
X(i+N) = X(i): periodic extension (mod N)
time domain {0,1/N,...,(N-1)/N} or
{0,1,...,N-1}
3
Model Wave Forms
•
model wave forms
E
•
k
n
(n ) = exp(2π i(k ⋅
))
N
frequency domain
k = 0,..., N − 1
•
Maple script - waveform.mws
4
Signal Analysis & Synthesis - 1
•
energy of a signal (* = conjugate transpose)
μ(X , X ) = X ⋅ X = X *X =
N −1
∑
| X ( n )|2
n=0
•
analysis of a signal -“energy content at a
frequency”
~
X ( r ) = E k ⋅ X = E k* X
=
N −1
∑
n=0
n
X ( n ) exp( − 2 π i ( k ⋅ ))
N
5
Signal Analysis & Synthesis - 2
•
synthesis or reconstruction for a signal
X =
N −1
∑
k =0
ak Ek
~
X (k )
ak =
N
6
Signal Analysis & Synthesis - 3
•
additivity of energy
1
μ(X , X ) =
N
N −1
∑
k =0
~
| X ( k ) |2 = N
N −1
∑
k =0
| a k |2
7
Discrete Fourier Transform
(DFT) - Matrix definition
•
set
F = [ E 0 , E 1 , ... , E
N −1
]
*
kl
F (k ,l) = exp(− 2π i
)
N
•
•
•
then
and
~
X = FX
1
F F =
I
N
*
hence (inversion formula)
1
~
X =
FX
N
8
Discrete Fourier Transform
Pictures
•
Matlab scripts
– dft1demo1.m, dft1demo2
– dft2demo1.m, dft2demo2.m ,dftdemo3.m
9
Convolution Theorem
•
Fourier transform takes convolution to
pointwise multiplication
~
~
X *Y = X •Y
•
Eigenvector interpretation
~
X * E k = H X E k = X (k ) E k = λE k
g a in = | λ | , p h a s e s h ift = ∠ λ
10
2D Discrete Fourier Transform
•
Let X be an mxn image then
~
t
X = Fm XFn = Fm XFn
•
2D convolution theorem holds
~
~
X *Y = X •Y
11
Simple Restoration -1
•
Let X be an true image and Y the blurred
and noisy image then
Y = M*X + E
•
•
where M is a blurring mask and E is the
noise
ideally, find another mask R such that
R * M = id
•
R* E = 0
can’t be done in practice but you try your
best
12
Simple Restoration -2
~ process ~ F −1
Y⎯
⎯→ Y ⎯⎯⎯→ Z ⎯⎯→ Z
F
•
•
•
~ ~ ~ ~ ~ ~
Z = R• M• X + R•E
where
work in Fourier domain
~ ~
R * M = id → R • M = id
or
~ ~ −1 pointwise
R=M
13
Simple Restoration - 3
•
Matlab Example - ansmid3.m
14
Issues in Restoration - 1
•
Model issues
– Good information on the blurring model M
needs to be available, it can sometimes be
found by experimentation
– The distribution of E needs to be known
– If M and E are unknown then you need to
estimate them from the degraded image
15
Issues in Restoration - 2
•
Computational issues
–
~
M
– thus
has zeros or small entries
~ ~ −1
R=M
– and so
image
~ ~
R•E
doesn’t exist or is very large
‘‘noises up’’ the restored
16
Download