Wavelets
Wavelets
Wavelets
STFT (revisited)
Time/Frequency localization depends on window size.
Once you choose a particular window size, it will be the same
for all frequencies.
Many signals require a more flexible approach - vary the
window size to determine more accurately either time or
frequency.
Wavelet
f (t ) ak k (t )
k
Morlet
Daubechies
jk (t )
(dyadic/octave grid)
2 t k
j/2
scale/frequency
localization
time localization
scale parameter
(measure of frequency)
1
C ( , s )
s
Continuous Wavelet Transform
of signal f(t)
normalization
constant
t
f t
dt
s
Forward
CWT:
Mother wavelet
(window)
s t
s
1
f (t )
s
t
s C ( , s) ( s )d ds
double integral!
FT vs WT
weighted by F(u)
weighted by C(,s)
Properties of Wavelets
Simultaneous localization in time and scale
- The location of the wavelet allows to explicitly represent
t
s C ( , s) ( s )d ds
(forward DWT)
f (t ) a jk jk (t ) (inverse DWT)
k
j
j/2
j
(
t
)
2
t k
jk
where
DFT vs DWT
FT expansion:
f (t ) a l l (t )
l
WT expansion
f (t ) a jk jk (t )
k
jk
(t )
f (t )
fine
details
a
j
jk (t )
jk
j
coarse
details
jk
(t )
f (t )
fine
details
f (t )
k
a
j
jk (t )
jk
j
coarse
details
jk
(t )
f (t )
a
j
jk (t )
jk
fine
details
j
coarse
details
jk
(t )
high resolution
f (t )
(more details)
f1 (t )
f2 (t )
low resolution
fs (t )
(less details)
f (t )
k
a
j
jk (t )
jk
(with sub-sampling)
details D2
details D1
L0
(no sub-sampling)
L0 D1 D2 D3
in general: L0 D1 D2 D3DJ
representation:
(decomposition
or analysis)
Reconstruction (synthesis)
H3=L2+D3
H2=L1+D2
details D3
details D2
H1=L0+D1
details D1
L0
(no sub-sampling)
[9 7 3 5]
The Haar wavelet transform is the following:
L 0 D 1 D2 D3
(with sub-sampling)
1 -1
Dj
Dj-1
L0
D1
How to
compute Di ?
Multiresolution Conditions
If a set of functions can be represented by a weighted
sum of (2jt - k), then a larger set, including the
original, can be represented by a weighted sum of
(2j+1t - k):
high
resolution
scale/frequency
localization
low
resolution
time localization
f j (t ) ak jk (t )
k
V j V j 1
Nested Spaces Vj
Vj : space spanned by (2jt - k)
Basis functions:
(t - k)
V0
(2t - k)
f(t) Vj
f (t )
k
jk (t )
jk
V1
(2jt - k)
Vj
f (t )
k
jk (t )
jk
Orthogonal Complement Wj
Let Wj be the orthogonal complement of Vj in Vj+1
Vj+1 = Vj + Wj
f (t ) ck (2 j 1 t k )
Vj+1
f (t ) ck (2 j t k ) d jk (2 j t k )
k
f (t ) ck (2 j 1 t k )
k
f (t ) ck (2 j t k ) d jk (2 j t k )
k
Vj,
Wj
differences
between
Vj and Vj+1
V0
basis functions
(t)
(t)
encode details or
high resolution info
(t-k)
(2jt-k)
(2jt-k) :
f (t ) ck (t k ) d jk (2 t k )
j
scaling function
wavelet function
1D Haar Wavelets
Haar scaling and wavelet functions:
(t)
computes average
(t)
computes details
V0 V1
=
Examples:
Note that V j 1 V j
Vj
Vj
V j V j 1
VJ fine details
V2
V1 coarse details
i ( x ) ji ( x )
note alternative notation:
1/2
1
0
-1
=0
0
1/2
basis for V 1 :
basis W 1 :
j=1
Note
that inner
product
is zero!
V3 = V2 + W2
V2 = V1 + W1
(t)
Decomposition of f(x)
f(x)=
0,2(x)
V2
1,2(x)
2,2(x)
3,2(x)
1,1(x)
V2=V1+W1
0,1(x)
1,1(x)
V0 ,W0 and W1
0,0(x)
V2=V1+W1=V0+W0+W1
0,1(x)
1,1(x)
Example
Example (contd)
Example:
a1k (j=1)
(t - k)
f0 (t ) a0 k 0 k (t )
k
a0k (j=0)
Subband
encoding!
(9+7)/2
high-pass,
down-sampling
(3+5)/2
(9-7)/2 (3-5)/2
V1 basis functions
low-pass,
down-sampling
high-pass,
down-sampling
V1 basis functions
(8+4)/2
(8-4)/2
x
average
detail
re-arrange:
V1 basis functions
re-arrange:
average
detail
ji ( x) 2 j , ji ( x) 2 j
Examples of lowpass/highpass
analysis filters
Haar
h0
h1
h0
Daubechies
h1
Examples of lowpass/highpass
synthesis filters
Haar (same as
for analysis):
g0
g1
g0
Daubechies
+
g1
re-arrange terms
xxx
xxx
xxx
...
x
x
.
x
row-transformed result
column-transformed result
Example
row-transformed result
re-arrange terms
Example (contd)
column-transformed result
Example:
V2=V0+W0+W1
0,0(x)
0,1(x)
1,1(x)
00(x), 00(x)
00(x), 00(x)
i j ( x) ji ( x)
01(x), 00(x)
i j ( x) ji ( x)
V2
i j ( x) ji ( x)
i j ( x) ji ( x)
xxx
...
x
x
.
x
Note: averaging/differencing
of detail coefficients shown as
Example
re-arrange terms
Example (contd)
( x, y ) ( x) ( y )
000 ( x, y ) ( x, y )
( x, y ) ( x) ( y )
( x, y ) ( x) ( y )
( x, y ) ( x) ( y )
kfj ( x, y ) 2 j (2 j x k , 2 j y f )
kfj ( x, y ) 2 j (2 j x k , 2 j y f )
kfj ( x, y ) 2 j (2 j x k , 2 j y f )
kfj ( x, y ) 2 j (2 j x k , 2 j y f )
Detail coefficients
LH: intensity variations along
columns (horizontal edges)
kfj ( x, y ) 2 j (2 j x k , 2 j y f ) HH:
i j ( x) ji ( x)
V2
i j ( x) ji ( x)
Forward/Inverse DWT
(using textbooks notation)
LL
i=H,V,D
H LH
V HL
D HH
LH
HH
H LH
V HL
D HH
LL
HL
LH
HL
HH
LL
HH
HL
Wavelets Applications
Noise filtering
Image compression
Fingerprint compression
Image fusion
Recognition
G. Bebis, A. Gyaourova, S. Singh, and I. Pavlidis, "Face Recognition by
Fusing Thermal Infrared and Visible Imagery", Image and Vision
Computing, vol. 24, no. 7, pp. 727-742, 2006.
query by content or
query by example
Typically, the K best
matches are reported.
painted
low resolution
queries
target