Top Banner
ENEE631 Digital Image Processing (Spring'04) Wavelet Based Image Coding Wavelet Based Image Coding Spring ’04 Instructor: Min Wu ECE Department, Univ. of Maryland, College Park www.ajconline.umd.edu (select ENEE631 S’04) [email protected] Based on ENEE631 Based on ENEE631 Spring’04 Spring’04 Section 11 Section 11
30

ENEE631 Digital Image Processing (Spring'04) Wavelet Based Image Coding Spring ’04 Instructor: Min Wu ECE Department, Univ. of Maryland, College Park

Dec 20, 2015

Download

Documents

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: ENEE631 Digital Image Processing (Spring'04) Wavelet Based Image Coding Spring ’04 Instructor: Min Wu ECE Department, Univ. of Maryland, College Park

ENEE631 Digital Image Processing (Spring'04)

Wavelet Based Image CodingWavelet Based Image Coding

Spring ’04 Instructor: Min Wu

ECE Department, Univ. of Maryland, College Park

www.ajconline.umd.edu (select ENEE631 S’04) [email protected]

Based on ENEE631 Based on ENEE631 Spring’04Spring’04Section 11Section 11

Page 2: ENEE631 Digital Image Processing (Spring'04) Wavelet Based Image Coding Spring ’04 Instructor: Min Wu ECE Department, Univ. of Maryland, College Park

ENEE631 Digital Image Processing (Spring'04) Lec14 – Wavelet Coding [3]

Wavelet Transform for Image CompressionWavelet Transform for Image Compression

ENEE631 emphasis– Focus on conceptual aspects related to image compression– Wavelet is also useful for denoising, enhancement, and image

analysis– Build upon filterbank and subband coding from ENEE630

(For more in-depth info. on wavelet: wavelet course offered in Math Dept.)

K-level 1-D wavelet/subband decomposition– Successive lowpass/highpass filtering and downsampling

on different level: capture transitions of different frequency bands

on the same level: capture transitions at different locations

UM

CP

EN

EE

63

1 S

lide

s (c

rea

ted

by

M.W

u ©

20

01

/20

04

)

Page 3: ENEE631 Digital Image Processing (Spring'04) Wavelet Based Image Coding Spring ’04 Instructor: Min Wu ECE Department, Univ. of Maryland, College Park

ENEE631 Digital Image Processing (Spring'04) Lec14 – Wavelet Coding [4]

Successive Wavelet/Subband DecompositionSuccessive Wavelet/Subband Decomposition

Successive lowpass/highpass filtering and downsampling on different level: capture transitions of different frequency bands on the same level: capture transitions at different locations

Figure from Matlab Wavelet Toolbox Documentation

UM

CP

EN

EE

63

1 S

lide

s (c

rea

ted

by

M.W

u ©

20

01

/20

04

)

Page 4: ENEE631 Digital Image Processing (Spring'04) Wavelet Based Image Coding Spring ’04 Instructor: Min Wu ECE Department, Univ. of Maryland, College Park

ENEE631 Digital Image Processing (Spring'04) Lec14 – Wavelet Coding [5]

Examples of 1-D Wavelet TransformExamples of 1-D Wavelet Transform

From Matlab Wavelet Toolbox Documentation

UM

CP

EN

EE

63

1 S

lide

s (c

rea

ted

by

M.W

u ©

20

01

)

Page 5: ENEE631 Digital Image Processing (Spring'04) Wavelet Based Image Coding Spring ’04 Instructor: Min Wu ECE Department, Univ. of Maryland, College Park

ENEE631 Digital Image Processing (Spring'04) Lec14 – Wavelet Coding [7]

UM

CP

EN

EE

63

1 S

lide

s (c

rea

ted

by

M.W

u ©

20

04

)

2-D Example2-D Example

From Usevitch (IEEE Sig.Proc. Mag. 9/01)

Page 6: ENEE631 Digital Image Processing (Spring'04) Wavelet Based Image Coding Spring ’04 Instructor: Min Wu ECE Department, Univ. of Maryland, College Park

ENEE631 Digital Image Processing (Spring'04) Lec14 – Wavelet Coding [8]

Subband Coding TechniquesSubband Coding Techniques

General coding approach – Allocate different bits for coeff. in different frequency bands– Encode different bands separately– Example: DCT-based JPEG and early wavelet coding

Some difference between subband coding and early wavelet coding ~ Choices of filters– Subband filters aims at (approx.) non-overlapping freq. response

– Wavelet filters has interpretations in terms of basis and typically designed for certain smoothness constraints

(=> will discuss more )

Shortcomings of subband coding– Difficult to determine optimal bit allocation for low bit rate applications– Not easy to accommodate different bit rates with a single code stream– Difficult to encode at an exact target rate

UM

CP

EN

EE

63

1 S

lide

s (c

rea

ted

by

M.W

u ©

20

01

)

Page 7: ENEE631 Digital Image Processing (Spring'04) Wavelet Based Image Coding Spring ’04 Instructor: Min Wu ECE Department, Univ. of Maryland, College Park

ENEE631 Digital Image Processing (Spring'04) Lec14 – Wavelet Coding [9]

Review: Filterbank & Multiresolution AnalysisReview: Filterbank & Multiresolution Analysis

UM

CP

EN

EE

63

1 S

lide

s (c

rea

ted

by

M.W

u ©

20

04

)

Page 8: ENEE631 Digital Image Processing (Spring'04) Wavelet Based Image Coding Spring ’04 Instructor: Min Wu ECE Department, Univ. of Maryland, College Park

ENEE631 Digital Image Processing (Spring'04) Lec14 – Wavelet Coding [10]

UM

CP

EN

EE

63

1 S

lide

s (c

rea

ted

by

M.W

u ©

20

04

)

Smoothness Conditions on Wavelet FilterSmoothness Conditions on Wavelet Filter

– Ensure the low band coefficients obtained by recursive filtering can provide a smooth approximation of the original signal

From M. Vetterli’s wavelet/filter-bank paper

Page 9: ENEE631 Digital Image Processing (Spring'04) Wavelet Based Image Coding Spring ’04 Instructor: Min Wu ECE Department, Univ. of Maryland, College Park

ENEE631 Digital Image Processing (Spring'04) Lec14 – Wavelet Coding [11]

Embedded Zero-Tree Wavelet Coding (EZW)Embedded Zero-Tree Wavelet Coding (EZW)

“Modern” lossy wavelet coding exploits multi-resolution and self-similar nature of wavelet decomposition

– Energy is compacted into a small number of coeff.– Significant coeff. tend to cluster at the same spatial location in

each frequency subband

Two set of info. to code:

– Where are the significant coefficients?

– What values are the significant coefficients?

From Usevitch (IEEE Sig.Proc. Mag. 9/01)

UM

CP

EN

EE

63

1 S

lide

s (c

rea

ted

by

M.W

u ©

20

01

)

Page 10: ENEE631 Digital Image Processing (Spring'04) Wavelet Based Image Coding Spring ’04 Instructor: Min Wu ECE Department, Univ. of Maryland, College Park

ENEE631 Digital Image Processing (Spring'04) Lec14 – Wavelet Coding [12]

Key Concepts in EZW Key Concepts in EZW Parent-children relation among coeff.

– Each parent coeff at level k spatially correlates with 4 coeff at level (k-1) of same orientation

– A coeff at lowest band correlates with 3 coeff. Coding significance map via zero-tree

– Encode only high energy coefficients Need to send location info.

large overhead– Encode “insignificance map” w/ zero-trees

Successive approximation quantization

– Send most-significant-bits first and gradually refine coeff. value

– “Embedded” nature of coded bit-stream get higher fidelity image by adding

extra refining bitsFrom Usevitch (IEEE Sig.Proc. Mag. 9/01)

UM

CP

EN

EE

63

1 S

lide

s (c

rea

ted

by

M.W

u ©

20

01

)

Page 11: ENEE631 Digital Image Processing (Spring'04) Wavelet Based Image Coding Spring ’04 Instructor: Min Wu ECE Department, Univ. of Maryland, College Park

ENEE631 Digital Image Processing (Spring'04) Lec14 – Wavelet Coding [13]

EZW Algorithm and ExampleEZW Algorithm and Example Initial threshold ~ 2 ^ floor(log2 xmax)

– Put all coeff. in dominant list Dominant Pass (“zig-zag” across bands)

– Assign symbol to each coeff. and entropy encode symbols

ps – positive significance ns – negative significance iz – isolated zero ztr – zero-tree root

– Significant coeff. move to subordinate list put zero in dominant list

Subordinate Pass– Output one bit for subordinate list

According to position in up/low half of quantization interval

Repeat with half threshold– Until bit budget achieved

From Usevitch (IEEE Sig.Proc. Mag. 9/01)

UM

CP

EN

EE

63

1 S

lide

s (c

rea

ted

by

M.W

u ©

20

01

)

Page 12: ENEE631 Digital Image Processing (Spring'04) Wavelet Based Image Coding Spring ’04 Instructor: Min Wu ECE Department, Univ. of Maryland, College Park

ENEE631 Digital Image Processing (Spring'04) Lec14 – Wavelet Coding [14]

After 1After 1stst Pass PassFrom Usevitch (IEEE Sig.Proc. Mag. 9/01)

UM

CP

EN

EE

63

1 S

lide

s (c

rea

ted

by

M.W

u ©

20

01

)

Page 13: ENEE631 Digital Image Processing (Spring'04) Wavelet Based Image Coding Spring ’04 Instructor: Min Wu ECE Department, Univ. of Maryland, College Park

ENEE631 Digital Image Processing (Spring'04) Lec14 – Wavelet Coding [15]

After 2After 2ndnd Pass Pass

From Usevitch (IEEE Sig.Proc. Mag. 9/01)

UM

CP

EN

EE

63

1 S

lide

s (c

rea

ted

by

M.W

u ©

20

01

)

Page 14: ENEE631 Digital Image Processing (Spring'04) Wavelet Based Image Coding Spring ’04 Instructor: Min Wu ECE Department, Univ. of Maryland, College Park

ENEE631 Digital Image Processing (Spring'04) Lec14 – Wavelet Coding [16]

Beyond EZWBeyond EZW

Cons of EZW– Poor error resilience– Difficult for selective spatial decoding

SPIHT (Set Partitioning in Hierarchal Trees)– Further improvement over EZW to remove redundancy

EBCOT (Embedded Block Coding with Optimal Truncation)

– Used in JPEG 2000– Address the shortcomings of EZW (random access, error resilience, …)– Embedded wavelet coding in each block + bit-allocations among blocks

UM

CP

EN

EE

63

1 S

lide

s (c

rea

ted

by

M.W

u ©

20

01

/20

04

)

Page 15: ENEE631 Digital Image Processing (Spring'04) Wavelet Based Image Coding Spring ’04 Instructor: Min Wu ECE Department, Univ. of Maryland, College Park

ENEE631 Digital Image Processing (Spring'04) Lec14 – Wavelet Coding [17]

JPEG 2000 Image Compression StandardJPEG 2000 Image Compression Standard

UM

CP

EN

EE

63

1 S

lide

s (c

rea

ted

by

M.W

u ©

20

04

)

Page 16: ENEE631 Digital Image Processing (Spring'04) Wavelet Based Image Coding Spring ’04 Instructor: Min Wu ECE Department, Univ. of Maryland, College Park

ENEE631 Digital Image Processing (Spring'04) Lec14 – Wavelet Coding [18]

From Christopoulos (IEEE Trans. on CE 11/00)

UM

CP

EN

EE

63

1 S

lide

s (c

rea

ted

by

M.W

u ©

20

01

)

Page 17: ENEE631 Digital Image Processing (Spring'04) Wavelet Based Image Coding Spring ’04 Instructor: Min Wu ECE Department, Univ. of Maryland, College Park

ENEE631 Digital Image Processing (Spring'04) Lec14 – Wavelet Coding [19]

JPEG 2000: A Wavelet-Based New StandardJPEG 2000: A Wavelet-Based New Standard

Targets and features

– Excellent low bit rate performance without sacrifice performance at higher bit rate

– Progressive decoding to allow from lossy to lossless– Region-of-interest (ROI) coding– Error resilience

For details

– David Taubman: “High Performance Scalable Image Compression with EBCOT”, IEEE Trans. On Image Proc, vol.9(7), 7/2000.

– JPEG2000 Tutorial by Skrodras @ IEEE Sig. Proc Magazine 9/2001 – Taubman’s book on JPEG 2000 (on library reserve)– Links and tutorials @ http://www.jpeg.org/JPEG2000.htm

UM

CP

EN

EE

63

1 S

lide

s (c

rea

ted

by

M.W

u ©

20

01

/20

04

)

Page 18: ENEE631 Digital Image Processing (Spring'04) Wavelet Based Image Coding Spring ’04 Instructor: Min Wu ECE Department, Univ. of Maryland, College Park

ENEE631 Digital Image Processing (Spring'04) Lec14 – Wavelet Coding [20]

ExamplesExamples

JPEG2KJPEG2K vs. vs. JPEGJPEG

From Christopoulos (IEEE Trans. on CE 11/00)

UM

CP

EN

EE

63

1 S

lide

s (c

rea

ted

by

M.W

u ©

20

01

)

Page 19: ENEE631 Digital Image Processing (Spring'04) Wavelet Based Image Coding Spring ’04 Instructor: Min Wu ECE Department, Univ. of Maryland, College Park

ENEE631 Digital Image Processing (Spring'04) Lec14 – Wavelet Coding [21]

DCT vs. Wavelet: Which is Better?DCT vs. Wavelet: Which is Better?

3dB improvement?– Wavelet compression was claimed to have 3dB improvement over

DCT-based compression– Comparison is done on JPEG Baseline

Improvement not all due to transforms– Main contribution from better rate allocation, advanced entropy

coding, & smarter redundancy reduction via zero-tree– DCT coder can be improved to decrease the gap

[Ref] "A comparative study of DCT- and wavelet-based image coding",   Z. Xiong, K. Ramchandran, M. Orchard, Y-Q. Zhang,   IEEE Trans. on Circuits and Systems for Video Tech.,   v.9, no.5, 8/99, pp692-695.

UM

CP

EN

EE

63

1 S

lide

s (c

rea

ted

by

M.W

u ©

20

01

)

Page 20: ENEE631 Digital Image Processing (Spring'04) Wavelet Based Image Coding Spring ’04 Instructor: Min Wu ECE Department, Univ. of Maryland, College Park

ENEE631 Digital Image Processing (Spring'04) Lec14 – Wavelet Coding [22]

A Close Look at Wavelet TransformA Close Look at Wavelet Transform

UM

CP

EN

EE

63

1 S

lide

s (c

rea

ted

by

M.W

u ©

20

04

)

Page 21: ENEE631 Digital Image Processing (Spring'04) Wavelet Based Image Coding Spring ’04 Instructor: Min Wu ECE Department, Univ. of Maryland, College Park

ENEE631 Digital Image Processing (Spring'04) Lec14 – Wavelet Coding [23]

Construction of Haar functionsConstruction of Haar functions

Unique decomposition of integer k (p, q)– k = 0, …, N-1 with N = 2n, 0 <= p <= n-1– q = 0, 1 (for p=0); 1 <= q <= 2p (for p>0)

e.g., k=0 k=1 k=2 k=3 k=4 … (0,0) (0,1) (1,1) (1,2) (2,1) …

hk(x) = h p,q(x) for x [0,1]

k = 2p + q – 1“reminder”

power of 2

]1,0[other for 0

22for 2

1

22

1for 2

1

)()(

]1,0[for 1

)()(

21

2/

21

2/

,

0,00

x

qx

q-

N

q-x

q-

N

xhxh

xN

xhxh

ppp

ppp

qpk

1

x

UM

CP

EN

EE

63

1 S

lide

s (c

rea

ted

by

M.W

u ©

20

01

/20

04

)

Page 22: ENEE631 Digital Image Processing (Spring'04) Wavelet Based Image Coding Spring ’04 Instructor: Min Wu ECE Department, Univ. of Maryland, College Park

ENEE631 Digital Image Processing (Spring'04) Lec14 – Wavelet Coding [24]

Haar TransformHaar Transform

Haar transform H

– Sample hk(x) at {m/N} m = 0, …, N-1

– Real and orthogonal– Transition at each scale p is

localized according to q

Basis images of 2-D (separable) Haar transform– Outer product of two basis vectors

2200

0022

0000

0000

0000

0000

2 2 00

0 0 2 22222

0000

1111

1111

0000

2222

1111

1111

8

1

UM

CP

EN

EE

63

1 S

lide

s (c

rea

ted

by

M.W

u ©

20

01

)

Page 23: ENEE631 Digital Image Processing (Spring'04) Wavelet Based Image Coding Spring ’04 Instructor: Min Wu ECE Department, Univ. of Maryland, College Park

ENEE631 Digital Image Processing (Spring'04) Lec14 – Wavelet Coding [25]

Compare Basis Images of DCT and HaarCompare Basis Images of DCT and Haar

See also: Jain’s Fig.5.2 pp136UMCP ENEE631 Slides (created by M.Wu © 2001)

Page 24: ENEE631 Digital Image Processing (Spring'04) Wavelet Based Image Coding Spring ’04 Instructor: Min Wu ECE Department, Univ. of Maryland, College Park

ENEE631 Digital Image Processing (Spring'04) Lec14 – Wavelet Coding [26]

Summary on Haar TransformSummary on Haar Transform Two major sub-operations

– Scaling captures info. at different frequencies– Translation captures info. at different locations

Can be represented by filtering and downsampling

Relatively poor energy compaction

1

x

UM

CP

EN

EE

63

1 S

lide

s (c

rea

ted

by

M.W

u ©

20

01

)

Page 25: ENEE631 Digital Image Processing (Spring'04) Wavelet Based Image Coding Spring ’04 Instructor: Min Wu ECE Department, Univ. of Maryland, College Park

ENEE631 Digital Image Processing (Spring'04) Lec14 – Wavelet Coding [27]

Orthonormal FiltersOrthonormal Filters

Equiv. to projecting input signal to orthonormal basis

Energy preservation property– Convenient for quantizer design

MSE by transform domain quantizer is same as reconstruction MSE

Shortcomings: “coefficient expansion”– Linear filtering with N-element input & M-element filter

(N+M-1)-element output (N+M)/2 after downsample

– Length of output per stage grows ~ undesirable for compression

Solutions to coefficient expansion– Symmetrically extended input (circular convolution) &

Symmetric filter

UM

CP

EN

EE

63

1 S

lide

s (c

rea

ted

by

M.W

u ©

20

01

)

Page 26: ENEE631 Digital Image Processing (Spring'04) Wavelet Based Image Coding Spring ’04 Instructor: Min Wu ECE Department, Univ. of Maryland, College Park

ENEE631 Digital Image Processing (Spring'04) Lec14 – Wavelet Coding [28]

Solutions to Coefficient ExpansionSolutions to Coefficient Expansion Circular convolution in place of linear convolution

– Periodic extension of input signal– Problem: artifacts by large discontinuity at borders

Symmetric extension of input– Reduce border artifacts (note the signal length doubled with symmetry)– Problem: output at each stage may not be symmetric From Usevitch (IEEE

Sig.Proc. Mag. 9/01)

UM

CP

EN

EE

63

1 S

lide

s (c

rea

ted

by

M.W

u ©

20

01

)

Page 27: ENEE631 Digital Image Processing (Spring'04) Wavelet Based Image Coding Spring ’04 Instructor: Min Wu ECE Department, Univ. of Maryland, College Park

ENEE631 Digital Image Processing (Spring'04) Lec14 – Wavelet Coding [29]

Solutions to Coefficient Expansion (cont’d)Solutions to Coefficient Expansion (cont’d)

Symmetric extension + symmetric filters

– No coefficient expansion and little artifacts– Symmetric filter (or asymmetric filter) => “linear phase filters”

(no phase distortion except by delays)

Problem

– Only one set of linear phase filters for real FIR orthogonal wavelets Haar filters: (1, 1) & (1,-1) do not give good energy compaction

UM

CP

EN

EE

63

1 S

lide

s (c

rea

ted

by

M.W

u ©

20

01

)

Page 28: ENEE631 Digital Image Processing (Spring'04) Wavelet Based Image Coding Spring ’04 Instructor: Min Wu ECE Department, Univ. of Maryland, College Park

ENEE631 Digital Image Processing (Spring'04) Lec14 – Wavelet Coding [30]

Biorthogonal WaveletsBiorthogonal Wavelets “Biorthogonal”

– Basis in forward and inverse transf.are not the same but give overall perfect reconstruction (PR)

recall EE624 PR filterbank– No strict orthogonality for transf.

filters so energy is not preserved But could be close to orthogonal

filters’ performance

Advantage– Covers a much broader class of filters

including symmetric filters that eliminate coefficient expansion

Commonly used filters for compression– 9/7 biorthogonal symmetric filter– Efficient implementation: Lifting (see Swelden’s tuotial)

UM

CP

EN

EE

63

1 S

lide

s (c

rea

ted

by

M.W

u ©

20

01

)From Usevitch (IEEE Sig.Proc. Mag. 9/01)

Page 29: ENEE631 Digital Image Processing (Spring'04) Wavelet Based Image Coding Spring ’04 Instructor: Min Wu ECE Department, Univ. of Maryland, College Park

ENEE631 Digital Image Processing (Spring'04) Lec14 – Wavelet Coding [35]

Summary of Compression ToolsSummary of Compression Tools

Lossless compression tools– Entropy coding

Huffman, Arithmetic, Lempel-Ziv run-length

– Predictive coding reduce the dynamic range to code

– Transform enhance energy compaction

Lossy compression tools– Discarding and thresholding– Quantization

( previous lectures ) Scalar quantizer Quantize more than one component => vector quantization

Page 30: ENEE631 Digital Image Processing (Spring'04) Wavelet Based Image Coding Spring ’04 Instructor: Min Wu ECE Department, Univ. of Maryland, College Park

ENEE631 Digital Image Processing (Spring'04) Lec14 – Wavelet Coding [40]

Question for Today: Bring in Motion Question for Today: Bring in Motion Video Video

Capturing video

– Frame by frame => image sequence– Image sequence: A 3-D signal

2 spatial dimensions & time dimension continuous I( x, y, t ) => discrete I( m, n, tk )

Encode digital video

– Simplest way ~ compress each frame image individually e.g., “motion-JPEG” only spatial redundancy is explored and reduced

– How about temporal redundancy? Will differential coding work well? U

MC

P E

NE

E4

08

G S

lide

s (c

rea

ted

by

M.W

u &

R.L

iu ©

20

02

)