Lifting 1

71
-1

Published on

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
71
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
4
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide
  • Smooth: able to localize (isolate) low frequencies (low pass: filtering out high freq)
  • Periodicity assumption: artificial discontinuity generated
  • Verify indeed “inverse the forward”
  • Here: energy is not conserved; instead, the average of signal is preserved.
    (6 is the average of 9, 7, 3, 5)
  • Here ½ is considered as a weighting coefficient, not a multiplication.
    Thus, not changed in the inverse. Compare B-spline case.
  • Try it out …
    In general …
  • A bit hand wavy; revisit in lifting-2
  • See p.52 of SIGGRAPH 96
  • # of samples odd?! (boundary effects)
    … here the discussion is restricted to 1st generation wavelets (must assume periodicity;
    See next page).
  • HW: check out it works for even number of samples too.
    Test circular data set (for equivalence of average)
  • do the inverse transform and verify biorthogonality
    This is H_tilda; What happened to G_tilda, H, G?
  • HW: Plot the schematic diagram (P, U)
    Compute speed up ratio?
    Verify equivalence
  • Lifting 1

    1. 1. Lifting Part 1: Introduction Ref: SIGGRAPH96
    2. 2. Outline • Introduction to wavelets and lifting scheme • Basic Ideas – Split, Predict, Update – In-place computation • Simple Examples – Lifting version of Haar – Linear interpolating wavelet
    3. 3. General Concepts • Wavelets are building blocks that can quickly decorrelate data • Most signals in life have correlation in time and frequency – temporal coherence and banded frequency • Build wavelets that: – Are compactly support (good time resolution; able to more localize spatial features) later – Have banded spectrum (good frequency resolution) • smoothness (decay towards high freq) • Have vanishing moments (decay towards low freq)
    4. 4. How lifting scheme differs from classical wavelets • Developed in 1994 by Wim Sweldens • All constructions are derived in the spatial domain • Faster implementation Recall how PR – In some cases, the number of operations halved of orthogonal • In-place computation – No auxiliary memory required wavelets are verified … • Easy to invert – In classical derivations, perfect reconstruction must be verified via Fourier transforms
    5. 5. Lifting in Second Generation Wavelets • True power of lifting is to construct wavelets in settings where classical (translation and dilation) and Fourier transform cannot be used: – Bounded domain • Avoid ad-hoc solutions: periodicity, zero-padding, reflection around edges … – Wavelets on curves and surfaces – Irregular sampling – …
    6. 6. Basic Ideas • Forward transform: three stages – Split the data into two smaller subsets: s/detail • e.g., interlace sampling (lazy wavelet) – Predict the subset based on the local correlation in the original data • Replace the detail as the difference between data and prediction. (If prediction is reasonable, difference will be small) – Update and maintain some global properties of data with original data • (e.g., overall signal average) • Inverse transform: – Simply reverse order of operations and signs (+|-, *|/)
    7. 7. That is, … (Forward Transform) Original signal ( s j −1 , d j −1 ) := Split( s j ) difference signal − = P(s j −1 ) d j −1 s j −1 s: even indices d: odd indices + = U(d j −1 ) coarsened signal sj s j ,0 s j ,1 ... ... s j ,2n s j , 2 n +1 sj-1, dj-1 s j −1, 0 d j −1, 0 ... ... s j −1,n d j −1,n
    8. 8. Inverse Transform s j −1 − = U(d j −1 ) d j −1 + = P(s j −1 ) s j := Merge(s j −1 , d j −1 ) • Observe the similarity with forward transform !
    9. 9. Schematically, … Hi-wire: coarsened signal forward Convention: ( 水平 ) – ( 垂 直) Lo-wire: difference signal inverse
    10. 10. Simple Examples Haar (lifting version) Linear Interpolating Wavelet
    11. 11. Revisit Haar a slightly different version Forward Transform a+b s= 2 d =b−a [9 s d [ 8 4] [ − 2 2] s Preserve “average”; not “energy” 7 3 5] [ 6] [ − 4] d
    12. 12. Haar (cont) Inverse Transform a = s−d /2 [9 7 3 5] b = s+d /2 s d 8 = 6 − (−4) 1 2 4 = 6 + 1 (−4) 2 9  8 1  − 2   = −    3  4 2  2        [ 8 4] [ − 2 2] s [ 6] [ − 4] 7 8 1  − 2   = +    5  4 2  2        d a b
    13. 13. Haar and Lifting • Rewrite expressions (forward) a+b s= 2 d =b−a no need for var d and s b−=a d =b−a  → a+ = b / 2 s = a+d /2 b replaces d a replaces s
    14. 14. Haar and Lifting (cont) • Inverse Transform: – Reverse order of operations – exchange plus/minus a− = b / 2 b+=a • Facilitate in-place computation
    15. 15. Ex: Haar (Lifting) [9 7 3 5] s2,0 s2,1 s2, 2 s2,3 b−=a a+ = b / 2 [8 − 2 4 2] s1,0 d1,0 s1,1 d1,1 b−=a a+ = b / 2 [6 − 2 − 4 2] s0,0 d1,0 d 0,0 d1,1 Note this order is different from Mallat’s order! [6 − 4 − 2 2] = [ s0,0 d 0,0 d1,0 d1,1 ]
    16. 16. In-place Computation • Only one set of array is used • Data are overwritten during the computation • Saves overhead for allocating multiple arrays s2,0 s2,1 s2, 2 s2,3 s1,0 d1,0 s1,1 d1,1 s0,0 d1,0 d 0,0 d1,1 Operate on the same piece Operate on the same piece of memory of memory
    17. 17. Lifted Haar (inverse transform) [9 7 3 5] s2,0 s2,1 s2, 2 s2,3 a− = b / 2 b+=a [8 − 2 4 2] s1,0 d1,0 s1,1 d1,1 a− = b / 2 b+=a [6 − 2 − 4 2] s0,0 d1,0 d 0,0 d1,1
    18. 18. Give exact prediction if function were constant Predict: how the data fail to be constant • eliminate zeroth order correlation • Order of predictor = 1 Order: has to do with polynomial reproduction (more later) Update: preserve average • zeroth order moment • Order of Update operator = 1
    19. 19. Haar & Lifting PHaar ( x) = x U Haar ( x) = x / 2 ( s j −1 , d j −1 ) := Split( s j ) d j −1 − = P( s j −1 ) s j −1 + = U(d j −1 ) s j −1 − = U(d j −1 ) d j −1 + = P( s j −1 ) s j := Merge(s j −1 , d j −1 )
    20. 20. Cascading 10 1100 10 00 Scaling Functions Scaling Functions 00 -½ 0 -½ ½ 0 0 10 ½0 Wavelets Wavelets
    21. 21. Double Check [9 7 3 5] 8× 1 + [8 − 2 4 2] s1,0 d1,0 s1,1 d1,1 4× + ½ -2 × -½ Note the wavelet definition is different 1 2× + ½ -½
    22. 22. Lifting Framework 93 84 93 9735 9735 75 -2 2 75 PHaar ( s j −1,k ) = s j −1,k U: to ensure coarsened signal preserves average U Haar (d j −1,k ) = d j −1,k / 2
    23. 23. Pseudo Codes Forward Inverse
    24. 24. Lifting Ordering f s2 s1 s0 d2 d1 d0 final result f0 f1 f2 f3 f4 f5 f6 f7 s2 , 0 (n=8) d 2,0 s2,1 d 2,1 s2 , 2 d 2, 2 s2, 3 d 2,3 s1, 0 d1, 0 s1,1 s0 , 0 s0 , 0 d1,1 d 0, 0 d 2,0 d1, 0 d 2,1 d 0, 0 d 2, 2 d1,1 d 2,3
    25. 25. About Demo Implementation #define S(j,l) ss[(l)*INCR[JMAX-(j)]] // increment #define D(j,l) ss[INCR[JMAX-((j)+1)]+(l)*INCR[JMAX-(j)]] // offset + increment ndata = 16 JMAX = 4 INCR 2 3 4 2 4 8 16 s4,1 s4, 2 s4 , 3 s4 , 4 s3,0 d 3, 0 s3,1 d 3,1 s3, 2 d 3, 2 s3,3 d 3,3 s3, 4 d 3, 4 s3,5 d 3,5 s3,6 d 3,6 s3, 7 d 3,7 s2 , 0 d 2, 0 s2,1 d 2,1 d 2, 2 s2 , 3 d 2,3 s1, 0 s0 , 0 d1,0 s4 , 5 1 1 s4 , 0 0 s4 , 6 s4 , 7 s4 ,8 s2 , 2 s1,1 d 0,0 s4,9 s4,10 s4,11 s4,12 s4,13 s4,14 s4,15 d1,1
    26. 26. Linear Interpolating Wavelet • more powerful lifting • Predictor (Order = 2) – Exact for linear data • Update (Order = 2) Predictor d j −1,l = d j −1,l 1 − ( s j −1,l + s j −1,l +1 ) 2 – Preserve the average and first moment
    27. 27. Linear Interpolating (Predictor) d j −1,l = d j −1,l − 1 ( s j −1,l + s j −1,l +1 ) 2
    28. 28. Linear Interpolating Wavelet (Update) ∑ s j −1,l = Preserve average l 1 ∑ s j ,l 2 l Propose update of s j −1,l = s j , 2 l + A( d j −1,l −1 + d j −1,l ) the form : ∑s l j −1,l use results already computed = ∑ s j , 2l + 2 A∑ d j −1,l l l [ = ∑ s j , 2l + 2 A∑ s j , 2l +1 − 1 ( s j , 2l + s j , 2l + 2 ) 2 l l = (1 − 2 A)∑ s j , 2l + 2 A∑ s j , 2l +1 l Therefore, A = 1 / 4 l ]
    29. 29. Linear Wavelet (Update) original signal s j −1,l = s j −1,l coarsened signal 1 + ( d j −1,l −1 + d j −1,l ) 4 Preserve average is equivalent Preserve average is equivalent to having zero mean difference to having zero mean difference
    30. 30. Preservation of 1st Moment 1 ∑ l ⋅ s j −1,l = 2 ∑ l ⋅ s j ,l satisfied due to symmetry l l ⇒ Order of Update = 2 We will refer this as the dual order of MRA
    31. 31. In-place computation
    32. 32. assume data periodicity assume data periodicity Numeric Example (linear wavelet) 2 4 4 6 10 12 8 6 2 4 4 6 2 1 4 −1 10 3 8 1 2 1 4 6 2 1 4 − 1 10.5 3 9 1 2.5 1 4 Forward 6 Average: 26/4 2 1 4 −1 10 2 4 4 6 3 8 1 2 1 4 6 10 12 8 6 2 4 4 6 Average: 52/8 Inverse
    33. 33. Remarks • By substituting the predictor into update one gets 1 1 3 1 1 s j −1,l = − s j , 2l − 2 + s j , 2l −1 + s j , 2l + s j , 2l +1 − s j , 2l + 2 8 4 4 4 8 • This is biorthogonal (2,2) of CDF – CDF: Cohen-Daubechies-Feauveau – More computations in this form (and cannot be done inplace) – Inverse transform harder to get (rely on Fourier-based techniques)
    34. 34. Homeworks • Review the derivation of PR for orthogonal wavelets • Verify that reversing order of operations indeed inverses the transform • Write a program that does general lifting. Implement Haar and linear interpolation. Compare. • Verify the CDF (2,2) formula
    35. 35. Homework: lifting version of D4 Speed up ratio!? Wiring diagram!?
    36. 36. undecided
    37. 37. Q • In lifting, it seems that forward and inverse use the same P and U boxes. Then, are H_tilda (G_tilda) and H (G) are related? … unlike what we mentioned in biorthogonal wavelets?
    1. A particular slide catching your eye?

      Clipping is a handy way to collect important slides you want to go back to later.

    ×