70
Wavelets and their applications in CG&CAGD Speaker: Qianqian Hu Date: Mar. 28, 2007

Wavelets and their applications in CG&CAGD Speaker: Qianqian Hu Date: Mar. 28, 2007

Embed Size (px)

Citation preview

Page 1: Wavelets and their applications in CG&CAGD Speaker: Qianqian Hu Date: Mar. 28, 2007

Wavelets and their applications in CG&CAGD

Speaker: Qianqian HuDate: Mar. 28, 2007

Page 2: Wavelets and their applications in CG&CAGD Speaker: Qianqian Hu Date: Mar. 28, 2007

Outline

Introduction 1D wavelets (eg, Haar wavelets) 2D wavelets (eg, spline wavelets) Multiresolution analysis

Applications in CG&CAGD Fairing curves Deformation of curves

Page 3: Wavelets and their applications in CG&CAGD Speaker: Qianqian Hu Date: Mar. 28, 2007

References L.M. Reissell, P. Schroder, M.F. Cohen. A wavelets a

nd their applications in Computer Graphics, Sig 94 E.J. Stollnitz, T.D. DeRose, D.H., Salesin. Wavelets f

or Computer Graphics: A Primer.IEEE Computer Graphics and Applications, 1995, 15.

G. Amati. A multi-level filtering approach for fairing planar cubic B-spline curves, CAGD, 2007 (24) 53-66

S. Hahmann, B. Sauvage, G.P., Bonneau. Area preserving deformation of multiresolution curves, CAGD, 2005 (22) 359-367.

M, Bertram. Single-knot wavelets for non-uniform Bsplines. CAGD, 2005 (22) 849-864.

Page 4: Wavelets and their applications in CG&CAGD Speaker: Qianqian Hu Date: Mar. 28, 2007

Background

In 1974, French engineer J.Morlet put forward the concept of wavelet transform.

A wavelet basis is constructed by Y.Meyer in 1986.

<<Ten lectures on wavelets>> by I.Daubechies

Page 5: Wavelets and their applications in CG&CAGD Speaker: Qianqian Hu Date: Mar. 28, 2007

Applications Math: numerical analysis, curve/surfac

e construction, solve PDE, control theory

Signal analysis: filtering, denoise, compression, transfer

Image process: compression, classification, recognition and diagnosis

Medical imaging: reduce the time of MRI, CT, B-ultrasonography

Page 6: Wavelets and their applications in CG&CAGD Speaker: Qianqian Hu Date: Mar. 28, 2007

Applications in CG&CAGD

Image editing Image compression Automatic LOD control for editing Surface construction for contours Deformation Fairing curves

Page 7: Wavelets and their applications in CG&CAGD Speaker: Qianqian Hu Date: Mar. 28, 2007

What is wavelets analysis?

A method of data analysis, similar to Taylor expansion, Fourier transform

a coarse functionA complex function detail

coefficients

Page 8: Wavelets and their applications in CG&CAGD Speaker: Qianqian Hu Date: Mar. 28, 2007

Haar wavelet transform(I) The simplest wavelet basis

[8 4 1 3]

[6 2]

detail coefficients

8 = 6 + 2 1 = 2 + (-1)

4 = 6 – 2 3 = 2 – (-1)

[2 -1]

Page 9: Wavelets and their applications in CG&CAGD Speaker: Qianqian Hu Date: Mar. 28, 2007

Haar wavelet transform(II)

The wavelet transform is given by [4 2 2 -1]

Page 10: Wavelets and their applications in CG&CAGD Speaker: Qianqian Hu Date: Mar. 28, 2007

Advantages

(1) reconstruct any resolution of the function

(2) many detail coefficients are very small in magnitude.

Page 11: Wavelets and their applications in CG&CAGD Speaker: Qianqian Hu Date: Mar. 28, 2007

Haar wavelet basis functions The vector space V j

The spaces V j are nested

The basis for V j is given by

Page 12: Wavelets and their applications in CG&CAGD Speaker: Qianqian Hu Date: Mar. 28, 2007

Example

The four basis functions for V 2

Page 13: Wavelets and their applications in CG&CAGD Speaker: Qianqian Hu Date: Mar. 28, 2007

Wavelets The orthogonal space

The properties: together with form a basis for Orthogonal property:

ji

1,j j j j jiW V W V

ji 1jV

1

0| 0, , .j j j j j j j j

i i i i i idx W V

Page 14: Wavelets and their applications in CG&CAGD Speaker: Qianqian Hu Date: Mar. 28, 2007

Haar wavelets Definition:

Page 15: Wavelets and their applications in CG&CAGD Speaker: Qianqian Hu Date: Mar. 28, 2007

2D Haar wavelet transforms(I) The standard decomposition

Page 16: Wavelets and their applications in CG&CAGD Speaker: Qianqian Hu Date: Mar. 28, 2007

2D Haar wavelet transforms(II) The non-standard decomposition

Page 17: Wavelets and their applications in CG&CAGD Speaker: Qianqian Hu Date: Mar. 28, 2007

2D Haar basis functions(I) The standard construction

Page 18: Wavelets and their applications in CG&CAGD Speaker: Qianqian Hu Date: Mar. 28, 2007

2D Haar basis functions(II) The non-standard construction

Page 19: Wavelets and their applications in CG&CAGD Speaker: Qianqian Hu Date: Mar. 28, 2007

Haar basis Advantages:

Simplicity Orthogonality Very compact supports Non-overlapping scaling functions Non-overlapping wavelets

Disadvantages: Lack of continuity

Page 20: Wavelets and their applications in CG&CAGD Speaker: Qianqian Hu Date: Mar. 28, 2007

B-spline wavelets Define the scaling functions

1) endpoint interpolation 2) For , choose k=2j+d-1

to produce 2j equally-spaced interior intervals.

Page 21: Wavelets and their applications in CG&CAGD Speaker: Qianqian Hu Date: Mar. 28, 2007

B-spline scaling functions

Page 22: Wavelets and their applications in CG&CAGD Speaker: Qianqian Hu Date: Mar. 28, 2007

Multiresolution analysis A nested set of vector spaces {Vj}:

Wavelet spaces {Wj}: for each j

1j j jW V V

Page 23: Wavelets and their applications in CG&CAGD Speaker: Qianqian Hu Date: Mar. 28, 2007

Refinement equations

For scaling functions

For wavelets

Page 24: Wavelets and their applications in CG&CAGD Speaker: Qianqian Hu Date: Mar. 28, 2007

Filter bank For a funcion in Vn with the coefficients

A low-resolution version Cn isThe lost detail is

Page 25: Wavelets and their applications in CG&CAGD Speaker: Qianqian Hu Date: Mar. 28, 2007

Analysis & synthesis

Analysis: Splitting Cn into Cn-1 and Dn-1

Analysis filters: An and Bn

Synthesis: recovering Cn from Cn-1 and Dn-

1

Synthesis filters: Pn and Qn

Page 26: Wavelets and their applications in CG&CAGD Speaker: Qianqian Hu Date: Mar. 28, 2007

Framework

Step1: select the scaling functions Φj(x) for each j =0,1… Step2: select an inner product defined

on the functions in V0 ,V1 … Step3: select a set of wavelets Ψj(x) th

at span Wj for each j=0,1,…

Page 27: Wavelets and their applications in CG&CAGD Speaker: Qianqian Hu Date: Mar. 28, 2007

Image compression in L2

Description of problemSuppose we are given a function f(x) expressed as

and a user-specified error tolerance ε. We are lookingfor

such that for L2 norm.

Page 28: Wavelets and their applications in CG&CAGD Speaker: Qianqian Hu Date: Mar. 28, 2007

L2 compression

For a function ,σis a permutation of 0,…,M-1. the approximation error is

Page 29: Wavelets and their applications in CG&CAGD Speaker: Qianqian Hu Date: Mar. 28, 2007

Main steps

Step 1: compute coefficients in a normalized 2D Haar basis.

Step 2: Sort the coefficients in order of decreasing magnitude

Step 3: Starting with M’ = M, find the least M’ with

Page 30: Wavelets and their applications in CG&CAGD Speaker: Qianqian Hu Date: Mar. 28, 2007

Example

Page 31: Wavelets and their applications in CG&CAGD Speaker: Qianqian Hu Date: Mar. 28, 2007

Multiresolution curves Change the overall “sweep” of a curve

while maintaining its characters Change a curve’s characters without

affecting its overall “sweep” Edit a curve at any continuous level of

detail Continuous levels of smoothing Curve approximation within a prescribed

error.

Page 32: Wavelets and their applications in CG&CAGD Speaker: Qianqian Hu Date: Mar. 28, 2007

Example

Page 33: Wavelets and their applications in CG&CAGD Speaker: Qianqian Hu Date: Mar. 28, 2007

Editing “character”

For multiresolution decomposition C0 ,...,Cn-

1, D0 ,…,Dn-1, replacing Dj ,…,Dn-1 with Ďj ,…, Ďn-1

Page 34: Wavelets and their applications in CG&CAGD Speaker: Qianqian Hu Date: Mar. 28, 2007

Fairing curves

Main idea: wavelet transform Imperfections:

undesired inflections curvature bumps curvature discontinuities non-monotonic curvature

Page 35: Wavelets and their applications in CG&CAGD Speaker: Qianqian Hu Date: Mar. 28, 2007

Multi-level representation

A cubic planar B-spline curve

with a uniform knot sequence

and a multiplicity vector

Page 36: Wavelets and their applications in CG&CAGD Speaker: Qianqian Hu Date: Mar. 28, 2007

Definition of wavelets

Vj ={Njk,m(u)=Φj

k(u)}, Wj ={Ψjk(u)} satisfy

where Pj={pjk,l}, Qj={qj

k,l}

Two scale relations

Synthesis filters

Page 37: Wavelets and their applications in CG&CAGD Speaker: Qianqian Hu Date: Mar. 28, 2007

Decomposition

Function fj+1(u) is decomposed into fj

(u) and gj(u).

where Aj={ajk,l}, Bj={bj

k,l}

Page 38: Wavelets and their applications in CG&CAGD Speaker: Qianqian Hu Date: Mar. 28, 2007

Curvature For a planar curve fj(u)=(x(u),y(u)), curvature:

curvature derivative:

fairness indicators:Local fairness

global fairness

Page 39: Wavelets and their applications in CG&CAGD Speaker: Qianqian Hu Date: Mar. 28, 2007

Thresholding Hard thresholding σ:(Rn×R) --->Rn wit

h detail functions Dj=(dj1, dj

2,…, djk), a t

hreshold value λ∈[0,1]

σ(Dj, λ) = Dj-λDj

Page 40: Wavelets and their applications in CG&CAGD Speaker: Qianqian Hu Date: Mar. 28, 2007

Algorithm

Page 41: Wavelets and their applications in CG&CAGD Speaker: Qianqian Hu Date: Mar. 28, 2007

Example 1

Page 42: Wavelets and their applications in CG&CAGD Speaker: Qianqian Hu Date: Mar. 28, 2007

Example 1

Page 43: Wavelets and their applications in CG&CAGD Speaker: Qianqian Hu Date: Mar. 28, 2007

Example 2

Page 44: Wavelets and their applications in CG&CAGD Speaker: Qianqian Hu Date: Mar. 28, 2007

Example 2

Page 45: Wavelets and their applications in CG&CAGD Speaker: Qianqian Hu Date: Mar. 28, 2007

Curve deformation

Multiresolution editing Area preserving

Page 46: Wavelets and their applications in CG&CAGD Speaker: Qianqian Hu Date: Mar. 28, 2007

Multiresolution curve For a curve c(t)

Decomposition:Reconstruction:

Page 47: Wavelets and their applications in CG&CAGD Speaker: Qianqian Hu Date: Mar. 28, 2007

Example

Page 48: Wavelets and their applications in CG&CAGD Speaker: Qianqian Hu Date: Mar. 28, 2007

Area of a MR-curve The signed area:

For any level of resolution L,

where

Page 49: Wavelets and their applications in CG&CAGD Speaker: Qianqian Hu Date: Mar. 28, 2007

Area matrix(I)

Page 50: Wavelets and their applications in CG&CAGD Speaker: Qianqian Hu Date: Mar. 28, 2007

Area matrix(II)

Page 51: Wavelets and their applications in CG&CAGD Speaker: Qianqian Hu Date: Mar. 28, 2007

Efficient computation of ML

By

(P)-filter:(Q)-filter:

By symmetry:

Page 52: Wavelets and their applications in CG&CAGD Speaker: Qianqian Hu Date: Mar. 28, 2007

Illustration

Page 53: Wavelets and their applications in CG&CAGD Speaker: Qianqian Hu Date: Mar. 28, 2007

ML for Chaikin MR curves The scaling function: quadratic unifor

m B-splines

Page 54: Wavelets and their applications in CG&CAGD Speaker: Qianqian Hu Date: Mar. 28, 2007

Overview of deformation

(1) Decomposition: express curve c(t) in a multiresolution basis at level

L. (2) Deformation: bend the coarse polygon to get the coordinates X0,Y

0. (3) Area preservation: compute X,Y such that A=Aref.

Page 55: Wavelets and their applications in CG&CAGD Speaker: Qianqian Hu Date: Mar. 28, 2007

Optimization method

Minimize a smoothness term and a distance term.

The smoothness term: prevent the curve to have unwanted wiggles.

The distance term: respect the defined deformation as much as possible.

Page 56: Wavelets and their applications in CG&CAGD Speaker: Qianqian Hu Date: Mar. 28, 2007

Smoothness criteria

Minimization the bending energy

For a MR-curve at L level, the energy can be expressed as

where

Page 57: Wavelets and their applications in CG&CAGD Speaker: Qianqian Hu Date: Mar. 28, 2007

Area preserving deformation

The optimization problem

where

Page 58: Wavelets and their applications in CG&CAGD Speaker: Qianqian Hu Date: Mar. 28, 2007

Linearization(I) Using Lagrange multiplyers,

Linearizing the area constraint

For , there isIf 0, then

Page 59: Wavelets and their applications in CG&CAGD Speaker: Qianqian Hu Date: Mar. 28, 2007

Linearization(II) The minimization problem with linear

ized area constraint:

The equivalent equation

Page 60: Wavelets and their applications in CG&CAGD Speaker: Qianqian Hu Date: Mar. 28, 2007

Algorithm

Page 61: Wavelets and their applications in CG&CAGD Speaker: Qianqian Hu Date: Mar. 28, 2007

Influence of α

Page 62: Wavelets and their applications in CG&CAGD Speaker: Qianqian Hu Date: Mar. 28, 2007

Example

Page 63: Wavelets and their applications in CG&CAGD Speaker: Qianqian Hu Date: Mar. 28, 2007

Localized deformation

Selection of index subset

{1,2,…,2n}=I J,∪ I: modified coefficients; J: unchanged coefficients

The linear system of equations:

Page 64: Wavelets and their applications in CG&CAGD Speaker: Qianqian Hu Date: Mar. 28, 2007

Local deformation

Page 65: Wavelets and their applications in CG&CAGD Speaker: Qianqian Hu Date: Mar. 28, 2007

Upholding moved point

Page 66: Wavelets and their applications in CG&CAGD Speaker: Qianqian Hu Date: Mar. 28, 2007

Modification of detail coefficients

Page 67: Wavelets and their applications in CG&CAGD Speaker: Qianqian Hu Date: Mar. 28, 2007

Example

Page 68: Wavelets and their applications in CG&CAGD Speaker: Qianqian Hu Date: Mar. 28, 2007

Multiresolution surfaces(I) Using tensor products of B-spline scal

ing functions and wavelets

Page 69: Wavelets and their applications in CG&CAGD Speaker: Qianqian Hu Date: Mar. 28, 2007

Multiresolution surfaces(II) Wavelets based on subdivision surfaces for

arbitrary topology typeM. Lounsbery, T.D. DeRose, J. Warren. Multiresolution analysis for surfa

ces of arbitrary topological type. TOG 1997, 16(1): 34-73

Page 70: Wavelets and their applications in CG&CAGD Speaker: Qianqian Hu Date: Mar. 28, 2007

Thanks a lot!