Recap Haar simple and fast wavelet transform Limitations not smooth enough: blocky How to improve? classical approach: basis functions Lifting: transforms 1 Erasing Haar Coefficients 2 Page 1
Classical Constructions Fourier analysis regular samples, infinite setting analysis of polynomials Conditions: smoothness perfect reconstruction But... Fourier analysis not always applicable 3 Lifting Scheme Custom design construction entirely in spatial domain Second generation wavelets boundaries irregular samples curves, surfaces, volumes 4 Page 2
Haar Transform Averages and differences two neighboring samples a b s = ( a + b) 2 d = b a a = s d2 b = s + d2 5 Haar Transform In-place Version want to overwrite old values with new values rewrite d = b a s = a + d2 b -= a; a += b/2; inverse: run code backwards! a -= b/2; b += a; 6 Page 3
Haar Transform Forward for( s = 2; s <= n; s *= 2 ) for( k = 0; k < n; k += s ){ c[k+s/2] -= c[k]; c[k] += c[k+s/2] / 2; } 7 Haar Transform Inverse for( s = n; s >= 2; s /= 2 ) for( k = 0; k < n; k += s ){ c[k] -= c[k+s/2] / 2; c[k+s/2] += c[k]; } 8 Page 4
Haar Transform Lifting version split into even and odd (even j-1,odd j-1 ):= Split(s j ) predict and store difference: detail coefficient d j-1 = odd j-1 - even j-1 update even with detail: smooth coefficient s j-1 = even j-1 + d j-1 /2 9 Haar Transform even smooth s j-1 s j split P U odd detail d j-1 d j-1 = odd j-1 - P(even j-1 ) s j-1 = even j-1 + U(d j-1 ) 10 Page 5
Haar Transform Predict perfect if function is constant detail coefficients zero removes constant correlation Update preserve averages of coarser versions avoid aliasing obtain frequency localization 11 Haar Transform even smooth s j-1 s j split P U odd detail d j-1 12 Page 6
Lifting Scheme Advantages in-place computation efficient, general parallelism exposed easy to invert split P U U P merge 13 Lifting Build more powerful versions higher order prediction Haar has order 1 higher order update preserve more moments of coarser data An example linear wavelet transform 14 Page 7
Linear Prediction Use even on either side keep difference with prediction exploit more coherence/smoothness/ correlation predict original even 15 Prediction failure to be linear detail detail odd d k = a 2k+1 12( a 2k + a 2k+2 ) even 16 Page 8
Update Even values are subsampled aliasing! DC components different average different 17 Update detail zero mean add smooth even s k = a 2k + 14( d k 1 + d k ) detail 18 Page 9
Inplace Wavelet Transform even odd - / - / / / smooth detail 19 Linear Wavelet Transform Order linear accuracy: 2nd order linear moments preserved: 2nd order (2,2) of Cohen-Daubechies-Feauveau split P U Extend build higher polynomial order predictors 20 Page 10
Higher Order Prediction linear cubic 21 Higher Order Prediction Use more (D) neighbors on left and right define interpolating polynomial of order N= D sample at midpoint for prediction value example: D= effective weights: - / 6 / 6 / 6 - / 6 22 Page 11
Summary Lifting Scheme construction of transforms spatial, Fourier Haar example rewriting Haar in place Two steps Predict Update 23 Summary Predict detail coefficient is failure of prediction Update smooth coefficient to preserve moments, e.g., average Higher order extensions increase order of prediction and update 24 Page 12
Building Blocks Transform forward inverse superposition W{ s n,k }= { d j,l } { s n,k }= W 1 { d j,l } { s n,k }= d j,l { W 1 δ j,l } building blocks 25 Scaling Functions Cascade/Subdivision single smooth coefficient delta sequence U P merge 26 Page 13
Scaling Functions Cascade/Subdivision 27 Scaling Functions 1.0 1.0 N = N = 1.0 1.0 N = 6 N = 28 Page 14
Twoscale Relation Scaling function ϕ( x) { } h l ½ ½ subdivide ( ) = h l ϕ( 2x l) ϕ x 29 Duality Function at successive scales coarse k s j,k ϕ j,k ( x) ( ) = s j+1,l ϕ j+1,l ( x) = fx l fine column vectors of coefficients M s j+1,l M = H M s j,k M ( L ϕ j,k L) = ( L ϕ j+1,l L)H row vectors of bases 30 Page 15
Interpolating Scaling Functions Properties for order N= D compact support: ϕ( x) = 0 x N [ + 1,N 1] interpolation: ϕ( k) =δ k polynomial reproduction: k k p ϕ( x k) = x p 31 Interpolating Scaling Functions Properties for order N= D smoothness: twoscale relation: s j+1,l = k ϕ x h l 2k s j,k ϕ j,k C α( N) N ( ) = h l ϕ( 2x l) l= N ϕ j,k x ( ) = h l 2k ϕ j+1,l ( x) l 32 Page 16
Wavelets Cascade/Subdivision single detail coefficient delta sequence U P merge 33 Wavelets N = N = N = 6 N = 34 Page 17
Twoscale Relation Wavelet ψ( x) { } g l - 1 /8-¼¾-¼- 1 /8 cascade ψ x ( ) = g l ϕ( 2x l) 35 36 Page 18
Average Interpolation constant quadratic 37 38 Page 19
Average Interpolation Idea assume observed samples are averages which polynomial would have produced those averages? observation Ls j,k 1 s j,k s j,k+1 L match ( ) px s j+1,2k s j+1,2k +1 finer averages 39 Average Interpolation 40 Page 20
Scaling Functions 1.0 1.0 N = N = 1.0 1.0 N = N = 41 Average Interpolating Scaling Functions Properties for order N= D+ compact support: ϕ( x) = 0 x N [ + 1,N] average interpolation: polynomial reproduction: Ave( x p,k)ϕ( x k) = x p k k+1 ϕ( x)dx =δ k k 42 Page 21
Average Interpolating Scaling Functions Properties for order N= D+ smoothness: twoscale relation: ϕ j,k x ϕ x ϕ j,k C α( N) N ( ) = h l ϕ( 2x l) l= N+1 s j+1,l = h l 2k s j,k ( ) = h l 2k ϕ j+1,l ( x) l k 43 Wavelets N = N = N = N = 44 Page 22
Differentiation Interpolation and average interpolation given interpolation sequence compute exact derivative { s 0,k } N = 2D { s 0,k = s 0,k+1 s 0,k } N = 2D 1 d dx ϕi ( x) =ϕ AI ( x + 1) ϕ AI ( x) 45 46 Page 23
Cubic B-splines Subdivision generate {1,4,6,4,1} ( ) 2 s j+1,2k +1 = s j,k + s j,k+1 s j+1,2k = s j,k + ( s j+1,2k 1 + s j,2k+1 ) 2 /2 U P P merge 47 Cubic B-spline Wavelet Completing the space put delta on detail wire: {1,4,1} /2 U P P merge get vanishing moment with update stage: {3/8,3/8} 48 Page 24
Cubic B-spline 1.0 Scaling function Wavelet 49 50 Page 25