مجلة إبن الھیثم للعلوم الصرفة و التطبیقیة 2012 السنة 25 المجلد 1 العدد Ibn Al-Haitham Journal for Pure and Applied Science No. 1 Vol. 25 Year 2012 Comparison of Wavelet Transform Filters Using Image Compression H. K. Abbas Department of Computer Science, College of Education Ibn Al-Haitham University of Baghdad Received in: 13 April 2011, Accepted in: 10May2011 Abstract The wavelet transform has become a useful computational tool for a variety of signal and image processing applications. The aim of this paper is to present the comparative study of various wavelet filters. Eleven different wavelet filters (Haar, Mallat, Symlets, Integer, Conflict, Daubechi 1, Daubechi 2, Daubechi 4, Daubechi 7, Daubechi 12 and Daubechi 20) are used to compress seven true color images of 256x256 as a samples. Image quality , parameters such as peak signal-to- noise ratio (PSNR), normalized mean square error have been used to evaluate the performance of wavelet filters. In our work PSNR is used as a measure of accuracy performance. We use two values of compression factors (4.3 and 5.1) to test the wavelet filters [1]. The experimental shows different results but in general the Daubechi Family specialy Daubechi 4, Daubechi 7, Daubechi 12 and Daubechi 20 give better performance in term of PSNR. Matlab 9.0 is used to implement the experiments. Keywords- Haar, Daubechies , Image Compression, Wavelet transform. Introduction Data compression is the process of converting an input data stream into another data stream that has smaller size. The basic principle of compression is to remove the redundancy in the source data. Compression basically is of two types –lossless and lossy . Computer graphics is used in many areas in everyday life to convert many types of complex information to images. Thus, images are important, but they tend to be big! Since modern hardware can display many colors, it is common to have a pixel represented internally as a 24-bit number, where the percentages of red, green, and blue occupy 8 bits each. Such a 24- bit pixel can specify one of 224 ≈ 16.78 million colors. As a result, an image at a resolution of 512*512 that consists of such pixels occupies 786,432 bytes. At a resolution of 1024*1024 it becomes four times as big, requiring 3,145,728 bytes. Movies are also commonly used in computers, making for even bigger images. This is why image compression is so important. An important feature of image compression is that it can be lossy . An image, after all, exists for people to look at, so, when it is compressed, it is acceptable to lose image features to which the eye is not sensitive. This is one of the main ideas behind the many lossy image compression methods [2]. The basic idea behind any compression is to find a way to represent data that takes up less space, and reducing the time for data transfer via communication channels. Data compression technology is necessary in today multimedia society. By using this technology, information can be transmitted in shorter amount of time and the storage space can be made smaller. Since data compression in broad terms "expressing" things concisely" it is applied to many fields, such as learning and inference, and so on [3]. مجلة إبن الھیثم للعلوم الصرفة و التطبیقیة 2012 السنة 25 المجلد 1 العدد Ibn Al-Haitham Journal for Pure and Applied Science No. 1 Vol. 25 Year 2012 Lossy /lossless compression: Certain compression methods are lossy . They achieve better compression by losing some information. When the compressed stream is decompressed, the result is not identical to the original data stream. Such a method makes sense especially in compressing images, movies, or sounds. If the loss of data is small, we may not be able to tell the difference. Lossless compression consists of those techniques guaranteed to generate an exact duplicate of the input data stream after a compress/ expand cycle. Lossless compression techniques provide for exact reconstruction of the original signal. Lossless compression works by removing redundancies within the data then coding the resulting signal with an efficient coding scheme. Lossless compression algorithm can provide a limited compression ratio. Instead, it is often applied in conjunction with a lossy compression scheme to provide additional compression [2]. The wavelet transform has become a useful computational tool for a variety of signal and image processing applications. For example, the wavelet transform is useful for the compression of digital image _les; smaller _les are important for storing images using less memory and for transmitting images faster and more reliably [4]. Wavelet Transform A wavelet is a waveform of effectively limited duration that has an average value of zero. Wavelet analysis is the breaking up of a signal into shifted versions of the original (or mother) wavelet. Wavelets are mathematical functions that cut up the data into different frequency components, and then study each component with resolution matched to scale [5]. A wavelet is usually defined as an oscillating function of time or space, such as a sinusoid. Fourier analysis is wave analysis. It expands signals or functions in terms of sinusoids or equivalently complex exponential, which have been proven to be extremely valuable in image compression, mathematics, science, and engineering, especially for periodic, time-invariant, or stationary phenomena. A wavelet is a "small wave", which has its energy concentrated in time to give a tool for the analysis of transient, non-stationary, or time-varying phenomena. It still has the oscillating wave like characteristic but also has the ability to allow simultaneous time and frequency analysis with a flexible mathematical foundation. Many classes of the function can be represented by wavelets in a more compact way. For example functions with discontinuities and functions with sharp sp ikes usually take substantially fewer wavelets bases than sine-cosine bases to achieve a comparable approximation. This sparse coding makes excellent tools in data compression. However, in wavelet analysis, the scale that can be used to look at a data plays a special role. Wavelet algorithm processes data at different scales or resolutions by looking at the signal with large window, it can notice gross features. Similarly by looking at the signal with small window, it can notice small features [6,7]. Calculating wavelet coefficients at every possible scale is a fair amount of work, it turns out, that if we choose scales and positions based on powers of two – so – called dyadic scales and positions – then our analysis will be more efficient and just such an analysis form the discrete wavelet transform (DWT). An efficient way to implement this scheme using filters was developed in 1988 by Mallat. This is a practical filtering algorithm yields a fast wavelet transform [8]. For many signals, the low frequency content is the most important part. It is what gives the signal its identity . For example, consider the human voice. If you remove the high frequency components, the voice sounds different, but you can still tell what’s being said. However, if you remove enough of the low – frequency components, you hear gibberish. مجلة إبن الھیثم للعلوم الصرفة و التطبیقیة 2012 السنة 25 المجلد 1 العدد Ibn Al-Haitham Journal for Pure and Applied Science No. 1 Vol. 25 Year 2012 It is for this reason that, in wavelet analysis, we often speak of approximations and details [9]. The approximations are the high – scale, low – frequency components of the signal. The details are the low – scale, high – frequency components of the signal. The decomposition process can be made by filtering the signal by LPF (Low Pass Filter) and HPF (High Pass Filter), then the signal is down sampled by two [10]. The reconstruction process can be made by up sampling f and d in equations (1) and (2), and filtering them with g(n) and h(n). (1) )2( )()()( )1( nkhk k jfnjd   (2) )2( )()( )()1(   k jj nkgkfnf Where f ( j ) = the signal. f ( j -1) = the approximation. d (j -1) = the details. g(n), h(n) = the LPF,HPF filters impulse responses, respectively. The aim of the DWT is to decompose the discrete time signal into basis functions, called the wavelets, to give us a good analytic view of the analyzed signal. The decomposition process is divided into stages, called levels or depths. At each depth, different time and frequency resolution is taken (high frequency resolution means lower time resolution and vise versa). This variable resolution is done using building blocks, or wavelets, which are derived from an original wavelet, called the mother wavelet. The signal is decomposed using dilated and shifted versions of the mother wavelet [11]. Key parameters used in image compression: Although a lot of key parameters are utilized in the literature for performance evaluation of the various filters type methods, this work will utilize three key parameters. 1- Compression Factor (CF) This parameter is used to calculate how much the size of the tested image files is compressed; the compression ratio is defined as: (size of input stream) original Compression Factor (CF) = (size of output stream) compressed CF > 1 means positive compression. CF < 1 means the output stream (negative compression). Whenever this factor is big it indicates that the compression is better, otherwise the compression is weak. مجلة إبن الھیثم للعلوم الصرفة و التطبیقیة 2012 السنة 25 المجلد 1 العدد Ibn Al-Haitham Journal for Pure and Applied Science No. 1 Vol. 25 Year 2012 2- The Mean Squared Error (MSE) This parameter is a fidelity parameter which is used to measure the error level caused by the compression system; mean square error can be defined as:     21 0 1 0 .. . 1             M M N N NMXNMX NM MSE _ X[.] is the original image with dimensions M ×N, and X [.] is the reconstructed image. k MSE= 1/k ∑ (Pi – Qi )², Root Mean Square Error i=1 RMSE = √MSE , Where, Pi – Original Image data, Qi - Reconstructed image data, K is size of image. 3- Peak Signal to Noise Ratio (PSNR) It is also a fidelity parameter used to measure the distortion level caused by the compression system. Peak signal to noise ratio (PSNR) can be defined as: where Max is the greater pixel value. In this case the large results mean that there is a small noise in the compression system image quality of the reconstructed and image is better. When the value of this parameter is small it means that the compression performance is weak. The small result of MSE means that there is small overall error in the reconstructed version of image caused by the compression system, this indicates that the objective quality of the reconstructed data is acceptable, when the value of MSE is high it will indicate that the compression system has caused a significant error [12].          RMSE PMax PSNR ii10log10 مجلة إبن الھیثم للعلوم الصرفة و التطبیقیة 2012 السنة 25 المجلد 1 العدد Ibn Al-Haitham Journal for Pure and Applied Science No. 1 Vol. 25 Year 2012 The Haar wavelet a- wavelet families b- Wavelet properties Wavelet families and properties [13]. Evaluation Performance Results: In this paper, eleven different wavelet filters (Haar, Mallat, Symlets, Integer, Conflict, Daubechi 1, Daubechi 2, Daubechi 4, Daubechi 7, Daubechi 12 and Daubechi 20) are used to compress seven true color images of 256x256 as samples as shown in figure (1). PSNR is used as a measure of accuracy performance. We use two values of compression factors (4.3 and 5.1) to test the above filters. The results of PSNR for compression factor 4.3 and 5.1 are shown bellow. مجلة إبن الھیثم للعلوم الصرفة و التطبیقیة 2012 السنة 25 المجلد 1 العدد Ibn Al-Haitham Journal for Pure and Applied Science No. 1 Vol. 25 Year 2012 Conclusions In this work we compared among different eleven wavelet filters using seven different true color images of 256x256. These Filters are (Haar, Mallat, Symlets, Integer, Conflict, Daubechi 1, Daubechi 2, Daubechi 4, Daubechi 7, Daubechi 12 and Daubechi 20). The selected images have different color features to illustrate the effects of wavelet filters. PSNR is used as a measure of accuracy performance. The experimental show different results but in general Daubechi Family specialy Daubechi 4, Daubechi 7, Daubechi 12 and Daubechi 20 give better performance in term of PSNR at a compression factor (4.3 and 5.1). References 1. Averbuch, A.;Lazar, D. and Israeli, M. January (1996) Image Compression Using Wavelet Transform and Multiresolution Decomposition", IEEE transactions on Image Processing,5. 2. Salomon, D. (2007), Data Compression the complete reference, Springer, Fourth Edition, Inc. Department of Computer Science/ California State University , Northridge/ Northridge, CA 91330-8281 / USA / d.salomon@csun.edu. :8, 253 3.Seidler J. A., (1997) " Information System and Data Compression", University of Salzburg, Boston/ Dordreocht / London. :200. 4. Selesnick, Ivan.W, September 27, (2007) "Wavelet Transforms | A Quick Study, Polytechnic University , Brooklyn, NY. :1 [5] Jin L. And Chang S. I., (2000)"Wavelet Transforms for Quality Engineering Application", http://home.earthlink.net/~ /eegs/wavelet.html/. 6. Nielsen, O. (1998) Introduction to wavelet analyses", Center for Mathematics and its Applications, ONU. :22 7. Villassenore John.D, Belzer Benjamin, and Liao Judy , August (1995) Wavelet Filter Evaluation for Image Compression", IEEE Transactions on image processing 4. 8.Lee, Y. and Hwang, K. W. April (1996) , Selecting Good Speech Features For Recognition , ETRI Journal, 18. 9. Daubechies, I. (1992),Ten Lectures On Wavelets, © by SIAM Press./ Princeton University. 10 Mallat, S. , April (1996) Wavelets for a Vision, Proceeding of IEEE, 84. 11. Ifeachor .E. C., Jervis .B. W., (1996) "Digital Signal Processing: a Practical Approach, Addison – Wesley. :17 12. Joshi, M.S. ;Manthalkar, R.R. and Joshi, Y.V. , October (2008) Image Compression Using Curvelet, Ridgelet and Wavelet Transform, A Comparative Study", Government College of Engineering, Aurangabad, (M.S. India), SGGS Institute of Engineering & Technology, Nanded , (M.S. India). 13.Parameswariah, C. March 26, (2003) Understanding wavelet analysis and filters for engineering applications,Electrical Engineering, Louisiana Tech University . مجلة إبن الھیثم للعلوم الصرفة و التطبیقیة 2012 السنة 25 المجلد 1 العدد Ibn Al-Haitham Journal for Pure and Applied Science No. 1 Vol. 25 Year 2012 Autumn Board Green Kids مجلة إبن الھیثم للعلوم الصرفة و التطبیقیة 2012 السنة 25 المجلد 1 العدد Ibn Al-Haitham Journal for Pure and Applied Science No. 1 Vol. 25 Year 2012 Saturn Peppers West Fig. (1):Different 7 Color Images (256 x 256) مجلة إبن الھیثم للعلوم الصرفة و التطبیقیة 2012 السنة 25 المجلد 1 العدد Ibn Al-Haitham Journal for Pure and Applied Science No. 1 Vol. 25 Year 2012 Experimental Results with CR=4.3 25 28 31 34 37 40 Ha ar M al la t Sy m let s In te ge r Co nf lic t D au b1 D au b2 D au b4 D au b7 D au b1 2 D au b2 0 Wavelet Filters P S N R atumn board greens kids peppers saturn west Fig. (2): Illustrates the comparative results of PSNR for Different 7 Color Images Using Different 11 wavelet filters when CF=4.3. Experimental Results with CR=5.1 25 28 31 34 37 40 H aa r Ma l la t Sy ml ets Int eg er Co nf lic t Da ub 1 Da ub 2 Da ub 4 Da ub 7 Da ub 12 Da ub 20 Wavelet Filters P S N R atumn board greens kids peppers saturn west Fig. (3): Illustrates the comparative results of PSNR for Different 7 Color Images Using Different 11 wavelet filters when CF=5.1. مجلة إبن الھیثم للعلوم الصرفة و التطبیقیة 2012 السنة 25 المجلد 1 العدد Ibn Al-Haitham Journal for Pure and Applied Science No. 1 Vol. 25 Year 2012 PSNR results for compression factor 4.3 PSNR Daubechies Family Image Name Haar Mallat Symlets Integer Conflict Daub1 Daub2 Daub4 Daub7 Daub1 2 Daub2 0 Atum 32.1 31.1 30.1 32.6 30.8 32.5 32.6 32.8 33.3 34.4 33.2 Board 30.8 29.7 28.8 32.4 29.4 32.2 32.1 31.8 32.9 33.6 32.8 Greens 33.1 31.4 30.6 32.7 32.5 33.3 33.7 34.1 34.1 34.2 33.9 Kids 32.4 30.2 29.1 32.2 31.8 33.1 33.3 33.7 33.7 34.6 32.8 Peppers 31.1 29.5 28.2 30.7 29.7 31.2 31.4 32.2 31.9 32.5 32.3 Saturn 37.2 36.3 35.3 36.8 33.6 36.5 37.1 36.12 37.7 38.4 37.3 West 33.1 32.1 31.4 32.1 32.4 33.2 33.2 33.9 33.5 34.1 33.3 AVERAG E 32.828 31.471 30.5 32.786 31.457 33.143 33.343 33.517 33.871 34.543 33.657 مجلة إبن الھیثم للعلوم الصرفة و التطبیقیة 2012 السنة 25 المجلد 1 العدد Ibn Al-Haitham Journal for Pure and Applied Science No. 1 Vol. 25 Year 2012 PSNR results for compression factor 5.1 PSNR Daubechies Family Image Name Haar Mallat Symlets Integer Conflict Daub1 Daub2 Daub4 Daub7 Daub12 Daub20 Atumn 32.4 31.3 30.3 32.8 31.1 32.7 32.9 33.1 33.3 34.6 33.6 Board 31.1 30.1 29.1 32.7 30.7 32.4 32.6 32.9 33.5 33.9 33.1 Greens 33.5 31.8 30.9 33.1 32.9 33.7 33.9 34.1 34.4 34.5 34.1 Kids 32.9 30.8 29.9 32.9 32.1 33.4 33.6 33.7 33.9 34.9 33.2 Peppers 31.2 29.9 28.9 31.1 29.9 31.6 31.9 32.2 32.3 32.9 32.3 Saturn 37.6 36.9 35.8 37.2 34.1 36.8 37.3 37.8 37.9 38.6 37.7 West 33.7 32.7 31.7 33.4 32.7 33.5 33.7 33.9 33.9 34.3 33.7 AVERAGE 33.2 31.929 30.943 33.314 31.929 33.443 33.7 33.957 34.171 34.814 33.957 مجلة إبن الھیثم للعلوم الصرفة و التطبیقیة 2012 السنة 25 المجلد 1 العدد Ibn Al-Haitham Journal for Pure and Applied Science No. 1 Vol. 25 Year 2012 ة ضغط الصور الملون مرشحات التحویل المویجي باستعمال بینةمقارن هند خضیر عباس د،ابن الهیثم- كلیة التربیهقسم علوم الحاسبات، جامعة بغدا 2011 ایار 10: قبل البحث في ،2011 نیسان 13: استلم البحث في الخالصة . التحویل المویجي اصبح أداة حاسوبیه لمختلف االشارات وتطبیقات معالجة الصور ,Haar) , Symlets, "ااعتمـد احـد عـشر مرشـح، الهـدف مـن هـذا البحـث تقـدیم دراسـة مقارنـة لمرشـحات التحویـل المـویجي Integer, Conflict, Mallat Daubechi 1 , Daubechi 4, Daubechi 2 ، Daubechi 7 Daubechi 20, Daubechi 12 , ( 256لضغط سبعة نماذج لصور ملونهx256. تـستخدم لتقیـیم ، و معـایر متوسـط مربـع الخطـأ(PSNR)من معامالت جـودة الـصورة نـسبة االشـارة الـى الـضوضاء .أداء مرشحات التحویل المویجیي الختبـار مرشـحات التحویـل ) 5.1 و 4.3(دة اعتمادا على معاملي ضـغط مختلفـین كمقیاس لدقة الجو PSNR داعتم Daubechi 4, Daubechi 7, Daubechi 12(التجارب العملیة اظهرت نتـائج كـان افـضلها نـسبیا المرشـحات . المویجي and Daubechi 20( . لتطبیق تجارب البحث9.0استعمل برنامج الماتالب .التحویل المویجي، ضغط الصور، الدوباتشي، الهار:الكلمات المفتاحیة مجلة إبن الھیثم للعلوم الصرفة و التطبیقیة 2012 السنة 25 المجلد 1 العدد Ibn Al-Haitham Journal for Pure and Applied Science No. 1 Vol. 25 Year 2012 مجلة إبن الھیثم للعلوم الصرفة و التطبیقیة 2012 السنة 25 المجلد 1 العدد Ibn Al-Haitham Journal for Pure and Applied Science No. 1 Vol. 25 Year 2012 مجلة إبن الھیثم للعلوم الصرفة و التطبیقیة 2012 السنة 25 المجلد 1 العدد Ibn Al-Haitham Journal for Pure and Applied Science No. 1 Vol. 25 Year 2012