IMAGE COMPRESSION. Chapter - 5 : (Basic)

Similar documents
Topic 5 Image Compression

CMPT 365 Multimedia Systems. Media Compression - Image

IMAGE COMPRESSION. Image Compression. Why? Reducing transportation times Reducing file size. A two way event - compression and decompression

Image Compression Algorithm and JPEG Standard

Features. Sequential encoding. Progressive encoding. Hierarchical encoding. Lossless encoding using a different strategy

Video Compression An Introduction

Digital Image Processing

Compression II: Images (JPEG)

Lecture 5: Compression I. This Week s Schedule

AN ANALYTICAL STUDY OF LOSSY COMPRESSION TECHINIQUES ON CONTINUOUS TONE GRAPHICAL IMAGES

IMAGE COMPRESSION- I. Week VIII Feb /25/2003 Image Compression-I 1

DIGITAL TELEVISION 1. DIGITAL VIDEO FUNDAMENTALS

1.Define image compression. Explain about the redundancies in a digital image.

7.5 Dictionary-based Coding

CS 335 Graphics and Multimedia. Image Compression

Index. 1. Motivation 2. Background 3. JPEG Compression The Discrete Cosine Transformation Quantization Coding 4. MPEG 5.

Wireless Communication

Digital Image Processing

CHAPTER 6. 6 Huffman Coding Based Image Compression Using Complex Wavelet Transform. 6.3 Wavelet Transform based compression technique 106

Lecture 8 JPEG Compression (Part 3)

CoE4TN4 Image Processing. Chapter 8 Image Compression

So, what is data compression, and why do we need it?

Image compression. Stefano Ferrari. Università degli Studi di Milano Methods for Image Processing. academic year

IMAGE COMPRESSION TECHNIQUES

Multimedia Communications. Transform Coding

Department of electronics and telecommunication, J.D.I.E.T.Yavatmal, India 2

Image Coding and Compression

Digital Image Representation Image Compression

IMAGE COMPRESSION USING HYBRID QUANTIZATION METHOD IN JPEG

Review and Implementation of DWT based Scalable Video Coding with Scalable Motion Coding.

A NEW ENTROPY ENCODING ALGORITHM FOR IMAGE COMPRESSION USING DCT

Multimedia Systems Image III (Image Compression, JPEG) Mahdi Amiri April 2011 Sharif University of Technology

ISSN (ONLINE): , VOLUME-3, ISSUE-1,

Data and information. Image Codning and Compression. Image compression and decompression. Definitions. Images can contain three types of redundancy

Part 1 of 4. MARCH

A Image Comparative Study using DCT, Fast Fourier, Wavelet Transforms and Huffman Algorithm

Image and Video Compression Fundamentals

VC 12/13 T16 Video Compression

Lecture 6: Compression II. This Week s Schedule

CHAPTER 4 REVERSIBLE IMAGE WATERMARKING USING BIT PLANE CODING AND LIFTING WAVELET TRANSFORM

AUDIOVISUAL COMMUNICATION

Interactive Progressive Encoding System For Transmission of Complex Images

Fundamentals of Video Compression. Video Compression

Professor Laurence S. Dooley. School of Computing and Communications Milton Keynes, UK

06/12/2017. Image compression. Image compression. Image compression. Image compression. Coding redundancy: image 1 has four gray levels

Image Compression - An Overview Jagroop Singh 1

Introduction ti to JPEG

JPEG: An Image Compression System. Nimrod Peleg update: Nov. 2003

CSEP 521 Applied Algorithms Spring Lossy Image Compression

Chapter 1. Digital Data Representation and Communication. Part 2

Compression of Stereo Images using a Huffman-Zip Scheme

2014 Summer School on MPEG/VCEG Video. Video Coding Concept

JPEG: An Image Compression System

Lecture 8 JPEG Compression (Part 3)

Lecture Information Multimedia Video Coding & Architectures

A COMPRESSION TECHNIQUES IN DIGITAL IMAGE PROCESSING - REVIEW

15 Data Compression 2014/9/21. Objectives After studying this chapter, the student should be able to: 15-1 LOSSLESS COMPRESSION

A Comparative Study of DCT, DWT & Hybrid (DCT-DWT) Transform

ECE 417 Guest Lecture Video Compression in MPEG-1/2/4. Min-Hsuan Tsai Apr 02, 2013

2.2: Images and Graphics Digital image representation Image formats and color models JPEG, JPEG2000 Image synthesis and graphics systems

Digital Image Representation. Image Representation. Color Models

REVIEW ON IMAGE COMPRESSION TECHNIQUES AND ADVANTAGES OF IMAGE COMPRESSION

Image coding and compression

JPEG. Wikipedia: Felis_silvestris_silvestris.jpg, Michael Gäbler CC BY 3.0

Tutorial T5. Video Over IP. Magda El-Zarki (University of California at Irvine) Monday, 23 April, Morning

DIGITAL IMAGE PROCESSING WRITTEN REPORT ADAPTIVE IMAGE COMPRESSION TECHNIQUES FOR WIRELESS MULTIMEDIA APPLICATIONS

Image Transformation Techniques Dr. Rajeev Srivastava Dept. of Computer Engineering, ITBHU, Varanasi

Digital Image Processing

Lecture Information. Mod 01 Part 1: The Need for Compression. Why Digital Signal Coding? (1)

Digital Image Processing (EI424)

( ) ; For N=1: g 1. g n

Multimedia Networking ECE 599

DCT Based, Lossy Still Image Compression

Robert Matthew Buckley. Nova Southeastern University. Dr. Laszlo. MCIS625 On Line. Module 2 Graphics File Format Essay

DIGITAL IMAGE WATERMARKING BASED ON A RELATION BETWEEN SPATIAL AND FREQUENCY DOMAINS

HYBRID TRANSFORMATION TECHNIQUE FOR IMAGE COMPRESSION

Adaptive Quantization for Video Compression in Frequency Domain

International Journal of Emerging Technology and Advanced Engineering Website: (ISSN , Volume 2, Issue 4, April 2012)

Statistical Image Compression using Fast Fourier Coefficients

JPEG Compression. What is JPEG?

compression and coding ii

Digital Image Processing

Final Review. Image Processing CSE 166 Lecture 18

IMAGE COMPRESSION. October 7, ICSY Lab, University of Kaiserslautern, Germany

IMAGE PROCESSING (RRY025) LECTURE 13 IMAGE COMPRESSION - I

IT Digital Image ProcessingVII Semester - Question Bank

Image Compression Compression Fundamentals

Sparse Transform Matrix at Low Complexity for Color Image Compression

Fingerprint Image Compression

MRT based Fixed Block size Transform Coding

Compression Part 2 Lossy Image Compression (JPEG) Norm Zeck

Lossless Image Compression having Compression Ratio Higher than JPEG

Week 14. Video Compression. Ref: Fundamentals of Multimedia

Advanced Video Coding: The new H.264 video compression standard

An introduction to JPEG compression using MATLAB

Image Compression. CS 6640 School of Computing University of Utah

Optimized Progressive Coding of Stereo Images Using Discrete Wavelet Transform

JPEG 2000 Still Image Data Compression

Biomedical signal and image processing (Course ) Lect. 5. Principles of signal and image coding. Classification of coding methods.

Forensic analysis of JPEG image compression

Transcription:

Chapter - 5 : IMAGE COMPRESSION (Basic) Q() Explain the different types of redundncies that exists in image.? (8M May6 Comp) [8M, MAY 7, ETRX] A common characteristic of most images is that the neighboring pixels are correlated and therefore contain redundant information. The foremost task then is to find less correlated representation of the image. Two fundamental components of compression are redundancy and irrelevancy reduction. Redundancy reduction aims at removing duplication from the signal source (image/video). Irrelevancy reduction omits parts of the signal that will not be noticed by the signal receiver, namely the Human Visual System (HVS). Types of redundancies are as follows : Spatial Redundancy or correlation between neighbouring pixel values. Spectral Redundancy or correlation between different color planes or spectral bands. Temporal Redundancy or correlation between adjacent frames in a sequence of images (in video applications). Image compression research aims at reducing the number of bits needed to represent an image by removing the spatial and spectral redundancies as much as possible. In digital image compression, three basic data redundancies can be identified and exploited : Coding redundancy, Inter-pixel redundancy and Psychovisual redundancy. ) Coding Redundancy. If the gray levels of an image are coded in a way that uses more code symbols than absolutely necessary to represent each gray level then, the resulting image is said to contain coding redundancy. IP Help Line : 9 9 8 7 3 8 8 www.guideforengineers.com 67 67

2) Inter-pixel Redundancy. The gray levels not equally probable. The value of any given pixel can be predicted from the value of its neighbors that is they are highly correlated. The information carried by individual pixel is relatively small. To reduce the inter-pixel redundancy the difference between adjacent pixels can be used to represent an image. 3) Psychovisual Redundancy. The psychovisual redundancies exist because human perception does not involve quantitative analysis of every pixel or luminance value in the image. It s elimination is real visual information is possible only because the information itself is not essential for normal visual processing. Q(2) Describe the general compression system model. (6M May6 IT) Image compression system reduces the number of bits needed to represent an image by removing the spatial and spectral redundancies as much as possible. In digital image compression, three basic data redundancies can be identified and exploited. Coding redundancy, Inter-pixel redundancy and psychovisual redundancy. Input Image Preprocessing Lossless Encoding Entropy Encoder Encoded Image Lossy Quantization IP Help Line : 9 9 8 7 3 8 8 www.guideforengineers.com 68 68

Source Encoder (or Linear Transformer) Over the years, a variety of linear transforms have been developed which include Discrete Fourier Transform (DFT), Discrete Cosine Transform (DCT) [], Discrete Wavelet Transform (DWT) and many more, each with its own advantages and disadvantages. Quantizer A quantizer simply reduces the number of bits needed to store the transformed coefficients by reducing the precision of those values. Since this is a many-to-one mapping, it is a lossy process and is the main source of compression in an encoder. Quantization can be performed on each individual coefficient, which is known as Scalar Quantization (SQ). Quantization can also be performed on a group of coefficients together, and this is known as Vector Quantization (VQ). Both uniform and non-uniform quantizers can be used depending on the problem at hand. Entropy Encoder An entropy encoder further compresses the quantized values losslessly to give better overall compression. It uses a model to accurately determine the probabilities for each quantized value and produces an appropriate code based on these probabilities so that the resultant output code stream will be smaller than the input stream. The most commonly used entropy encoders are the Huffman encoder and the arithmetic encoder, although for applications requiring fast execution, simple run-length encoding (RLE) has proven very effective. It is important to note that a properly designed quantizer and entropy encoder are absolutely necessary along with optimum signal transformation to get the best possible compression. IP Help Line : 9 9 8 7 3 8 8 www.guideforengineers.com 69 69

Q(3) Write short notes on: Psychovisual redundancy. (M Dec6 IT) (5M May5 Comp) Eye does not respond with equal sensitivity to all visual information. Certain information has lees relative importance than other information in normal visual processing. This information is said to be psychovisually redundant. It can be eliminated without significantly impairing the quality of image perception. The psychovisual redundancies exist because human perception does not involve quantitative analysis of every pixel or luminance value in the image. In general, an observer searches for distinguishing features such as edges or textural regions and mentally combines them into recognizable groupings. The brain then correlates these groupings with prior knowledge in order to complete the image interpretation processes. Psychovisual redundancies are associated with real visual information. It s elimination in real visual information is possible only because the information itself is not essential for normal visual processing. Since the elimination of psychovisual redundant data, results in a loss of quantitative information, its is commonly referred to as quantization Q(4) Classify Image Compression Techniques. (5M Dec6 Comp) In Lossy compression techniques reconstructed image contains loss of information. Which in turn produces distortion in the image. The resulting distortion may or may not be visually apparent. This compromising accuracy of the reconstructed image gives very high compression ratio. IP Help Line : 9 9 8 7 3 8 8 www.guideforengineers.com 7 7

Q(5) Explain Objective And Subjective Fidelity Criteria (M Dec 4 Comp) The criteria for an assessment of a the quality of an image are ) Objective Fidelity Criteria and 2) Subjective Fidelity Criteria. ) Objective Fidelity Criteria : - a) Mean Square Error [MSE] : Let f (x,y) represent an input image and Let fˆ (x, y) denote an estimate or appro of f (x,y) For any value of x and y, the error e (x,y) between f(x,y) and fˆ (x, y) can be defined as, e (x,y) = f (x,y) fˆ (x, y) So that the total error between the two images is M N x, y= [ f ( x, y) fˆ ( x, y) ] Where the images are of size M x N. The root mean square error between f (x,y) and fˆ (x, y) is defined as, M 2 ˆ 2 = N e rms [ f ( x, y) f ( x, y) ] == MSE MN x= y= b) Signal to Noise Ratio [SNR} SNR c) Peak Signal to Noise Ratio [PSNR] IP Help Line : 9 9 8 7 3 8 8 www.guideforengineers.com 7 7 = M x =, PSNR M N x =, y = N y = [ f = M x=, f ( x, y) ( x, y) N y= M N x=, y= 2 fˆ ( x, y)] (255)2 [ f ( x, y) 2 fˆ ( x, y) ] 2) Subjective fidelity criteria :- Images are viewed by human beings. Therefore measuring image quality by the subjective evaluations of a human observer is more appropriate. This can be accomplished by showing a typical decompressed image to an appropriate cross section of viewers and averaging their evaluations. The evaluations may be made using an absolute rating scale or by means of side by side comparisons of f (x,y) and fˆ (x, y), side by side comparisons can be done with the following scale. 2

) {, 2, 3, 4, 5, 6} to represent subjective evaluations such as {Excellent, Fine, Passable, Marginal, Inferior, Unusable} respectively. 2) {- 3, - 2, -,,, 2, 3} to represent subjective evaluations such as {much worse, worse, slightly worse, the same, slightly better, better, much better] respectively. These evaluations are said to be based on subjective fidelity criteria. Value Rating Description Excellent An image of extremely high quality, as good as you could desire. 2 Fine An image of high quality, providing enjoyable viewing. Interference is not objectionable. 3 Passable An image of acceptable quality. Interference is not objectionable. 4 Marginal An image of poor quality; you wish you could improve it. Interference is somewhat objectionable. 5 Inferior A very poor image, but you could watch it. Objectionable interference is definitely present. 6 Unusable An image so bad that you could not watch it. Q(6) Explain Arithmetic Coding (6M Dec 4 Comp) In arithmetic coding one to one correspondence between source symbols and code words does not exists. Instead an entire sequence is assigned single code word. The codeword its self defines an interval of real numbers between and. As the number of symbols in the message increases, the interval used to represent it becomes smaller and the number of information bits required to represent the interval becomes larger. Each symbol of the message reduces the size of the interval in accordance with its probability of occurrences Example : -- IP Help Line : 9 9 8 7 3 8 8 www.guideforengineers.com 72 72

Q(7) Classify with reasons, the following data compression techniques into Lossy and Lossless schemes [8 M, MAY 7, ETRX] i] Run length coding. ii] DCT compression. (Loss-less) Q(8) Given below is a table of eight symbol and their frequency of occurrence. Symbol S S S2 S3 S4 S5 S S7 Frequency.25.5.6.8.2.4.7.4 (a) Give Huffman code for each eight symbol. (6M Dec.4 I.T) (b) Evaluate minimum number of average bits of sequence per symbol. (c) What is coding efficiency for the code you have obtained in part (a)? Q(9) Generate Huffman code for the given image source. Calculate entropy of the source, average length of the code generated and the compression ratio achieved compare it to standard binary encoding. (2M May6 Etrx) Symbol A A2 A3 A4 A5 A6 A7 A8 probability.6.2.2.6.4..3.4 Q() Find Huffman code for the following six symbols. The symbols and their probabilities are given in tabular form: (M Dec6 IT) Symbol A A2 A3 A4 A5 A6 Probability..4.6..4.3 Q() Short Note: Huffman coding and Run length coding. (M Dec5 IT) Q(2) How many unique Huffman codes are there for three symbol source? construct these modes. [4 M, MAY 7, Comp] Solution : Consider three symbols s, s2, s3 with probabilities p,p2 and p3 respectively. IP Help Line : 9 9 8 7 3 8 8 www.guideforengineers.com 73 73

Case : When P > P 2 > P 3 SYMBOL PROBABILTY S P P23 S2 P2 P S3 SYMBOL S S2 S3 CODE Case 2: When P > P 3 > P 2 SYMBOL PROBABILTY S P P23 S3 P3 P S2 P2 SYMBOL S S3 S2 CODE Case 3: When P 2 > P > P 3 SYMBOL PROBABILTY S2 P2 P23 S P P S3 P3 SYMBOL S2 S S3 CODE Case 4: When P 2 > P 3 > P SYMBOL PROBABILTY S2 P2 P23 S3 P3 P S P SYMBOL S2 S3 S CODE IP Help Line : 9 9 8 7 3 8 8 www.guideforengineers.com 74 74

. Case 5: When P 3 > P > P 2 SYMBOL PROBABILTY S3 P3 P23 S P P S2 P2 SYMBOL S3 S S2 CODE Case 6: When P 3 > P 2 > P SYMBOL PROBABILTY S3 P3 P23 S2 P2 P S P SYMBOL S3 S2 S CODE Q(3) For a given source A = { a, a2, a3, a4 } the following codes were developed. Check for each of them whether it is uniquely decodable or not. Also state which is the most optimum compared to others? Why? Solution : SYMBOL PROBABILITY CODE- CODE-2 CODE-3 CODE-4 a.5 a2.25 a3.25 a4.25 Code -2 and Code -4 are NOT uniquely decodable code. In Code- : The prefix of the code is not a valid codeword. Therefore Code- is uniquely decodable Code. In Code-2, the codeword for symbol a4 is. The single bit prefix of code(a4) is which is a valid codeword. Therefore, code-2 is NOT uniquely decodable code. In Code-3, the single bit prefix of a2, a3 and a4 is and it is not a valid codeword. Two bit prefix of code(a3) and Code(a4) is and it is not a valid codeword. Therefore Code-3 is uniquely decodable Code. IP Help Line : 9 9 8 7 3 8 8 www.guideforengineers.com 75 75

In Code-4, the single bit prefix is not a valid codeword. Two bit prefix of Code(a3) is (which is not a valid codeword.) and Code-4 is ( which is a valid codeword). Therefore, code-4 is NOT uniquely decodable code. To find Optimum Code, find Average Length. () For Code- : Lavg = N k = Pk Lk = P L + P 2 L 2 + P 3 L 3 + P 4 L 4 = (.5)(2)+ (.25)(2)+ (.25)(2)+ (.25)(2) Lavg = bit/symbol (2) For Code-3 : Lavg = N k = Pk Lk = P L + P 2 L 2 + P 3 L 3 + P 4 L 4 = (.5)()+ (.25)(2)+ (.25)(3)+ (.25)(3) Lavg =.75 bit/symbol Code - has minimum value of Average Length. So the efficiency of Code- is greater than the efficiency of Code-3. Therefore Code- is an Optimum code. Q(4) Can variable length coding procedures be used to compress a histogram equalized image with gray levels?. Explain. (M May6 Comp) Q(5) What is Constant Area Coding Technique? (5M Dec6 Comp) The image is divided into blocks of size (m x n pixels which are classified as all white, all black or mixed intensity. the most frequently occurs category is assigned the bit code word and other two categories are assigned the 2 codes and. The mixed intensity category block is coded using 2 bit code word as a prefix which is followed by the m x n bit pattern of the pixel. Example :- IP Help Line : 9 9 8 7 3 8 8 www.guideforengineers.com 76 76

Compression is achieved because the (m x n) bits that will be replaced by bit or 2 code words. When predominantly white text documents are compressed a slightly simpler approach is to code the solid white areas as and all other blocks (including solid black blocks) by a followed by the bit pattern of the block. This approach is called white block skipping (WBS). As few black areas are expected, they are grouped with the mixed intensity regions. Q(6) Explain Bit plane Coding. (5M May5 Comp)(6M Dec 4 Comp) Bit plane technique is an error free compression that exploits the images interpixel redundancies. Bit plane technique is based on the concept of decomposing a multilevel image (monocrome or colour) into a series of binary images and compressing each binary image. Bit Plane Decomposition :- The gray levels of an m bit gray scale image can be represented in the form of the base 2 polynomial. am 2 m + ---------- + a 2 + a 2 By separating the m coefficients into m bit planes, the image gets decomposed into bit planes. Zero order bit plane is generated by collecting a bit of each pixel. In General, each bit plane is numbered from to (m ) and is constructed by setting its pixel equal to the values of the appropriate bits from each pixel. The disadvantage of this approach is that small changes in gray level can have a significant impact on the complexity of the bit planes. If a pixel of intensity 27 () is adjacent to a pixel of intensity 28 ( ), every bit plane will contain a corresponding to (OR to ) transition. This problem can be solved by representing the image by m bit Gray code. The m bit gray code gm.. g2 g g can be computed from IP Help Line : 9 9 8 7 3 8 8 www.guideforengineers.com 77 77

gi = ai + ai + i m 2 gm = am This code has the unique property that successive code words differ in only one bit position. Thus small changes in gray level are lees likely to affect all m bit planes. When gray levels 27 and 28 are adjacent the gray code of 27 = and 28 = That means only the 7 th bit plane will contain a to transition Q(7) Explain B2 Code :- B2 Code is variable length coding. Each code word is made up of continuation bits denoted as C and information bits which are natural binary numbers. The purpose of the continuation code is to separate the individual code words. In B2 code, two information bits are used per continuation bits and hence B2 code. Example :- Consider six symbols with probabilities as given below, Symbol Probability B2 Code S.4 C S2.3 C S3. C S4. C S5.6 CC S6.4 CC Message : S S2 S3 S5 S S6 B2 code : C C C C C C C C C= C= C= C= C= C= C= C= IP Help Line : 9 9 8 7 3 8 8 www.guideforengineers.com 78 78

To Average Length : Lavg = N k = Pk Lk = P L + P 2 L 2 + P 3 L 3 + P 4 L 4 = (.4)(3) + (.3)(3) + (.)(3) + (.)(3) + (.6)(6) + (.4)(6) Lavg = 3.3 bit/symbol Q(8) Explain Shift codes. Algorithm to find shift code word. i) Arrange the source symbols so that their probabilities are monotonically decreasing. ii) Divide the total number of symbol into symbol blocks of equal size. iii) Add special shift up and / or shift down symbols to identify each block. Each Time a shift up or shift down symbol is recognized at the decoder, it moves one block up or down with respect to a predefined reference block. Example of Shift code is Binary Shift Code. Consider 2 source symbols, Arrange the source symbols so that their probabilities are monotonically decreasing and divide into three blocks of seven symbols. The individual symbols (a thro a 7 ) of upper block can be considered as the reference block. Code the symbols in reference block with the binary codes thro. The 8 th binary code is obtained by single shift up control symbol followed by. The 9 th binary code is obtained by single shift up control symbol followed by and so on... This procedure continues to find the code word of the next symbol. The code word for each symbol is control symbol followed by binary sequence of corresponding earlier block symbol codeword. IP Help Line : 9 9 8 7 3 8 8 www.guideforengineers.com 79 79

Q(9) What do you mean by Variable Length Coding technique? Explain at least two Techniques. (M Dec6 Comp) Examples of Variable Length Coding are : Huffman Code, B2 Code, Shift Code. (Lossy) Q(2) Explain Improved Gray Scale (IGS) Quantization :- IGS method recognizes the eye s inherent sensitivity to edges and breaks them up by adding to each a pseudo random number. The pseudo random number is generated from low order bits of neighbouring pixels. Because low order bits are fairly random, this amounts to adding a level of randomness which depends on the local characteristics of the image, to the artificial edges normally associated with false contouring. IGS Quantization Procedure :- PIXEL GRAY LEVEL SUM IGS CODE N / A N / A SUM is initially set to Zero. Then Sum = Current 8 bit gray level + Four least significant bits of a previously generated sum. If the four most significant bits of the current value are instead of four least significant bits of a previously generated sum, are added. The four most significant bits of the resulting sum are used as the coded pixel value. IP Help Line : 9 9 8 7 3 8 8 www.guideforengineers.com 8 8

Q(2) Consider an 8-pixel line of gray scale data { 2,2,3,3,,3,57,54 }, which has been uniformly quantized with 6- bit accuracy. Construct its 3- bit IGS code. (8M May6 Etrx) Solution : Pixel Pixel in 6 bit Sum IGS Code Binary 2 2 3 3 3 57 54 Q(22) DPCM/DCT encoder for video compression. (5M May6 I.T) Q(23) Write Short Notes on: (a) Compression using LZW method (M May6 Comp)(7M May6 Etrx) (b) Delta Modulation and differential pulse code modulation (DPCM). (6M May6 Comp) Q(24) TRUE OR FALSE AND JUSTIFY (a) All image compression technique are invertible. (4M May7 IT) (3M May6 Etrx) False All image compression techniques are not invertible. Lossless compression techniques such as Runlength encoding, Huffman coding, Arithmetic coding, CAC coding, B2 code DPCM are invertible. Lossy compression techniques such as JPEG, IGS Quantization are not invertible. (b) Runlength coding is loss less coding but may not give data compression always. [4 M, MAY 7, ETRX] True Runlength coding is a lossless compression coding technique. Runlength codeword consists of repeated sequence of tokens. Each token consists of two words : () pixel value (2) consecutive occurrence of pixel value. Runlegth Encoding (RLE) is effective compression technique when pixel value is repeated consecutively. In the overall image if the pixel value is not repeatedly consecutively large number of times, RLE cannot give compression. IP Help Line : 9 9 8 7 3 8 8 www.guideforengineers.com 8 8

For Ex- 8 8 8 8 8 8 RLE coded image is =, 8, 3,, 2, 8, 3,, Size : bytes Image is compressed Size of input Image is 25 bytes For Ex-2 8 8 8 2 2 8 8 8 2 2 5 2 4 RLE coded image is =, 5,,, 8, 3, 2, 2, 8, 3, 2,,, 2, 2,,, 5, 3,, 2,,,, 4, RLE coded imag Size : 28 bytes Size of input Image is 25 bytes Hence size of the RLE coded image is larger than size of input image. That means every time RLE does not gives compression. Q(25) Write Short Notes on Transform Coding In transform coding a reversible, linear transform is used to map the image into a set of transform coefficients which are then quantized and coded. For most images, a significant number of coefficients have small magnitudes and can be coarsely quantized (or discarded entirely) with little image distortion. The following fig. shows general block diagram of transform coding system. Input Compressed Forward Transform Quantizer Symbol encoder image Image (N x N) Compressed image Deccmpressed Symbol decoder Inverse Transform image IP Help Line : 9 9 8 7 3 8 8 www.guideforengineers.com 82 82

The decoder implements the inverse sequence of steps. An N x N input image first is subdivided into subimages of size (n x n) which are then transformed to generate n x n subimage transform arrays. The goal of the transformation process is to de-correlate the pixel of each subimage or to pack as much information as possible into the smallest number of coefficients. Transform coding system based on DCT, WT, FT can be effectively applied. The choice of a particular transform in a given application depends on the amount of reconstruction error that can be tolerated and computational resources available. Q(26) Explain the basic principle of transform coding for image compression and illustrate same with the help of DFT and DCT. (M Dec5 IT) Q(27) Write short Note on : JPEG Compression IP Help Line : 9 9 8 7 3 8 8 www.guideforengineers.com 83 83

JPEG ENCODER ( Sequential Baseline System) Input Image Data FDCT Quantizer Zig-zag ordering Entropy Encoding Compressed Image 8 X 8 Blocks Quantization Table Specification Entropy Table Specification i) In the sequential baseline system, an input image is first divided into pixel blocks of size 8 x 8 which are processed left to right, top to bottom. ii) iii) iv) Each block of 8 x 8 pixel size is level shifted by subtracting the quantity 2 n- where 2 n is the highest gray value (ie for n = 8, 2 n = 256). The 2D DCT of the block is then computed and quantized. c( u, v) Ô(u,v) = Round Where Q(u,v) is the quantization factor. Q( u, v) In DCT sequential baseline system, Input and output data precision is limited to 8 bits and DCT quantized values are restricted to bits. Quantized DCT coefficients are reordered using the zigzag pattern to form a D sequence of quantized coefficients. Zigzag reordering results increasing spatial frequency components with long runs of zeros. v) Non-zero AC coefficients are coded using a variable length code that defines the coefficients value and the number of preceding zeros. vi) DC coefficients are the difference coded relative to the Dc coefficient of the previous sub-image. The output consists of sequence of tokens is repeated until the block is complete. IP Help Line : 9 9 8 7 3 8 8 www.guideforengineers.com 84 84

) Run length : Number of consecutive zeros that preceded the current element in the DCT output matrix. 2) Bit count : The number of bits to follow in the amplitude number. 3) Amplitude : The amplitude of the DCT coefficient. JPEG DECODER : Entropy Decoding Zig-zag Re-ordering Dequantizer IDCT Compressed Image Entropy Table Specification Quantization Table Specification Reconstructed Image Data i) To decompress the image, decoder first creates the normalized transform coefficient. ii) After demoralization, the DCT coefficients are computed. C(u,v) = c(u,v) Q(u,v). iii) iv) The reconstructed sub-image is obtained by taking the inverse DCT of the demoralized coefficients and then level shifting each pixel by 2 n-. The difference between the original and reconstructed image is the result of lossy nature of compression and decompression process. v) The root mean square error of the overall compression and reconstruction process is approximately 5.9. IP Help Line : 9 9 8 7 3 8 8 www.guideforengineers.com 85 85

Q(28) Write short note on :- Image Compression Standards. (5M Dec 4 Comp) Image Compression Standards :- Joint Photographic Expert Group (JPEG) has developed an international standard for general purpose colour still image compression standards. Motion Picture Expert Group(MPEG) has developed full motion video image sequence with application to digital video distribution and high Definition Television (HDTV) JPEG still Image Compression:- The JPEG standard defines three difference coding systems.. Lossy baseline Coding System-which is based on sequential DCT based compression. 2. An Extended Coding System, for greater compression, higher precision or progressive reconstructions applications. 3. Lossless independent coding system based on sequential predictive compression techniques. Q(29) Write short note on :- Vidéo Compression Standards. (5M Dec 4 Comp) MPEG Full motion video compression:- The MPEG standard defines different coding systems. Video teleconferencing standards. 2. Multimedia standards. H.263 standard defines low bit rate -3 kbps speed. H.32 standard supports ISDN Bandwidth. IP Help Line : 9 9 8 7 3 8 8 www.guideforengineers.com 86 86

() MPEG- standard is an Entertainment quality video compression standard for the storage and retrieval of compressed imaginary on digital media such as compact disk read only memory (CD-Rom). MPEG- standard is written to allow higher bit rates and higher quality encoding. (2) MPEG II standard supports video transfer rates between 5 to Mbps a range which is suitable for cable TV distribution and narrowchannel satellite broadcasting. (3) MPEG IV standard are developed for small frame full motion compression with slow refresh rates. Both MPEG standards and H.26 standards extends the DCT based compression approach. IP Help Line : 9 9 8 7 3 8 8 www.guideforengineers.com 87 87