subband and wavelet coding

37
Bernd Girod: EE398A Image and Video Compression Subband and Wavelet Coding no. 1 Subband and wavelet coding Vector convolution, convolutional transforms Filter banks vs. vector space interpretation Orthogonal and biorthogonal subband transforms DCT as a filter bank Lapped Orthogonal Transform (LOT) Discrete Wavelet Transform (DWT) Quadrature mirror filters and conjugate quadrature filters Lifting implementation/design of the DWT Embedded zero-tree coding of wavelet coefficients

Upload: ngominh

Post on 06-Feb-2017

222 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Subband and Wavelet Coding

Bernd Girod: EE398A Image and Video Compression Subband and Wavelet Coding no. 1

Subband and wavelet coding

Vector convolution, convolutional transforms

Filter banks vs. vector space interpretation

Orthogonal and biorthogonal subband transforms

DCT as a filter bank

Lapped Orthogonal Transform (LOT)

Discrete Wavelet Transform (DWT)

Quadrature mirror filters and conjugate quadrature filters

Lifting implementation/design of the DWT

Embedded zero-tree coding of wavelet coefficients

Page 2: Subband and Wavelet Coding

Bernd Girod: EE398A Image and Video Compression Subband and Wavelet Coding no. 2

Subband coding: motivation

Coding with block-wise transform introduces visible

blocking artifacts, as bit-rate decreases.

Can we, somehow, overlap adjacent blocks,

thereby smoothing block boundaries,

but without increasing the number of transform

coefficients?

Solution: subband transform.

Page 3: Subband and Wavelet Coding

Bernd Girod: EE398A Image and Video Compression Subband and Wavelet Coding no. 3

+

Vector convolution

+

1A 1A

y k

x k

m

m

nx 1n x 2n x 1n x

ny 1n y 2n y 1n y

i

n A i n i

y x

0A

i

n S i n i

x y

Forward transform

Inverse transform

Page 4: Subband and Wavelet Coding

Bernd Girod: EE398A Image and Video Compression Subband and Wavelet Coding no. 4

Perfect reconstruction condition

Original domain

z-transform: “polyphase matrices”

Perfect reconstruction condition in the z-domain

Example, m=2

i i

S n i A i A n i S i I n

i

i

z A i z

H i

i

z S i z

G

1

z z z z I z z

G H H G G H

11 01

10 0000 01

10 11 00 11 01 10

H z H z

H z H zG z G z

G z G z H z H z H z H z

Page 5: Subband and Wavelet Coding

Bernd Girod: EE398A Image and Video Compression Subband and Wavelet Coding no. 5

Filter bank interpretation of convolutional transform

0h

Analysis filterbank

Synthesis filterbank

+

1h

1mh

m

m

m

m

m

m

0g

1g

1mg

x k x k 0y n

1y n

1my n

,

; 0 ,q q jh mi j A i j q m

,; 0 ,q j q

g mi j S i j q m

subband

signals

Page 6: Subband and Wavelet Coding

Bernd Girod: EE398A Image and Video Compression Subband and Wavelet Coding no. 6

Frequency domain perspective

0H 1H 2H

2

3

3

3

2

3

3 1G

Page 7: Subband and Wavelet Coding

Bernd Girod: EE398A Image and Video Compression Subband and Wavelet Coding no. 7

Vector space interpretation

Subband decomposition is the projection of the input onto a

set of “analysis vectors” in the Hilbert space of square

summable sequences

Consider signal in channel q

Synthesis filterbank is linear combination of synthesis

“basis vectors”

,

n

q q q q

k k

y n h k x mn k h mn k x k x a

“Analysis vector”

n denotes shift

1

0

1

0

m

q q

q n

mn

q q

q n

x k y n g k mn

y n

x s“Synthesis vector”

n denotes shift

Page 8: Subband and Wavelet Coding

Bernd Girod: EE398A Image and Video Compression Subband and Wavelet Coding no. 8

Orthonormal subband transforms

Orthonormal expansion

Analysis and synthesis vectors are identical!

0

, m

n n

q q

q n

x x s s

n n T

q q q qA i S i h k g k a s

Vector space Convolutional

transform Filter bank

Page 9: Subband and Wavelet Coding

Bernd Girod: EE398A Image and Video Compression Subband and Wavelet Coding no. 9

Biorthogonal transforms

Analysis vectors and synthesis vectors are not necessarily each

orthogonal, but each analysis vector must be orthogonal to all but

one synthesis vectors (and vice versa)

Equivalent to perfect reconstruction

Important for linear-phase FIR filters, since lapped orthogonal

transforms with linear phase do not exist.

1 2

1 2 1 2 1 2 1 2 1 2, , 0 , , ,n n

q q q q n n q q m n n s a

Page 10: Subband and Wavelet Coding

Bernd Girod: EE398A Image and Video Compression Subband and Wavelet Coding no. 10

Subbands vs. block-wise transform

Blockwise transforms are a special case of subband

decompositions with:

Number of bands m = order of transform N

Length of impulse responses of analysis/synthesis filters ≤ m

Filters used in subband coders are not in general

orthogonal.

Linear phase is desirable for images.

Page 11: Subband and Wavelet Coding

Bernd Girod: EE398A Image and Video Compression Subband and Wavelet Coding no. 11

Subbands vs. block-wise transform (cont.)

Page 12: Subband and Wavelet Coding

Bernd Girod: EE398A Image and Video Compression Subband and Wavelet Coding no. 12

0 /2 30

20

10

0

10

Frequency

Fre

quency

response [

dB

]

i = 4

0 /2 30

20

10

0

10

Frequency

Fre

quency

response [

dB

]

i = 5

0 /2 30

20

10

0

10

Frequency

Fre

quency

response [

dB

]

i = 6

0 /2 30

20

10

0

10

Frequency

Fre

quency

response [

dB

]

i = 7

Frequency response of a DCT of order N=8

0 30

20

10

0

10

/2

Frequency

Fre

qu

en

cy r

esp

on

se [d

B] i = 0

0 /2 30

20

10

0

10

Frequency

i = 1

0 /2 30

20

10

0

10

Frequency

Fre

quency

response [

dB

]

i = 2

0 /2 30

20

10

0

10

Frequency

Fre

quency

response [

dB

]

i = 3

/2

Frequency

Fre

qu

en

cy r

esp

on

se [d

B]

/2

Frequency

Fre

qu

en

cy r

esp

on

se [d

B]

/2

Frequency

Fre

qu

en

cy r

esp

on

se [d

B]

/2

Frequency

Fre

qu

en

cy r

esp

on

se [d

B]

/2

Frequency

Fre

qu

en

cy r

esp

on

se [d

B]

/2

Frequency

Fre

qu

en

cy r

esp

on

se [d

B]

/2

Frequency

Fre

qu

en

cy r

esp

on

se [d

B]

/2

Frequency

Fre

qu

en

cy r

esp

on

se [d

B]

Page 13: Subband and Wavelet Coding

Bernd Girod: EE398A Image and Video Compression Subband and Wavelet Coding no. 13

Lapped Orthogonal Transform

Orthonormal convolutional transform with perfect reconstruction

Lapped orthogonal transform (LOT): only A[0] and A[1] non-zero,

hence

TA i S i T

i

A i A n i I n

0 00 0 1 1

1 1

T

T TA A

A A A A IA A

0 1 0TA A

Page 14: Subband and Wavelet Coding

Bernd Girod: EE398A Image and Video Compression Subband and Wavelet Coding no. 14

Example LOT basis functions, m=8

[G. Levinsky, EE392C class project, 1997]

Page 15: Subband and Wavelet Coding

Bernd Girod: EE398A Image and Video Compression Subband and Wavelet Coding no. 15

LOT vs. DCT coding

LOT quantizer step size 70

entropy 0.426 bpp

DCT quantizer step size 70

entropy 0.453 bpp

[G. Levinsky, EE392C class project, 1997]

Page 16: Subband and Wavelet Coding

Bernd Girod: EE398A Image and Video Compression Subband and Wavelet Coding no. 16

Discrete Wavelet Transform

Recursive application of a two-band filter bank to the

lowpass band of the previous stage yields octave band

splitting:

Same concept can be derived from wavelet theory:

Discrete Wavelet Transform (DWT)

frequency

Page 17: Subband and Wavelet Coding

Bernd Girod: EE398A Image and Video Compression Subband and Wavelet Coding no. 17

Cascaded analysis / synthesis filterbanks

Page 18: Subband and Wavelet Coding

Bernd Girod: EE398A Image and Video Compression Subband and Wavelet Coding no. 18

2-d Discrete Wavelet Transform

Page 19: Subband and Wavelet Coding

Bernd Girod: EE398A Image and Video Compression Subband and Wavelet Coding no. 19

2-d Discrete Wavelet Transform example

Page 20: Subband and Wavelet Coding

Bernd Girod: EE398A Image and Video Compression Subband and Wavelet Coding no. 20

2-d Discrete Wavelet Transform example

Page 21: Subband and Wavelet Coding

Bernd Girod: EE398A Image and Video Compression Subband and Wavelet Coding no. 21

2-d Discrete Wavelet Transform example

Page 22: Subband and Wavelet Coding

Bernd Girod: EE398A Image and Video Compression Subband and Wavelet Coding no. 22

2-d Discrete Wavelet Transform example

Page 23: Subband and Wavelet Coding

Bernd Girod: EE398A Image and Video Compression Subband and Wavelet Coding no. 23

2-d Discrete Wavelet Transform example

Page 24: Subband and Wavelet Coding

Bernd Girod: EE398A Image and Video Compression Subband and Wavelet Coding no. 24

Two-channel filterbank

Aliasing cancellation if : 0 1

1 0

( ) ( )

( ) ( )

g z h z

g z h z

0 0 1 1

0 0 1 1

1ˆ( ) ( ) ( ) ( ) ( ) ( )

2

1( ) ( ) ( ) ( )

2

x z h z g z h z g z x z

h z g z h z g z x z

Aliasing

2 2

2 2

0h

1h

0g

1g

x z x̂ z∑

Page 25: Subband and Wavelet Coding

Bernd Girod: EE398A Image and Video Compression Subband and Wavelet Coding no. 25

Example: two-channel filter bank with perfect reconstruction

Impulse responses, analysis filters:

Lowpass Highpass

Impulse responses, synthesis filters

Lowpass Highpass

Mandatory in JPEG2000

Frequency responses:

1

2

0 0

frequency ω fr

equen

cy r

esponse

1 1 3 1 1, , , ,

4 2 2 2 4

1 1 1, ,

4 2 4

1 1 3 1 1, , , ,

4 2 2 2 4

1 1 1, ,

4 2 4

“Biorthogonal 5/3 filters”

“LeGall-Tabatabai filters” [LeGall, Tabatabai, 1988]

2

h0 ej

h1 ej

g1 ej

g0 ej

Page 26: Subband and Wavelet Coding

Bernd Girod: EE398A Image and Video Compression Subband and Wavelet Coding no. 26

Quadrature Mirror Filters (QMF)

QMFs achieve aliasing

cancellation by choosing

Highpass band is the mirror

image of the lowpass band

in the frequency domain

Need to design only one

prototype filter

1 0

1 0

( ) ( )

( ) ( )

h z h z

g z g z

Example:

16-tap QMF filterbank

[Croisier, Esteban, Galand, 1976]

Page 27: Subband and Wavelet Coding

Bernd Girod: EE398A Image and Video Compression Subband and Wavelet Coding no. 27

Conjugate quadrature filters

Achieve aliasing cancelation by

Impulse responses

Perfect reconstruction: find power complementary prototype filter

Orthonormal subband transform!

1

0 0

1 1

1 1

( ) ( )

( )

h z g z f z

h z g z zf z

[Smith, Barnwell, 1986]

Prototype filter

0 0

1

1 1 1 1k

h k g k f k

h k g k f k

2 2

2F F

Page 28: Subband and Wavelet Coding

Bernd Girod: EE398A Image and Video Compression Subband and Wavelet Coding no. 28

Lifting

Analysis filters

L “lifting steps”

First step can be interpreted as prediction of odd samples

from the even samples

K0

1 21L L

K1

even samples 2x n

odd samples

2 1x n

0low band y

1high band y

[Sweldens 1996]

Page 29: Subband and Wavelet Coding

Bernd Girod: EE398A Image and Video Compression Subband and Wavelet Coding no. 29

Lifting (cont.)

Synthesis filters

Perfect reconstruction (biorthogonality) is directly built into

lifting structure

Powerful for both implementation and filter/wavelet design

1 21L L

even samples 2x n

odd samples

2 1x n

0low band y

1high band y

1

0K

1

1K

-

-

-

-

Page 30: Subband and Wavelet Coding

Bernd Girod: EE398A Image and Video Compression Subband and Wavelet Coding no. 30

Example: lifting implementation of 5/3 filters

even samples 2x n

1

2

z

1 z1

4

1/2

odd samples

2 1x n

0low band y

1high band y

Verify by considering response to unit impulse in even and

odd input channel.

Page 31: Subband and Wavelet Coding

Bernd Girod: EE398A Image and Video Compression Subband and Wavelet Coding no. 31

Reversible subband transform

Observation: lifting operators can be nonlinear.

Incorporate the necessary rounding into lifting operator:

Used in JPEG2000 as part of 5/3 biorthogonal wavelet

transform

K0

1 21L L

K1

even samples 2x n

odd samples

2 1x n

0low band y

1high band y

Page 32: Subband and Wavelet Coding

Bernd Girod: EE398A Image and Video Compression Subband and Wavelet Coding no. 32

Wavelet compression results

Original

512x512

8bpp

0.074 bpp 0.048 bpp

Error

images

enlarged

[Gonzalez, Woods, 2001]

Page 33: Subband and Wavelet Coding

Bernd Girod: EE398A Image and Video Compression Subband and Wavelet Coding no. 33

Embedded zero-tree wavelet algorithm

X X X X

X X X X

X X X X

X X X X

X X

X X X

X

X X

X X

X X X X

X X X X

X X X X

X X X X

X

X X

X X

X X X X

X X X X

X X X X

X X X X

Idea: Conditional coding of all descendants (incl. children)

Coefficient magnitude > threshold: significant coefficients

Four cases

1. ZTR: zero-tree, coefficient and all descendants are not significant

2. IZ: coefficient is not significant, but some descendants are significant

3. POS: positive significant

4. NEG: negative significant

For the highest bands, ZTR and IZ symbols are merged into one symbol Z

„Parent“

„Children“

Page 34: Subband and Wavelet Coding

Bernd Girod: EE398A Image and Video Compression Subband and Wavelet Coding no. 34

Embedded zero-tree wavelet algorithm (cont.)

Successive approximation quantization and encoding Initial „dominant“ pass

• Set initial threshold θ, determine significant coefficients

• Arithmetic coding of symbols ZTR, IZ, POS, NEG

Subordinate pass • Refine magnitude of all coefficients found significant so far by one bit

(subdivide magnitude bin by two)

• Arithmetic coding of sequence of zeros and ones.

Repeat dominant pass • Omit previously found significant coefficients

• Decrease threshold θ by factor of 2, determine new significant coefficients

• Arithmetic coding of symbols ZTR, IZ, POS, NEG

Repeat subordinate and dominant passes, until bit budget is exhausted.

Page 35: Subband and Wavelet Coding

Bernd Girod: EE398A Image and Video Compression Subband and Wavelet Coding no. 35

Embedded zero-tree wavelet algorithm (cont.)

Decoding: bitstream can be truncated to yield a coarser

approximation: „embedded“ representation

Further details: J. M. Shapiro, „Embedded image coding using

zerotrees of wavelet coefficients,“ IEEE Transactions on Signal

Processing, vol. 41, no. 12, pp. 3445-3462, December 1993.

Enhancement SPIHT coder: A. Said, A., W. A. Pearlman, „A

new, fast, and efficient image codec based on set partitioning in

hierarchical trees,“ IEEE Transactions on Circuits and Systems

for Video Technology, vol. 63 , pp. 243-250, June 1996.

Page 36: Subband and Wavelet Coding

Bernd Girod: EE398A Image and Video Compression Subband and Wavelet Coding no. 36

Conclusions: subband and wavelet coding

Overlapping basis functions can reduce blocking artifacts

Biorthogonal subband transforms = perfect reconstruction

DCT can be understood as a (poor) filter bank

Discrete Wavelet Transform = cascaded dyadic subband splits

Quadrature mirror filters and conjugate quadrature filters: aliasing cancellation

Lifting: powerful for implementation and wavelet construction

Lifting allows reversible (i.e., lossless) wavelet transform

Zero-trees: exploit statistical dependencies across subbands

Page 37: Subband and Wavelet Coding

Bernd Girod: EE398A Image and Video Compression Subband and Wavelet Coding no. 37

Reading

Taubman, Marcellin, Sections 4.2, 6.1-6.4, 7

H. S. Malvar, D. H. Staelin, “The LOT: transform coding

without blocking effects,” IEEE Transactions on Acoustics,

Speech, and Signal Processing, vol. 37, no. 4, pp. 553-559,

April 1989.

D. Le Gall, A. Tabatabai, “Sub-band coding of digital

images using symmetric short kernel filters and arithmetic

coding techniques,” Proc. ICASSP-88, vol. 2, pp. 761-764,

April 1988.

J. M. Shapiro, “Embedded image coding using zerotrees of

wavelet coefficients,” IEEE Transactions on Signal

Processing,” vol. 41, no. 12, pp. 3445-3462, Dec. 1993.