filter design for adaptive lifting schemes - eurasip

1 downloads 0 Views 127KB Size Report
and U(.) can be chosen arbitrary. They can be even non-linear (e.g. median) and data-adaptive. Since the signal is reconstruc- ted exactly in reversed order (see ...
FILTER DESIGN FOR ADAPTIVE LIFTING SCHEMES Tomasz P. Zielinski1), Jacek Stêpieñ 2), Krzysztof Duda1) 1)

Instrumentation and Measurement Department, 2) Electronics Department, Technical University AGH Al. Mickiewicza 30, 30-059 Krakow, Poland Tel: (+4812) 17 28 41; fax: (+4812) 17 39 72 e-mail: [email protected], [email protected]

ABSTRACT The paper addresses the problem of optimum design of predict and update filters for lifting scheme of the wavelet transform. It extends previous works of Baraniuk, Claypoole and Nowak, and presents general principles for building matrix equations for computation of arbitrary order lifting filters. Exemplary designs are presented in the paper. (2,2) Cohen-Daubechies-Feauveau and (4,4) Deslauriers-Debuc wavelet transforms can be obtained as special cases from the presented approach. Both predict-first and update-first schemes are taken into account. 1 INTRODUCTION Second generation wavelet transforms have been introduced recently [1]. They are obtained using the so-called lifting construction. Lifting implementations of wavelet transform offers several advantages in comparison to the traditional filter bank approach, e.g. faster, in-place calculations and possibility of designing adaptive, nonlinear, irregular-sampled and integer-to-integer wavelet transforms. It has been shown that any wavelet transform can be factored into lifting steps [2]. Block diagrams of the direct and inverse ”predict first” lifting are presented in figures in table 1. The analyzed signal x(n) is first split into even and odd samples: xe(n) and xo(n). Then the odd samples are predicted from the even ones using any function, in particular a linear one. Predicted values are subtracted from xo(n). The resultant signal d(n) represents high-frequency content of x(n) - the so-called detail signal. Finally, the even samples xe(n) are updated on the base of d(n) and a smoothed signal approximation c(n) is obtained. Filters P(.) and U(.) can be chosen arbitrary. They can be even non-linear (e.g. median) and data-adaptive. Since the signal is reconstructed exactly in reversed order (see figures in table 1), the transform is always invertable. When the order of predict and update filters is reversed, the ”update-first” lifting scheme is get. Situation when both filters are linear has been discussed in detail in [3¸4]. Some fruitful graphical illustrations and constraints for filters P(.) and U(.) have been derived and presented there. In particular, relations which should fulfill the filters P(.) and U(.) have been given. They assure exact decomposition of the signal x(n) into its low-pass and high-pass components (c(n) and d(n),

respectively). But since the choice of U(.) depends on actual P(.), the explicit solution for the filter U(.) has not been derived in [3¸4]. Our paper addresses and solves exactly this problem. The proposed methodology let one design predict and update filters with any even lengths. For example, coefficient for (M=2, N=2) Cohen-DaubechiesFeauveau and (M=4, N=4) Deslauriers-Debuc wavelet transforms can be calculated with its help (M and N denote lengths of the filters P(.) and U(.), respectively). After minor algorithm modification odd-length filters design is also possible. Both ”predict first” and ”update first” schemes can utilize the proposed method. 2 FILTER DESIGN PROCEDURE Let us make following denotations: · the predict filter p(M) (M even):

p ( M ) = [p1 p2 p3 ... p M ]T ,

(1)

· the update filter u(N) (N even):

u ( N ) = [u1 u2 u3 ... u N ]T ,

(2)

· the work matrix W with dimensions Kx(2L-1) which rows

are monomial signals ( k = 0, 1,..., K-1; l = -(L-1), -(L2),..., -1, 0, 1,..., (L-2), (L-1); 00=1): W ( K ,2 L −1) (k , l ) = l k ,

(3)

· work matrix V with dimensions KxL built from odd

columns of W (k = 0, 1,..., K-1; l = -(L-1), -(L-3),..., -1, 1, ..., (L-3), (L-1)): V ( K , L ) (k , l ) = l k

(4)

· the K-element vector d(K):

δ ( K ) = [1 0 0 ... 0] T

(5)

Weights of the prediction filter p(M) can be computed from the following relation [3¸4]: V ( M , M ) p(M ) = δ ( M ) while the filter u

(N)

(6)

can be found with ease from:

W ( N , 2 K −1) ⋅ Q ( 2 K −1, N ) ⋅ u ( N ) = δ ( M )

(7)

where K=M+N-1 and Nx(2K-1) matrix W and (2K-1)xN matrix Q are defined as follows:

N k=

c(n) = xe (n) − ∑ u k d (n − N

/2

1

0 0

0 0

0 0 0 0

0 0

0 0

0 0

0 0

0 0

0 0

0 0

0 0

h(2M-1)

0 0

=

p

= [1 / 2

1/ 2

]T

,

u

= [1 / 4

( 2)

1/ 4

p u

( 4)

= [− 1 / 16 = [− 1 / 32

which are pair-wise related. In general, h(n)=h(2M-1), g~(n) = (−1) n+1 h(n) is equal to h(n) with negated elements pi

]T

9 / 16

9 / 32

9 / 32

/2

+

g = [− u1 , 1, − u2 ] , g~ = [− u1 p1 , − p1 , 1 − u1 p2 − u2 p1 , − p2 , − u2 p2 ] , h = [− u1 p1 , + p1 , 1 − u1 p2 − u2 p1 , + p2 , − u2 p2 ] . ~

~

In general, h ( n ) =g(2N-1), g (n) = (−1) n +1 h (n) is equal to ~ h ( n ) with negated elements ui on even positions, g~( n ) = h(n) = (−1) n g~ (n) is equal to g~( n ) without negation of

]T

− 1 / 16

− 1 / 32] T

The lifting scheme corresponds with the classical biorthogonal dyadic wavelet transform (see table 1). The standard wavelet low-pass and high-pass decomposition ~ filters h (n), g~ (n) and reconstruction filters h (n ), g ( n ) are practically realized with the help of prediction and update filters p(M) and u(N). Their choice should assure appropriate decomposition of the analyzed signal into high-frequency and low-frequency signal components. When p(M) and u(N) are known finding the adequate wavelet filters is possible from the Z-transform relations presented in table 1 or from graphical analysis of signal flow trees [3-7]. Typically it is assumed for even M and N that:

1

on even positions, g(n)=-Qu with 1 added to the central ~ element and, finally, h (n) = (−1)n g (n) is equal to g(n) without negation of elements ui on odd positions. In the ”update first” lifting scheme the filters p(M) and (N) u are again calculated from equations similar to (6)(7). In this case u(N) is found from (6) while the filter p(M) replaces u(N) in (7) (now the matrix Q is built from vectors g(2N-1) with elements ui). In consequence the ”update first” (N=2, M=2) lifting scheme results in: ~ h = [+ u1 , 1, + u2 ],

-Q p(M) with 1 added to the central element and, finally,

9 / 16

M d (n) = xo (n) − ∑ pk xe (n − M k=

2

h = [+ p1 , 1, + p2 ] ,

and the (4,4) Deslauriers-Debuc one: ( 4)

(9)

For example (for symmetrical filters p(M) and u(N)), the (M=2, N=2) lifting system results in the following wavelet filters: ~ h = [− p1u1 , + u1 , 1 − p1u2 − p2 u1 , + u2 , − p2 u2 ], 1

The matrix Q is built via: putting the vector q(2M-1) into its upper-left corner, shifting it two positions down in N-1 consecutive columns, and finally, filling the remaining matrix elements with zeroes. Derivation of (7) is original contribution of this paper. Using (6)(7) different wavelet systems can be built, including the (2,2) CohenDaubechies-Feauveau design: ( 2)

k)

g = [− p1u1 , − u1 , 1 − p1u2 − p2 u1 , − u2 , − p2 u2 ] , g~ = [− p , 1, − p ] ,

p1 0 p2 0 p3 ... pM/2 1 pM/2+1 ... pM-2 0 pM-1 0 pM

h(2M-1)

Q=

0 0

h(2M-1)

0 0

0 0

h(2M-1)

h(2M-1)

 − ( K − 1) 0 − ( K − 2) 0 ... 1 ... ( K − 2) 0 ( K − 1) 0    1 1 − ( K − 1) − ( K − 2) ... 0 ... ( K − 2)1 ( K − 1)1  W =   M M M M M   N −1 N −1 N −1 N −1 ... 0 ... ( K − 2) ( K − 1) − ( K − 2)   − ( K − 1)

−1+

k)

elements pi on odd positions. In the ”update first” (N, M) scheme analysis and synthesis filters are exchanged in comparison with the ”predict first” (M, N) system ~ ( h ↔ h, g~ ↔ g ) that results in corresponding exchange of analysis and synthesis scaling functions and wavelets. 3 EXEMPLARY FILTERS As an example, the (N=2, M=8) lifting system has been designed using the described above procedure. Frequency responses of corresponding wavelet transform filters as ~ well as obtained scaling functions ( ϕ (t ) , ϕ(t ) ) and wavelets ~ ( ø (t ) , ø (t ) ) are presented in figure 1. The predict filter length determines features of the synthesis subsystem. 4 ADAPTATION METHODS

(8) The problem of designing adaptive and non-linear lifting schemes has been already discussed in literature [3¸7]. Space-adaptive and line-adaptive filters switching are

reported there. It has been suggested there that in case of linear filters P(.) and U(.) one can change the length of prediction according to signal characteristics. For instance, the prediction filter should become shorter before and after abrupt change of data. With the help of the presented procedure one can design several pairs of predict & update filters and switch them according to the nature of decomposed data. We have initially applied space-adaptive and lineadaptive switching technique of lifting filters to image denoising [8]. Usage of adaptive lifting schemes instead of traditional wavelet decomposition filters has resulted in about 1 dB better image enhancement.

REFERENCES [1]

W.Sweldens: "The lifting scheme: A custom-design construction of biorthogonal wavelets," Applied Comput. Harmonic Analysis, vol.3, no.2, pp.186-200, 1996. I. Daubechies, W. Sweldens: "Factoring Wavelet Transform into Lifting Steps," Journal of Fourier Analysis and Applications, vol.4, no.3, pp. 245-267, 1998. R.L. Claypoole, RG. Baraniuk, R.D. Nowak "Lifting Construction of Non-Linear Wavelet Transforms", IEEE SP Symposium on Time-Frequency and Time-Scale Analysis TFTS-98, pp.49-52, Pittsburgh 1998. R.L. Claypoole, RG. Baraniuk, R.D. Nowak "Adaptive Wavelet Transformsvia Lifting”, IEEE Conf. on Acoustics, Speech and Signal Processing, Phoenix, 1999. R.L. Claypoole, G. Davis, W. Sweldens, R.G. Baraniuk "Nonlinear wavelet transforms for image coding", Proc. 31st Asilomar Conf., Pacific Grove 1997. R.L. Claypoole, G. Davis, W. Sweldens, R.G. Baraniuk "Nonlinear Wavelet Transforms for Image Coding via Lifting", submitted to IEEE Trans. on Image Processing. R.L. Claypoole, RG. Baraniuk, R.D. Nowak "Adaptive Wavelet Transformsvia Lifting”, submitted to IEEE Trans. on Signal Processing. J. Stepien, T.P. Zielinski, R. Rumian, ”Image Denoising Using Adaptive Lifting Schemes”, IEEE Conf. on Image Processing, Vancouver 2000.

[2]

[3]

[4]

5 CONCLUSIONS

[5]

Proposed in the paper algebraic method for update filter calculation is easy but at the same time versatile and universal. Different linear lifting schemes can be designed with its help and switched adaptively according to time(space)-varying features of analyzed signals. It has been already applied with success to image denoising.

[6]

[7]

[8]

.0 0

.0 0

.0 0

.0 0

.5 0

.5 0

.5 0

.5 0

.0 0

.0 0

.0 0

.0 0

.5 0

.5 0

.5 0

.5 0

.0 0

.0 0

.0 0

.0 0

0.0 0.1 0 .2 0.3 0 .4 0.5

0.0 0.1 0 .2 0.3 0 .4 0.5

0.0 0.1 0 .2 0.3 0 .4 0.5

0.0 0.1 0 .2 0.3 0 .4 0.5

H( f )

G( f )

~ G( f )

~ H( f ) 0.0 03 0.0 02 0 .0 0 1

0.0 0 8

1 .2

0.0 0 6

1.0

0.00 4

0 .8

0.4

0 .00 2

0 .6

0 .2

0.4

0 .0 0 0

0 .0

0.2

0.00 2

0.0 00

0.6

-0 .2

0 .0

-0 .00 4 0.0 01

-0 .2 0

40 0 0

~ (t ) ϕ

8 00 0

0

2 0 00

4 0 00

ø~ (t )

-0 .4 0

1000

ϕ(t )

2 0 00

0

2 0 00

4 0 00

ø(t )

Fig. 1 Exemplary ”predict first” (M=2, N=8) lifting system: frequency responses of corresponding wavelet transform filters as ~ (t ) , ø (t ) ). ~ (t ) , ϕ(t ) ) and wavelets ( ø well as the scaling functions ( ϕ ~ ~ ~(t ), ø ~ (t ) , synthesis: H ( f ), G ( f ), ϕ(t ), ø (t ) ) (analysis: H ( f ), G( f ), ϕ

Table 1. Lifting scheme as a classical wavelet transform ANALYSIS - direct transform x(n)

¯2 z

x e(n)

xe(n) c(n)

-1

-U(z)

z

P(z)

-1

x(n) d(n) x o(n)

x(n)

2

-P(z )

­2

d(n) x o(n)

¯2

z

­2

c(n)

U(z)

-P(z)

¯2

SYNTHESIS - inverse transform

c(n)

­2

c(n)

z

2

2

U(z )

¯2

d(n)

d(n)

x(n)

2

-U(z )

-1

-1

P(z )

­2

~ H( z)

¯2

c(n)

c(n)

­2

H( z)

~ G( z)

¯2

d(n)

d(n)

­2

G( z)

x(n)

x(n)

Equations

Equations

d (n ) = xo (n ) − P (xe (n )), c (n ) = xe (n ) + U (d (n ))

xe (n ) = c (n ) − U (d (n )), xo (n ) = d (n ) + P (xe (n ))

0  X e ( z )   C ( z )  1 U ( z )   1  D ( z )  = 0   1   − P( z ) 1  X o ( z )   

0 1 − U ( z )  C ( z )   X e ( z )  1  X ( z )  =  P ( z ) 1  0 1   D ( z )   o  

 C ( z )  1 − P( z )U ( z ) U ( z )  X e ( z )   D ( z ) =  − P ( z ) 1   X o ( z )    ~ ~  C ( z )   H e ( z ) H o ( z )  X e ( z )  ~  X e ( z )  =  ~  = E ( z )  X ( z )  D( z )  ~    Ge ( z ) Go ( z )   X o ( z )  o 

− U( z) C( z)  X e ( z)  1  X ( z) = P( z) 1 − P( z)U( z)D( z)    o  

H~ ( z ) = H~ e (z 2 )+ z −1H~ o (z 2 ) = 1 − P(z 2 )U (z 2 )+ z −1U (z 2 )

( )

( )

( )

 X e ( z )   H e ( z ) Ge ( z )   C ( z )  C ( z )   X ( z )  =  H ( z ) G ( z )   D ( z )  = R( z )  D ( z )  o  o   o    

( ) ( ) ( ) −1 2 2 2 G (z )+ G (z ) = − z U (z )+ − P(z 2 )U (z 2 )

H (z ) = z −1 H e z 2 + H o z 2 = z −1 + P z 2

~ ~ ~ G ( z ) = Ge z 2 + z −1Go z 2 = − P z 2 + z −1

G(z ) = z

”Update First” (by analogy)

”Update First” (by analogy)

( ) ( ) ( ) −1 2 2 2 = G (z )+ z G (z ) = − P (z )+ z −1 ( − P (z 2 )U (z 2 ))

~ ~ ~ H ( z ) = H e z 2 + z −1H o z 2 = 1 + z −1U z 2

G( z) ~

~

e

~

o

1

−1

e

1

o

H (z ) = z −1H e (z 2 )+ H o (z 2 ) = z −1 (1 − P(z 2 )U (z 2 ))+ P(z 2 )

( ) ( )

( )

G (z ) = z −1Ge z 2 + Go z 2 = − z −1U z 2 + 1

Fulfillment of perfect reconstruction condition − U ( z )  1 − P ( z )U ( z ) U ( z ) 1 0  1 ~ = R(z )E (z ) =  ( ) 1 1  0 1 − P z P ( z )U ( z )  − P ( z ) 

and

[H ( z )

~  H ( z ) G ( z )] ~  = 2 z −1  G( z) 