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
0.5 t 2 0 –2 –4 –6 1.0 t 0.0 –0.5 –1.0 ψ 4 6 0 –4 1.0 0.0 4 t 0 –4 1.0 0.0 –1.0 4 Review: Wavelets in a Nutshell Three Wavelet Examples Varied functional forms Wavelets = packets Vary scale & center Nonstationary signals Finite ∆ τ ∆ ω Basis functions ∆ τ ∆ ω ≥ 2 π All oscillate 2 / 1
Problem: Determine ≤ N Indep Wavelet TFs Y i , j The Discrete Wavelet Transform (DWT) � + ∞ Y ( s , τ ) = dt ψ ∗ s ,τ ( t ) y ( t ) (Wavelet Transform) −∞ Given: N signal measurements: y ( t m ) ≡ y m , 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 τ : τ = k s = 2 j , k , j = 0 , 1 , . . . (Dyadic Grid) (1) 2 j , � t − k 2 j � ψ j , k ( t ) = 1 2 j Ψ (Wavelets T = 1) (2) √ 2 j � + ∞ Y j , k = dt ψ j , k ( t ) y ( t ) (3) −∞ � ψ j , k ( t m ) y ( t m ) h (DWT) (4) ≃ m 4 / 1
Time Frequency Time & Frequency Sampling Sample y ( t ) in Time & Frequency Ranges High ω ↑ range Uncertainty Prin: ∆ ω ∆ t ≥ 2 π High ω for details Don’t be wasteful! Few low ω for shape ⇒ H × W = Const Each t , ∆ scales 5 / 1
Multi Resolution Analysis (MRA) Digital Wavelet Transform ≡ Filter 2 2 L LL 2 L 2 2 H LH D a t a I n p u t 2 2 H H Filter: ∆ relative ω strengths ≡ analyze ∆ scale: MRA Sample → Filter → Sample · · · � + ∞ g ( t ) = d τ h ( t − τ ) y ( τ ) (Filter) −∞ � t − τ � + ∞ � � dt Ψ ∗ Y ( s , τ ) = y ( t ) ≃ w i ψ i y ( t i ) (Transform) s −∞ w i = integration weight + wavelet values = “filter coeff” 6 / 1
MRA via Filter Tree (Pyramid Algorithm) Filtering with Decimation 2 2 L LL 2 L 2 2 H L H Data Input 2 2 H H H: highpass filters Factor-of-2 “decimation” L: lowpass filters "Subsampling" Ea filter: lowers scale Keeps area constant ↓ 2: rm 1/2 signal Need little large-s info 7 / 1
Example from Appendix High → Medium → Low Resolution 8 / 1
Summary Pyramid DWT algorithm compresses data, separates hi res Smooth info in low- ω (large s ) components Detailed info in high- ω (small s ) components High-res reproduction: more info on details than shape Different resolution components = independent ⇒ Lower data storage Rapid reproduction/inversion (JPEG2) 9 / 1
(2) Coefficients Input (3) (n) Coefficients Coefficients Coefficients Coefficients Coefficients (n) Coefficients Coefficients L L L L H H (1) (3) H 2 N Samples N/2 N/4 N/8 2 N/2 N/4 N/8 c (2) c c c d d d d (1) H Pyramid Algorithm Graphically (see text) L & H via matrix mult (TFs) Downsample: ↓ #, ∆ scale Decimated H output saved Ends with 2 H , L points 10 / 1
N = 8 Example Matrices s ( 1 ) s ( 1 ) s ( 2 ) s ( 2 ) 1 1 1 1 y 1 d ( 1 ) s ( 1 ) d ( 2 ) s ( 2 ) y 2 1 2 1 2 s ( 1 ) s ( 1 ) s ( 2 ) d ( 2 ) y 3 2 3 2 1 d ( 1 ) s ( 1 ) d ( 2 ) d ( 2 ) y 4 filter order filter order 2 4 2 2 − → − → − → − → s ( 1 ) d ( 1 ) d ( 1 ) d ( 1 ) y 5 3 1 1 1 y 6 d ( 1 ) d ( 1 ) d ( 1 ) d ( 1 ) 3 2 2 2 y 7 s ( 1 ) d ( 1 ) d ( 1 ) d ( 1 ) 4 3 3 3 y 8 d ( 1 ) d ( 1 ) d ( 1 ) d ( 1 ) 4 4 4 4 11 / 1
Pyramid Algorithm Matrices Pyramid Algorithm Successive Operations Mult N -D vector of Y by c matrix 1 (See text for c i derivation) 2 Y 0 c 0 c 1 c 2 c 3 y 0 Y 1 c 3 − c 2 c 1 − c 0 y 1 = Y 2 c 2 c 3 c 0 c 1 y 2 Y 3 c 1 − c 0 c 3 − c 2 y 3 Mult ( N / 2 ) -D smooth vector by c matrix 3 Reorder: new 2 smooth on top, new detailed, older detailed 4 Repeat until only 2 smooth remain 5 12 / 1
Inversion Y → y Using transpose (inverse) of transfer matrix at each stage y 0 c 0 c 3 c 2 c 1 Y 0 y 1 c 1 − c 2 c 3 − c 0 Y 1 = . y 2 c 2 c 1 c 0 c 3 Y 2 y 3 c 3 − c 0 c 1 − c 2 Y 3 13 / 1
Chirp Example Graphical 1024 sin ( 60 t 2 ) 1024 thru H & L Downsample → 512 L , 512 H Save details Each step ↓ 2 × Connected dots End: 2 ↓ detail 14 / 1
–0.06 –0.02 0.02 0.06 0.1 0 400 800 1200 –0.1 Daubechies Daub4 Wavelet (Derivation in Text) √ √ c 0 = 1 + 3 c 1 = 3 + 3 √ , √ 4 2 4 2 √ √ c 2 = 3 − 3 c 3 = 1 − 3 √ , √ 4 2 4 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
Recommend
More recommend