Coding Binary Images Quantization - Lecture Slides | ECE 6258, Study notes of Digital Signal Processing

Material Type: Notes; Class: Digital Image Processing; Subject: Electrical & Computer Engr; University: Georgia Institute of Technology-Main Campus; Term: Fall 2003;

Typology: Study notes

Pre 2010

Uploaded on 08/05/2009

koofers-user-bxv
koofers-user-bxv 🇺🇸

10 documents

1 / 7

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
1
10/1/2003 ECE 6258 Russell M. Mersereau 1
ECE6258 Lecture 18
Coding Binary Images
Quantization
10/1/2003 ECE 6258 Russell M. Mersereau 2
Announcements
Problem Set #4 is posted on the web site.
Due: Friday, October 10, 2003
10/1/2003 ECE 6258 Russell M. Mersereau 3
Coding Binary Images
Binary images, such as printed documents contain,
on average many fewer than 1 bit/sample.
They are usually coded losslessly (within sampling
limits).
Markov models can be successfully applied.
Examples,
Group 3 and Group 4 fax standards
JBIG (Joint Binary Images Group) standard (ITU).
10/1/2003 ECE 6258 Russell M. Mersereau 4
Run-length coding
For sources that emit “runs” of identical symbols
(e.g. line art)
Replace a sequence {xn} by a shorter sequence of
symbol pairs {ak,rk} such that
Entropy coding of new symbol pairs {ak, rk}
For binary images, ak, can usually be omitted.
pf3
pf4
pf5

Partial preview of the text

Download Coding Binary Images Quantization - Lecture Slides | ECE 6258 and more Study notes Digital Signal Processing in PDF only on Docsity!

10/1/^

ECE 6258 Russell M. Mersereau

1

ECE6258 Lecture 18^ Coding Binary ImagesQuantization

10/1/^

ECE 6258 Russell M. Mersereau

Announcements „^ Problem Set #4 is posted on the web site. „^ Due: Friday, October 10, 2003

10/1/^

ECE 6258 Russell M. Mersereau

3

Coding Binary Images „^ Binary images, such as printed documents contain,on average many fewer than 1 bit/sample. „^ They are usually coded losslessly (within samplinglimits). „^ Markov models can be successfully applied. „^ Examples,^ ‰^ Group 3 and Group 4 fax standards^ ‰^ JBIG (Joint Binary Images Group) standard (ITU).

10/1/^

ECE 6258 Russell M. Mersereau

Run-length coding „^ For sources that emit “runs” of identical symbols(e.g. line art) „^ Replace a sequence {

x^ } by a shorter sequence of n symbol pairs {

a^ , r } such that kk „^ Entropy coding of new symbol pairs {

a ,^ r } kk

„^ For binary images,

a^ , can usually be omitted. k

10/1/^

ECE 6258 Russell M. Mersereau

5

„^ Markov model [Capon, 1959] „^ State probabilitiesPr{ k^ successive white pixels} = (1-

k -1^ p )p^ forWBWB^ k =1,2,3,…

Pr{ k^ successive black pixels} = (1-

k -1^ p )p^ forBW BW^ k =1,2,3,…

Statistical model for binary images of line art

B p WB W^ p BW

1- p BW

1- p WB

10/1/^

ECE 6258 Russell M. Mersereau Measured parameters for Capon model

0.9350.0650.0240.3470.215 bpp 0.8870.1130.0270.2140.241 bpp Pr{ W } Pr{ B }^ p WB^ p BW^ H (SS)

Printed Text Weather Map Document

[Kunt, 1974]

10/1/^

ECE 6258 Russell M. Mersereau

7

Facsimile compression standards „^ Standards by the ITU-T^ ‰^ T4 (Group 3)^ „^ Used by all fax machines over PSTN^ „^ 1-D modified Huffman code (MH) or 2-D MMR code^ ‰^ T6 (Group 4)^ „^ Fax over digital networks^ „^ Always uses 2-D MMR „^ Format^ ‰^ Horizontal resolution: 1728 pixels/line^ ‰^ Vertical resolution: 3.85 lines/mm (standard)

7.70 lines/mm (fine)

10/1/^

ECE 6258 Russell M. Mersereau Group 3 fax: modified Huffman code „^ Lengths of white pixels and black pixels encoded within ascan line „^ Each run represented aswhite runs:

r =64 x^ r w^ w/make-up

+^ r similar for black w/term^ „^ Two separate Huffman code tables for white and black runsbased on the statistics of 8 representative documents. „^ Shortest code words (2 bits) for black runs of length 2 and 3 „^ Shortest code words (4 bits) for white runs of lengths 2…7. „^ Special EOL codework for each line, 6x EOL as end of page.

10/1/^

ECE 6258 Russell M. Mersereau

13

Quantization „^ The output of the quantizer is a sequence ofsymbols that is fed to an entropy encoder. „^ If the pdf (probability density function) of

x [ n ]

is known, the probabilities of the quantizedvalues can be calculated.

Quantizer

10/1/^

ECE 6258 Russell M. Mersereau Quantization (cont’d) „^ If

t^ t^ i^ i+

10/1/^

ECE 6258 Russell M. Mersereau

15

Common pdf models for Images „^ Gaussian „^ Laplacian „^ Generalized Gaussian

10/1/^

ECE 6258 Russell M. Mersereau Quantization Intervals

„^ Interval boundaries-∞,^ x ,^ x^1

,^ x ,^ x ,^ ∞ 234 „^ Representationvalues^ y ,^ y ,^ y^123

,^ y ,^ y 4 5 Q [ r ]^ r xx^1 2^ x^3 y^5 y^4 x^4^ y^2^ y^1

10/1/^

ECE 6258 Russell M. Mersereau

17

Formalizing „^ An^ N -point scalar quantizer

Q^ is a mapping Q :^ R Æ C , where

R^ is the real line and C ={ y , y ,…,^12

y^ }^ ⊂^ R^ is the output set or N codebook

with size^

N.

„^ Associated with every

N -point quantizer is a partition of the real line

R^ into^ N^ cells or atoms. The

th^ i cell is given by R^ = { x^ ∈ R : i^

Q ( x )= y^ } = i

-1 Q ( y^ ) i

10/1/^

ECE 6258 Russell M. Mersereau Quantization Error „^ There are a number of measures of thedistortion introduced by a quantizer.^ ‰^ d ( x , y^ ) = | i

(^2) x - y | (^) i (squared error) ‰^ d ( x , y^ ) = | i x - y^ |^ i (absolute error) ‰^ d ( x , y^ ) = | i

m^ x - y | i th^ ( m power) „^ Mean-Squared Error

10/1/^

ECE 6258 Russell M. Mersereau

19

Quantizer Design „^ Design Problem #1Given^ p^ X

( x ),^ N , and distortion criterion, find {

y^ }, { x^ } to ii

minimize^ D. „ Design Problem #2Assume knowledge of interval can be encoded using

l^ bits. i^

Subject to^ R

R *, find { l^ }, { xi

}, { y },^ N^ that minimize ii

D.

10/1/^

ECE 6258 Russell M. Mersereau Uniform Quantizers „^ Regular quantizers „^ Partitions of same size „^ Reconstruction levels are midpoints ofintervals. „^ Implemented by most A/D converters „^ Uniform quantizers minimize the maximumerror

10/1/^

ECE 6258 Russell M. Mersereau The Lloyd algorithm 1.^ Begin with an initial codebook,

C. Set^ m^1

2.^ Given codebook

C^ , perform a Lloyd m iteration to generate an improved codebook C^. m +13. Compute the average distortion for

C^. If it m +

has changed by a small enough amountsince the last iteration, stop. Else

m +1Æ m

and go to Step 2.