Wavelets & Wavelet Algorithms: 1D Discrete Fourier Transform & Inverse Discrete Fourier Transform
Discrete Wavelet Transformssites.science.oregonstate.edu/~landaur/Books/...Discrete Wavelet...
Transcript of Discrete Wavelet Transformssites.science.oregonstate.edu/~landaur/Books/...Discrete Wavelet...
-
Discrete Wavelet Transforms�
Industrial-Strength, Technology-Enabling Computing(look, listen, read)
Rubin H Landau
Sally Haerer, Producer-Director
Based on A Survey of Computational Physics by Landau, Páez, & Bordeianu
with Support from the National Science Foundation
Course: Computational Physics II
1 / 1
-
Review: Wavelets in a Nutshell
Three Wavelet Examples
–1.0
0.0
1.0
–4 0t
4
0.0
1.0
–4 0 4t
ψ
–1.0
–0.5
0.0
0.5
1.0
–6 –4 –2 0 2 4 6
t
Wavelets = packets
Nonstationary signals
Basis functions
All oscillate
Varied functional forms
Vary scale & center
Finite ∆ τ ∆ ω
∆τ ∆ω ≥ 2π
2 / 1
-
Problem: Determine ≤ N Indep Wavelet TFs Yi ,j
The Discrete Wavelet Transform (DWT)
Y (s, τ) =∫ +∞−∞
dt ψ∗s,τ (t) y(t) (Wavelet Transform)
Given: N signal measurements:
y(tm) ≡ ym, m = 1, . . . ,N
Compute no more DWTs than needed
Hint: Lossless: consistent with uncertainty principle
Hint: Lossy: consistent with required resolution
3 / 1
-
How to Discretize DWT?
Auto Scalings, Translations = ♥Wavelets
Discrete scaling s, discrete time translation τ :
s = 2j , τ =k2j, k , j = 0, 1, . . . (Dyadic Grid) (1)
ψj,k (t) =1√2j
Ψ
[t − k2j
2j
](Wavelets T = 1) (2)
Yj,k =∫ +∞−∞
dt ψj,k (t) y(t) (3)
'∑
m
ψj,k (tm)y(tm)h (DWT) (4)
4 / 1
-
Time & Frequency Sampling
Sample y(t) in Time & Frequency Ranges
Time
Freq
uen
cy
High ω ↑ rangeHigh ω for detailsFew low ω for shapeEach t , ∆ scales
Uncertainty Prin:∆ω∆t ≥ 2πDon’t be wasteful!⇒ H ×W = Const
5 / 1
-
Multi Resolution Analysis (MRA)
Digital Wavelet Transform ≡ Filter
L
L
H H
LL
LHH
2
2
2
2
DataInput 2
2
2
Filter: ∆ relative ω strengths ≡ analyze ∆ scale: MRASample→ Filter→ Sample · · ·
g(t) =∫ +∞−∞
dτ h(t − τ) y(τ) (Filter)
Y (s, τ) =∫ +∞−∞
dt Ψ∗(
t − τs
)y(t) '
∑wiψiy(ti ) (Transform)
wi = integration weight + wavelet values = “filter coeff”
6 / 1
-
MRA via Filter Tree (Pyramid Algorithm)
Filtering with Decimation
L
L
H H
LL
LHH
2
2
2
2
DataInput 2
2
2
H: highpass filters
L: lowpass filters
Ea filter: lowers scale
↓2: rm 1/2 signal
Factor-of-2 “decimation”
"Subsampling"
Keeps area constant
Need little large-s info
7 / 1
-
Example from Appendix
High → Medium → Low Resolution
8 / 1
-
Summary
Pyramid DWT algorithm compresses data, separates hi resSmooth info in low-ω (large s) componentsDetailed info in high-ω (small s) componentsHigh-res reproduction: more info on details than shapeDifferent resolution components = independent⇒ Lower data storageRapid reproduction/inversion (JPEG2)
9 / 1
-
Pyramid Algorithm Graphically (see text)
InputN Samples
N/2
N/4
N/8
2
N/2
N/4
N/8
2
c
c
c
c
d
d
d
d
(1)
(2)
(3)
(n)
(1)
(2)
(3)
(n)
Coefficients
Coefficients
Coefficients
Coefficients
CoefficientsCoefficients
Coefficients
Coefficients
L
L
L
L
H
H
H
H
L & H via matrix mult (TFs)Decimated H output saved
Downsample: ↓ #, ∆ scaleEnds with 2 H, L points
10 / 1
-
N = 8 Example Matrices
y1y2y3y4y5y6y7y8
filter−→
s(1)1d (1)1s(1)2d (1)2s(1)3d (1)3s(1)4d (1)4
order−→
s(1)1s(1)2s(1)3s(1)4d (1)1d (1)2d (1)3d (1)4
filter−→
s(2)1d (2)1s(2)2d (2)2d (1)1d (1)2d (1)3d (1)4
order−→
s(2)1s(2)2d (2)1d (2)2d (1)1d (1)2d (1)3d (1)4
11 / 1
-
Pyramid Algorithm Matrices
Pyramid Algorithm Successive Operations1 Mult N-D vector of Y by c matrix2 (See text for ci derivation)
Y0Y1Y2Y3
=
c0 c1 c2 c3c3 −c2 c1 −c0c2 c3 c0 c1c1 −c0 c3 −c2
y0y1y2y3
3 Mult (N/2)-D smooth vector by c matrix
4 Reorder: new 2 smooth on top, new detailed, older detailed
5 Repeat until only 2 smooth remain
12 / 1
-
Inversion Y → y
Using transpose (inverse) of transfer matrix at each stagey0y1y2y3
=
c0 c3 c2 c1c1 −c2 c3 −c0c2 c1 c0 c3c3 −c0 c1 −c2
Y0Y1Y2Y3
.
13 / 1
-
Chirp Example Graphical
1024 sin(60t2)
1024 thru H & L
Downsample
→ 512 L, 512 H
Save details
Each step ↓ 2×
Connected dots
End: 2 ↓ detail
14 / 1
-
Daubechies Daub4 Wavelet (Derivation in Text)
–0.1
–0.06
–0.02
0.02
0.06
0.1
0 400 800 1200
c0 =1 +√
34√
2, c1 =
3 +√
34√
2
c2 =3−√
34√
2, c3 =
1−√
34√
2
15 / 1
-
Summary: Wavelet Transforms
Continuous→ Discrete→ Pyramid Algorithm
Y (s, τ) =∫ +∞−∞
dt ψ∗s,τ (t) y(t)
Discrete: measurements,∫→
∑i
Transform→ digital filter→ coefficients
Multiple scales→ series H & L filters
Compression: N independent components
Further compression: Variable resolution
16 / 1
ReviewProblem: Optimize Wavelet Transform and InverseDiscrete