image compression in data compression

17
Term paper Image compression In Data compression Submitted by:- Jabir ali Roll no.A90 Cap 604 Reg-11102338 Submitted to:- SARUCHI MAM

Upload: zaabir-ali

Post on 11-Nov-2014

504 views

Category:

Education


2 download

DESCRIPTION

term paper

TRANSCRIPT

Page 1: image compression in data compression

Term paper

Image compression

In

Data compression

Submitted by:-

Jabir ali

Roll no.A90

Cap 604

Reg-11102338

Submitted to:-

SARUCHI MAM

Page 2: image compression in data compression

A c k n o w l e d g e me nt I would like to express my special thanks of gratitude to my teacher who gave me the golden opportunity to do this wonderful project on the topic (“image compression in data compression”) which also helped me in doing a lot of research and I came to know about so many new things I am really thankful to him .Secondly I would also like to thank my parents and friends who helped me a lot in finishing this project within the limited time I am making this project not only for marks but to also increase my knowledge thanks again to all who helped me.

Page 3: image compression in data compression

CONTENT1. Introduction to image comp.2. Image Compression Coding3. Reduce the Correlation between Pixels4. Quantization5. Entropy Coding

Differential encoding Huffman encoding Frame building

Introduction to image compression

Image compression is an application of data compression that encodes the original image with few bits. The objective of image compression is to reduce the redundancy of the image and to store or transmit data in an efficient form. shows the block diagram of the general image storage system. The main goal of such system is to reduce the storage quantity as much as possible, and the decoded image displayed in the monitor can be similar to the original image as much as can be.

Page 4: image compression in data compression

Color specification(1) Luminance: received brightness of the light, which is proportional to the totalenergy in the visible band.

(2)Chrominance : describe the perceived color tone of a light, which depends onthe wavelength composition of light chrominance is in turn characterized by two attributes – hue and saturation.

1. hue: Specify the color tone, which depends on the peak wavelength of the light

2. saturation: Describe how pure the color is, which depends on the spread orbandwidth of the light spectrum

Image Compression Coding Image compression coding is to store the image into bit-stream as compact as possible and to display the decoded image in the monitor as exact as possible. Now consider an encoder and a decoder as When the encoder receives the original image file, the image file will be converted into a series of binary data, which is called the bit-stream. The decoder then receives the encoded bit-stream and decodes it to form the decoded image. If the total data quantity of the bit-stream is less than the total data quantity of the original image, then this is called image compression.

Page 5: image compression in data compression

Reduce the Correlation between Pixels

The correlation between one pixel and its neighbor pixels is very high, or we can say that the values of one pixel and its adjacent pixels are very similar. Once the correlation between the pixels is reduced, we can take advantage of the statistical characteristics and the variable length coding theory to reduce the storage quantity. This is the most important part of the image compression algorithm; there are a lot of relevant processing methods beingproposed.

Predictive Coding : Predictive Coding such as DPCM (Differential PulseCode Modulation) is a lossless coding method, which means that the decoded image and the original image have the same value for every corresponding element.

Orthogonal Transform: Discrete Cosine Transform (DCT) are the two most well-known orthogonal transforms. The DCT-based image compression standard such as JPEG is a lossy coding method that will result in some loss of details and unrecoverable distortion.

Subband Coding : Sub band Coding such as Discrete Wavelet Transform(DWT) is also a lossy coding method. The objective of sub band coding is to divide the

Page 6: image compression in data compression

spectrum of one image into the low pass and the high pass components. JPEG 2000 is a 2-dimension DWT based image compression standard.

QuantizationThe main objective of entropy coding is to achieve less average length of the image. Entropy coding assigns code words to the corresponding symbols according to the probability of the symbols. In general, the entropy encoders are used to compress the data by replacing symbols represented by equal-length codes with the code words whose length is inverse proportional to corresponding probability.

JPEG – Joint Picture Expert GroupThe Encoder and Decoder model of JPEG. We will introduce the operation and fundamental theory of each block in the following sections.The Encoder model of JPEG compression standard

Page 7: image compression in data compression

The Encoder model of JPEG compression standard

Page 8: image compression in data compression

The Decoder model of JPEG compression standard

Page 9: image compression in data compression

Quantization in JPEGThe goal of quantization is to reduce most of the less important high frequency DCT coefficients to zero, the more zeros we generate the better the image will compress. The matrix Q generally has lower numbers in the upper left direction and large numbers in the lower right direction. Though the high-frequency components are removed, the IDCT still can obtain an approximate matrix which is close to the original 8×8 block matrix. The JPEG committee has recommended certain Q matrix that work well and the performance is close to the optimal condition, the Q matrix for luminance and chrominance components is defined.

Page 10: image compression in data compression
Page 11: image compression in data compression

Zigzag Scan

After quantization, the DC coefficient is treated separately from the 63 AC coefficients. The DC coefficient is a measure of the average value of the original 64 image samples. Because there is usually strong correlation between the DC coefficients of adjacent 8×8 blocks, the quantized DC coefficient is encoded as the difference from the DC term of the previous block. This special treatment is worthwhile, as DC coefficients frequently contain a significant fraction of the total image energy. The other 63 entries are the AC components. They are treated separately from the DC coefficients in the entropy coding process.

The zigzag scan

Page 12: image compression in data compression

Entropy Coding in JPEG

Differential Coding The mathematical representation of the differential coding is:

Differential Coding

Run-Length CodingAfter quantization and zigzag scanning, we obtain the one-dimensional vectors with a lot of consecutive zeroes. We can make use of this property and apply zero-run -length coding, which is variable length coding. Let us consider the 63 AC coefficients in the original 64 quantized vectors first.

57, 45, 0, 0, 0, 0, 23, 0, -30, -16, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, ..., 0 We encode then encode the vector

(0,57) ; (0,45) ; (4,23) ; (1,-30) ; (0,-16) ; (2,1) EOB

The notation (L,F) means that there are L zeros in front of F, and EOB (End of Block) is a special coded value means that the rest elements are all zeros. If the

Page 13: image compression in data compression

last element of the vector is not zero, then the EOB marker will not be added. On the other hand, EOC is equivalent to (0,0), so we can express

(0,57) ; (0,45) ; (4,23) ; (1,-30) ; (0,-16) ; (2,1) ; (0,0)

Huffman EncodingSignificant levels of compression can be obtained by replacing long string of binary digits by a string of much shorter code wordsThe length of each code word being a function of its relative frequency of occurrence

The JPEG Huffman coding restricts the number of previous zero(s) within 15 becausethe length of the encoded data is 4 bits. Hence, we can encode57, eighteen zeroes, 3, 0, 0, 0, 0, 2, thirty-three zeroes, 895, EOB into(0,57) ; (15,0) ; (2,3) ; (4,2) ; (15,0) ; (15,0) ; (1,895) ; (0,0)

(15,0) is a special coded value which indicates that there are 16 consecutive zeroes.Therefore, the both of the values 18 and 33 are converted to 15.

The right value of the bracket is called category, andthe left value of the bracket is called run. We can encode the category by looking up which is specified in the JPEG standard. For example, 57 is in the category 6 and the bits for the value is 111001, so we encode it as 6,111001. The full encodedsequence of 57, 45, 0, 0, 0, 0, 23, 0, -30, -16, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, ..., 0

(0,6,111001);(0,6,101101);(4,5,10111);(1,5,00001);(0,4,0111);(2,1,1);(0,0)

Page 14: image compression in data compression

The JPEG standard specifies the Huffman table for encoding the AC coefficientsThe final step is to encode by using the HuffmanThe encoding method is quite easy and straight forward. For instance, the code (0,6)is encoded as 1111000, and the code (4,5) is encoded as 1111111110001000. The finalbit-stream stored in the JPEG file57, 45, 0, 0, 0, 0, 23, 0, -30, -16, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, ..., 0

1111000 1111001 , 111000 101101 , 1111111110011000 10111 ,11111110110 00001 , 1011 0111 , 11100 1 , 1010

Page 15: image compression in data compression

Frame BuildingThe frame builder is to encapsulate all the information relating to an encoded

image/picture in this format