SLIDE 1 Short Time Fourier Transform
- 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.
SLIDE 2 The Wavelet Transform
- Overcomes the preset resolution problem of the STFT by
using a variable length window:
– Narrower windows are more appropriate at high frequencies (better time localization) – Wider windows are more appropriate at low frequencies (better frequency localization)
SLIDE 3
The Wavelet Transform (cont’d)
Wide windows do not provide good localization at high frequencies.
SLIDE 4
The Wavelet Transform (cont’d)
A narrower window is more appropriate at high frequencies.
SLIDE 5
The Wavelet Transform (cont’d)
Narrow windows do not provide good localization at low frequencies.
SLIDE 6
The Wavelet Transform (cont’d)
A wider window is more appropriate at low frequencies.
SLIDE 7 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
SLIDE 8 Wavelets
- Like sine and cosine functions in FT, wavelets can define
basis functions ψk(t):
- Span of ψk(t): vector space S containing all functions f(t)
that can be represented by ψk(t).
( ) ( )
k k k
f t a t ψ =∑
SLIDE 9 Wavelets (cont’d)
- There are many different wavelets:
Morlet Haar Daubechies
SLIDE 10 Basis Construction - Mother Wavelet
( )
jk t
ψ =
SLIDE 11 Basis Construction - Mother Wavelet (cont’d)
scale =1/2j (1/frequency)
( )
/2
( ) 2 2
j j jk t
t k ψ ψ = −
j k
SLIDE 12 Discrete Wavelet Transform (DWT)
( ) ( )
jk jk k j
f t a t ψ = ∑∑
( )
/2
( ) 2 2
j j jk t
t k ψ ψ = −
(inverse DWT) (forward DWT) where
*
( ) ( )
jk
jk t
a f t t ψ =∑
SLIDE 13 DFT vs DWT
- FT expansion:
- WT expansion
- r
- ne parameter basis
( ) ( )
l l l
f t a t ψ =∑ ( ) ( )
jk jk k j
f t a t ψ =∑∑
two parameter basis
SLIDE 14 Multiresolution Representation using
high resolution
(more details)
low resolution
(less details)
…
( ) ( )
jk jk k j
f t a t ψ =∑ ∑
( ) f t
1
ˆ ( ) f t
2
ˆ ( ) f t ˆ ( )
s
f t ( )
jk t
ψ
j
SLIDE 15 Prediction Residual Pyramid - Revisited
- In the absence of quantization errors, the approximation
pyramid can be reconstructed from the prediction residual pyramid.
- Prediction residual pyramid can be represented more
efficiently.
(with sub-sampling)
SLIDE 16 Efficient Representation Using “Details”
details D2
L0
details D3 details D1
(without sub-sampling)
SLIDE 17
Efficient Representation Using Details (cont’d)
representation: L0 D1 D2 D3
A wavelet representation of a function consists of (1) a coarse overall approximation (2) detail coefficients that influence the function at various scales.
in general: L0 D1 D2 D3…DJ
SLIDE 18 Reconstruction (synthesis)
H3=H2+D3 details D2 L0
details D3
H2=H1+D2 H1=L0+D1 details D1
(without sub-sampling)
SLIDE 19 Example - Haar Wavelets
- Suppose we are given a 1D "image" with a resolution
- f 4 pixels:
[9 7 3 5]
- The Haar wavelet transform is the following:
L0 D1 D2 D3
(with sub-sampling)
SLIDE 20 Example - Haar Wavelets (cont’d)
- Start by averaging the pixels together (pairwise) to get
a new lower resolution image:
- To recover the original four pixels from the two
averaged pixels, store some detail coefficients.
1 [9 7 3 5]
SLIDE 21 Example - Haar Wavelets (cont’d)
- Repeating this process on the averages (i.e., low
resolution image) gives the full decomposition:
1 Harr decomposition:
SLIDE 22 Example - Haar Wavelets (cont’d)
- We can reconstruct the original image by adding or
subtracting the detail coefficients from the lower- resolution versions.
2 1 -1
SLIDE 23 Example - Haar Wavelets (cont’d)
Detail coefficients become smaller and smaller as j increases.
Dj Dj-1 D1 L0
How to compute Di ?
SLIDE 24 Multiresolution Conditions
- If a set of functions can be represented by a weighted
sum of ψ(2jt - k), then a larger set, including the
- riginal, can be represented by a weighted sum of ψ(2j
+1t - k):
low resolution high resolution
j
SLIDE 25 Multiresolution Conditions (cont’d)
- If a set of functions can be represented by a weighted
sum of ψ(2jt - k), then a larger set, including the
- riginal, can be represented by a weighted sum of ψ(2j
+1t - k):
Vj: span of ψ(2jt - k):
( ) ( )
j k jk k
f t a t ψ =∑
Vj+1: span of ψ(2j+1t - k):
1 ( 1)
( ) ( )
j k j k k
f t b t ψ
+ +
=∑
1 j j
V V + ⊆
SLIDE 26 Nested Spaces Vj
ψ(t - k) ψ(2t - k) ψ(2jt - k) … V0 V1 Vj Vj : space spanned by ψ(2jt - k) Multiresolution conditions à nested spanned spaces:
( ) ( )
jk jk k j
f t a t ψ =∑ ∑
f(t) ϵ Vj Basis functions: i.e., if f(t) ϵ V j then f(t) ϵ V j+1
1 j j
V V + ⊂
SLIDE 27 How to compute Di ? (cont’d)
( ) ( )
jk jk k j
f t a t ψ =∑ ∑
f(t) ϵ Vj IDEA: define a set of basis functions that span the difference between Vj+1 and Vj
SLIDE 28 Orthogonal Complement Wj
- Let Wj be the orthogonal complement of Vj in Vj+1
Vj+1 = Vj + Wj
SLIDE 29 How to compute Di ? (cont’d)
If f(t) ϵ Vj+1, then f(t) can be represented using basis functions φ(t) from Vj+1:
1
( ) (2 )
j k k
f t c t k ϕ
+
= −
∑
( ) (2 ) (2 )
j j k jk k k
f t c t k d t k ϕ ψ = − + −
∑ ∑
Vj+1 = Vj + Wj Alternatively, f(t) can be represented using two sets of basis functions, φ(t) from Vj and ψ(t) from Wj: Vj+1
SLIDE 30 Think of Wj as a means to represent the parts of a function in Vj+1 that cannot be represented in Vj
1
( ) (2 )
j k k
f t c t k ϕ
+
= −
∑
( ) (2 ) (2 )
j j k jk k k
f t c t k d t k ϕ ψ = − + −
∑ ∑
Vj Wj
How to compute Di ? (cont’d)
differences between Vj and Vj+1
SLIDE 31 How to compute Di ? (cont’d)
- à using recursion on Vj:
( ) ( ) (2 )
j k jk k k j
f t c t k d t k ϕ ψ = − + −
∑ ∑∑
V0 W0, W1, W2, …
basis functions basis functions
Vj+1 = Vj-1+Wj-1+Wj = …= V0 + W0 + W1 + W2 + … + Wj if f(t) ϵ Vj+1 , then: Vj+1 = Vj + Wj
SLIDE 32 Summary: wavelet expansion (Section 7.2)
- Wavelet decompositions involve a pair of waveforms
(mother wavelets):
φ(t) ψ(t)
encode low resolution info encode details or high resolution info
( ) ( ) (2 )
j k jk k k j
f t c t k d t k ϕ ψ = − + −
∑ ∑∑
scaling function wavelet function
SLIDE 33 1D Haar Wavelets
- Haar scaling and wavelet functions:
computes average computes details
φ(t) ψ(t)
SLIDE 34 1D Haar Wavelets (cont’d)
- V0 represents the space of one pixel images
- Think of a one-pixel image as a function that is constant
- ver [0,1)
Example:
0 1
width: 1
SLIDE 35 1D Haar Wavelets (cont’d)
- V1 represents the space of all two-pixel images
- Think of a two-pixel image as a function having 21
equal-sized constant pieces over the interval [0, 1).
Examples:
0 ½ 1
1
V V ⊂
= +
width: 1/2
e.g.,
SLIDE 36 1D Haar Wavelets (cont’d)
- V j represents all the 2j-pixel images
- Functions having 2j equal-sized constant pieces over
interval [0,1).
Examples: width: 1/2j
ϵ Vj ϵ Vj
1 j j
V V
− ⊂
e.g.,
SLIDE 37 1D Haar Wavelets (cont’d)
V0, V1, ..., V j are nested
i.e.,
VJ … V1 V0 coarse details fine details
1 j j
V V + ⊂
SLIDE 38 Define a basis for Vj
- Mother scaling function:
- Let’s define a basis for V j :
0 1
note alternative notation:
( ) ( )
j i ji
x x ϕ ϕ ≡
1
SLIDE 39
Define a basis for Vj (cont’d)
SLIDE 40 Define a basis for Wj (cont’d)
- Mother wavelet function:
- Let’s define a basis ψ j
i for Wj :
1
0 1/2 1
( ) ( )
j i ji
x x ψ ψ ≡
note alternative notation:
SLIDE 41
Define a basis for Wj
Note that the dot product between basis functions in Vj and Wj is zero!
SLIDE 42 Define a basis for Wj (cont’d)
Basis functions ψ j
i of W j
Basis functions φ j
i of V j
form a basis in V j+1
SLIDE 43
Example - Revisited
f(x)= V2
SLIDE 44 Example (cont’d)
V1and W1 V2=V1+W1
φ1,0(x) φ1,1(x) ψ1,0(x) ψ1,1(x)
(divide by 2 for normalization)
SLIDE 45 Example (cont’d)
V2=V1+W1=V0+W0+W1 V0 ,W0 and W1
φ0,0(x) ψ0,0(x) ψ1,0 (x) ψ1,1(x)
(divide by 2 for normalization)
SLIDE 46
Example
SLIDE 47
Example (cont’d)
SLIDE 48 Filter banks
- The lower resolution coefficients can be calculated
from the higher resolution coefficients by a tree- structured algorithm (i.e., filter bank).
h0(-n) is a lowpass filter and h1(-n) is a highpass filter Subband encoding (analysis)
SLIDE 49 Example (revisited)
[9 7 3 5]
low-pass, down-sampling high-pass, down-sampling
(9+7)/2 (3+5)/2 (9-7)/2 (3-5)/2
V1 basis functions
SLIDE 50
Filter banks (cont’d)
Next level:
SLIDE 51 Example (revisited)
[9 7 3 5]
high-pass, down-sampling low-pass, down-sampling
(8+4)/2 (8-4)/2
V1 basis functions
SLIDE 52 Convention for illustrating 1D Haar wavelet decomposition
x x x x x x … x x
detail average
…
re-arrange: re-arrange: V1 basis functions
SLIDE 53
Examples of lowpass/highpass (analysis) filters
Haar h0 h1
SLIDE 54 Filter banks (cont’d)
- The higher resolution coefficients can be calculated from
the lower resolution coefficients using a similar structure. Subband encoding (synthesis)
SLIDE 55
Filter banks (cont’d)
Next level:
SLIDE 56 Examples of lowpass/highpass (synthesis) filters
Haar (same as for analysis):
+
g0 g1
SLIDE 57 2D Haar Wavelet Transform
- The 2D Haar wavelet decomposition can be computed
using 1D Haar wavelet decompositions.
– i.e., 2D Haar wavelet basis is separable
- Two decompositions (i.e., correspond to different
basis functions):
– Standard decomposition – Non-standard decomposition
SLIDE 58 Standard Haar wavelet decomposition
(1) Compute 1D Haar wavelet decomposition of each row of
the original pixel values. (2) Compute 1D Haar wavelet decomposition of each column of the row-transformed pixels.
SLIDE 59 Standard Haar wavelet decomposition (cont’d)
x x x … x x x x … x … … . x x x ... x (1) row-wise Haar decomposition: …
detail average
… … … . … … … … .
re-arrange terms
SLIDE 60 Standard Haar wavelet decomposition (cont’d)
(1) row-wise Haar decomposition: …
detail average
… … … … . … … … . …
row-transformed result
SLIDE 61 Standard Haar wavelet decomposition (cont’d)
(2) column-wise Haar decomposition: …
detail average
… … … … . … … … … … . …
row-transformed result column-transformed result
SLIDE 62 Example
… … … … … .
row-transformed result
… … … .
re-arrange terms
SLIDE 63 Example (cont’d)
… … … … … .
column-transformed result
SLIDE 64 Non-standard Haar wavelet decomposition
- Alternates between operations on rows and columns.
(1) Perform one level decomposition in each row (i.e., one step of horizontal pairwise averaging and differencing). (2) Perform one level decomposition in each column from step 1 (i.e., one step of vertical pairwise averaging and differencing). (3) Repeat the process on the quadrant containing averages
- nly (i.e., in both directions).
SLIDE 65 Non-standard Haar wavelet decomposition (cont’d)
x x x … x x x x … x … … . x x x . . . x
Haar decomposition: … … … … . … … … … … .
Haar decomposition: …
SLIDE 66 Non-standard Haar wavelet decomposition (cont’d)
Haar decomposition
- n “green” quadrant
- ne level, vertical
Haar decomposition
… … … … . … …
re-arrange terms
… … … … … . …
SLIDE 67 Example
… … … … . … …
re-arrange terms
SLIDE 68
Example (cont’d)
… … … … … .
SLIDE 69 2D DWT using filter banks (analysis)
LL LH HL HH
SLIDE 70 2D DWT using filter banks (analysis)
LL Hà LH Và HL Dà HH The wavelet transform is applied again on the LL sub-image
LL LL LH HL HH
SLIDE 71
2D DWT using filter banks (analysis)
SLIDE 72 Fast Multiresolution Image Querying
painted low resolution target
queries
Charles E. Jacobs Adam Finkelstein David H. Salesin, "Fast Multiresolution Image Querying", SIGRAPH, 1995.