Second-generation wavelets on finite intervals Stephan Houben Eindhoven University of Technology January 17, 2002 1 Overview of the talk 1. Quick review of some concepts 2. The Lifting scheme 3. Numerical examples of Lifting, and some problems 4. Wavelets on finite intervals (second-generation wavelets) 5. Numerical examples of interval wavelets 6. Other second-generation wavelets 2 Quick review of some concepts • Riesz bases and their dual • Multi-resolution analysis • Wavelets and scaling functions • Discrete Wavelet Transform (DWT) 3 Riesz bases Suppose we have a Hilbert space H and a (countably infinite) sequence of vectors {φn} ⊂ H. Define the operator Φ : `2 → H as Φ({αn }) := ∞ X αn φn . (1) n=0 Then {φn} is a Riesz basis of H if and only if: 1. The series (1) converges for all {αn} ∈ `2. 2. The operator Φ is bounded. 3. The inverse Φ−1 : H → `2 exists. 4. The inverse Φ−1 is also bounded. 4 What does it mean? This means that a Riesz basis gives us a way to map the abstract space H one-to-one on the concrete space `2. Convergence of a sequence in `2 implies convergence of the Φ-transformed sequence in H, and vice versa. Note that if we have a bounded operator Ψ : `2 → H with bounded inverse Ψ−1, then we can find back the accompanying Riesz basis {ψ n} by ψ n := Ψ(en), where en(m) = δnm. (2) 5 Dual basis The dual basis {φ̃n} of a Riesz basis {φ}n satisfies the following equation. (φi, φ̃j ) = δij . (3) The corresponding operators Φ and Φ̃ satisfy the relation −1 ∗ Φ̃ = Φ (4) . If {φn} = {φ̃n} (which is true iff Φ = Φ̃), then we say that {φn} is an orthonormal basis. Note that Φ is in that case an orthogonal operator, since Φ∗ = Φ−1. (5) 6 Multi-resolution analysis Consider the function space L2(R). A Multi-resolution analysis consists of a sequence of linear subspaces {Vn}, n ∈ Z, with the following properties. 1. Vn = Vn−1 ⊕ Wn−1, for some {Wn}. 2. 3. S n∈Z T n∈Z Vn = L2(R). Vn = {0}. 4. f (t) ∈ Vn ⇔ f (2t) ∈ Vn+1. 5. f (t) ∈ V0 ⇔ f (t + 1) ∈ V0. 7 Analysis and synthesis Analysis V3 V2 V1 V0 W2 W1 W0 V2 V1 V0 W2 W1 W0 Synthesis V3 8 Wavelets and scaling functions 1. A Riesz basis of Vi is formed by the scaling functions {φi,n(t)}n . 2. A Riesz basis of the detail space Wi is formed by the wavelets {ψi,n(t)}n . 3. All scaling functions are scaled, translated versions of the father wavelet φ(t). 4. All wavelet functions are scaled, translated versions of the mother wavelet ψ(t). 5. Scaling functions and wavelets are localised, i.e. lim φi,n(t), ψi,n(t) = 0. t→±∞ 6. ∞ R −∞ ψi,n(t) = 0, i.e. wavelets have zero average. 9 Discrete Wavelet Transform We have a f ∈ Vi, represented by coefficients {vi(n)}n. ∞ X f (t) = (6) vi(n)φi,n(t). n=−∞ Since Vi = Vi−1 ⊕Wi−1, we can write f (t) = g(t)+ h(t), with g ∈ Vi−1 and h ∈ Wi−1. g(t) = h(t) = ∞ X n=−∞ ∞ X vi−1(n)φi−1,n(t), (7) wi−1(n)ψi−1,n(t). (8) n=−∞ The linear operation that produces {vi−1(n)}n and {wi−1(n)}n from {vi(n)} is called the Discrete Wavelet Transform (DWT). Its inverse is called the Inverse Discrete Wavelet Transform (IDWT). 10 The Lifting Scheme The lifting scheme is a method for designing wavelet transforms. First we design a Discrete Wavelet Transform (DWT) directly, without any reference to scaling functions φi,n or wavelets ψi,n. Then we find the scaling functions and wavelets belonging to this DWT. Note that we don’t need these for most applications. Exactly the opposite of what you might expect! 11 Lifting scheme: DWT {vi (n)}n SPLIT {vi (2n)}n {vi (2n + 1)}n - PREDICT UPDATE {wi−1 (n)}n + {vi−1 (n)}n 12 Lifting scheme: IDWT {vi−1 (n)}n {wi−1 (n)}n UPDATE + - PREDICT {vi (2n)}n {vi (2n + 1)}n MERGE {vi (n)}n 13 Discrete Wavelet Transform: {vi(2n)}n , {vi(2n + 1)}n = SPLIT({vi(n)}n), {wi−1(n)}n = {vi(2n + 1)}n − P({vi(2n)}n), {vi−1(n)}n = {vi(2n)}n + U({wi−1(n)}n). Inverse Discrete Wavelet Transform: {vi(2n)}n = {vi−1(n)}n − U({wi−1(n)}n). {vi(2n + 1)}n = {wi−1(n)}n + P({vi(2n)}n ), {vi(n)}n = MERGE({vi(2n)}n , {vi(2n + 1)}n). 14 Choosing P and U • P is selected so that certain classes of functions can be represented exactly (lead to 0 detail coefficients) in any space Vi . E.g. constant functions or polynoms up to some degree k. • U is selected so that the contribution of the detail coefficients {wi−1(n)}n to the signal {vi(n)}n has zero average. More generally, one requires that the first k moments are 0. ∞ X vi(n)np = 0, for p = 0, . . . , k − 1. n=−∞ (9) 15 Designing the predict step {vi (n)}n SPLIT {vi (2n)}n {vi (2n + 1)}n - PREDICT {. . . , 0, . . . } We design the operator P so that for certain classes of inputs {vi(n)}n, the detail signal becomes exactly 0. 16 Designing the update step {. . . , 0, 1, 0, . . . } UPDATE + - PREDICT {vi (2n)}n {vi (2n + 1)}n MERGE {vi (n)}n We design the operator U so that if a δ-pulse is put on the detail wire and 0 on the other wire, we obtain a {vi(n)}n with 0 average. 17 Example: Haar wavelet • P({vi(2n)}n) = {vi(2n)}n, i.e. just the identity. • U({wi−1(n)}n) = { 1 2 wi−1(n))}n , i.e. multiplication by 1 2. 18 Haar wavelet update step {. . . , 0, 1, 0, . . . } UPDATE + {. . . 0, - PREDICT {. . . 0, − 12 , 0 . . . } 1 ,0...} 2 MERGE {. . . 0, − 12 , 12 , 0 . . . } 19 Example: Cohen-Daubechies-Feauveau biorthogonal (2, 2) wavelet • P({vi(2n)}n) = { 1 2 (vi (2n) + vi(2n + 2))}n , • U({wi−1(n)}n) = { 1 4 (wi−1(n−1)+wi−1(n))}n . 20 Computing the scaling function In the space V0, the basic scaling function φ0,0 (the father wavelet) is represented by the coefficients {v0(n)}n = {. . . , 0, 1, 0 . . . } = δn. Using the Inverse DWT (with all detail coefficients wi(n) = 0), we can compute the representation of the scaling function in any space Vi, i > 0. For i → ∞, the coefficients {vi(n)}n approach the sampling {φ0,0(n2−i)}n . 21 The cascade algorithm {. . . 0, 1, 0 . . . } PREDICT IDWT IDWT MERGE IDWT {vi (n)}n ≈ {φ0,0 (n2−i)}n 22 Example: CDF-(2, 2) scaling function 1 1 0.8 0.8 0.6 0.6 0.4 0.4 0.2 0.2 0 0 -2 -1.5 -1 -0.5 0 0.5 1 1.5 2 -2 -1.5 Iteration 0 -1 -0.5 0 0.5 1 1.5 2 1 1.5 2 Iteration 1 1 1 0.8 0.8 0.6 0.6 0.4 0.4 0.2 0.2 0 0 -2 -1.5 -1 -0.5 0 0.5 Iteration 2 1 1.5 2 -2 -1.5 -1 -0.5 0 0.5 Iteration 8 23 Computing the wavelet In the detail space W0, the basic wavelet ψ0,0 (the mother wavelet) is represented by the coefficients {w0(n)}n = {. . . , 0, 1, 0 . . . } = δn. Using the Inverse DWT (with all coefficients v0(n) = 0), we can compute the representation of the scaling function in V1. Then we can again use the cascade algorithm to find the representation in any space Vi , i > 1. For i → ∞, the coefficients {vi(n)}n approach the sampling {ψ0,0(n2−i)}n. 24 Example: CDF-(2, 2) wavelet 0.8 0.8 0.6 0.6 0.4 0.4 0.2 0.2 0 0 -0.2 -0.2 -0.4 -0.4 -2 -1 0 1 2 3 -2 -1 Iteration 0 0 1 2 3 2 3 Iteration 1 0.8 0.8 0.6 0.6 0.4 0.4 0.2 0.2 0 0 -0.2 -0.2 -0.4 -0.4 -2 -1 0 1 Iteration 2 2 3 -2 -1 0 1 Iteration 8 25 CDF-(2, 2) 1 Cohen-Daubechies-Feauveau (2,2) scaling function 0.8 0.6 0.4 0.2 0 -3 -2 -1 0 1 2 3 0.8 Cohen-Daubechies-Feauveau (2,2) wavelet 0.6 0.4 0.2 0 -0.2 -0.4 -3 -2 -1 0 1 2 3 26 CDF-(2, 2) for de-noising 4 4 Original signal 3 3 2 2 1 1 0 0 -1 Noisy signal -1 0 1 2 3 4 5 6 0 1 Original signal 4 2 3 4 5 6 Noisy signal 4 Non-adaptive filter 3 3 2 2 1 1 0 0 -1 Adaptive filter -1 0 1 2 3 4 5 Non-adaptive filter 6 0 1 2 3 4 5 Adaptive filter 27 6 CDF-(2, 2) for de-noising (2) 5 5 4 4 3 3 2 2 1 1 0 0 0 1 2 3 4 5 6 0 1 Original signal 5 4 4 3 3 2 2 1 1 0 0 1 2 3 4 5 Non-adaptive filter 3 4 5 6 5 6 Noisy signal 5 0 2 6 0 1 2 3 4 Adaptive filter 28 CDF-(2, 2), non-periodic signal, adaptive filter 5 4 3 2 1 0 0 1 2 3 4 5 6 29 Wavelets on finite intervals • Away from the boundary, wavelets and scaling function remain the same. • Near the boundary, we introduce special wavelets and scaling functions. • We again use the lifting scheme to find the DWT first, and then compute the wavelets and scaling functions by using the cascade algorithm. • It is no longer true that all wavelets and scaling functions are translated, dilated versions of the mother and father wavelet. (Orphan wavelets) • Interval wavelets are a special case of secondgeneration wavelets. 30 Predict for interval wavelets Away from the boundary, P works as before. P P Near the boundary, we have to do something special. 31 Update for interval wavelets We design the operator U again by putting δ-pulses on the detail wire, but now we have to consider the boundary as a special case. E.g. for CDF-(2, 2), {1, 0, 0, . . . } UPDATE + {1 − - PREDICT {−x, −y, 0, . . . } x+y , − 2y , 0, . . . } 2 MERGE {−x, 1 − x+y , −y, − 2y , 0, . . . } 2 Take x = 3/4 and y = 1/8. 32 CDF-(2, 2) on the interval 1 1 0.8 0.8 0.6 0.6 0.4 0.4 0.2 0.2 0 0 0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5 Scaling function in center 0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5 Scaling function on boundary 0.8 0.6 0.4 0.6 0.2 0.4 0 0.2 -0.2 0 -0.4 -0.2 -0.6 -0.4 -0.8 0 0.5 1 1.5 2 2.5 3 3.5 Wavelet in center 4 4.5 5 0 0.5 1 1.5 2 2.5 3 3.5 4 Wavelet on boundary 33 4.5 5 Interval CDF-(2, 2) for de-noising 5 5 4 4 3 3 2 2 1 1 0 0 0 1 2 3 4 5 6 0 1 Original signal 5 4 4 3 3 2 2 1 1 0 0 1 2 3 4 5 Non-adaptive filter 3 4 5 6 5 6 Noisy signal 5 0 2 6 0 1 2 3 4 Adaptive filter 34 Other second-generation wavelets 1. Wavelets on non-equidistant grids 2. Wavelets with weighted inner products 3. Wavelets on a sphere (or even arbitrary surfaces) 35 Wavelets on non-equidistant grids • The predict step generalises in a straightforward way, as long as we have a subdivision scheme. P • The update step is complicated by the fact that we need the averages (integrals) of the scaling functions, which may all be different. We can numerically approximate these integrals with the cascade algorithm and a quadrature rule. 36 Wavelets with weighted inner products Instead of the standard L2 inner product Z∞ (f, g) = f (t)g(t) dt, −∞ one may want to use a weighted inner product Z∞ (f, g)w = f (t)g(t)w(t) dt. −∞ Again, the difficulty is with the update step. We now want the weighted average and the first k weighted moments of the wavelets to be 0. Z∞ ψi,n(t)w(t)tp dt = 0, p = 0, 1, . . . , k − 1. −∞ The update step has to ensure all these conditions. 37 Wavelets on a sphere (or even arbitrary surfaces) “Butterfly” scaling function “Butterfly” wavelet Images by Wim Sweldens 38 THE END 39