A Review on Different Lossless Image Compression Techniques
Total Page:16
File Type:pdf, Size:1020Kb
Ilam Parithi.T et. al. /International Journal of Modern Sciences and Engineering Technology (IJMSET) ISSN 2349-3755; Available at https://www.ijmset.com Volume 2, Issue 4, 2015, pp.86-94 A Review on Different Lossless Image Compression Techniques 1Ilam Parithi.T * 2Balasubramanian.R Research Scholar/CSE Professor/CSE Manonmaniam Sundaranar Manonmaniam Sundaranar University, University, Tirunelveli, India Tirunelveli, India [email protected] [email protected] Abstract In the Morden world sharing and storing the data in the form of image is a great challenge for the social networks. People are sharing and storing a millions of images for every second. Though the data compression is done to reduce the amount of space required to store a data, there is need for a perfect image compression algorithm which will reduce the size of data for both sharing and storing. Keywords: Huffman Coding, Run Length Encoding (RLE), Arithmetic Coding, Lempel – Ziv-Welch Coding (LZW), Differential Pulse Code Modulation (DPCM). 1. INTRODUCTION: The Image compression is a technique for effectively coding the digital image by minimizing the numbers of bits needed for representing the image. The aim is to reduce the storage space, transmission cost and to maintain a good quality. The compression is also achieved by removing the redundancies like coding redundancy, inter pixel redundancy, and psycho visual redundancy. Generally the compression techniques are divided into two types. i) Lossy compression techniques and ii) Lossless compression techniques. Compression Techniques Lossless Compression Lossy Compression Run Length Coding Huffman Coding Wavelet based Fractal Compression Compression Arithmetic Coding LZW Coding Vector Quantization Block Truncation Coding Fig. 1 Various Image Compression Techniques © IJMSET-Advanced Scientific Research Forum (ASRF), All Rights Reserved “IJMSET promotes research nature, Research nature enriches the world’s future” 86 Ilam Parithi.T et. al. /International Journal of Modern Sciences and Engineering Technology (IJMSET) ISSN 2349-3755; Available at https://www.ijmset.com Volume 2, Issue 4, 2015, pp.86-94 LOSSY COMPRESSION.[14] This approach is based on the concept of compromising the accuracy of the reconstructed image in order to increase the compression ratio. If the resulting distortion can be tolerated the increase in the compression can be significant. LOSSLESS COMPRESSION.[3] The aim of using lossless image compression is to compare the image without any loss of data hence it helps in minimizing the space required for storing the data and speeding up transmission. In lossless compression approaches the original image can be completely recovered from the compressed image. These are also called noiseless as they do not add noise to the signal. It is known as entropy coding. Here the image after compression and decompression is identical to the original image and every bit of information is preserved during the decomposition process the reconstructed image after compression is an exact replica of the original image. The lossless compression scheme is used in application where no loss of image data can be compromised. Input Image Decompressed Original Image MAPPER INVERSE MAPPER Block QUANTIZER RER Compression SYMBOL SYMBOL Decompression Block ENCODER DECODER Compressed Image Fig.2 Image Compression Framework 2. LOSSLESS COMPRESSION TECHNIQUES. The following are the some of the Lossless Image compression techniques. 1. Arithmetic Coding. 2. Huffman Coding. 3. LZW Coding. 4. Run Length Coding (RLE). 5. DPCM. 6. Lossless JPEG © IJMSET-Advanced Scientific Research Forum (ASRF), All Rights Reserved “IJMSET promotes research nature, Research nature enriches the world’s future” 87 Ilam Parithi.T et. al. /International Journal of Modern Sciences and Engineering Technology (IJMSET) ISSN 2349-3755; Available at https://www.ijmset.com Volume 2, Issue 4, 2015, pp.86-94 2.1 Arithmetic coding. [14] Arithmetic Coding is the complex technique for coding shortest message. Binary fractional number is used here. The arithmetic coding is used to assign short code to more probable event and longer code word to less probable event. It is always minimal. It is one of the efficient techniques for statistically lossless encoding. The aim of arithmetic coding is to define a method that provides code word with an ideal data. The incremental transmissions of bits are possible. This coding takes a stream of input symbol and it replaces it with floating point number. 2.2 Huffman Coding. [10] Huffman Coding is an entropy coding technique used for lossless data compression. Here, the coding redundancy can be eliminated by choosing a better way of accessing the code. The pixels in the images are treated as symbols. The symbols that occur more frequently are assigned to small number of bits; the symbols that occur rarely are assigned to larger number of bits. The binary code of any symbol is not the prefix of the code of any other symbol. Generally the Huffman algorithm is divided into two types. Static and Dynamic. Static Huffman algorithm is a technique that calculates the frequency of each symbol in the first phase and it constructs a Huffman tree in the second phase. Dynamic Huffman algorithm is expanded on Huffman algorithm that constructs a Huffman tree in one pass but it takes more space than the static Huffman algorithm. The example of Huffman coding is follows. Step 1. Give the input data. 9 2 35 28 T E L A Step 2. Arrange the input data in ascending order 2 9 28 35 E T A L Step 3. Select the least two data’s 2 9 E T Step 4. Add them together and update the data. 11 2 9 E T © IJMSET-Advanced Scientific Research Forum (ASRF), All Rights Reserved “IJMSET promotes research nature, Research nature enriches the world’s future” 88 Ilam Parithi.T et. al. /International Journal of Modern Sciences and Engineering Technology (IJMSET) ISSN 2349-3755; Available at https://www.ijmset.com Volume 2, Issue 4, 2015, pp.86-94 Step 5. The final Huffman tree will be 2 E 35 L 11 9 T 74 39 28 A Fig 3 Final Huffman Tree 2.3 LZW Coding.[15] [Lempel – Ziv-Welch] uses a dictionary to store the string patterns and how already encountered. Here the repeated patterns are encoded using indices. The input string is read by the encoder, then it analysis the repeated codes from the dictionary. If a new word is encountered the word will be sent as a output in the uncompressed form. LZW is always used in Graphics Interchange Format (GIF).This technique works well for the large database which has the repeated information. 7 8 8 1 4 12 12 36 8 8 8 Unique Unique Unique Unique Code A1 Code A2 Code A3 Code A4 A1 A2 A3 A4 Fig. 4 Example of LZW coding 2.4 RLE.[9] It is the simplest dictionary based data compression technique. Image files frequently contain the same character repeated many times in a row. It tries to identify the length of pixel value and encode the image in the form of run. Each row of the image is written in a sequence. The length is represented as a run of black or white pixels. E E E L L L L L A A E 3 L 4 A 2 Fig 5 Example of Run Length Encoding © IJMSET-Advanced Scientific Research Forum (ASRF), All Rights Reserved “IJMSET promotes research nature, Research nature enriches the world’s future” 89 Ilam Parithi.T et. al. /International Journal of Modern Sciences and Engineering Technology (IJMSET) ISSN 2349-3755; Available at https://www.ijmset.com Volume 2, Issue 4, 2015, pp.86-94 2.5 DPCM.[14] DPCM stands for Differential Pulse Code Modulation. It is a predictive compression technique in which a prediction of pixel being encoded is subtracted from the pixel to create a difference value which is then quantized for subsequent transmission. DPCM occurs with or without using quantizer. In DPCM without quantizer the reconstructed signal exactly resembles the original signal and it comes under lossless technique. The main drawback of this technique is the compression ratio will be poor. Input(S) Output(R) Predictor Predictor + Error (e) Error (e) Entropy Entropy Encoder Decoder Channel Fig. 6 DPCM without Quantizer Algorithm. Step 1: Install the predictor. Step 2: Select the first element in the matrix. Step 3: Compute the error in transmission side. Step 4: Transfer the error signal. Step 5: Reconstruct the first value in the receiver side. Step 6: Repeat step 2 to 5 for remaining pixels of the image. © IJMSET-Advanced Scientific Research Forum (ASRF), All Rights Reserved “IJMSET promotes research nature, Research nature enriches the world’s future” 90 Ilam Parithi.T et. al. /International Journal of Modern Sciences and Engineering Technology (IJMSET) ISSN 2349-3755; Available at https://www.ijmset.com Volume 2, Issue 4, 2015, pp.86-94 2.6 Lossless JPEG [13]. Lossless JPEG was developed as a late addition to JPEG in 1993, using a completely different technique from the lossy JPEG standard. It can perform lossless compression as long as the image size is a multiple of MCU (Minimum Coded Limit). It uses a predictive scheme based on the three nearest neighbors upper, left and upper-left and entropy coding is used on the prediction error. It uses a simple predictive algorithm and Huffman algorithm to encode the prediction difference. This technique is rarely used since its compression ratio is very low when compared to Lossy modes. This technique is very useful in the case of medical image compression where the loss of information is not tolerable.[15] The main steps of lossless operation mode are depicted in Fig.7. Source Image data Predictor Entropy Encoder Lossless Encoder Table Specification Compressed Image data Fig.7 Block diagram of lossless JPEG Compression.