Basic Compression Methods-Colors Pictures And Digital Image Processing-Lecture Slides, Slides of Digital Image Processing

Dr. Chittaranjan Verma delivered this lecture for Digital Image Processing course at B R Ambedkar National Institute of Technology. It includes: Basic, Compression, Methods, Huffman, Coding, Symbol, Based, Predictive

Typology: Slides

2011/2012

Uploaded on 07/20/2012

shalaby_88cop
shalaby_88cop 🇮🇳

4.3

(15)

63 documents

1 / 20

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
2
Basic compression methods
Huffman coding
Golomb coding*
Arithmetic coding
LZW coding
Run length coding
Symbol-Based coding
Bit-Plane coding
Block transform coding
Predictive coding (lossy and loss less)*
Wavelet coding*
* will not be covered in this course
docsity.com
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14

Partial preview of the text

Download Basic Compression Methods-Colors Pictures And Digital Image Processing-Lecture Slides and more Slides Digital Image Processing in PDF only on Docsity!

2

Basic compression methods ^

Huffman coding

^

Golomb coding*

^

Arithmetic coding

^

LZW coding

^

Run length coding

^

Symbol-Based coding

^

Bit-Plane coding

^

Block transform coding

^

Predictive coding (lossy and loss less)*

^

Wavelet coding** will not be covered in this course

3

Bit Plane Encoding ^

Idea ^

Decompose a multilevel image (grayscale or color) into aseries of binary images ^

Apply any binary image compression encoding schemee.g. run length encoding, symbol based coding

^

Based on the reduction of the spatial redundancies in animage

^

Bit Plane Decomposition ^

Gray level r of an m-bit image can be represented in polynomialform

1

1

2

1

0

1

2

1

0

0

2

2

2

2

2

where

= 0 or 1

m

m^

m^

i

m^

m^

i i

i

a^

a^

a^

a^

a

a

^

^

^

^

^

^

^

5

Bit Plane Encoding: Gray code ^

m-bit Gray code reduce the effect of small gray-levelvariations mentioned above

^

The successive gray codes differ in only one bitposition

^

Gray code is computed as:

^

127 (01111111) = 01000000 (gray code) ^

128 (10000000) = 11000000 (gray code)

1

1

1

0

2

i^

i^

i

m^

m

g^

a^

a

i^

m

g^

a

^

Exclusive OR  

6

Binary code

Gray code

Binary code

Gray code

BIT PLANES

8

Block Transform Encoding^ 1. Input MxN image is subdivided into sub images of size nxn2. nxn sub images are converted into transform arrays. This

tends

to

decorrelate

pixel

values

and

pack

as

much

information as possible in the smallest number of coefficients

  1. Quantizer

selectively

eliminates

or

coarsely

quantizes the

coefficients with least information

  1. Symbol encoder uses a variable-length code to encode the

quantized coefficients NOTE: Any of the above steps can be adapted to each subimage:

(adaptive transform coding), based on local image information

Encoder Decoder

9

Transform selection ^

Choice of transformation function depends on ^

Acceptable amount of reconstruction error ^

Computational resources

^

Consider an

n x n

subimage

g(x,y)

whose generalized

discrete forward transform

T(u,v)

(transform coefficients) can

be given as: ^

The generalized inverse transform is given as: ^

r(x,y,u,v)

and

s(x,y,u,v)

are called forward and inverse

transformation kernels or basis functions or basis images

1

1 0

0

( , )

( ,

) ( ,

,^

, )

for

,^

0,1, 2,...,

1

n^

n x^

y

T u v

g x y r x y u v

u v

n

^

 ^

 ^

1

1 0

0

)^

,^

for

,^

n^

n u^

v

g x y

T u v s x y u v

x y

n

^

 ^

 ^

11

Transform selection: Example Three

approximations

of

the

512x

gray

scale

image.

These

pictures

were

obtained by dividing the original image into subimages of size 8x8, representingeach

subimage

using

one

of

the

transform,

truncating

50%

of

the

resulting

coefficients and taking the inverse transform of the truncated coefficient array. Thedifference between original and reconstructed image is also shown

DFT Transformrms error =2.32 gray levels

WHT Transform

rms error = 1.78 gray levels

DCT Transformrms error =1.13 gray levels

12

Transform selection: Comparisonof Transformations ^

Information

packing:

redistribute

or

pack

the

most

information into the fewest coefficients

^

Information packing ability: DCT is superior to DFT &WHT

^

Most practical transform coding systems are based onDCT (which has become the international standard fortransform

coding

systems)

because

DCT

provides

a

good compromise between information packing abilityand computational complexity.

^

The

DCT

is

the

most

popular

transform

for

image

compression algorithms like JPEG (still images), MPEG(motion pictures).

^

The

more

recent

JPEG

standard

uses

wavelet

transforms instead of DCT

14

Subimage size selection

15

Bit allocation ^

After transforming each subimage, only a fraction of thecoefficients are retained. This can be done in two ways: ^

Zonal coding

: Transform coefficients with large variance

are retained. Same set of coefficients retained in allsubimages ^

Threshold coding

: Transform coefficients with large

magnitude in each subimage are retained. Different set ofcoefficients retained in different subimages

^

The retained coefficients are quantized and thenencoded.

^

The overall process of truncating, quantizing, and codingthe transformed coefficients of the subimage is called bit-allocation

17

Bit allocation: Zonal Coding

A typical zonal mask. Retained coefficients are

shown in shaded

Zonal bit allocation

18

Bit allocation: Threshold Coding ^

In each subimage, the transform coefficients of largestmagnitude contribute most significantly and are thereforeretained

^

A

different

set

of

coefficients

is

retained

in

each

subimage.

So

this

is

an

adaptive

transform

coding

technique

^

The coefficients are thresholded to get largest magnitudecoefficients

inexpensive approach

^

Thresholding schemes ^

A single global threshold for all subimages ^

A different threshold for each subimage ^

Threshold as a function of location of coefficient

^

Different

thresholding

schemes

result

in

different

compression ratios

20

Thresholding schemes and Coding ^

Thresholding schemes ^

A single global threshold for all subimagesThe level of compression differs from image to image dependingupon the number of coefficients that exceeds the global threshold ^

A different threshold for each subimageSame number of coefficients are discarded for each subimage

coding rate is constant and known in advance ^

Threshold as a function of location of coefficientIt results in a variable code rate. In this case, the quantizationand thresholding can be combined

^

Encoding The retained coefficients can now be encoded by asuitable variable length code

21

JPEG Compression Standard ^

Subimage size: 8x8 pixels

^

Transform: Discrete Cosine Transform (DCT)

^

A non-uniform quantization scheme whicheliminates psycho-visual redundancies

^

Symbol encoder: Huffman code

Encoder Decoder