Wavelets (Chapter 7) : CS474/674 - Prof. Bebis
Wavelets (Chapter 7) : CS474/674 - Prof. Bebis
Wavelets (Chapter 7) : CS474/674 - Prof. Bebis
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.
What is a wavelet?
It is a function that waves above and below the x-axis;
it has (1) varying frequency, (2) limited duration, and (3)
an average value of zero.
This is in contrast to sinusoids, used by FT, which have
infinite energy.
Sinusoid
Wavelet
Wavelets
Like sine and cosine functions in FT, wavelets can define
basis functions k(t):
f (t ) ak k (t )
k
Wavelets (contd)
There are many different wavelets:
Haar
Morlet
Daubechies
jk (t )
(dyadic/octave grid)
scale =1/2j
(1/frequency)
Forward
CWT:
scale parameter
(measure of frequency)
1
C ( , s )
s
normalization
constant
t
f t
dt
s
Mother wavelet
(window)
scale =1/2j=1/frequency
C ( , s)
1
s
t
dt
s
f t
1
f (t )
s
t
s C ( , s) ( s )d ds
note the 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
(without sub-sampling)
L0 D1 D2 D3
in general: L0 D1 D2 D3DJ
representation:
Reconstruction (synthesis)
H3=H2+D3
H2=H1+D2
details D3
details D2
H1=L0+D1
details D1
L0
(without sub-sampling)
[9 7 3 5]
The Haar wavelet transform is the following:
L 0 D 1 D2 D3
(with sub-sampling)
Harr decomposition:
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,
set including the
original, can be represented by a weighted sum of
(2j+1t - k):
high
resolution
j
low
resolution
f j (t ) ak jk (t )
f j 1 (t ) bk ( j 1) k (t )
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
f (t ) ck (t k ) d jk (2 j t k )
k
scaling function
wavelet function
1D Haar Wavelets
Haar scaling and wavelet functions:
(t)
computes average
(t)
computes details
Example:
width: 1
0
Note that
e.g.,
width: 1/2
V0 V1
=
width: 1/2j
Note that V j 1 V j
e.g.,
Vj
Vj
V j V j 1
VJ fine details
V1
V0 coarse details
i ( x ) ji ( x )
note alternative notation:
1/2
Note
that the dot
product
between basis
functions in Vj
and Wj is zero!
V3 = V2 + W2
V2 = V1 + W1
V1 = V0 + W0
Example - Revisited
f(x)=
V2
Example (contd)
f(x)=
2,0(x)
V2
2,1(x)
2,2(x)
2,3(x)
Example (contd)
(divide by 2 for normalization)
V1and W1
V2=V1+W1
1,0(x)
1,1(x)
1,0(x)
1,1(x)
Example (contd)
Example (contd)
(divide by 2 for normalization)
V0 ,W0 and W1
V2=V1+W1=V0+W0+W1
0,0(x)
0,0(x)
1,0 (x)
1,1(x)
Example
Example (contd)
Filter banks
The lower resolution coefficients can be calculated
from the higher resolution coefficients by a treestructured algorithm (i.e., filter bank).
Subband
encoding
(analysis)
Example (revisited)
[9 7 3 5]
low-pass,
down-sampling
(9+7)/2
high-pass,
down-sampling
(3+5)/2
(9-7)/2 (3-5)/2
V1 basis functions
Example (revisited)
[9 7 3 5]
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:
Examples of lowpass/highpass
(analysis) filters
Haar
h0
h1
h0
Daubechies
h1
Subband
encoding
(synthesis)
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)
1,0(x)
1,1(x)
00(x), 00(x)
00(x), 00(x)
i j ( x) ji ( x)
10(x), 00(x)
i j ( x) ji ( x)
V2
i j ( x) ji ( x)
i j ( x) ji ( x)
xxx
...
x
x
.
x
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 )
i j ( x) ji ( x)
V2
i j ( x) ji ( x)
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:
LH
HL
HH
LL
LH
HL
HH
LL
LL
H LH
V HL
D HH
H LH
V HL
D HH
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.
low resolution
target
queries
Charles E. Jacobs Adam Finkelstein David H. Salesin, "Fast Multiresolution
Image Querying", SIGRAPH, 1995.