Digital image processing- Compression- Different Coding techniques

1,767 views 36 slides May 21, 2021
Slide 1
Slide 1 of 36
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20
Slide 21
21
Slide 22
22
Slide 23
23
Slide 24
24
Slide 25
25
Slide 26
26
Slide 27
27
Slide 28
28
Slide 29
29
Slide 30
30
Slide 31
31
Slide 32
32
Slide 33
33
Slide 34
34
Slide 35
35
Slide 36
36

About This Presentation

Image Compression- Different coding Techniques such as Huffman coding, Bit plane and Arithmetic coding are discussed. By using these coding techniques compression of data or image can be achieved.


Slide Content

Huffman Coding, Bit plane coding and arithmetic coding Dr. r.sudarmani , associate professor/ ece MERISH S A, III ECE Avinashilingam institute

TOPIC 1: VARIABLE LENGTH CODING Variable length coding method is used to minimize the coding redundancy. Variable-length coding reduces only coding redundancy by assigning the shortest possible code words to the most probable (grey) levels. The most popular variable length coding is “Huffman coding method”.

Codes: It is a group of bits. Types of codes: Fixed length code Variable length code FIXED LENGTH CODE: Each code word uses the same number of bits. VARIABLE LENGTH CODE: Each code word uses different number of bits. Eg : Assign A= 000; B=000 which is fixed length code Assign A=00; B=100 which is variable length code

HUFFMAN CODING METHOD: It is also known as minimum redundancy method. ( ie ) it leads to the lowest possible value of 1 for given m. There are three procedure for obtaining Huffman coding, they are list the source symbols in order of decreasing probability. Combine the probabilities of the two symbols having the lowest probabilities and reorder the resultant probabilities. This step is called reduction. The same procedure is repeated until there are two ordered probabilities remaining

EXAMPLE: CALCULATE THE HUFFMAN CODES FOR THE SET OF SYMBOLS AS SHOWN IN TABLE SYMBOLS A B C D PROBABILITY 0.4 0.3 0.2 0.1

EXAMPLE 2: A source has 6 symbols a1,a2,a3,a4,a5,a6 with probabilities 0.1,0.4,0.06,0.1,0.04.0.3 respectively attached to every symbol. construct Huffman code for the source and calculate the codeword.

REFERENCE: https://www.youtube.com/watch?v=FfiDvZnlKZI https://www.youtube.com/watch?v=oxVauLakNcY

TOPIC 2: BIT PLANE CODING Bit-plane coding has been widely used in lossless compression of gray-scale images or color palette images and Bit plane coding technique is an effective approach to provide bitstream truncation ability. It splits a multilevel image into a series of bit level image. The gray levels of an m-bit gray-scale image can be represented in the form of the base 2 polynomial

We can generate three bit plane are; The Zero’th bit plane is generated by collecting the a0 bits of each pixels. The first order bit plane is generated by collecting the all bits of each pixel. The m-1 order bit plane is generated by collecting the m-1 bits of each pixel

EXAMPLE : In given grey scale image apply bit plane coding. A = 2 6 6 6 7 7 1 2 4

STEP 1: Write the given input in binary equivalent code A= 010 111 110 110 111 111 001 010 100

STEP 2: A can be divided into three planes, By using MSB By using middle bits By using LSB 0 1 1 0 0 1 A( msb )= 1 1 1 a( lsb )= 0 1 1 0 0 1 1 0 0 A(middle) = 1 1 1 1 1 1 0 1 0

The disadvantages of this type is that neighbourhood in the spatial domain like 3 and 4 have binary code 011 and 100 are not present together in any plane. To avoid this problem grey codes can be used instead of binary codes In grey codes, successive codes differ by only one bit.

Here, the exclusive OR operation is done . This code has the unique property that successive code words differ in only one bit position. Thus, small changes in gray level are less likely to affect all m bit planes. For instance, when gray levels 127 and 128 are adjacent, only the 7th bit plane will contain a 0 to 1 transition, because the Gray codes that correspond to 127 and 128 are 11000000 and 01000000, respectively.

Reference: https://www.youtube.com/watch?v=7_AolrMtWYk&t=5s https://www.imageeprocessing.com/2015/10/bit-plane-compression.html http://vemu.org/uploads/lecture_notes/30_12_2019_616360124.pdf

ARITHMETIC CODING Arithmetic coding is a popular compression algorithm after Huffman coding and it is particularly useful for a relatively small and skewed alphabet. It is also one of the types of lossless compression algorithm. arithmetic coding algorithm encodes an entire file as a sequence of symbols into a single decimal number.

The initial interval [0, 1) (or [0, 1]) is successively divided into subintervals on each iteration according to the probability distribution. The subinterval that corresponds to the input symbol is selected for next iteration. The interval derived at the end of this division process is used to decide the codeword for the entire sequence of symbols.

PROCEDURE FOR ARITHMETIC CODING: Step 1: divide the numeric range 0 to 1 into number of different symbol present in the messages. Step 2: expand the first letter to be coded along with the range .further subdivide this range into number of symbols. Step 3: repeat the procedure until termination character is coded.

EXAMPLE: Code the string CAB using arithmetic coding. Character A B C probability 0.6 0.3 0.1

EXAMPLE: Consider the transmission of the message “ went. ” comprising a string of characters with probabilities e=0.3, n=0.3, t=0.2, w=0.1, .=0.1

Here the arithmetic codeword range is 0.81602 to 0.8162

DIFFERENCE BETWEEN ARITHMETIC CODING AND HUFFMAN CODING ARITHMETIC CODING HUFFMAN CODING Complex technique for coding short messages Simple techniques Gives optimum results Does not give optimum results There is no one to one correspondence between source symbol and codeword There is one to one correspondence between source symbol and codeword Compression ratio is more Compression ratio is less Execution time is more Execution time is less

applications Arithmetic coding is used in a variety of lossless and lossy compression applications. It is a part of many international standards. arithmetic coding is used in image compression, audio compression, and video compression standards.

REFERENCE: https://youtu.be/SNvY3_FEBCM https://youtu.be/4yYgRAHtDLk

THANK YOU