• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Comparison and improvement of image compression
 

Comparison and improvement of image compression

on

  • 563 views

 

Statistics

Views

Total Views
563
Views on SlideShare
563
Embed Views
0

Actions

Likes
0
Downloads
8
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Comparison and improvement of image compression Comparison and improvement of image compression Document Transcript

    • INTERNATIONALComputer EngineeringCOMPUTER ENGINEERING International Journal of JOURNAL OF and Technology (IJCET), ISSN 0976- 6367(Print), ISSN 0976 – 6375(Online) Volume 4, Issue 1, January- February (2013), © IAEME & TECHNOLOGY (IJCET)ISSN 0976 – 6367(Print)ISSN 0976 – 6375(Online)Volume 4, Issue 1, January- February (2013), pp. 54-60 IJCET© IAEME: www.iaeme.com/ijcet.aspJournal Impact Factor (2012): 3.9580 (Calculated by GISI) ©IAEMEwww.jifactor.com COMPARISON AND IMPROVEMENT OF IMAGE COMPRESSION USING DCT, DWT & HUFFMAN ENCODING TECHNIQUES P. Prasanth Babu1, L.Rangaiah2, D.Maruthi kumar3 1 (Associate Professor, ECE Department, SRIT, Anantapur, India, prasanth_440@yahoo.com) 2 (Associate Professor, ECE Department, SRIT, Anantapur, India, rleburu@gmail.com) 3 (Assistant Professor, ECE Department, SRIT, Anantapur, India, maruthi.srit@gmail.com) ABSTRACT Digital image and video image require large amount of capacity to store. Image compression means reducing the size of image, without losing its quality. Depending on the reconstructed image, to be exactly same as the original or some unidentified loss may be incurred, two techniques for compression exist. Two techniques are: lossy techniques and lossless techniques. Digital imaging play an important role in image processing therefore it is necessary to develop a system that produces high degree of compression while preserving critical image. In this paper we present hybrid model which is the combination of several compression techniques. This paper presents DWT and DCT implementation because these are the lossy techniques and also introduce Huffman encoding technique which is lossless. On several medical, Lena images simulation has been carried out. At last implement lossless technique so our PSNR and MSE will go better, and due to DWT and DCT we will get good level of compression without losing any image. When compared to standalone DCT and DWT algorithms,the proposed hybrid algorithm gives better result in term of peak-signal-to- noise ratio with a higher compression ratio. Keywords: DCT (discrete cosine transform), DWT (discrete wavelet transform), MSE (mean square error), PSNR (peak signal to noise ratio) I. INTRODUCTION Compression refers to reducing the quantity of data used to represent a file, image or video content without excessively reducing the quality of the original data. It also reduces the number of bits required to store and/or transmit digital media. To compress something means that you have a piece of data and you decrease its size. JPEG is the best choice for digitized photographs. The Joint Photographic Expert Group (JPEG) system, based on the Discrete 54
    • International Journal of Computer Engineering and Technology (IJCET), ISSN 0976-6367(Print), ISSN 0976 – 6375(Online) Volume 4, Issue 1, January- February (2013), © IAEMECosine Transform (DCT), has been the most widely used compression method [1][2]. In DCTimage data are divided up into n*m number of block. DCT converts the spatial imagerepresentation into a frequency map: the average value in the block is represented by the low-order term, strength and more rapid changes across the width or height of the blockrepresented by high order terms. DCT is simple when JPEG used, for higher compressionratio the noticeable blocking artifacts across the block boundaries cannot be neglected. TheDCT is fast.It can be quickly calculated and is best for images with smooth edges. Discrete wavelettransform (DWT) has gained widespread acceptance in signal processing and imagecompression. Huffman coding is a statistical lossless data compression technique. Huffmancoding is based on the frequency of pixel in images. It helps to represent a string of symbolswith lesser number of bits. In this lossless compression shorter codes are assigned to the mostfrequently used symbols, and longer codes to the symbols which appear less frequently in thestring. This algorithm is an optimal compression algorithm when only the frequencies ofindividual letters are used to compress the data. Therefore, when Huffman coding whencombined with technique of reducing the image redundancies using Discrete CosineTransform (DCT) helps in compressing the image data to a better level. The Discrete CosineTransform (DCT) is an example of transform coding. The DCT coefficients are all realnumbers unlike the Fourier Transform. The Inverse Discrete Cosine Transform (IDCT) canbe used to retrieve the image from its transform representation. The one-dimensional DCT isuseful in processing speech waveforms. The two dimensional (2D) signals useful inprocessing images, for compression coding we need a 2D version of the DCT data, foroptimal performance. JPEG is a commonly used standard method of compression forphotographic images. The name JPEG stands for Joint Photographic Experts Group, the nameof the committee who created the standard. JPEG provides for lossy compression of images.Lossy compression means that some data is lost when it is decompressed. Losslesscompression means that when the data is decompressed, the result is a bit-for-bit perfectmatch with the original oneThe main objectives of this paper are reducing the image storage space, Easy maintenanceand providing security, Data loss cannot affect the image clarity, Lowerbandwidthrequirements for transmission, reducing cost. Because of their inherent multi-resolution nature, wavelet-coding schemes are especially suitable for applications wherescalability and tolerable degradation are important. Recently the JPEG committee hasreleased its new image coding standard, JPEG-2000, which has been based upon DWT. Italso offers higher compression ratio. In this paper, we present a new hybrid algorithm: the 2-level 2-D DWT followed by the 4x4 2-D DCT.The DCT is applied to the DWT low-frequency components that generally have zero meanand small variance, and accordingly results in much higher compression ratio (CR) withimportant diagnostic information. 55
    • International Journal of Computer Engineering and Technology (IJCET), ISSN 0976-6367(Print), ISSN 0976 – 6375(Online) Volume 4, Issue 1, January- February (2013), © IAEMEII. DWT, DCT, HUFFMAN ALGORITHM The presented hybrid DWT-DCT algorithm for image compression is to exploit the propertiesof both the DWT and the DCT (as illustrated in Fig. 1):-Take the Lena/X-ray image. The original image/frame of size 256x256. Firstly original image/framedivided into blocks of 16x16. By using the 2-D DWT decomposed the each 16x16 blocks. The low-frequency coefficients are LL and high-frequency coefficients are HL, LH and HH. Figure 1. Block diagram of the proposed hybrid DWT-DCT, Huffman algorithmIII. INDENTATIONS AND EQUATIONSError Metrics: - Two error metrics are used to compare the various image compression techniquesare:- 1.The Mean Square Error (MSE) and 2.The probalistic Signal to Noise Ratio (PSNR). The MSEis the cumulative squared error between the compressed and the original image, whereas PSNR is ameasure of the peak error. The mathematical formulae for the two are M N MSE=1/NM=∑ ∑[I(x,y)-I’(x,y)²] V=1 X=1 PSNR = 20 * log10 (255 / sqrt (MSE))Where I (x,y) is the original image, I(x,y) is the approximated version (which is actually thedecompressed image) and M, N are the dimensions of the images.When LL passed to the next stagewhere the high-frequency coefficients (HL, LH and HH) are discarded. The passed LL componentsare further decomposed using another 2-D DWT and the detail coefficients (HL, LH and HH) arediscarded. . 4x4 DCT has been applied to the reaming approximate DWT coefficients (LL) and can beachieved high CR. Then Huffman codes are performed on 4x4 and assign the codes to low-frequencycoefficients and high-frequency coefficients. . In this lossless compression shorter codes are assignedto the most frequently used symbols, and longer codes to the symbols which appear less frequently inthe string.Then the images are compressed and finally, the image is reconstructed followed by inverseprocedure. During the inverse DWT, zero values are padded in place of the detail coefficients. Alower value for MSE means lesser error, and as seen from the inverse relation between the MSE andPSNR, this translates to a high value of PSNR. Logically, a higher value of PSNR is good because itmeans that the ratio of Signal to Noise is higher. Here, the signal is the original image, and the noiseis the error in reconstruction. So, if you find a compression scheme having a lower MSE (and a highPSNR), you can recognize that it is a better one. 56
    • International Journal of Computer Engineering and Technology (IJCET), ISSN 0976-6367(Print), ISSN 0976 – 6375(Online) Volume 4, Issue 1, January- February (2013), © IAEMEIV. RESULT ANALYSIS We have applied the hybrid image compression algorithm on several images and the resultsare shown in this section. Several images are used e.g. endoscopic image, X-ray, Lena, Barbra, CTscan. The results are also compared with the standalone DCT and DWT algorithms. Take an image ofsize 256x256 pixels. The original image is resized to 16x16 pixels. Then hybrid image compressionalgorithm is applied. The following graphs depict the results in terms of PSNR for a constant CR of97%. If we change our CR to 93%, still our hybrid image compressed performance much better thanDWT, DCT standalone techniques.V. FIGURES AND TABLES Figure 2. Graph shows the DCT, DWT and Huffman results at CR=97% Figure 3. Graph shows the DCT, DWT and Huffman results at CR=93% 57
    • International Journal of Computer Engineering and Technology (IJCET), ISSN 0976-6367(Print), ISSN 0976 – 6375(Online) Volume 4, Issue 1, January- February (2013), © IAEME SAMPLE RECONSTRUCTED IMAGE AT COMPREESION RATIO OF 97% ORIGINAL RECONSTRUCTED IMAGE IMAGES DWT PROPOSED ALGORITHM DCT ALGORITHM HYBRID DWT, DCT, HUFFMAN ALGORITHM X-RAY(CHEST)PSNR(DB) 28.85 7.76 34.69CT SCAN IMAGEPSNR(DB) 19.04 8.56 24.77 Table 1. Shows the sample reconstructed image compression at ratio97% 58
    • International Journal of Computer Engineering and Technology (IJCET), ISSN 0976-6367(Print), ISSN 0976 – 6375(Online) Volume 4, Issue 1, January- February (2013), © IAEMEVI. CONCLUSION In this paper we present a hybrid DWT, DCT and Huffman algorithm for imagecompression. The proposed scheme helps in many areas like telemedicine, wireless capsuleendoscopies where the degree of compression is important. The performance analysis onseveral images shows that the hybrid algorithm achieves the higher compression ratio andbetter PSNRREFERENCES[1] K. Rao, P. Yip, "Discrete Cosine Transform: Algorithms, Advantages, and Applications",NY Academic, 1990[2] c.P. Lui, and A. D. Poularikas, "A new sub band coding compression," in Proc., IEEESoutheastern symposium on system theory, Baton Rouge, LA, pp. 317-321, Mar. 1996.[3] R. W. Buccigrossi and E. P. Simoncelli, “Progressive wavelet image coding based on aconditional probability model,” in Proc. IEEE ICASSP, Munich, Germany, Apr. 1997, vol. 4,pp. 2957–2960.[4] C. Chrysafis and A. Ortega, “Efficient context-based lossy wavelet imagecoding,” in Proc. Data Compression Conf., Snowbird, UT, Mar. 1997.[5] R. R. Coifman and M. V. Wickerhauser, “Entropy-based algorithms for best basisselection,” IEEE Trans. Inform. Theory, vol. 38, pp. 713–718, Mar. 1992.[6] D. L. Donoho, “Nonlinear wavelet methods for recovery of signals, densities, and spectrafrom indirect and noisy data,” in Proc. Symp. Appl. Math, I. Daubechies, Ed., Providence,RI, 1993, vol. 47, pp. 173–205.[7] D. J. Field, “What is the goal of sensory coding?,” Neural Comput., vol. 6, pp. 559–601,1994.[8] Ali Al-Fayadh, AbirJaafarHussain, Paulo Lisboa, and Dhiya Al- Jumeily “AnAdaptive Hybrid Classified Vector Quantisation and Its Application to Image Compression”2008 IEEE[9] Zhang Shi-qiang,ZhangShu-fang, Wang Xin-nian, Wang Yan “ The Image CompressionMethod Based on Adaptive Segment and Adaptive Quantified” 2008 IEEE[10]SuchitraShrestha and Khan Wahid,”Hybrid DWT-DCT algorithem for biomedical imageand video compression application.” 2010 10th International conference.[11 ] Ayan Banerjee, AmiyaHalder,” An Efficient Image Compression Algorithm for almostDual-Color Image Based on K-Means Clustering, Bit-Map Generation and RLE”.[12] Sunil Bhooshan , Shipra Sharma “ An Efficient and Selective ImageCompression Scheme using Huffman and Adaptive Interpolation” 2009 IEEE 59
    • International Journal of Computer Engineering and Technology (IJCET), ISSN 0976-6367(Print), ISSN 0976 – 6375(Online) Volume 4, Issue 1, January- February (2013), © IAEME[13] Ying Xie , Xiaojun Jing ,Songlin Sun ,Linbi Hong “ A Fast And LowComplicated Image Compression Algorithm For Predictor For JPEG-LS” 2009 IEEE[14]Fawad Ahmed and M Y Siyal, ValiUddin Abbas,” A Perceptually Scalable and JPEGCompression Tolerant Image Encryption Scheme”.[15] Chong Fu ,Zhi-Liang Zhu “ A DCT-Based Fractal Image CompressionMethod” 2009 IEEE[16]Chunlei Jiang, Shuxin Yin “A Hybrid Image Compression Based on Human VisualSystem” 2010 IEEE[17] F.M. Bayer and R J Cintra “Image Compression Via a Fast DCT Approximation” 2010IEEE[18] LIU Wei “Research on Image Compression Algorithm Based on SPHIT” 2010 IEEE[19] Hitashi and Sugandha Sharma, “Fractal Image Compression Scheme UsingBiogeography Based Optimization On Color Images” International journal of ComputerEngineering & Technology (IJCET), Volume3, Issue2, 2012, pp. 35 - 46, Published byIAEME[20] Ch. Ramesh, Dr.N.B. Venkateswarlu and Dr. J.V.R. Murthy, “Fast DCT AlgorithmUsing Winograd’s Method” International journal of Electronics and CommunicationEngineering &Technology (IJECET), Volume3, Issue1, 2012, pp. 98 - 110, Published byIAEME[21] Ravindra M. Malkar, Vaibhav B. Magdum and Darshan N. Karnawat, “An AdaptiveSwitched Active Power Line Conditioner Using Discrete Wavelet Transform (DWT)”International Journal of Electrical Engineering & Technology (IJEET), Volume 2, Issue 1,2011, pp. 14 - 24, Published by IAEME[22] Ch. Ramesh, Dr. N.B. Venkateswarlu and Dr. J.V.R. Murthy, “A Novel K-Means BasedJpeg Algorithm For Still Image Compression” International journal of Computer Engineering& Technology (IJCET), Volume3, Issue1, 2012, pp. 339 - 354, Published by IAEME 60