lifting part 1: introduction ref: siggraph96. outline introduction to wavelets and lifting scheme...

37
Lifting Part 1: Introduction Ref: SIGGRAPH96

Upload: grant-jones

Post on 16-Jan-2016

218 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Lifting Part 1: Introduction Ref: SIGGRAPH96. Outline Introduction to wavelets and lifting scheme Basic Ideas –Split, Predict, Update –In-place computation

Lifting

Part 1: Introduction

Ref: SIGGRAPH96

Page 2: Lifting Part 1: Introduction Ref: SIGGRAPH96. Outline Introduction to wavelets and lifting scheme Basic Ideas –Split, Predict, Update –In-place computation

Outline

• Introduction to wavelets and lifting scheme

• Basic Ideas– Split, Predict, Update– In-place computation

• Simple Examples– Lifting version of Haar– Linear interpolating wavelet

Page 3: Lifting Part 1: Introduction Ref: SIGGRAPH96. Outline Introduction to wavelets and lifting scheme Basic Ideas –Split, Predict, Update –In-place computation

General Concepts

• Wavelets are building blocks that can quickly de-correlate 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

localize spatial features)– Have banded spectrum (good frequency resolution)

• smoothness (decay towards high freq)• Have vanishing moments (decay towards low freq)

more later

Page 4: Lifting Part 1: Introduction Ref: SIGGRAPH96. Outline Introduction to wavelets and lifting scheme Basic Ideas –Split, Predict, Update –In-place computation

How lifting scheme differs from classical wavelets

• Developed in 1994 by Wim Sweldens• All constructions are derived in the spatial domain• Faster implementation

– In some cases, the number of operations halved

• In-place computation– No auxiliary memory required

• Easy to invert – In classical derivations, perfect reconstruction must be

verified via Fourier transforms

Recall how PR of orthogonal wavelets are verified …

Page 5: Lifting Part 1: Introduction Ref: SIGGRAPH96. Outline Introduction to wavelets and lifting scheme Basic Ideas –Split, Predict, Update –In-place computation

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

– …

Page 6: Lifting Part 1: Introduction Ref: SIGGRAPH96. Outline Introduction to wavelets and lifting scheme Basic Ideas –Split, Predict, Update –In-place computation

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 (+|-, *|/)

Page 7: Lifting Part 1: Introduction Ref: SIGGRAPH96. Outline Introduction to wavelets and lifting scheme Basic Ideas –Split, Predict, Update –In-place computation

That is, … (Forward Transform)

) U(d s

)P(s d

)Split( : ),(

11

11

11

jj

jj

jjj sds

Original signal

coarsened signal

difference signal

12,2,1,0, ...... njnjjj ssss

njnjjj dsds ,1,10,10,1 ......

sj

sj-1, dj-1

s: even indicesd: odd indices

Page 8: Lifting Part 1: Introduction Ref: SIGGRAPH96. Outline Introduction to wavelets and lifting scheme Basic Ideas –Split, Predict, Update –In-place computation

Inverse Transform

• Observe the similarity with forward transform !

)d,Merge(s :

)P(s d

) U(d s

11

11

11

jjj

jj

jj

s

Page 9: Lifting Part 1: Introduction Ref: SIGGRAPH96. Outline Introduction to wavelets and lifting scheme Basic Ideas –Split, Predict, Update –In-place computation

Schematically, …

forward

inverse

Convention:(水平 ) – (垂

直 )

Hi-wire:coarsened

signal

Lo-wire:difference

signal

Page 10: Lifting Part 1: Introduction Ref: SIGGRAPH96. Outline Introduction to wavelets and lifting scheme Basic Ideas –Split, Predict, Update –In-place computation

Simple Examples

Haar (lifting version)

Linear Interpolating Wavelet

Page 11: Lifting Part 1: Introduction Ref: SIGGRAPH96. Outline Introduction to wavelets and lifting scheme Basic Ideas –Split, Predict, Update –In-place computation

Revisit Haara slightly different version

abd

bas

2 5379

22 48

4 6

s d

s d

Forward Transform

Preserve “average”;

not “energy”

Page 12: Lifting Part 1: Introduction Ref: SIGGRAPH96. Outline Introduction to wavelets and lifting scheme Basic Ideas –Split, Predict, Update –In-place computation

Haar (cont)

2/

2/

dsb

dsa

5379

22 48

4 6

s d

s d

ba

Inverse Transform

2

2

2

1

4

8

3

9

2

2

2

1

4

8

5

7

)4(64

)4(68

21

21

Page 13: Lifting Part 1: Introduction Ref: SIGGRAPH96. Outline Introduction to wavelets and lifting scheme Basic Ideas –Split, Predict, Update –In-place computation

Haar and Lifting

• Rewrite expressions (forward)

2/das

abd

2/

ba

ab

sd and var for needno

b replaces da replaces s

abd

bas

2

Page 14: Lifting Part 1: Introduction Ref: SIGGRAPH96. Outline Introduction to wavelets and lifting scheme Basic Ideas –Split, Predict, Update –In-place computation

Haar and Lifting (cont)

• Inverse Transform:– Reverse order of operations– exchange plus/minus

• Facilitate in-place computation

ab

ba

2/

Page 15: Lifting Part 1: Introduction Ref: SIGGRAPH96. Outline Introduction to wavelets and lifting scheme Basic Ideas –Split, Predict, Update –In-place computation

Ex: Haar (Lifting)

2/

ba

ab

2/

ba

ab

Note this order is different from Mallat’s order!

1,10,10,00,02246 ddds

5379 3,22,21,20,2 ssss

2428 1,11,10,10,1 dsds

2426 1,10,00,10,0 ddds

Page 16: Lifting Part 1: Introduction Ref: SIGGRAPH96. Outline Introduction to wavelets and lifting scheme Basic Ideas –Split, Predict, Update –In-place computation

In-place Computation

• Only one set of array is used

• Data are overwritten during the computation

• Saves overhead for allocating multiple arrays

3,22,21,20,2 ssss

1,11,10,10,1 dsds

1,10,00,10,0 ddds

Operate on the same piece of memory

Operate on the same piece of memory

Page 17: Lifting Part 1: Introduction Ref: SIGGRAPH96. Outline Introduction to wavelets and lifting scheme Basic Ideas –Split, Predict, Update –In-place computation

Lifted Haar (inverse transform)

5379

2428

2426

ab

ba

2/

ab

ba

2/

3,22,21,20,2 ssss

1,11,10,10,1 dsds

1,10,00,10,0 ddds

Page 18: Lifting Part 1: Introduction Ref: SIGGRAPH96. Outline Introduction to wavelets and lifting scheme Basic Ideas –Split, Predict, Update –In-place computation

Predict: how the data fail to be constant• eliminate zeroth order correlation• Order of predictor = 1

Update: preserve average• zeroth order moment• Order of Update operator = 1

Give exact prediction if

function were constant

Order: has to do with polynomial

reproduction (more later)

Page 19: Lifting Part 1: Introduction Ref: SIGGRAPH96. Outline Introduction to wavelets and lifting scheme Basic Ideas –Split, Predict, Update –In-place computation

Haar & Lifting

2/)(

)(

xxU

xxP

Haar

Haar

2/)(

)(

xxU

xxP

Haar

Haar

),Merge( :

)P(

) U(

11

11

11

jjj

jj

jj

dss

sd

ds

) U(

)P(

)Split( : ),(

11

11

11

jj

jj

jjj

ds

sd

sds

Page 20: Lifting Part 1: Introduction Ref: SIGGRAPH96. Outline Introduction to wavelets and lifting scheme Basic Ideas –Split, Predict, Update –In-place computation

Cascading1 0

0 0 1 0

1 1 0 0

1 0

-½ 0

½ 0

-½ ½ 0 0

0 0

Scaling FunctionsScaling Functions

WaveletsWavelets

Page 21: Lifting Part 1: Introduction Ref: SIGGRAPH96. Outline Introduction to wavelets and lifting scheme Basic Ideas –Split, Predict, Update –In-place computation

Double Check

5379

2428

1,11,10,10,1 dsds

8 ×

4 ×

-2 ×

2 ×

+

½

1

1

½

+

+Note the wavelet definition is

different

Page 22: Lifting Part 1: Introduction Ref: SIGGRAPH96. Outline Introduction to wavelets and lifting scheme Basic Ideas –Split, Predict, Update –In-place computation

Lifting Framework

9 7 3 5

9 3

7 5 -2 2

8 4 9 3

7 5

9 7 3 5

2/)(

)(

,1,1

,1,1

kjkjHaar

kjkjHaar

ddU

ssP

2/)(

)(

,1,1

,1,1

kjkjHaar

kjkjHaar

ddU

ssP

U: to ensure

coarsened signal preserves average

Page 23: Lifting Part 1: Introduction Ref: SIGGRAPH96. Outline Introduction to wavelets and lifting scheme Basic Ideas –Split, Predict, Update –In-place computation

Pseudo CodesForward

Inverse

Page 24: Lifting Part 1: Introduction Ref: SIGGRAPH96. Outline Introduction to wavelets and lifting scheme Basic Ideas –Split, Predict, Update –In-place computation

Lifting Ordering

(n=8)

3,23,22,22,21,21,20,20,2 dsdsdsds

1,11,10,10,1 dsds

0,00,0 ds

final result

76543210 ffffffff

2d

2sf 1s0s

1d 0d

3,21,12,20,01,20,10,20,0 ddddddds

Page 25: Lifting Part 1: Introduction Ref: SIGGRAPH96. Outline Introduction to wavelets and lifting scheme Basic Ideas –Split, Predict, Update –In-place computation

About Demo Implementation

ndata = 16JMAX = 4

INCR

0 1 2 3 4

1 2 4 8 16

#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

15,414,413,412,411,410,49,48,47,46,45,44,43,42,41,40,4 ssssssssssssssss

7,37,36,36,35,35,34,34,33,33,32,32,31,31,30,30,3 dsdsdsdsdsdsdsds

3,23,22,22,21,21,20,20,2 dsdsdsds

1,11,10,10,1 dsds

0,00,0 ds

Page 26: Lifting Part 1: Introduction Ref: SIGGRAPH96. Outline Introduction to wavelets and lifting scheme Basic Ideas –Split, Predict, Update –In-place computation

Linear Interpolating Wavelet

• more powerful lifting• Predictor (Order = 2)

– Exact for linear data

• Update (Order = 2)– Preserve the average and first moment

1,1,1,1,1 2

1

Predictor

ljljljlj ssdd 1,1,1,1,1 2

1

Predictor

ljljljlj ssdd

Page 27: Lifting Part 1: Introduction Ref: SIGGRAPH96. Outline Introduction to wavelets and lifting scheme Basic Ideas –Split, Predict, Update –In-place computation

Linear Interpolating (Predictor)

1,1,1,1,1 2

1 ljljljlj ssdd 1,1,1,1,1 2

1 ljljljlj ssdd

Page 28: Lifting Part 1: Introduction Ref: SIGGRAPH96. Outline Introduction to wavelets and lifting scheme Basic Ideas –Split, Predict, Update –In-place computation

Linear Interpolating Wavelet (Update)

)( ,11,12,,1 ljljljlj ddAss )( ,11,12,,1 ljljljlj ddAss

llj

llj

lljljlj

llj

llj

llj

llj

sAsA

sssAs

dAss

12,2,

22,2,21

12,2,

,12,,1

2)21(

2

2

4/1 Therefore, A

l

ljl

lj ss ,,1 2

1Preserve average

Propose update of the form :

use results already computed

Page 29: Lifting Part 1: Introduction Ref: SIGGRAPH96. Outline Introduction to wavelets and lifting scheme Basic Ideas –Split, Predict, Update –In-place computation

Linear Wavelet (Update)

Preserve average is equivalent to having zero mean difference

Preserve average is equivalent to having zero mean difference

coarsened signal

original signal

ljljljlj ddss ,11,1,1,1 4

1 ljljljlj ddss ,11,1,1,1 4

1

Page 30: Lifting Part 1: Introduction Ref: SIGGRAPH96. Outline Introduction to wavelets and lifting scheme Basic Ideas –Split, Predict, Update –In-place computation

Preservation of 1st Moment

2 UpdateofOrder

symmetry todue satisfied 2

1,,1

l

ljl

lj slsl

We will refer this as the dual order of MRA

Page 31: Lifting Part 1: Introduction Ref: SIGGRAPH96. Outline Introduction to wavelets and lifting scheme Basic Ideas –Split, Predict, Update –In-place computation

In-place computation

Page 32: Lifting Part 1: Introduction Ref: SIGGRAPH96. Outline Introduction to wavelets and lifting scheme Basic Ideas –Split, Predict, Update –In-place computation

Numeric Example (linear wavelet)

64426812106442

Average: 26/4

Average: 52/8

Forward

Inverse

6412183101412

6415.21935.101412

6412183101412

64426812106442

assume data periodicityassume data periodicity

Page 33: Lifting Part 1: Introduction Ref: SIGGRAPH96. Outline Introduction to wavelets and lifting scheme Basic Ideas –Split, Predict, Update –In-place computation

Remarks

• By substituting the predictor into update one gets

• This is biorthogonal (2,2) of CDF– CDF: Cohen-Daubechies-Feauveau

– More computations in this form (and cannot be done in-place)

– Inverse transform harder to get (rely on Fourier-based techniques)

22,12,2,12,22,,1 8

1

4

1

4

3

4

1

8

1 ljljljljljlj ssssss

Page 34: Lifting Part 1: Introduction Ref: SIGGRAPH96. Outline Introduction to wavelets and lifting scheme Basic Ideas –Split, Predict, Update –In-place computation

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

Page 35: Lifting Part 1: Introduction Ref: SIGGRAPH96. Outline Introduction to wavelets and lifting scheme Basic Ideas –Split, Predict, Update –In-place computation

Homework: lifting version of D4

Speed up ratio!?Wiring diagram!?

Page 36: Lifting Part 1: Introduction Ref: SIGGRAPH96. Outline Introduction to wavelets and lifting scheme Basic Ideas –Split, Predict, Update –In-place computation

undecided

Page 37: Lifting Part 1: Introduction Ref: SIGGRAPH96. Outline Introduction to wavelets and lifting scheme Basic Ideas –Split, Predict, Update –In-place computation

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?