Image Compression Redundancy and Compression Ratioaitrivra.tripod.com/ip/lecture_notes/ip09.pdf ·...

33
Image Compression Data: means by which information is conveyed. Information: more unknown, more information. Associated with the unpredictability. Various amounts of data may be used to represent same information. Often data may be non – essential or redundant. Data compression uses removal of redundancy to compress the amount of data. Redundancy and Compression Ratio: Let 1 n and 2 n denote information carrying units in two data sets representing same information. The relative data redundancy of 1 st set 1 n is defined as R D C R 1 1 - = , where 2 1 n n C R = is called the compression ratio. When 2 1 n n = , 0 , 1 = = D R R C and there is no redundancy. When 1 , , 1 2 << D R R C n n showing highest redundancy and greatest compression. When -∞ >> D R R C n n , 0 , 1 2 , showing no compression. Coding redundancy: We assume grey levels are random quantities. The values of these levels are represented by suitable encoding them. Let k r in an interval [ ] 1 , 0 represent the grey levels. Let each k r occur with probability n n r p k k r = ) ( , with 1 , 2 , 1 , 0 - = L k where L is number of grey levels. Let ) ( k r l bits be used to represent the value k r Then average number of bits required to represent each pixel And total bits in the image of dimension N M × is avg MNL . For natural m -bit binary code, m L avg = k r ) ( k r r p Code 1 ) ( 1 k r l Code 2 ) ( 2 k r l 0 r 0 0.19 000 3 11 2 1 r 1/7 0.25 001 3 01 2 2/7 0.21 010 3 10 2 3/7 0.16 011 3 001 3 - = = 1 0 ) ( ) ( L k k r k avg r p r l L

Transcript of Image Compression Redundancy and Compression Ratioaitrivra.tripod.com/ip/lecture_notes/ip09.pdf ·...

Page 1: Image Compression Redundancy and Compression Ratioaitrivra.tripod.com/ip/lecture_notes/ip09.pdf · 2009-03-25 · coding redundancy. • It uses the fact that generally images have

Image Compression

• Data: means by which information is conveyed.

• Information: more unknown, more information. Associated with the

unpredictability.

• Various amounts of data may be used to represent same information.

• Often data may be non – essential or redundant.

• Data compression uses removal of redundancy to compress the amount of data.

Redundancy and Compression Ratio: Let 1n and 2n denote information carrying units in two data sets representing same

information.

The relative data redundancy of 1st set 1n is defined as

R

DC

R1

1−= , where 2

1

n

nCR = is

called the compression ratio.

When 21 nn = , 0,1 == DR RC and there is no redundancy.

When 1,,12 →∞→<< DR RCnn showing highest redundancy and greatest

compression.

When −∞→→>> DR RCnn ,0,12 , showing no compression.

Coding redundancy: We assume grey levels are random quantities.

The values of these levels are represented by suitable encoding them.

Let kr in an interval [ ]1,0 represent the grey levels.

Let each kr occur with probability n

nrp k

kr =)( , with 1,2,1,0 −= Lk � where L is

number of grey levels.

Let )( krl bits be used to represent the value kr

Then average number of bits required to represent each pixel

And total bits in the image of dimension NM × is avgMNL .

For natural m -bit binary code, mLavg =

kr )( kr rp Code 1 )(1 krl Code 2 )(2 krl

0r 0 0.19 000 3 11 2

1r 1/7 0.25 001 3 01 2

2/7 0.21 010 3 10 2

3/7 0.16 011 3 001 3

�−

=

=1

0

)()(L

k

krkavg rprlL

Page 2: Image Compression Redundancy and Compression Ratioaitrivra.tripod.com/ip/lecture_notes/ip09.pdf · 2009-03-25 · coding redundancy. • It uses the fact that generally images have

0.08 100 3 0001 4

0.06 101 3 00001 5

0.03 110 3 000001 6

7r 1 0.02 111 3 000000 6

bitsLavg 7.2)02.0(6)03.0(6)06.0(5)08.0(4)16.0(3)21.0(2)25.0(2)19.0(2 =+++++++=

099.011.1

11,1.1

7.2

3=−=== DR RC

• Here coding has been used to minimize the number of symbols using variable

length coding, and code 1 has redundant code symbols. This is called removal of

coding redundancy.

• It uses the fact that generally images have regular and predictable shape and area

much large than the elements

• Hence some values are more probable than others, and they are coded with shorter

length codes.

Interpixel redundancy A picture of 5 randomly arranged pencils, and 5 parallel pencils have the same histogram,

and same probabilities for each grey value.

However in one case, the picture shows a strong spatial correlation. Hence value of next

pixel can be predicted reasonably well. Then all values are not necessary, and many are

redundant.

These inter-pixel redundancies can be removed by using not pictorial mapping like

difference between adjacent pixels, value and length of grey level runs, etc. Usually this

leads to a non-pictorial representation.

e.g 1024 bits of binary data can be coded as

(1,63)(0,87)(1,37)(0,5)(1,4)(0,556)(1,62)(0.210) requiring 88 bits.

A complete image requires 12166 runs. 11 bits are required for each pair.

Then Compression Ratio 63.21112166

13431024=

×

××=RC , and 62.0=DR

Page 3: Image Compression Redundancy and Compression Ratioaitrivra.tripod.com/ip/lecture_notes/ip09.pdf · 2009-03-25 · coding redundancy. • It uses the fact that generally images have

Psycho visual Redundancy: The eye and the brain do not respond to all visual information with same sensitivity.

Some information is neglected during the processing by the brain. Elimination of this

information does not affect the interpretation of the image by the brain.

Edges and textural regions are interpreted as important features and the brain groups and

correlates such grouping to produce its perception of an object.

Psycho visual redundancy is distinctly vision related, and its elimination does result in

loss of information. Quantization is an example.

When 256 levels are reduced by grouping to 16 levels, objects are still recognizable. The

compression is 2:1, but an objectionable graininess and contouring effect results.

IGS Quantization:

The graininess from quantization can be reduced by Improved Grey Scale quantization

which breaks up the edges and contours and makes them less apparent. IGS adds a

pseudo random number generated from low order bits of neighboring pixels to each pixel

before quantizing them. If most significant bits are all 1, the 0s are added. The msbs

become the coded value.

Pixel Grey level Sum IGS code

i -1 NA 0000 0000 NA

i 0110 1100 0110 1100 0110

i +1 1000 1011 1001 0111 1001

i +2 1000 0111 1000 1110 1000

i +3 1111 0100 1111 0100 1111

Fidelity criteria:

Objective:

Let the pixel error be given as ),(),(ˆ),( yxfyxfyxe −= .

Then total error between two images

[ ]��−

=

=

−1

0

1

0

),(),(ˆM

x

N

y

yxfyxf

The RMS error is

[ ]2

1

21

0

1

0

),(),(ˆ1

���

���

�−= ��

=

=

M

x

N

y

rms yxfyxfMN

e

The mean square SNR is

[ ]

[ ]��

��−

=

=

=

=

=1

0

1

0

2

1

0

1

0

2

),(),(ˆ

),(ˆ

M

x

N

y

M

x

N

y

ms

yxfyxf

yxf

SNR

The RMS SNR is the square root of above ratio.

Page 4: Image Compression Redundancy and Compression Ratioaitrivra.tripod.com/ip/lecture_notes/ip09.pdf · 2009-03-25 · coding redundancy. • It uses the fact that generally images have

Subjective:

As commented upon by a cross-section of viewers 1 for excellent to 6 for unusable

i.e excellent, fine, passable, marginal, inferior, unusable.

Image compression models:

The three redundancy removal methods are typically combined to get maximum

compression.

Input image goes into an encoder which creates a set of symbols. It consists of a source

encoder and a channel encoder.

After transmission through the channel it goes into a decoder, consisting of channel

decoder and source decoder from which the reconstructed image is given out.

The source encoder removes most of the redundancies, and the channel encoder increases

noise immunity.

The two distinct coding processes are reversed at the respective decoders at the receiver.

If the channel has no noise, channel encoder-decoder may be omitted.

Source Encoder – Decoder:

The source encoder starts with a mapper transforming data into a non visual format

reducing interpixel redundancies. (i.e. run length encoding).

This is followed by a quantizer (psycho visual redundancy removal) and a symbol

encoder generates variable of fixed length code to minimize coding redundancy.

Page 5: Image Compression Redundancy and Compression Ratioaitrivra.tripod.com/ip/lecture_notes/ip09.pdf · 2009-03-25 · coding redundancy. • It uses the fact that generally images have

At the receiver input, symbol decoder is followed by an inverse mapper. (de-quantization

cannot be done, hence there is no de-quantizer block )

Channel Encoder and Decoder:

These are used to reduce the effect of noise during the transmission. The channel

encoding process is such as to re-introduce some controlled redundancy such as

redundant error correcting bits to overcome the noise.

Example is a 7,4 Hamming code with a distance of 3, which can correct all single bit

errors resulting from noise. To a 4 bit code, 3 redundant bits are added to get a resulting 7

bit Hamming encoded code.

Binary number is 0123 bbbb

Hamming code word is 7654321 hhhhhhh , where

0231 bbbh ⊕⊕= , 0132 bbbh ⊕⊕= , 0124 bbbh ⊕⊕= which are even parity bits for the

respective groups of bits, and 33 bh = , 25 bh = , 16 bh = 07 bh = ,

The decoder forms 75311 hhhhc ⊕⊕⊕= , 76322 hhhhc ⊕⊕⊕= and

76544 hhhhc ⊕⊕⊕=

If the parity word 124 ccc is non zero, its value indicates location of the erroneous bit,

which is inverted to correct the error. The correct binary word is then given by

7653 hhhh , and thus a single error is corrected.

More errors can be corrected by defining more redundant bits, making channel encoded

word longer (This moves away from out intended compression and instead increases the

data length. For this reason longer hamming codes are not preferred.)

Page 6: Image Compression Redundancy and Compression Ratioaitrivra.tripod.com/ip/lecture_notes/ip09.pdf · 2009-03-25 · coding redundancy. • It uses the fact that generally images have

Information Theory

Entropy: Information is modeled as a probabilistic process.

If an event E occurs with probability P(E) it contains

)(log)(

1log)( EP

EPEI −== units of information called self information of E.

When the base of the log is 2, unit of information is a bit.

Assume the source produces random sequence of symbols from a finite set of source

alphabet A given by { }jaaa ,,2,1 � .

Let probability of ja be )( jaP and let a vector [ ]Tj ),P(a),),P(aP(az �21= give the set of

probabilities of alphabet symbols.

The finite ensemble ( )zA�

, then describes the source completely.

The self information in ja is

)(log)( jj aPaI −=

If a large number k symbols are generated, ja will occur )( jakP times, contributing

information )(log)( jj aPakP−

Thus all the k symbols give information:

�=

−j

j

jj aPaPk1

)(log)( ,

The average information per symbol is defined as the Entropy of the source, and is given

by

�=

−=j

j

jj aPaPzH1

)(log)()(

Source entropy is maximum when all symbols are equally likely.

The Channel Matrix: Let the output of the channel belong to an alphabet B comprising of { }kbbb �,, 21 with a

probability vector

[ ]T

kbPbPbPv )(,),(),( 21 ��

=

The finite ensemble ( )vB�

, then describes the received information completely.

( )kbP is related to ( )jaP by

( )�=

=J

j

jjkk aPabPbP1

)()(

Then we can write the matrix equation

Page 7: Image Compression Redundancy and Compression Ratioaitrivra.tripod.com/ip/lecture_notes/ip09.pdf · 2009-03-25 · coding redundancy. • It uses the fact that generally images have

zQv���

= ,

Where

������

������

=

)()(

)()(

)()()(

1

212

12111

jkk

j

j

abPabP

abPabP

abPabPabP

Q

��

����

����

��

� is called the channel matrix.

Conditional Entropy and Equivocation: Now when the observed output is kb , we can estimate the entropy of the source using the

probability relation

�=

=K

k

kkjj bPbaPaP1

)()()(

If we define a conditional entropy function

( ) �=

−=J

j

kjkjk baPbaPbzH1

)(log)(�

Then, for all kb ’s we have

( ) ( ) ( )�=

=K

k

kk bPbzHvzH1

���, or

( ) ( ) ( )��= =

−=J

j

kj

K

k

kj baPbaPvzH1 1

log,��

, which is called Equivocation of z�

with respect to

v�

, and gives the information estimate in one source symbol based on observation of

output symbol.

Mutual Information and Channel capacity:

The difference between )(zH�

and ( )vzH��

is the information transmitted by the channel

(received by observer) estimated by observing one output symbol and is called mutual

information.

( ) ( ) ( )vzHzHvzI�����

−=,

Upon substitution of the equivocation equation, and noting that ( ) ( )�=

=K

k

kjj bapaP1

, this

becomes

( ) ( )( )

( ) ( )( )

( )���

��= == = ⋅

=⋅

=J

j

K

k kjj

kj

kjj

J

j

K

k kj

kj

kjqaP

qqaP

bPaP

baPbaPvzI

1 11 1

log,

log,,��

The maximum value of ( )vzI��

, over all possible choices of source probabilities (all

possible z�

) is the Channel Capacity C : .

( )[ ]vzICz

��,max=

Page 8: Image Compression Redundancy and Compression Ratioaitrivra.tripod.com/ip/lecture_notes/ip09.pdf · 2009-03-25 · coding redundancy. • It uses the fact that generally images have

Shannon’s Theorem for noiseless channels:

n-th extension of a source:

The source considered earlier generates individual symbols.

If the symbols are statistically independent (do not depend on other symbols) it is a zero-

memory source.

Assume that the source generates words of n characters rather than single symbols.

Its output is said to be an n-tuple of the symbol alphabet.

Such a source is said to be the nth extension of the basic source.

Properties of n-tuples:

Source output now has nJ = M possible n element sequences mα called block variables.

A new dictionary now consists of a set A′ of n element sequences with

{ }MA ααα ,,, 21 �=′ and )()()()( 21 jnjji aPaPaPP �=α

Also,

{ })(),(),( 21 MPPPz ααα ��

=′

Hence the corresponding entropy is

�=

−=′M

i

ii PPzH1

)(log)()( αα�

And also it follows that )()( znHzH��

=′

Shannon’s First Theorem (Theorem for noiseless coding):

The self information of output is )(

1log

iP α so it is reasonable to code it with codeword

of smallest integer length )( il α longer than the self information in bits. Thus

1)(

1log)(

)(

1log +<≤

i

i

i Pl

P αα

α

Or multiplying each term by its probability and adding over the ensemble,

1)(

1log)()()(

)(

1log)(

111

+<≤ ���=== i

M

i

ii

M

i

i

i

M

i

iP

PlPP

αααα

α

Or

1)()( +′<′≤′ zHLzH avg

�� where )()(

1

i

M

i

iavg lPL αα�=

=′

Dividing by n,

nzH

n

LzH

avg 1)()( +<

′≤

��

In the limit as n becomes large, this becomes

Page 9: Image Compression Redundancy and Compression Ratioaitrivra.tripod.com/ip/lecture_notes/ip09.pdf · 2009-03-25 · coding redundancy. • It uses the fact that generally images have

)(lim zHn

Lavg

n

�=�

���

� ′

∞→

The Shannon’s first theorem states that:

it is possible to make the ratio n

Lavg′

approach arbitrarily close to H(z) by coding

infinitely long extensions of the source.

The coding efficiency can be now defined as avgL

zHn

′=

)(�

η ,

In the ideal case efficiency becomes 1 as n becomes infinite.

Noisy coding Theorem:

Suppose a Binary Symmetric Channel has a error probability 01.0=eP

To increase its reliability, we decide to transmit each symbol (1 or 0) three times (000 or

111), and take a majority decision on receiving.

Our majority decision will be wrong if there are two or three errors in the received triplet,

with a probability eee PPP23

3+ which is 0.0003.

In general we can encode nth

extension of source using a K-ary code sequence of length

r , such that nrJK ≤ , and select only φ of the possible r

K sequences as valid, and also

we formulate rules for optimizing correct deciding when errors arise (i.e. 2 out of 8 valid,

and majority decision for rest in above example).

The zero memory source generates information at a rate )(zH�

Units/symbol.

The nth extension generates at a rate n

zH )(�′

.

Maximum rate after coding is r

log= since all words are not valid words.

Thus a code of size φ and block length r has a maximum rate R given above.

Shannon’s second theorem (noisy coding theorem) states that:

For any CR < where C is the capacity of a zero memory channel with channel matrix

Q�

, there exists an integer r and a code of block length r and rate R such that the

probability of a block decoding error is less than or equal to an arbitrary value ε for

.0>ε .

This implies that probability of error in the noisy channel can be made arbitrarily small,

as long as coded message rate is less than the channel capacity.

Page 10: Image Compression Redundancy and Compression Ratioaitrivra.tripod.com/ip/lecture_notes/ip09.pdf · 2009-03-25 · coding redundancy. • It uses the fact that generally images have

Huffman Coding:

Removes coding redundancy by using a variable length coding procedure.

Symbols are arranged in order of decreasing probabilities, and probabililty values are

stated alongside.

The symbols with two smallest probabilities are (considered as) combined

the probability table is reordered using the combined value.

The smallest two probabilities in the new table are combined, and table again reordered.

This continues till only two probability values remain.

These are assigned code values 0 and 1.

Each coded probability value is examined to determine its original constituents, and if it

is a combination 0 and 1 code digits are added to make the code assignment unique.

This is repeated backwards till all original probability values have associated code words.

This procedure creates a near optimal code, and generates a look up table for subsequent

coding requirements. The code is an instantaneous (no references to previous procedures

are required for decoding) uniquely decodable, variable length block code. (see example)

P(a1) = 0.1, P(a2) = 0.4, P(a3) = 0.06, P(a4) = 0.1, P(a5) = 0.04, P(a6) = 0.3

The average length of this code in the example is 2.2 bits/symbol,

Entropy of the source is 2.14 bits/symbol, and code efficiency is 0.973.

The coded output for sequence a3a1a2a2a6 is 010100111100.

The output 0100100010001011 decodes to a4a2a6a4a5 unambiguously.

The coding method is difficult to apply when there are large number of symbols to be

coded. In such a case, truncated Huffman, B2, binary shift, Huffman shift and other

computationally more efficient codes are used with some sacrifice in average length.

For details of these codes, refer to the text book.

Page 11: Image Compression Redundancy and Compression Ratioaitrivra.tripod.com/ip/lecture_notes/ip09.pdf · 2009-03-25 · coding redundancy. • It uses the fact that generally images have

��������������

• �������������� �������������������• ������������������������������������������������������• ������������������������������ �������� ������� �������������������• ����������������������� ���������������������!���"�• ���������������������������� ����������#�������� ������������������

��������������������������������������#������������������������������� ���������� ���

• $����������������� �������������%���������� �����������������������������������������

• ���������������������������• ����������������� ������������������������������������ �������&�����

'�(�(�• )� ������������������������������������ �������*���#��� ����������������

����� �#������������������������������������������������������ ������#�������� �������������������������������������� ��+!#"�������������#��������� ������������������ ������������ ����������������������������������������

• �������������� ������������������������� ������������ ��,�(-.�!#/��������� ����������������

• ��������� ��������������������������������#��!�.'��������� ����• ������������ ���� ���������������������������0

�"�������������������������� ������������������������������������� �����������1���������������������������������

• �������������� ������������� ������� ������ ����������� ������ ��• ��������� ��������%�������������� ������+!#"���� ����������� ���� ����• ����������������������������������• ��������� ����������������������������������������������������������������

����� ���������� �������� ���������� ����������������������

�������������� �������#)�������".#1!!.""0(/23

IP Page 1

Page 12: Image Compression Redundancy and Compression Ratioaitrivra.tripod.com/ip/lecture_notes/ip09.pdf · 2009-03-25 · coding redundancy. • It uses the fact that generally images have

456����

• ���������������������������• ������������ �7������������������������• ���� ����������� ���������� ���������� �����������������������• ������������������ ���������������������������������������������• 456���������������89)#�9))#���2:)�

���� ��������

• �������;���������;�������� ����������������������������������

• )�'�������������� ��#��������1./������������������������ ������� ��� �����!#"#1#���#1..�

• ����������������������������������� �7�������# ������ ���������������������������������������������������������������9������������������������ ���������#����������#��������;1..�1..;�� �������� ����������1./#�

• �����������������������������������������#������1./#���������������������������� ��������1..�1..#���������������������

• 9��<����#."1������������������������������� ������#����� �����'='��������������������������������������������������� ��<�����������

$>�324$0���������� � �������� ���"/������(<(<"1/"1/(<(<"1/"1/(<(<"1/"1/(<(<"1/"1/

• �."1����������������������� ������� ���������������0

• 4������1./���� �.""�������������������

• ������ ������������������� ������������������ ��#����������

• $����������� � ������ �� ���������������������� �������?�����"����������?���������;������������ ��%�����������;���� �����������������������������

456���� 6��������#)�������"/#1!!."10"@�3

IP Page 2

Page 13: Image Compression Redundancy and Compression Ratioaitrivra.tripod.com/ip/lecture_notes/ip09.pdf · 2009-03-25 · coding redundancy. • It uses the fact that generally images have

����?���������;������������ ��%�����������;���� �����������������������������

• �����������������������������������������������

• ������#� ���������������������������������������������������������

��� ��%�������#�����������������������������������"���1�� A������������ ��������#������������������������

• 9��������������������#� �������������������������� ��%��������������������������

������ ����#� ���������������������� ��%������������������������������#� ��������������� ��%��������������������%������������������ �����

����1�����������

• ������������������������ ������ ����������������������������������������������� ���������B�B��� ��

• A������������������������������

• ������������� #�������������������1/.�������������456�� �������������������������������� ������������ ������ �����������?���� ���������������� ����"1'������� ��<!���������#"!<����������

• ����������� ���������������"�B10"�

• ������������������������������� ������������������������

• ���� ������������������������������������������� �������

• 456��������������������������������������������������������������������������������������

IP Page 3

Page 14: Image Compression Redundancy and Compression Ratioaitrivra.tripod.com/ip/lecture_notes/ip09.pdf · 2009-03-25 · coding redundancy. • It uses the fact that generally images have

• ������������������ ����� �7���������������������• 2������������� �7�������������� ��������• 9������������������������� �������� ����� ��������������������� �����

��������� �������������� �������������������������

C������������������

• ��� ����� ����������� ������������ ���������������������������������1��������

• ������������������������������������"�������������#5������������� ������������������ ����!��������������#��������������������������������������"�����������������

• $������������������������!���"����������������������� ������������������ �������������������������������������������������������������� ������� ��

• �������� ���� ���������������� ���� ����� ���� ���� �����������������������������������������9�����������������"1@�!"""""""�����D����������������������"1'�"!!!!!!!�#� �������������������������������� !�"��"�!�����������

• ����������������������� �� ��� �� ������������������������� ������������������ ������ � ��������������������������� �������������

• �������������������������������������� �����������������������������������#��������� ���� ����� ������������������������������������

• ���� ����� ���"1@���"1'�����D�����#������@���������������������!�"���������#����������8��������������������"1@���"1'���""!!!!!!���!"!!!!!!#�������� ���

���������������

• ���������� ������������������������

• E����������������������������� ����������� ���"7��,7��

• 9�� ����� ���������������%��>�������#

• C������������������������#��������#����������������

• ����������������������� ���� ������������ ������"����������!#���������������� ����������� ������1��������"!���""�

• ���������������� �����������������������������������������"�����1����������

• ������� ������������������������� ���������������������������������������������������������

C��2�������� 6��������#)�������"/#1!!."0!!�3

IP Page 4

Page 15: Image Compression Redundancy and Compression Ratioaitrivra.tripod.com/ip/lecture_notes/ip09.pdf · 2009-03-25 · coding redundancy. • It uses the fact that generally images have

6����C���&������ �6C&�

• �������������������������������������������� ���������#• ����������������������!������������������������ ���������������������"

������������������������������• ������������������������������#������� ���������������������������� ���#��

���� �"������������������������ ���������������������

• ������������������������������������%�"���������������������������,7���������������������"����������������6C&������������

• ����������������������� ��������������������������� ������������������������������� �����������������������������

• )�1�:�����#������������� ����������!#• ���������� ������� �������������������������� �����������"• 9�������������������#��������������������������"#��������� �����������������

�������#���������!#��������� ��������������• 9������������������������#��������������������� ������������������������

���������%��������������������������!������������������"��������������������������

,�������������������� ������

• ����������� ����������������� • ���������������������������������������)�>����� �• F��������������������� ������������������������� ���������������

�������� ��������������������������• �������������������� �������� ��� ����,7��"7�������������������

�� �������� ���������� ������������������ ����������������� ��� ������������

• ������������������������������� ��� �������������0�"������������ �������������������������1��������������� ����������������#�����������!��� ��

• �����������������������������������%���� ����������� ������ ��������� ���������� ���

• C�������6���������� �������������������������� ����������� ���������������������������������������������������

• )��������#������ ������D���������������������� ��D#������������������������������������������������������� ����������������� ����������� ���� ��������������������� ������� ��D�������������� ���������������������������

• ������������������������������������� �������#������*!������������������ ��������������������$��

• ���������� ���������������������������������#���������• ������������������� ��������������� ���

�������� ��������4!���4D��������� ��� � ������������������������� ���#�������� ����

• $�������� ��� ������������������� ��� ����������������������������������������� ��������������� ����� � ����������� ������

��������������� 6��������#)�������"/#1!!."0"1�3

IP Page 5

Page 16: Image Compression Redundancy and Compression Ratioaitrivra.tripod.com/ip/lecture_notes/ip09.pdf · 2009-03-25 · coding redundancy. • It uses the fact that generally images have

,�������������������� ������ �����������������������1�:���� ���������

F����� ������������ �F���

• C������������������������� ������������������������� �����������������������������)� �����������������������������

� ������������������������������������������������������������������������

� ����������������������������������������������������������������������������������� ��������

� 9���G�������F������������������������������������������������������������������

� 9���� �������������������

• F����� ������������ ��������������������� ����������������� ��� ������

• 9�� ������������������� ��������������������#������������� ������������ ��������#���������������#��������������������� �����������������������������#

• )� �����#F�������������������������#������������������������������������ ��������� ����������� ������

• ��)� ��������#�������������C��������������%���

• ��������������������������� ��������������������#

• ����������������������������� ��������������������������F����������#�������������������� ���������������� �����������������������������������+������>>>���>��)� �'�"@���H����������������������������� ��������

• 9������������='���=B#����)� ������������F����������""!!!""�

• )������#���I!#����������������7����������I"#�������������� ���������������������������������#����������"!!�������������������������������������������� ���������������������� ������

F����� ������������ 6��������#)�������"/#1!!."0B<�3

IP Page 6

Page 17: Image Compression Redundancy and Compression Ratioaitrivra.tripod.com/ip/lecture_notes/ip09.pdf · 2009-03-25 · coding redundancy. • It uses the fact that generally images have

����������� �������

• F������������������������������������������� �������������������������������������������!������� "�

• #�������$���%%�������&�!����'�� �2:J�������������������������������� ���������

• ��������������������������D��������� ������������������������ ������������������������7#�;��

• �7�������������������������������� ��������������������������D����������#

• �;�������������������������������������������� ����

• &����������� ����������������������������������()��������� ��������������������������� ������ ���

• 9��;��������������������������������������������������������D����������#�������KKK���������������������!�&���&������ �::���

• ����������������� ������ �����������7#�;����7#�7;������ ����������������������������������������������������� ���������� ��������������

• 6��������������� ��#�������������������������������������������������������������������������������������������� ��

• �� �������� �������������������������������������������� ������ �#������������������������������������������������D����������

• �����������������2:J���::����� �������������7#�;��7;#���������������������������������� ��������������� ����������� ������

����������� 6��������#)�������"/#1!!.""0B"23

IP Page 7

Page 18: Image Compression Redundancy and Compression Ratioaitrivra.tripod.com/ip/lecture_notes/ip09.pdf · 2009-03-25 · coding redundancy. • It uses the fact that generally images have

• 9�����������������#����������������� ������������������������������������

• *�����������������������������������L&����������C&����������������������*!�!"�

• ��������������������������������������������������������������� ����������)������������ �!��"#������������ ��!!!���"""��������

• 2�������������������������������� �������������������������������� �����"����(

• ������������������ ��������������������������������.!M#

• 3���� ������������������� ���D���� ������������������

• ������������������������������ �����������������������������������������������������������������������6�������������� �����������#�����D���� ���������������� ����������

• )���*!�!"#����������������������������������������!�!!!(��������������� ����������� ����� ������#����������������������������������������������

• 8����������#�������� ��������������������������� +�������������������� ���#�����N�OP�

• ��������������������������������� ����N7��������������������� ���������������� ������������������������%���������������������������� �

• F������� ������������������������������ ���������������� �������������

��������������� �����1(#�'#���������������������

• *����� ��������������!!!���"""�

• 9���� �������������������������������#���D���� ������������������

�������������������

• �%���������������������� ��������������������������������������������

�����������������������'"�

• ������������������������� �����������������������'�",���������������

���������

• 9�������������������#��������������#���������������������������������

�������Q ���������������������������������������������

• �������%�Q���������� ������������ ��������������������

• -������))����������#����������������� ����������������������. /����������������������%�������������&(����������������������������� ������������������� ����������.�����������2��������������������� ����

������ ������OR��RS!

A������� ������ ��������#)�������"@#1!!."1011�3

IP Page 8

Page 19: Image Compression Redundancy and Compression Ratioaitrivra.tripod.com/ip/lecture_notes/ip09.pdf · 2009-03-25 · coding redundancy. • It uses the fact that generally images have

4������2������� �����

• 0))&�))��������$����� ���������������������������������������������������������

���� ���������������������������

• �����(��%�����������������������������������������������������������������

���������������

• ��������������������������������������� ��� ����������

• $�������������� ���������������������������������#������������������

���������� �����������������*����������

• �������������� ������������������ �#���������������������#�����������

���������������������� �����������������������������������������

• ������������������������������������������� ��#��������������

�����������������������

• $������������� � ����������� ������ �����������������������������������

�������

• ���������������������� ����������� �� ����������� ����������������������

�� �����������

• 9�"�:�������������� ����� #���������������������������

• ���������� �������� ����� ������������������%%�������&���� ����$�!)��1�&����

4������2������� ����� �������#3����!'#1!!.(0!/23

IP Page 9

Page 20: Image Compression Redundancy and Compression Ratioaitrivra.tripod.com/ip/lecture_notes/ip09.pdf · 2009-03-25 · coding redundancy. • It uses the fact that generally images have

• �����������������������������������

• T������������������������������������������������� ����������� ����� �����

����� ������� ��

• �������������������������������������������������� �������������������������� ������� ��(�</�����������������/�'"����-�������

• ����������� ���� �������������������������������� ����� �

• )��������� ��#��2���������������������������������������������������������

• ������� ����������� ������ ��������������������������������������

• �������������� ������������������������������ ��������� ������������

����������9������������������������� ���������� ���������� � ����������������(!0"�9�� ����� ���������������� ���������������� �������"!0"�1!0"

IP Page 10

Page 21: Image Compression Redundancy and Compression Ratioaitrivra.tripod.com/ip/lecture_notes/ip09.pdf · 2009-03-25 · coding redundancy. • It uses the fact that generally images have

4���2������� �����

• ����������%��������������������������

• ������������������������������������������� ����������������������

������������� �������������������� �������������7������������������������

����������������� �������������������������������������������������

������%��������������#

• ��������������� ��������� ���������������������������7�������

• 3�&����!&�����:3���������������� ����� ���������������������������%�����

���������

• ������������������%��#������ ����������������������������%��"������������� ����������������� :3���������"���-�����

• 6���ζ��������������������������7���� ������� ��#���������������)&��

$��&��������6�������� �������������������������� ��# ���!&����)�

��������

• ����������������������������D����� ����� ������������������

• ������������������������ ����������������������������%��������#������������%�������� ����������%����������

4������������ �������#3����!'#1!!.B0!.23

IP Page 11

Page 22: Image Compression Redundancy and Compression Ratioaitrivra.tripod.com/ip/lecture_notes/ip09.pdf · 2009-03-25 · coding redundancy. • It uses the fact that generally images have

,������2��������

• ���������������������������������� ����� �����������������%�����������7������

��������������������

� J�����%���������������������� �� ����� 2������������������������������������������ ���������

• ����������� �������� ����� �����������������%%�������&�!&)������!&�����:2�3��

• ,������������������ ��������������������������������������������������%����

���������

• :������������� $����������������������������#������� ������� ��� ���%��#����� ��

����������� ���������������������������������������������� ��������%�����

���� ������� ������

�����F�"������� ����������������������������������������������� �����

• ��������������������������������������������������������� ������� ��

• ��� ���������������������������������������������������������������������

• ������������������������������������F������������������������������&��&����������������������������������������� ������ ������������

• 8������������% &��&����������������������������� ���������� ��������

����������� ������������� ����������������$��������

• �� �1�:3��� �������������������������������������

,������2�������� �������#3����!'#1!!.B0(.23

IP Page 12

Page 23: Image Compression Redundancy and Compression Ratioaitrivra.tripod.com/ip/lecture_notes/ip09.pdf · 2009-03-25 · coding redundancy. • It uses the fact that generally images have

,������������%����

• ������������������%������������*��)"��������������)���������

�����������������������0,� ������)������

• �������������������������������������������������������������)�����

����)��!����&�$�&)%���������%���

• )����������������������9� ������������������������ ���)�)�2&4�

• ���������%������ �����������������������)� �����#�������������

�����%����������������������������������������������)"�

4���3��������%��

• 9���������%�����������������������%�������������������������%����

���������������� ���������#�������������������������������

��� ����0

• ����������������� ���������������������������������)" �����

��������������������� ���#������������ �����������������������

�������������� ���

• )����4#���)������ ������������� ������������������������������

�����U

• ���������%������������4��� ��0&��5�1������%��

• :�����������������������������������������$��������#����������

�������������������

• 4����3��������%�������������� �

• ������� ���������%������ �������������������� �������� ���

�������

• &�������� �� �� ��������������������%��#����������� �� ��������

������%�������������

• �������������� ������������������ ������

,������J�����%�� �������#3����!'#1!!.B0./23

IP Page 13

Page 24: Image Compression Redundancy and Compression Ratioaitrivra.tripod.com/ip/lecture_notes/ip09.pdf · 2009-03-25 · coding redundancy. • It uses the fact that generally images have

������������

• ��� �������#������������������������������ ����������������������������#

��������������%����������

• )�������������� ���� ������������������������������� �������� �������������

���������������%��������������������� ���������

• ����������������0������� �����������#������������#������%����#������� � :���������0��A�6�������� ������������� �������������� �����%�����

����������������������� ��������A-��1 ���������� ����������������� ������������0��������������������������������� � ������������

����������������������������������������������������������� J�����%����0����������� ������������������������������%����������������

��������������������������� $����� 0���� ������������ � ����������� ���������������%�������������

• �������������� ������������������������� �������#������������$�����)%������ �

• 9���������������������� ��#���������������$�����)%������

• ������������ ����������������N��������4� ��N4��#��������)������:)��#��������������:���#6�����*��������6*��#��� ������������������

• ������������������������������������������������������������

���������������������������������� ��������

• �������������������������������������������������������������������������

�� ����������������� ���������������������������������������������

• ������������������ ��������:��������������������:)����6*������

���������� ��

• N4�#����������������������� ������������������� ������9�������%���������

������������������ ���������������������������������

• N4�������������������������� ���N4��������� ��������������� �#������������

�����

• *�������N4�����������������������

������������ �������#3����!'#1!!./0"123

IP Page 14

Page 25: Image Compression Redundancy and Compression Ratioaitrivra.tripod.com/ip/lecture_notes/ip09.pdf · 2009-03-25 · coding redundancy. • It uses the fact that generally images have

• :��#������������ ����������������������������#������������������

• 9������������������������������������������������������������6*��*������������������������

���������

• �������������������������������:)��:������������������������������������� �����������������N4�

• *���������������������������� �������������������:��#������� ����� ������������������������������� �������������������������������

• 9���������������������������������������������� ��������

• 9��������� ���� ����� �� ����������������������� ������������#������ ������������������������������������������������������ ���#���������%�� ����&�7�� ����%���

• 6������:)���������������������������������������%��#8��������������������������������������� �����#������������������ ��������� ���������

• ���������������������D������������ ������� ���������������������������������������� ��������

������� ������������������������������������������

• ���:�������������������#������������������1�������������������������������������������������

9�� ���%���������

• �������������� ������������ ������������������������������������ ���%��

• E��������� ���������� ��������������������������������������D������������ ��������������������������� ������������������� �������1������������������ ����������

• �������������������������������������������� �����������

• ����� ������������������������������������������������������� ���%�����������

• ������������������� ���%�����'�'���"/�"/�

C����������

• F����������������������������������������������������������������������������������������������������������������

• ���#����������������������������������������������������������������

• 9���������������� �������#���������������������������������,����������������� �������#������'��&���� ��������������������� ������#����������)�&����� �

• ��� ��������������������� #������%�� #������� ��������������������������������� �������������������&&������

IP Page 15

Page 26: Image Compression Redundancy and Compression Ratioaitrivra.tripod.com/ip/lecture_notes/ip09.pdf · 2009-03-25 · coding redundancy. • It uses the fact that generally images have

5�������

• 5������� �������� ����� �����������������������

• ��������������������������������� �������������������������

������������������������������������ �������

• ��� �����������������������������������������������6,�"� ����������

������� �������#������������������� ���������#�3���

���������������������

• ���%���������� ����������� ����������������� ����8�!�$"�����

���������� ����������'��&��)7�������������������������� �"�����

��������������� �����������!�����������������

• ������������������� ��������������������������������� �������� �

��������#�������� ������������%�������������)� �

• ��������������������������� ���%���������� ������������������%�����

����#�%�������������������������������� ������������������

�������������������)� ����

• 9���������#�������������������������������������������#9�����

����#�������������� �����������������%������������������� ���������

��������������%���

• 9������������������������������������������������ ����

�����������������%��#��������������4����3��������%��#������ �����

���������������

• ��������������������������%���#���%�����:��������������������

���������F����� ���������������#������������������ ��������������

���������4���������8���������������

• 5������� �������������������������� ���� ���������������������� ���

• ����������������������������������������������� ���������������

������ ������������������ �������������� �������

5������� �������#3����!'#1!!./0B123

IP Page 16

Page 27: Image Compression Redundancy and Compression Ratioaitrivra.tripod.com/ip/lecture_notes/ip09.pdf · 2009-03-25 · coding redundancy. • It uses the fact that generally images have

������������ 0

• ��������������������������������� ����� ������������������ ��������

������������������������������ ��������

• ������������ #�������� �������������������������������������������������

������� ���� ��������������� ��������

• ������������ ����������� ������������� ��������������������������������

����������������������

• C�������������������������������������� ��������������� �����������

���������8�!�$"��!�$"�������������������������������������������"�:#����

��� ���������������)� ����������������������)�&���)7����������� ��

• 6������������������������������ �������������������������1��������

�������������������������%� %� ������ ���������� ������#

• �����������"�:����������������� ������ �����,7�������������������������

��� ������������%����������������������#���������� ��������������������������"#������������������ ������ ����������� �������

• ���� �� ����������������������������������� ��#���������� ������������

������������� ����� �#�������� ����������������������������������� ������������

• ���������������������������������������� �U9���������#������6�&�� �)�

���� �������������������������������������������������� �����������#������������������������������ �����

• ���������������� ������������������������������������������������������� ���������������� ��������������#������������� ���� ��������������� ���������%�����������������

• ���������������� 8�!�$"��!�$"����

• 89�!�$"����������������������%��������������89�!� �#���5�������������

������%���������

• C�����������%����������������������%���������� ���������#������� ����

������������������������������%�!�$"���������������������:�!� V�

������������ �������#3����!'#1!!./0BB23

IP Page 17

Page 28: Image Compression Redundancy and Compression Ratioaitrivra.tripod.com/ip/lecture_notes/ip09.pdf · 2009-03-25 · coding redundancy. • It uses the fact that generally images have

• ����������� ���������%�������# ����������������8�!� �0

• ����� ��������������� ���������������������������� �

������������

• )� �������$������ ��������������������������:�!�$"��

���� �������������� ������

• 89�!� ������������ �� ����7����������

9�5��#$";�8�!� �����89�!�$"I!#��������������������������

�����������������������������

• 6���89�!� ������������������� ����������� ������������������

����� ��������� �������7���������#�������������������

���������8�!� ���������������� �������

• ����������������5����������������� �� �������

����������� ����

• ��������������%�������������������������������� �����P2$8#

��� ����������������������������������� �������� �

����������������������������������2������ ���������������)� ���

IP Page 18

Page 29: Image Compression Redundancy and Compression Ratioaitrivra.tripod.com/ip/lecture_notes/ip09.pdf · 2009-03-25 · coding redundancy. • It uses the fact that generally images have

,����������������������

• 9����&�3��9��8���(��������������#�����������������

� ����������� ������������������������������� �������

���������� ����������������������������� ���������������

• �������������������

� 9���������� ������������/(� ���������� ������������

�������*�����������������

� 9���� ������ ���� ����������/(#������ ����������

�������������������� ��������� ��������������

��������D��������������������� �����������������

�����������������������������������������������

��� ���

• ��������������������������������� �������������������� ��

������#����������!!""!"!"#������������������

��� ��%���

• ������������������$,4�������!!!!!!!!!!!"�������

�����������������#����������� �����������������������

��� ��

• �������������������� �������������������������� �

$,4��

����������������������

• ���1�:�������������������9��8���(���B������������

����������������������������������������������������

�����������������������������������������������������

���%�������&������� ����������������������������� &����

• ������ ��������������������������%������&����

• ����������������������������������������� �������� �����

����������

• )��������������������� �� �&�����)<��� ��#��������������

�������

• ������������������������� ���������������������#�������

������������������������� �������������� �� ��������

��������������������������������� ������������������

������ ������� ����

� �� ����������������������������������� �� ��������

����� ����� ��������������� �����

� �� ������������� �� ������������� ���������

���� �����

� �� ��������� �� ����������� ������ �����������

������ ����������������������� ���������

� ���������������� �� ������������� �����#����

��������������

• 9�������������� �� ���������������������#�����������

��������������� ���������������� ����������������

C�����&�������� ��������#3����"@#1!!./0"<�3

IP Page 19

Page 30: Image Compression Redundancy and Compression Ratioaitrivra.tripod.com/ip/lecture_notes/ip09.pdf · 2009-03-25 · coding redundancy. • It uses the fact that generally images have

1�:��������������0

• ������������������������������������������

����� ��))����$������&��������'���&���• ��������������#������������������1�������"�

• ������������#����������������������������

���������"����" ������������� �����(�

• ������������������� ��������������������

• �������������������������������������#��������

���������

• 2������������������������������������������ �

��#• 9���������������������������!!!"��

�������• �������������������������������������������������

��� ������������������������������ ���������

• 9����%�������� ���#����������������� ��� ���

�" ��� ���������������������������%����

���������!!"�

• 9� ����������� ���#������������� ����������� ��

���������� �������������������������������

• ���1���)�������������������������������

������������� �������������������������

IP Page 20

Page 31: Image Compression Redundancy and Compression Ratioaitrivra.tripod.com/ip/lecture_notes/ip09.pdf · 2009-03-25 · coding redundancy. • It uses the fact that generally images have

&��������������������������������

• ��9�����9&,������������� ������P2$8���������

• ���P2$8��������������������������������� �������0� �������)�&������� )�)��������������������:��������

�����������������������U� ���1���������� )�)����� ���������������#�� �����������#

��� ����� ������������������������U���� ����������������������� )�)������� �����������������

• 9������������������#�������������)��!�����&��)�&���)�)������������

������������������������������'����#����������������%��:�� �������������������""�����

• �����������������������������0:�����������#������%����#��� ��������4�� ��������� �����

• T����� ������������� ��������������������%�'�'

• ��������/B����������� ��������������������� �����������1��"#�����1�������������������� ����� ����

• ���1�:������������������������������������������#������%��

�����������#���� ���%� %� �������#�����"�:���������������%��������������

• ������������������������������� ��������������� ��������� ���������� ����������������#�������� �����%���

• �����%�������������������������� � ����������� �����������������������������7� ���������������������� %����

• ���:��������������������������������� �����:���������������

��� ���������� ��

• �������� �������������P2$8*�����������

�����������������P2$8���

• ����������������������������������������:�������������������

������ ������������������ ��

• 9����:����������������������������������%��������� �����

�����������������"@#����������� :2�3������������+�1/���"@�H��<#�����������:��������������� ��B������/�"B�

• 9������������������������*�������������������������/�".#���������������������� ��B������������"!"��(��������#��������

������� ����������������������� ��B������������@�����

• ����������� B���������� ��������������������� �������������4&C��

�������������� �����

• )�� ������:��������������� ��N# ����������+4&C���������� ���������������+4&C������� ��� ����������������"�

• )��������������<#�������������4&C�����!"""��"�!""!#������:2�3����:���������"!"!""!�

• A�%������������������������������������������������������:����������������������������������������������������%���

������������������������ �����%�������������������#������������� ���������� �����%�������������

• ����������%���������������������������������(���������!"!!#��������1�������������������������������������������� ������

���� ��1��������������%��� ��������������������������������

$������0

������������ ��1./-1

�����:����AI'

E��� &�������������%�������������

,����� �"�:��������� ��������%� �%�

�������

P2$8 ��������#3����"@#1!!.@0!<�3

IP Page 21

Page 32: Image Compression Redundancy and Compression Ratioaitrivra.tripod.com/ip/lecture_notes/ip09.pdf · 2009-03-25 · coding redundancy. • It uses the fact that generally images have

IP Page 22

Page 33: Image Compression Redundancy and Compression Ratioaitrivra.tripod.com/ip/lecture_notes/ip09.pdf · 2009-03-25 · coding redundancy. • It uses the fact that generally images have

Image Restoration:

(refer to chap 5, art 5.1, 5.2 and 5.3 upto 5.3.2)