Chapter 7 Wavelets and Multiresolution Processingcs.tju.edu.cn/faculty/hyh/image analysis/chapter...

Preview:

Citation preview

Chapter 7Wavelets and

MultiresolutionProcessing

Background

Multiresolution Expansions

Wavelet Transforms in One Dimension

Wavelet Transforms in Two Dimensions

Image Pyramids

Subband Coding

The Haar Transform

The total number of elements in a P+1 level pyramid for P>0 is

( ) ( ) ( )2

212

34

41

41

411 NN P ≤⎟⎟

⎞⎜⎜⎝

⎛+⋅⋅⋅+++

Image Pyramids

Subband Coding

The Haar Transform

The Z-transform, a generalization of the discrete Fourier transform, is the ideal tool for studying discrete-time, sampled-data systems.The Z-transform of sequemce x(n) for n=0,1,2,…is

Where z is a complex variable.∑∞

∞−

−= nznxzX )()(

Downsampling by a factor of 2 in the time domain corresponds to the simple Z-domain operation

(7.1-2)Upsampling-again by a factor of 2---is defined by the transform pair

(7.1-3)

( )[ ]2/12/1 )(21)()2()( zXzXzXnxnx downdown −+=⇔=

)()(0

,...4,2,0)2/()( 2zxzX

otherwisennx

nx upup =⇔⎩⎨⎧ =

=

If sequence x(n) is downsampled and subsequently upsampled to yield , Eqs.(7.1-2) and (7.1-3) combine to yield

where is the downsampled-upsampled sequence. Its inverse Z-transform is

)(nx)

[ ])()(21)( zXzXzX −+=

)

[ ])()( 1 zXZnx)) −=

[ ] )()1()(1 nxzXZ n−=−−

We can express the system’s output as

The output of filter is defined by the transform pair

[ ]

[ ])()()()()(21

)()()()()(21)(

111

000

zXzHzXzHzG

zXzHzXzHzGzX

−−++

−−+=)

)(0 nh

∑ ⇔−=∗k

zXzHkxknhnxnh )()()()()()( 000

As with Fourier transform, convolution in the time (or spatial domain is equivalent to multiplication in the Z-domain.

[ ]

[ ] )()()()()(21

)()()()()(21)(

1100

1100

zXzGzHzGzH

zXzGzHzGzHzX

−−+−+

+=)

For error-free reconstruction of the input,and . Thus, we impose the

following conditions:

To get

Where denotes the determinant of .

)()( nxnx =))()( zXzX =

)

2)()()()(0)()()()(

1100

1100

=+=−+−

zGzHzGzHzGzHzGzH

( ) ⎥⎦

⎤⎢⎣

⎡−−

−=⎥

⎤⎢⎣

⎡)(

)()(det

2)()(

0

1

1

0

zHzH

zHzGzG

m

( ))(det zH m )(zH m

Letting , and taking the inverse Z-transform, we get

Letting , and taking the inverse Z-transform, we get

)12())(det( +−= km zzH α

2=α

)()1()(

)()1()(

01

1

10

nhng

nhngn

n

+−=

−=

2−=α

)()1()(

)()1()(

01

11

0

nhng

nhngn

n

−=

−= +

Three general solution:Quadrature mirror filters (OMFs)

Conjugate quadrature filters (CQFs)

Orthonormal

Image Pyramids

Subband Coding

The Haar Transform

The Haar transform can be expressed in matrix form

Where F is an N*N image matrix, H is an N*N transformation matrix, T is the resulting N*N transform.

THFHT =

For the Haar transform, transformation matrix H contains the Haar basis functions, .They are defined over the continuous, closed interval for k=0,1,2,…,N-1, where .To generate H, we define the integer k such that

where , or 1 for .

)(zhk

[ ]1,0∈znN 2=

12 −+= qk P

10 −≤≤ np 0=q 0=ppq 21 ≤≤ 0≠pfor

Then the Haar basis functions are

and

[ ]1,0,1)()( 000 ∈== zN

zhzh

[ ]⎪⎩

⎪⎨

∈<≤−−

−<≤−

==1,0,0

2/2/)5.0(22/)5.0(2/)1(2

1)()( 2/

2/

zotherwiseqzq

qzq

Nzhzh ppp

ppp

pqk

The ith row of an N*N Haar transformation matrix contains the elements of

If N=4, for example k,q, and p assume the values./)1(,....,/2,/1,/0)( NNNNNzforzhi −=

213112101000qpk

The 4*4 transformation matrix, H4, is

⎥⎥⎥⎥

⎢⎢⎢⎢

−−

−−=

220000221111

1111

41

4H

Background

Multiresolution Expansions

Wavelet Transforms in One Dimension

Wavelet Transforms in Two Dimensions

Series Expansion

Scaling Functions

Wavelet Functions

A signal of function f(x) can often be better analyzed as a linear combination of expansion functions

k is an interger index of the finite or infinite sum;

are real-valued expansion coefficients;are real-valued expansion functions.

∑=k

kk xxf )()( ϕα

)(xkϕ

These coefficients are computed by taking the integral inner products of the dual ‘s and function f(x). That is

)(~ xkϕ

dxxfxxfx kkk )()(~)(),(~ *∫== ϕϕα

Series Expansion

Scaling Functions

Wavelet Functions

The set of expansion functions composed of integer translations and binary scaling of the real, square-integrable function ; that is, the set where

)(xϕ{ })(, xkjϕ

( )kxx jjkj −= 22)( 2/

, ϕϕ

If , it can be written

We will denote the subspace spanned over k for any j as

{ })(,00xSpanV kj

kj ϕ=

0)( jVxf ∈

∑=k

kjk xxf )()( ,0ϕα

{ })(, xSpanV kjk

j ϕ=

The simple scaling function in the preceding example obeys the four fundamental requirements of multiresolution analysis:

MRA Requirement 1: The scaling function is orthogonal to its integer translates;

MRA Requirement 2: The subspaces spanned by the scaling function at low scales are nested within those spanned at higher scales.

MRA Requirement 3: The only function that is common to all Vj is f(x)=0.

MRA Requirement 4: Any function can be represented with arbitrary precision.

Series Expansion

Scaling Functions

Wavelet Functions

Given a scaling function that meets the MRA requirements of the previous section, we can define a wavelet function that, together with its integer translates and binary scaling, spans the difference between any two adjacent scaling subspaces, and . We define the set of wavelets

)(xψ

jV 1+jV{ })(, xkjψ

{ })2(2)( 2/, kxx jjkj −= ψψ

As with scaling functions, we write

And note that if

The scaling and wavelet function subspaces are related by

{ })(, xSpanW kjk

j ψ=

jWxf ∈)(

∑=k

kjk xxf )()( ,ψα

jjj WVV ⊕=+1

We can now express the space of all measurable, square-integrable functions as

or...)( 100

2 ⊕⊕⊕= WWVRL

...)( 2112 ⊕⊕⊕= WWVRL

The Haar wavelet function is

⎪⎩

⎪⎨

⎧<≤−<≤

=elsewhere

xx

x0

15.015.001

)(ψ

Background

Multiresolution Expansions

Wavelet Transforms in One Dimension

Wavelet Transforms in Two Dimensions

The Wavelet Series Expansions

The Discrete Wavelet Transform

The Continuous Wavelet Transform

Defining the wavelet series expansion of function relative to wavelet and scaling function . f(x) can be written as

: the approximation or scaling coefficients;

: the detail or wavelet coefficients.

)()( 2 RLxf ∈ )(xψ

)(xϕ

∑∑∞

=

+=0

00)()()()()( ,,

jjkjj

kkjj xkdxkcxf ψϕ

skc j )'(0

skd j )'(

If the expansion functions form an orthonormal basis or tight frame, the expansion coefficients are calculated as

and

∫== dxxxfxxfkc kjkjj )()()(),()( ,, 000ϕϕ

∫== dxxxfxxfkd kjkjj )()()(),()( ,, ψψ

The Wavelet Series Expansions

The Discrete Wavelet Transform

The Continuous Wavelet Transform

If the function being expanded is a sequence of numbers, like samples of a continuous function f(x), the resulting coefficients are called the discrete wavelet transform(DWT) of f(x).

and

∑=x

kj xxfM

kjW )()(1),( ,0 0ϕϕ

∑=x

kj xxfM

kjW )()(1),( ,ψψ

∑∑∑∞

=

+=0

0)(),(1)(),(1)( ,,0

jj kkj

kkj xkjW

MxkjW

Mxf ψϕ ψϕ

Consider the discrete function of four points:f(0)=1, f(1)=4, f(2)=-3, and f(3)=0

Since M=4, J=2 and, with j0=0, the summations are performed over

x=0,1,2,3,j=0,1, and k=0 for j=0

or k=0,1 for j=1.

We find that

[ ] 11013141121)()(

21)0,0(

3

00,0 =⋅+⋅−⋅+⋅== ∑

=xxxfW ϕϕ

[ ] 4)1(0)1(3141121)0,0( =−⋅+−⋅−⋅+⋅=ψW

[ ] 25.10003)2(42121)0,1( −=⋅+⋅−−⋅+⋅=ψW

[ ] 25.1)2(023040121)1,1( −=−⋅+⋅−⋅+⋅=ψW

For x=0,1,2,3. If x=0, for instance,

[ ])()1,1()()0,1()()0,0()()0,0(21)( 1,10,10,00,0 xWxWxWxWxf ψψψϕ ψψψϕ +++=

[ ] 1025.1)2(25.1141121)0( =⋅−⋅−⋅+⋅=f

The Wavelet Series Expansions

The Discrete Wavelet Transform

The Continuous Wavelet Transform

The continuous wavelet transform of a continuous, square-integrable function, f(x), relative to a real-valued wavelet, ,is

Where

And s and are called scale and translation parameters.

)(xψ

∫∞

∞−= dxxxfsW s )()(),( ,τψ ψτ

⎟⎠⎞

⎜⎝⎛ −

=s

xs

xsτψψ τ

1)(,

τ

Given , f(x) can be obtained using the inverse continuous wavelet transform

Where

And is the Fourier transform of .

),( τψ sW

dsds

xsW

Cxf s τ

ψτ τ

ψψ∫ ∫∞ ∞

∞−=

0 2, )(

),(1)(

∫∞

∞−

Ψ= du

uu

C2)(

ψ

)(uΨ )(xψ

The Mexican hat wavelet

2/24/1 2

)1(3

2)( xexx −− −⎟⎟⎠

⎞⎜⎜⎝

⎛= πψ

Background

Multiresolution Expansions

Wavelet Transforms in One Dimension

Wavelet Transforms in Two Dimensions

In two dimensions, a two-dimensional scaling function, , and three two-dimensional wavelet, , and , are required.

),( yxϕ

),( yxHψ ),( yxVψ ),( yxVψ

Excluding products that produce one-dimensional results, like , the four remaining products produce the separable scaling function

And separable, “directionally sensitive”wavelets

)()( xx ψϕ

)()(),( yxyx ϕϕϕ =

)()(),( yxyxH ϕψψ =

)()(),( yxyxV ψϕψ =

)()(),( yxyxD ψψψ =

The scaled and translated basis functions:

)2,2(2),( 2/,, nymxyx jjjnmj −−= ϕϕ

{ }DVHinymxyx jjjnmj

i ,,),2,2(2),( 2/,, =−−= ψψ

The discrete wavelet transform of function f(x,y) of size M*N is then

( ) ∑∑−

=

=

=1

0

1

0,,0 ),(),(1,,

0

M

x

N

ynmj yxyxf

MNnmjW ϕϕ

( ) { }∑∑−

=

=

==1

0

1

0,, ,,),(),(1,,

M

x

N

ynmj

ii DVHiyxyxfMN

nmjW ψψ

Given the and , f(x,y) is obtained via the inverse discrete wavelet transform

ϕW iWψ

∑ ∑∑∑

∑∑

=

=

+

=

DVHi jj m n

inmj

i

m nnmj

yxnmjWMN

yxnmjWMN

yxf

,,,,

,,0

0

0

),(),,(1

),(),,(1),(

ψ

ϕ

ψ

ϕ

Fig. 7.24 (Con’t)

Recommended