DIP IPT Unit V Complete

Download as pdf or txt
Download as pdf or txt
You are on page 1of 69
UNIT -IV IMAGE COMPRESSION 4.1 INTRODUCTION Image compression is defined as the process of reducing the amount of data needed to Tepresent a-digital represent a digital image. This is done by removing the redundant data (i.e, the data which is more than needed). After storage or transmission of the compressed image, decompression can be performed to reconstruct the original image. Objective The objective of image compression is to decrease the number of bits required to store and transmit images without any measurable loss of information. - Types Two types of digital image compression are (i) Lossless (or) Error ~ free (ot) Information preserving compression Gi) Lossy compression Applications Image compression has a wide range of applications including Televiedo - conferencing Remote sensing Document and medical imaging Facsimile transmission (FAX) Control of remotely piloted vehicles in military, space and hazardous waste management applications. 4.2 BASIC CONCEPTS In general, data compression is the process of reducing the amount of data needed to represent a given quantity of information. Data Redundancy: Data is the one by which the information is conveyed. For a given information, various types of representations may be used and each representation will have different amounts of data. Image Compression 4.2 Some representations may have data which do not convey any useful information. Therefore, these representations are said to contain data redundancy. If this redundancy is removed, compression can be achieved. Relative Data Redundancy: Let, there are two data sets that represent the same information and mand np are the number of information - carrying units (i.e. bits) in the data sets. Now, the relative data redundancy Rp of the first data set is given by Where, Ca ~ compression ratio defined as Cee ee (4.2) ny Based on ny and np values there can be three different cases are below. (@ — n2=n; => Cr=1 and Rp=0 = First set kas no redundant data. Gi) m << => Cy =m and Rp = 1 — First set contains highly data, (ili) ny >> ny => Cy =0 and Ry = « — Second set has more data than the original (1%) set, This case is undesirable. Thus, a redundancy of 0.9 means that 90% of data in the first set is redundant and so on Types of Redundancy ‘Three types of data redundancies can be found in image compression. They are, (Coding Redundancy (ii) Interpixel Redundancy Gili), Psychovisual Redundancy Reducing these redundancies provides data compression. () Coding Redundancy A code is a system of symbols used for representing an information. A code word is a sequence of symbols representing a piece of information. Thus, the code length is defined as the number of symbols.in each code word 3 43 Digital Image Processing A resulting image is said to have coding redundancy if its gray levels are coded using more code symbols to represent each gray level than actually needed. Average Length of Code Words The gray — level histogram of an image is used to construct codes to reduce data redundancy. Multiplying the number of bits used to represent each gray level with the probability of occurance of that gray level and adding all such products gives the average length of code words assigned to different gray levels. et Leg = 2h) PK) wo (4.3) oi Where, £(1,) - Number bits used to represent each gray level P.() ~ Probability of occurrence of gray level n.. This is the average number of bits needed to represent each pixel. The probability of occurance of a pray level which is in the interval [0, 1] ina histogram is P, ()=78, k=0,1..L-1 —— (44) Where, — Number of gray levels nm — Number of times the kth gray level appear in the image n~ Total number of pixels. Total Number of Bits: Now, the total number of bits required to code an M x N image is given by, =M.N.Lig (4.5) Lava To Avoid Redundancy: Coding redundancy can be avoided and thus data compression can be achieved by assigning fewer bits to more probable gray levels and more bits to less probable gray levels. This process is known as variable-length coding, [Explained in sec 4.4]. Natural (or) Binary Coding: This type of coding assigns same number of bits to both the most and least probable gray levels. Therefore, it cannot help to minimize coding redundancy.

You might also like