DCT Based Image Compression Using Arithmetic Encoding Technique
Total Page:16
File Type:pdf, Size:1020Kb
ISSN 2319-8885 Vol.03,Issue.14 June-2014, Pages:3025-3030 www.semargroup.org, www.ijsetr.com DCT Based Image Compression using Arithmetic Encoding Technique 1 2 EI EI PHYO , NANG AYE AYE HTWE 1Dept of IT, Mandalay Technological University, Mandalay, Myanmar, E-mail: [email protected]. 2Dept of IT, Mandalay Technological University, Mandalay, Myanmar, E-mail: [email protected]. Abstract: Image or data compression is also called as source coding. It is the process of encoding information using fewer bits than an unencoded representation is also making a use of specific encoding schemes. Compression is a technique that makes storing easier for large amount of data. There are various techniques available for compression. In my paper work, I have analyzed Arithmetic algorithm among other common compression techniques like Run length, LZW and Huffman Encoding. Arithmetic encoding provides an effective mechanism for removing redundancy in the encoding of data. Arithmetic coding works and describes an efficient implementation that uses lookup table as a fast alternative to arithmetic operations. The transform technique is based on Discrete Cosine Transform (DCT) transform. The performance is evaluated in terms of compression ratio (CR), Mean Square Error (MSE), and Peak Signal to Noise Ratio (PSNR). Keywords: Arithmetic, Discrete Cosine Transform, Encoding, MSE, PSNR, Quantization. I. INTRODUCTION Normally the JPEG technique uses two process quantization, There are different techniques for compressing images. which is lossy process and entropy encoding, which is They are broadly classified into two classes called lossless considered lossless process. In this paper, a new technique and lossy compression techniques. Lossless compression has been proposed by combining the JPEG algorithm and techniques are generally used where the reconstruction Symbol Reduction Huffman technique for achieving more quality is important, such as executable programs, text compression ratio. The symbols reduction technique reduces documents and source codes. The lossy compression the number of symbols by combining together to form a new techniques achieve data compression by losing some symbol. As a result of this technique the number of Huffman information while maintaining the reconstruction quality. As code to be generated also reduced. The result shows that the the name suggests in lossless compression techniques, no performance of standard JPEG method can be improved by information regarding is lost. In other words, the proposed method. This hybrid approach achieves about 20% reconstructed image from the compressed image is identical more compression ratio than the Standard JPEG. to the original image in every sense. Whereas in lossy compression, some image information is lost that is the Jagadish H. Pujar and LOHIT M. Kadhlaskar proposed a reconstructed image from the compressed image is similar to new lossless method of image compression and the original image but not identical to it. In this work we will decompression using Huffman coding techniques [2]. The use a lossless compression and decompression through a need for an efficient technique for compression of images technique called Arithmetic coding. Arithmetic encoding ever increasing because the raw images need large amounts method is frequently applied to images or pixels. It is a small of disk space seems to be a big disadvantage during compression component used in JPEG compression. transmission and storage. Even though there are so many compression technique already present a better technique This paper is organized as follows: related works of the which is faster, memory efficient and simple surely suits the system are described in section two. In section three, requirements of the user. In this paper, the Lossless method background theory is explained. In section four, system of image compression and decompression using a simple design and implementation result are presented. Finally, in coding technique called Huffman coding is proposed. This section five, the paper has been concluded. technique is simple in implementation and utilizes less memory. A software algorithm has been developed and II. RELATED WORKS implemented to compress and decompress the given image Bheshaj Kumar, Kavita Thakur and G. R. Sinha proposed using Huffman coding techniques in a MATLAB platform. that performance evaluation of image compression using D.Malarvizhi and Dr.K.Kuppusamy proposed that a new symbol reduction technique [1]. In this paper, Lossy JPEG entropy encoding algorithm for image compression using compression is a widely used compression technique. DCT [3]. Copyright @ 2014 SEMAR GROUPS TECHNICAL SOCIETY. All rights reserved. EI EI PHYO, NANG AYE AYE HTWE Image compression addresses the problem by reducing the then, the size of the image is arbitrary size. For image amount of data required to represent a digital image. Image resizing, bilinear interpolation method is used. compression is achieved by removing data redundancy while preserving information content. In this paper, a new B. Image Preprocessing alternative method for simultaneous image acquisition and In the preprocessing step, it is necessary to perform compression called adaptive compressed sampling. In this changing color and chrominance down-sampling. quality measures values gives better result for compare to other techniques. PSNR image quality factor is better in RGB to YCbCr Conversion: RGB to YCbCr color Penguins reconstructed the result is 12.7263 for MSE and conversion is necessary to transform for more efficient 37.0838 PSNR with low value indicates a good quality. processing and transmission of color signals. Luminance Asadollah Shahbahrami, Ramin Bahrampour, Mobin component (Y) represents the intensity of the image and look Sabbaghi Rostami and Mostafa Ayoubi Mobarhan proposed likes a gray scale version. The chrominance components that Evaluation of Huffman and Arithmetic Algorithms for (CbCr) represent the color information in the image. Two Multimedia Compression Standards [4]. Compression is a chrominance components contain high frequency color technique to reduce the quantity of data without excessively information to which the human eye is less sensitive. Most of reducing the quality of the multimedia data. There are this information can be discarded. various techniques and standards for multimedia data compression, especially for image compression such as the Chrominance Down-sampling: After changing color space JPEG and JPEG2000 standards. These standards consist of from RGB to YCbCr, the image is down-sampled by the different functions such as color space conversion and factor of 2. The format is 4:2:0. Down-sampling can cause entropy coding. Arithmetic and Huffman coding are normally degradation of pixels in chrominance channel (CbCr) in used in the entropy coding phase. image compression system. There are three color formats in the baseline system: In this paper, there have implemented and tested Huffman 4:4:4 formats: The sampling rate of the luminance and arithmetic algorithms. Our implemented results show component is the same as those of the chrominance. that compression ratio of arithmetic coding is better than 4:2:2 formats: There are 2 I samples and 2 Q samples for Huffman coding, while the performance of the Huffman every 4 Y samples. This leads to half number of pixels in coding is higher than Arithmetic coding. In addition, each line, but the same lines per frame. implementation of Huffman coding is much easier than the 4:2:0 formats: Sample I and Q components by half in Arithmetic coding. Bilal Kamal Ahmed proposed that DCT both the horizontal and vertical directions. In this format, Image Compression by Run-Length and Shift Coding there are also 1 I sample and 1 Q sample for every 4 Y Techniques [5]. In this work an image is processed as three samples. color channel. The correlated pixels values of an image can be transformed to a representation where its coefficients are C. Image Compression de-correlated. The term "decorrelated" means that the In the image compression, the following steps are transformed values are independent of one another. As a performed. result, they can be encoded independently, which make it DCT image transform, simpler to construct a statistical model. Correlated values are Image quantization, coded with run-length coding techniques while shift coding Zigzag scan and used to decode the DC term and the other five lifting values. Lossless coding In this work, we suggest to save the first five values from every block to keep it back without any significant errors. There are many lossless coding techniques. They are Run The obtained bit rates was extended to be within range (11.4 , length encoding, Huffman encoding, Arithmetic encoding, 2.6), compression ratio (2.76 , 13.34 ) the values of the Entropy encoding and so on. Among them, Arithmetic fiedility parameters (PSNR) was within the range (31.61 , encoding is used in this paper. 46.21) for the Lena test image in both sizes (128×128 and 256×256), and PSNR was calculated as average for the three DCT Image Transform: For image compression, Discrete color channels, red, green , blue. Cosine Transform (DCT) is used. An input image f(x, y) is a two dimensional M by N matrix image with different III. BACKGROUND THEORY intensity values. To transform spatial to frequency domain The JPEG image compression system is composed of four for image compression, the system is needed to determine main steps: image acquisition, preprocessing, image with the forward 2D-DCT transformation equation. The compression and image decompression. transform matrix is calculated as shown in Equation (1). A. Image Acquisition The input color image is acquired by using offline (1) technique through the scanner or digital camera or other digital input devices. The input image is JPEG type. And where, i, j = 0,1,2,3,…….., N-1 International Journal of Scientific Engineering and Technology Research Volume.03, IssueNo.14, June-2014, Pages: 3025-3030 DCT Based Image Compression using Arithmetic Encoding Technique P(x, y) = input matrix quantized coefficients of each 8x8 block for further encoding. F(i, j)=transformed matrix.