You are on page 1of 7

ENEE631 Fall 2001 Lecture-9 Lecture-

Review of Last Time


"

Predictive coding Transform coding JPEG compression standard


Baseline block-DCT based algorithm
# #

Image Compression (3) Wavelet Coding & Vector Quantization


Min Wu
Electrical & Computer Engineering University of Maryland, College Park

" "

lossy part: quantization with different step size for each coeff. Band lossless part: differential coding, run-length coding, Huffman

" "

Binary image coding Today


Wavelet coding Brief introduction to Wavelet-based JPEG 2000 Brief introduction to Vector Quantization (VQ)
M. Wu: ENEE631 Digital Image Processing (Fall'01) Lec9 Wavelet Coding & VQ 10/2/01 [2]

! !

http://www.ece.umd.edu/class/enee631/ minwu@eng.umd.edu

M. Wu: ENEE631 Digital Image Processing (Fall'01)

Recall Haar Transform


"

Wavelet Transform for Image Compression


"

Two major sub-operations


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

ENEE631 emphasis
Conceptual aspects related to image compression Wavelet is also useful for denoising, enhancement, and image analysis For more info. on wavelet: ENEE624, wavelet math course, & other ref.

" "

Can be represented by filtering and downsampling Poor energy compaction of Haar transform
x 1

"

K-level 1-D wavelet 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

From Matlab Wavelet Toolbox Documentation M. Wu: ENEE631 Digital Image Processing (Fall'01) Lec9 Wavelet Coding & VQ 10/2/01 [3] M. Wu: ENEE631 Digital Image Processing (Fall'01) Lec9 Wavelet Coding & VQ 10/2/01 [4]

Examples of 1-D Wavelet Transform 1-

2-D Wavelet Transform via Separable Filters

From Matlab Wavelet Toolbox Documentation

From Matlab Wavelet Toolbox Documentation M. Wu: ENEE631 Digital Image Processing (Fall'01) Lec9 Wavelet Coding & VQ 10/2/01 [5] M. Wu: ENEE631 Digital Image Processing (Fall'01) Lec9 Wavelet Coding & VQ 10/2/01 [6]

Orthonormal Filters
" "

Solutions to Coefficient Expansion


"

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

Equiv. to projecting input signal to orthonormal basis Energy preservation property


Convenient for quantizer design
#

"

Symmetric extension of input


Reduce border artifacts Problem: output at each stage may not be symmetric
From Usevitch (IEEE Sig.Proc. Mag. 9/01)

MSE by transform domain quantizer is same as reconstruction MSE

"

Shortcomings: coefficient expansion


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

M. Wu: ENEE631 Digital Image Processing (Fall'01)

Lec9 Wavelet Coding & VQ 10/2/01 [7]

M. Wu: ENEE631 Digital Image Processing (Fall'01)

Lec9 Wavelet Coding & VQ 10/2/01 [8]

Solutions to Coefficient Expansion (contd)


"

Biorthogonal Wavelets
"

Symmetric extension + symmetric filters


No coefficient expansion and little artifacts Symmetric filter => linear phase filters (no phase distortion except by delays) Problem:
#

Biorthogonal
Some orthogonality between filters but not strict orthogonality Not preserving energy But could be close to orthogonal filters performance

"

Advantage
Covers a much broader class of filters
#

only one set of linear phase filters for real, FIR orthogonal wavelets $ Haar filters: (1, 1) & (1,-1)

including symmetric filters that eliminate coeff. expansion

"

Commonly used filters for compression


9/7 biorthogonal symmetric filter

M. Wu: ENEE631 Digital Image Processing (Fall'01)

Lec9 Wavelet Coding & VQ 10/2/01 [9]

M. Wu: ENEE631 Digital Image Processing (Fall'01)

Lec9 Wavelet Coding & VQ 10/2/01 [10]

Subband Coding Techniques


"

Embedded Zero-Tree Wavelet Coding (EZW) Zero"

General coding approach


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

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 freq. subband

"

Minor difference between subband coding and early wavelet coding ~ Choices of filters
Subband filters aims at (approx.) non-overlapping freq. response Wavelet filters typically designed for certain smoothness constraints

"

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
M. Wu: ENEE631 Digital Image Processing (Fall'01) Lec9 Wavelet Coding & VQ 10/2/01 [11] M. Wu: ENEE631 Digital Image Processing (Fall'01) From Usevitch (IEEE Sig.Proc. Mag. 9/01)

Lec9 Wavelet Coding & VQ 10/2/01 [12]

Two Key Concepts of EZW


"

EZW Algorithm and Example


"

Significance map coding via zero-Tree


Encode only high energy coefficients
#

Initial threshold ~ 2 ^ floor(log2 xmax)


Put all coeff. in dominant list

Need to send location info. $ large overhead

"

Dominant Pass (zig-zag across bands)


Assign symbol to each coeff. & entropy encode symbols
# # # #

Encode insignificance map using zero-trees


"

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

Successive approximation quantization


Send most-significant-bits first and gradually refine coeff. value Embedded nature of coded bit-stream
#

Significant coeff.
# #

move. to subordinate list put zero in dominant list

"

Subordinate Pass
Output one bit for subordinate list
#

get higher fidelity image by adding extra refining bits


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

According to position in up/low of quantization interval

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

"

Repeat with half threshold


Until bit budget achieved

M. Wu: ENEE631 Digital Image Processing (Fall'01)

Lec9 Wavelet Coding & VQ 10/2/01 [13]

M. Wu: ENEE631 Digital Image Processing (Fall'01)

Lec9 Wavelet Coding & VQ 10/2/01 [14]

After 1st Pass

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

After 2nd Pass

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

M. Wu: ENEE631 Digital Image Processing (Fall'01)

Lec9 Wavelet Coding & VQ 10/2/01 [15]

M. Wu: ENEE631 Digital Image Processing (Fall'01)

Lec9 Wavelet Coding & VQ 10/2/01 [16]

Beyond EZW
"

JPEG 2000: A Wavelet-Based New Standard Wavelet"

Cons of EZW
Poor error resilience Difficult for selective spatial decoding

Targets and features


Excellent low bit rate performance without sacrifice at higher bit rate Progressive decoding to allow from lossy to lossless Region-of-interest (ROI) coding Error resilience

"

Set Partitioning in Hierarchal Trees (SPIHT)


Further improvement over EZW

"

EBCOT
Used in JPEG 2000 Address the shortcomings of EZW

"

For details
Tutorial @ IEEE Trans. on consumer electronics 11/00 Links and tutorials @ http://www.jpeg.org/JPEG2000.htm

M. Wu: ENEE631 Digital Image Processing (Fall'01)

Lec9 Wavelet Coding & VQ 10/2/01 [17]

M. Wu: ENEE631 Digital Image Processing (Fall'01)

Lec9 Wavelet Coding & VQ 10/2/01 [18]

Examples JPEG2K vs. JPEG


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

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

M. Wu: ENEE631 Digital Image Processing (Fall'01)

Lec9 Wavelet Coding & VQ 10/2/01 [19]

M. Wu: ENEE631 Digital Image Processing (Fall'01)

Lec9 Wavelet Coding & VQ 10/2/01 [20]

DCT vs. Wavelet: Which is Better?


"

Summary of Compression Tools


"

3dB improvement?
Wavelet compression was claimed to have 3dB improvement over DCTbased compression Comparison is done on JPEG Baseline

Lossless compression tools


Entropy coding
# #

Huffman, Arithmetic, Lempel-Ziv run-length

Predictive coding
"

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 Transc. on Circuits and Systems for Video Tech., v.9, no.5, 8/99, pp692-695.

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

M. Wu: ENEE631 Digital Image Processing (Fall'01)

Lec9 Wavelet Coding & VQ 10/2/01 [21]

M. Wu: ENEE631 Digital Image Processing (Fall'01)

Lec9 Wavelet Coding & VQ 10/2/01 [22]

Vector Quantization
"

Outline of Core Parts in VQ


"

Encode a set of values together


Find the representative combinations Encode the indices of combinations

Design codebook
Optimization formulation is similar to MSE scalar quantizer Given a set of representative points
#

"

Stages
vector quantization of 2 elements

Nearest neighbor rule to determine partition boundaries

Codebook design Encoder Decoder


" "

Given a set of partition boundaries


#

Probability centroid rule to determine representative points that minimizes mean distortion in each cell

Scalar vs. Vector quantization


VQ allows flexible partition of coding cells VQ could naturally explore the correlation between elements SQ is simpler in implementation
From Boviks Handbook Sec.5.3 M. Wu: ENEE631 Digital Image Processing (Fall'01) Lec9 Wavelet Coding & VQ 10/2/01 [23]

Search for codeword at encoder


Tedious exhaustive search Design codebook with special structures to speed up encoding

scalar quantization of 2 elements

E.g., tree-structured VQ
vector quantization of 2 elements

M. Wu: ENEE631 Digital Image Processing (Fall'01)

Lec9 Wavelet Coding & VQ 10/2/01 [24]

Summary
"

Assignment
"

Required readings
[Wavelet coding]
# # #

Wavelet coding
Filters for wavelet transf. EZW

Usevitchs tutorial in IEEE Sig. Proc. Magazine 9/01 Xiongs paper on DCT vs. Wavelet on IEEE Trans. CSVT MATLAB 2-D Wavelet Demos

(Univ. Librarys E-journal)

[JPEG2000] Christopoluos tutorial in IEEE Trans. CE 11/00


#

"

Brief introduction
JPEG 2000 Vector quantization
"

http://etro.vub.ac.be/~chchrist/paper_ieee_ce_jpeg2000_Nov2000.pdf

[VQ] Boviks Handbook Sec.5.3

Recommended readings
www.jpeg.org Grays tutorial paper on VQ Boviks Handbook Sec.5.4

"

Next time
Review of image processing basics and image compression

"

Reminder
Project BB1 Due Thursday before class 1st in-class exam ~ Next Thursday 10/11/2001
M. Wu: ENEE631 Digital Image Processing (Fall'01) Lec9 Wavelet Coding & VQ 10/2/01 [26]

M. Wu: ENEE631 Digital Image Processing (Fall'01)

Lec9 Wavelet Coding & VQ 10/2/01 [25]

You might also like