Professional Documents
Culture Documents
Why transform?
Image representation
Noise in Fourier spectrum
Fourier Analysis
Breaks down a signal into constituent
sinusoids of different frequencies
• Flexibility.
The Continuous Wavelet Transform (CWT)
iwt
F ( w) f (t )e dt
f ( t ) sin(t ) ; a 1
f ( t ) sin(2t ) ; a 1 2
f ( t ) sin(4t ) ; a 1 4
Scaling (Cont’d)
Scale factor works exactly the same with
wavelets:
f ( t ) (t ) ; a 1
f ( t ) ( 2t ) ; a 1 2
f ( t ) ( 4t ) ; a 1 4
CWT
Reminder: The CWT Is the sum over all
time of the signal, multiplied by scaled and
shifted versions of the wavelet function
Step 1:
Take a Wavelet and compare
it to a section at the start
of the original signal
CWT
Step 2:
Calculate a number, C, that represents
how closely correlated the wavelet is
with this section of the signal. The
higher C is, the more the similarity.
CWT
Step 3: Shift the wavelet to the right and
repeat steps 1-2 until you’ve covered the
whole signal
CWT
Step 4: Scale (stretch) the wavelet and
repeat steps 1-3
STFT - revisited
• Time - Frequency localization depends on window size.
– Wide window good frequency localization, poor time localization.
f (t ) ak k (t )
k
Example:
scale
ψ(t)
translate
Basis Construction - Mother Wavelet
(dyadic/octave grid)
jk (t )
scale =1/2j
(1/frequency) j
k
Continuous Wavelet Transform (CWT)
1 t
Forward C ( , s) f t
dt
CWT: s t s
1 t
C ( , s) f t dt
s t s
Illustrating CWT (cont’d)
3. Shift the wavelet to the right and repeat step 2 until you've
covered the whole signal.
1 t
C ( , s) f t
dt
s t s
Illustrating CWT (cont’d)
1 t
C ( , s) f t
dt
s t s
1 t
C ( , s) f t
dt
s t s
Continuous Wavelet Transform (cont’d)
1 t
Forward CWT: C ( , s) f t
dt
s t s
1 t
Inverse CWT: f (t )
s s C( , s) ( s )d ds
weighted by F(u)
Fourier Transform vs Wavelet Transform
weighted by C(τ,s)
1 t
f (t )
s s C( , s) ( s )d ds
Properties of Wavelets
• Simultaneous localization in time and scale
- The location of the wavelet allows to explicitly represent
the location of events in time.
- The shape of the wavelet allows to represent different
detail or resolution.
Properties of Wavelets (cont’d)
1 t
f (t )
s s C( , s) ( s )d ds
Properties of Wavelets (cont’d)
1 t
f (t )
s s C( , s) ( s )d ds
where jk (t ) 2 j / 2 2 j t k
DFT vs DWT
or f (t ) a l l (t )
l
f (t ) a jk jk (t )
k j
Multiresolution Representation Using Wavelets
f (t )
fine
details
wider, large translations
f (t ) a jk (t )
jk
k j j
coarse
details
Multiresolution Representation Using Wavelets
f (t )
fine
details
f (t ) a jk (t )
jk
k j j
coarse
details
Multiresolution Representation Using Wavelets
f (t )
fine
details
narrower, small translations
f (t ) a jk (t )
jk
k j j
coarse
details
Multiresolution Representation Using Wavelets
f (t ) high resolution
(more details)
fˆ1 (t )
j
fˆ2 (t )
…
low resolution
fˆs (t ) (less details)
f (t ) a jk (t )
jk
k j
Pyramidal Coding - Revisited
Approximation Pyramid
(with sub-sampling)
Pyramidal Coding - Revisited
(details)
Prediction Residual
Pyramid
(details)
(with sub-sampling)
reconstruct
Approximation Pyramid
Efficient Representation Using “Details”
details D3
details D2
details D1
L0
(without sub-sampling)
Efficient Representation Using Details (cont’d)
representation: L0 D1 D2 D3
in general: L0 D1 D2 D3…DJ
A wavelet representation of a function consists of
(1) a coarse overall approximation
(2) detail coefficients that influence the function at various scales
Reconstruction (synthesis)
H3=H2 & D3
details D3
H2=H1 & D2
details D2
H1=L0 & D1
details D1
L0
(without sub-sampling)
Example - Haar Wavelets
(with sub-sampling)
L0 D1 D2 D3
Example - Haar Wavelets (cont’d)
• Start by averaging and subsampling the pixels
together (pairwise) to get a new lower resolution
image:
[9 7 3 5]
1
Example - Haar Wavelets (cont’d)
• Repeating this process on the averages (i.e., low
resolution image) gives the full decomposition:
Harr decomposition:
Example - Haar Wavelets (cont’d)
• The original image can be reconstructed by adding or
subtracting the detail coefficients from the lower-
resolution representations.
L0 D1 D2 D3
2 1 -1
[6]
Example - Haar Wavelets (cont’d)
Detail coefficients
become smaller and
smaller scale decreases.
Dj
How should we
Dj-1 compute the detail
coefficients Dj ?
D1
L0
Multiresolution Conditions
• If a set of functions V can be represented by a weighted
sum of ψ(2jt - k), then a larger set, including V, can be
represented by a weighted sum of ψ(2j+1t - k).
high
resolution
ψ(2j+1t - k)
j
ψ(2jt - k)
low
resolution
Multiresolution Conditions (cont’d)
f j 1 (t ) bk ( j 1) k (t )
Vj+1: span of ψ(2j+1t - k): k
V j V j 1
Multiresolution Conditions (cont’d)
Nested Spaces
j=0 ψ(t - k) V0
j=1 ψ(2t - k) V1
j ψ(2jt - k) Vj V j V j 1
if f(t) ϵ V j then f(t) ϵ V j+1
How to compute Dj ?
IDEA:
Vj+1 = Vj + Wj
How to compute Dj ? (cont’d)
If f(t) ϵ Vj+1, then f(t) can be represented using basis
functions φ(t) from Vj+1:
Vj+1 f (t ) ck (2 j 1 t k )
k
f (t ) ck (2 j t k ) d jk (2 j t k )
k k
How to compute Dj ? (cont’d)
f (t ) ck (2 j 1 t k )
k
Vj+1
Vj+1 = Vj-1+Wj-1+Wj = …= V0 + W0 + W1 + W2 + … + Wj
f (t ) ck (t k ) d jk (2 j t k )
k k j
φ(t) ψ(t)
V0 .
different resolution 1D images:
1-pixel (j=0)
V1 .. 2-pixel (j=1)
V2 …. etc.
4-pixel (j=2)
1D Haar Wavelets (cont’d)
j=0
• V0 represents the space of 1-pixel (20-pixel) images
Example: width: 1
0 1
1D Haar Wavelets (cont’d)
j=1
• V1 represents the space of all 2-pixel (21-pixel) images
• Think of a 2-pixel image as a function having 21 equal-
sized constant pieces over the interval [0, 1).
0 ½ 1 width: 1/2
Example:
Note that: V0 V1
e.g., = +
1D Haar Wavelets (cont’d)
• V j represents all the 2j-pixel images
• Functions having 2j equal-sized constant pieces over
interval [0,1).
Note that:
Vj-1 ϵ Vj V1 ϵ Vj
Vj fine details
…
V1
V0 coarse info
Define a basis for Vj
• Scaling function:
Note
that the dot
product
between basis
functions in Vj
and Wj is zero!
Basis for Vj+1
Basis functions ψ ji of W j
form a basis in V j+1
Basis functions φ ji of V j
Define a basis for Wj (cont’d)
V3 = V2 + W2
Define a basis for Wj (cont’d)
V2 = V1 + W1
Define a basis for Wj (cont’d)
V1 = V0 + W0
Example - Revisited
f(x)=
V2
Example (cont’d)
f(x)=
φ2,0(x)
V2 φ2,1(x)
φ2,2(x)
φ2,3(x)
Example (cont’d)
ψ1,0(x)
ψ1,1(x)
Example (cont’d)
Example (cont’d)
(divide by 2 for normalization)
V0 ,W0 and W1
φ0,0(x)
V2=V1+W1=V0+W0+W1
ψ0,0(x)
ψ1,0 (x)
ψ1,1(x)
Example
Example (cont’d)
Filter banks
• The lower resolution coefficients can be calculated
from the higher resolution coefficients by a tree-
structured algorithm (i.e., filter bank).
Subband
encoding
(analysis)
[9 7 3 5]
low-pass, high-pass,
down-sampling down-sampling
[9 7 3 5]
low-pass, high-pass,
down-sampling down-sampling
LP HP
(8+4)/2 (8-4)/2
Convention for illustrating
1D Haar wavelet decomposition
x x x x x x … x x
average
(LP)
… detail
(HP)
re-arrange: …
…
… LP HP
re-arrange: …
Examples of lowpass/highpass
(analysis) filters
h0
Haar
h1
h0
Daubechies
h1
Filter banks (cont’d)
• The higher resolution coefficients can be calculated
from the lower resolution coefficients using a similar
structure.
Subband
encoding
(synthesis)
g0
Haar (same as
for analysis):
g1
g0
Daubechies:
+ g1
2D Haar Wavelet Transform
• Steps:
row-transformed result
… …
…
…
… … . … … .
…
Standard Haar wavelet decomposition
(cont’d)
average
detail
(2) column-wise Haar decomposition:
row-transformed result
…
re-arrange terms …
…
… … .
…
… … .
Example (cont’d)
column-transformed result
…
…
… … .
…
Standard Haar wavelet decomposition
(cont’d)
What is the 2D Haar basis for the
standard decomposition?
To construct the standard 2D Haar wavelet basis, consider
all possible outer products of the1D basis functions.
φ0,0(x)
Example:
ψ0,0(x)
V2=V0+W0+W1
ψ1,0(x)
ψ1,1(x)
What is the 2D Haar basis for the
standard decomposition?
To construct the standard 2D Haar wavelet basis, consider
all possible outer products of the1D basis functions.
Notation: ij ( x) ji ( x) ij ( x) ji ( x)
What is the 2D Haar basis for the
standard decomposition?
Notation:
V2 ij ( x) ji ( x)
ij ( x) ji ( x)
Non-standard Haar wavelet decomposition
re-arrange terms
…
…
… … .
…
…
Example (cont’d)
…
…
… … .
…
Non-standard Haar wavelet decomposition
(cont’d)
What is the 2D Haar basis for the non-
standard decomposition?
( x, y ) ( x) ( y ) 000 ( x, y ) ( x, y)
( x, y ) ( x) ( y ) kfj ( x, y ) 2 j (2 j x k , 2 j y f )
( x, y ) ( x) ( y ) kfj ( x, y ) 2 j (2 j x k , 2 j y f )
( x, y ) ( x) ( y ) kfj ( x, y ) 2 j (2 j x k , 2 j y f )
What is the 2D Haar basis for the non-
standard decomposition?
Notation:
ij ( x) ji ( x)
V2
ij ( x) ji ( x)
2D Subband Coding
HL HH
Wavelets Applications
• Noise filtering
• Image compression
– Special case: 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.
• Image matching and retrieval
Charles E. Jacobs Adam Finkelstein David H. Salesin, "Fast
Multiresolution Image Querying", SIGRAPH, 1995.