wavelet based image compression using different techniques

18 downloads 0 Views 435KB Size Report
Abstract. In this paper, we are going to implement different wavelet based techniques for image compression and these are: wavelet based embedded zerotree.
BULETINUL INSTITUTULUI POLITEHNIC DIN IAŞI Publicat de Universitatea Tehnică „Gheorghe Asachi” din Iaşi Tomul LX (LXIV), Fasc. 3-4, 2014 SecŃia AUTOMATICĂ şi CALCULATOARE


USMAN ALI KHAN, SAHAR ARSHAD∗, TAHIR RIAZ SINDHU and SHAYAN QAZI The Islamia University of Bahawalpur, Pakistan, Department of Electronics Engineering, University College of Engineering and Technology

Received: September 12, 2014 Accepted for publication: November 5, 2014

Abstract. In this paper, we are going to implement different wavelet based techniques for image compression and these are: wavelet based embedded zerotree Wavelet (EZW), Set Partitioning In Hierarchical Trees (SPIHT), Wavelet Difference Reduction (WDR), Spatial-orientated Tree Wavelet (STW), 3D-Set Partitioning in hierarchical trees (3D-SPIHT) and Adaptively Scanned Wavelet Difference Reduction (ASWDR). Here, for this purpose we will use MATLAB R2010a. With the help of these implementation we can measure the effectiveness of all these techniques. From JPEG algorithms, wavelet based image compression is giving significantly better results. In this way it is appearing as a really effective technique for image compression. With the help of these algorithms we find different performance parameters like PSNR, CR, BPP and MSE. By calculating these performance parameters we can evaluate comparisons amongst these techniques. Through these mentioned compression techniques we can achieve better MSE and PSNR values w.r.t CR which shows that for images these are more efficient for than DCT. Key words: image compression; EZW; BPP; SPIHT; WDR; STW; PSNR; 3D-SPIHT; MSE; CR; ASWDR; DWT; MATLAB. 2010 Mathematics Subject Classification: 93E11, 68P30. ∗

Corresponding author; e-mail: [email protected]


Usman Ali Khan et al.

1. Introduction Now a days, through limited bandwidth channels we can transmit massive amount of real time images and this is only possible due to image compression (Negahdaripour & Khamene, 2000). The information area unit within the style of audio, video, graphics, and images. Through transmission process, these type of data can be compressed. During last decade, a range of wavelet based techniques have been developed for image compression (Walker, 2001; Kim & Pearlman, 1997; Jai & Potnis, 2012; Said & Pearlman, 1993; Said & Pearlman, 1996). Encoder and decoder are based on such algorithms to minimize the number of memory (Islam & Pearlman, 1999; Malvar, 1999). Associate algorithmic rule which minimizes PSNR is delineated in (Li & Lei, 1999) and it is embedded, called Rate distortion Optimized Embedding. Due to de-correlation property DWT (DeVore et al., 1992; Lewis & Knowles, 1992) has gained so much popularity but several trendy image compression systems deals DWT as middle transform stage. When DCT was introduced, a lot of work was done on compression algorithms. Several codec algorithms were introduced to compress maximum amount of transform coefficients which amount can attainable but for this purpose we have to make a compromise between CR ratio and the quality of image. It is very difficult to achieve high compression ratio without discarding some perceptible information (Shapiro, 1993; Walker & Nguyen, 2000; Walker, 2001; Kim & Pearlman, 1997; Jai & Potnis, 2012; Said & Pearlman, 1993; Said & Pearlman, 1996; Islam & Pearlman, 1999; Malvar, 1999; Li & Lei, 1999). In this way it is proved that the rate of compression is application dependent. A lot of work has been done on Wavelet transforms over the last decade (Strang & Nguyen, 1996). For images mostly used coding algorithms based on wavelet transform are: EZW (Said & Pearlman, 1993), STW (Said & Pearlman, 1993), SPIHT (Said & Pearlman, 1996) and WDR (Tian & Wells, 1996a; Negahdaripour & Khamene, 2000). Now, during this paper we have a tendency to area unit reaching to compare six different wavelet techniques. In Section II we have a tendency to discuss the outline for our proposed different wavelet techniques. In section III, we have a tendency to discuss the performance parameters. In section IV, results of various wavelet techniques exploitation MATLAB R2010a are given. In section V, we discuss the comparison of performance parameters on Microsoft Office Excel 2007. In the end, conclusions are given in section VI. 2. Description of Different Wavelet Techniques For image compression, a really effective technique is wavelet coding which is considerably proved as a better algorithm than other algorithms because its efficiency is much better than other computed efficiency of image compression techniques. Now, compression systems use biorthogonal wavelet.

Bul. Inst. Polit. Iaşi, t. LX (LXIV), f. 3-4, 2014


Instead of orthogonal wavelets like: Haar, Daubechies etc. (Usevitch, 2001). Bior is wavelet family it uses biorthogonal wavelet which is bior wavelet family. It is a real fact that it is not energy preserving but this thing can’t effect its use because it is not a huge drawback. Now we are going to differentiate between orthogonal wavelet and biorthogonal wavelet. The main difference is that in orthogonal wavelet associated wavelet transform is orthogonal but in biorthogonal wavelet, the associated wavelet transform is invertible however not essentially orthogonal but there are some coefficients of linear phase biorthogonal filter which are so much close to biorthogonal (Usevitch, 2001). Biorthogonal wavelet have symmetric filters and it also permits the employment of a way broader category of filters. Linear phase filters are used in biorthogonal wavelet transform so this is so much advantageous in this sense because with the help of symmetric inputs we can obtain symmetric outputs which are given once. With the help of this transform we can solve many issues like coefficient expansion (Usevitch, 2001) and broader discontinuities. 2.1. Embedded Zerotree Wavelet (EZW)

EZW coding algorithm is one of the most powerful progressive method for image compression and it is introduced by Shapiro (1993). In this algorithm, firstly we combine stepwise thresholding and progressive quantization. Our focus is to encode image coefficients more efficiently so that we can get minimum CR. For a given threshold T at every location, a zerotree have insignificant values of wavelet transform. In wavelet transform, Zerotree is a tree of locations with its main root which is [j,k] and then it has its descendants which can be located at [2j,2k], [2j, 2k+1], [2j+1, 2k] and [2j+1, 2k+1] (we can say it its children)and with all their other groups so on and we can say these their youngsters. We can mark the root location in EZW by encoding method through symbols. Here, R or I is used for output and it is delineated in (Shapiro, 1993). In EZW, the zerotree offers slender descriptions for the purpose to describe locations for insignificant values. 2.2. Set Partitioning in Hierarchical Trees (SPIHT)

Refined version of seminal EZW algorithm is the based on SPIHT and STW. SPIHT and STW both are wavelet based image compression algorithms (Shapiro, 1993). In case of wavelet decomposition (Treil et al., 1989) of an image, SPIHT (Shapiro, 1993) used to exploits the inherent similarities across the sub-bands. For the multi-resolution pyramid once the sub-band/wavelet transformation SPIHT algorithmic imperative is used. Coding property of SPIHT which is embedded permits actual bit rate control with none penalty in


Usman Ali Khan et al.

performance. Similarly this property furthermore permits actual MSE distortion control. Bit-plane sequence is followed by SPIHT codes the entity bits of the image wavelet transform coefficients. So, it is competent of recovering the image completely by coding all bits of the transform. It is predicated on three values: (1) management of the hierarchical structure of the wavelet transform, by using a tree-based organization of the coefficients; (2) transformed coefficients in partial ordering by magnitude, with the ordering information not openly transmitted however recalculated by the decoder; and (3) bit plane transmission of refinement bits for the coefficient ethics. Initially, this ends up in a solid bit stream in which the foremost necessary coefficients (regardless of location) are transmitted, principles of all coefficients are increasingly refined, and also the relationship between coefficients representing the same location at completely different scales is totally exploited for solidity efficiency. 2.3. Spatial Orientation Tree Wavelet (STW)

STW employs a various approach in coding the information of zero trees. It is additional open eyed in its group of coding outputs than the Embedded Zero tree Wavelet (EZW) (Shapiro, 1993) and SPIHT algorithm (Said & Pearlman, 1996). EZW has the root location is marked by encoding only one symbol for the output R or I as delineated in (Shapiro, 1993). In EZW Consequently, the zerotrees offer slender descriptions of the locations of irrelevant values. The use of a state transition model is the various approach utilized in STW. From one threshold to consequent the locations of transform values undertake state transitions. So the number of bits required for encoding is thus condensed in STW with this design of state transitions. State transition model uses states IR, IV, SR and SV as represented in (DeVore et. al., 1992) to score the locations rather than code for the outputs R and I utilized in (Shapiro, 1993). Hence the states concerned are outline once knowing the import function S(m) and the descendent indices D(m) (Walker, 2011). 2.4. Wavelet Difference Reduction (WDR)

WDR technique combines run-length coding of the significance map with a well-organized illustration of the run-length symbols to produce relates embedded image coder. SPIHT and WDR both have techniques, the zerotree data structure is precluded, but the embedding principles of lossless bit plane coding and set partitioning are sealed. Rather than using the zerotrees, each coefficient during a off wavelet pyramid is appointed a linear position index in the WDR algorithm. Output of the WDR encoding can be arithmetically compressed (Tian & Wells, 1996b).

Bul. Inst. Polit. Iaşi, t. LX (LXIV), f. 3-4, 2014


2.5. Adaptively Scanned Wavelet Difference Reduction (ASWDR)

One of the leading enhanced image compression algorithms proposed by Walker (2000; 2001). This algorithm aims to get better the subjective perceptual qualities of compressed images and improve the results of objective alteration measures. ASWDR algorithm is a simple adaptation of the Wavelet Difference Reduction (WDR) algorithm. WDR algorithm employs a hard and fast ordering of the positions of wavelet coefficients, so ASWDR method employs a various order that aims to adapt itself to specific image features. The ASWDR adjusts the scanning order therefore as to predict locations of latest significant values. Scanning order of ASWDR dynamically adapts to the locations of edge details in an image, and this increases the declaration of these edges in ASWDR compressed images. Hence, ASWDR shows better perceptual qualities, especially at low bit rates, than WDR and SPIHT compressed images preserving all the features of WDR. 2.6. 3D-Set Partitioning In Hierarchical Trees (3D-SPIHT)

This technique is proposed by Kim et al. (1997) is extended from the higher than well-known SPIHT coding algorithm, in which the relationship among coefficients lying in different frequency bands is based on octal tree structure rather than quad-tree structure. It is efficient wavelet zero tree image coding algorithm which has been tested its efficiency with high performance and state forward, accurate rate control and its real-time capability in compression of image and video. Wavelet coefficients are considered as a group of spatial orientation trees wherever every tree is shaped of coefficients from all sub bands belonging to the same spatial location in an image (Kim et al., 2000). These are scanned column then line, from low sub-bands to high sub bands. After that the relate unvaried 3D-SPIHT algorithm selects correlate initial threshold supported the biggest wavelet coefficient (Namuduri & Ramaswamy, 2003). A tree wavelet coefficient set is significant, when the largest coefficient magnitude within the set is larger than or capable the chosen threshold. In the 3D-SPIHT algorithm we've got two significant passes: sorting pass and refinement pass (Kim et al., 2000). A recursive partitioning is realized on the tree therefore the position of significant coefficient with in the descendants of the considered coefficient is identified (Said & Pearlman, 1996; Qi & Tyler, 2005). The relationship among coefficients lying in different frequency bands is based on quad-tree arrangement in SPITH, while the one is based on octree structure in 3D-SPIHT. 3. Performance Parameters 3.1. Peak Signal to Noise Ratio (PSNR) and Mean Squared Error (MSE)

Two of the error metrics used to compare the assorted image compression techniques are the Mean Square Error (MSE) and also the Peak


Usman Ali Khan et al.

Signal to Noise Ratio (PSNR). The MSE is that the accumulative squared error between the compressed and also the original image, whereas PSNR is a measure of the peak error. The phrase peak signal-to-noise ratio, typically abbreviated as PSNR, is associate engineering term for the ratio between the utmost attainable power of a signal and the power of corrupting noise that affects the fidelity of its representation. Because many signals have a very wide dynamic range, PSNR is usually expressed in terms of the logarithmic decibel scale. PSNR is most ordinal used as a measure of superiority of reconstruction of lossy compression codecs. The original data is signal in this case, and the noise is the error introduced by compression. It is used as an approximation to human perception of reconstruction quality when comparing compression codecs, that’s why in some cases one renovation may appear to be closer to the original than another, even though it has a lower PSNR (a higher PSNR would normally show that the reform is of higher quality). It is only conclusively applicable when it is used to compare results from an equivalent codec (or codec type) and same content. It is most simply outlined via the mean squared error (MSE) which for two m × n images I and K wherever one in every of the images is taken into account a noisy approximation of the other is outlined as (Shapiro, 1993):


1 m −1 n −1 [ I (i, j ) − K (i, j )]2 ∑∑ mn i = 0 j =0

The PSNR is defined as (Shapiro, 1993):

 MAX 12  PSNR = 10.log10    MSE   MAX 1  PSNR = 20.log10    MSE  Here, MAX1 is the maximum possible pixel value of the image. When the pixels are represented using 8 bits per sample, this is 255. More generally, when samples are represented using linear PCM with B bits per sample, MAX1 is 2B−1. For color images with three RGB values per pixel, the definition of PSNR is the same except the MSE is the sum over all squared value differences divided by image size and by three. For color images the image is transformed to a different color space and PSNR is reported alongside each channel of that color space. 3.2. Compression Ratio (CR) and Bit-Per-Pixel (BPP)

Compression Ratio (CR) provide the measure of achieved compression is given by the and the Bit-Per-Pixel (BPP) ratio. BPP CR and represent

Bul. Inst. Polit. Iaşi, t. LX (LXIV), f. 3-4, 2014


equivalent information. CR indicates that the compressed image is stored using CR% of the initial storage size while BPP is the number of bits used to store one pixel of the image. The initial BPP is 8 for a greyscale image. The initial BPP is 24 for a true color image, because 8 bits are used to encode each of the three colors (RGB color space). Confront of compression methods is to find the best compromise between a low compression ratio and a perceptual result. 4. Results The simulation results of image compression by applying the embedded zerotree Wavelet (EZW), Set Partitioning In Hierarchical Trees (SPIHT), Wavelet Difference Reduction (WDR), Spatial-orientated Tree Wavelet (STW), 3D-Set Partitioning in hierarchical trees (3D-SPIHT) and Adaptively Scanned Wavelet Difference Reduction (ASWDR) algorithms various comparisons are obtained on the basis of PSNR and MSE and compression ratio (CR) values for the particular bit-per-pixel (BPP) ratio. For this purpose, we use the picture of wpeppers. The original image is shown in Fig. 1 and the compressed images are shown in Figs. 2,…,7.

Fig. 1 − Wpeppers Original image.

for maxloop 10 CR = 1.2239 BPP = 0.2937

for maxloop 11 CR = 2.5094 BPP = 0.6023

Fig. 2 − Wpeppers Compressed by using EZW algorithm.


Usman Ali Khan et al.

for maxloop 12 CR = 1.6527 BPP = 0.3966

for maxloop 13 CR = 3.1993 BPP = 0.7687

Fig. 3 − Wpeppers Compressed by using SPIHT algorithm.

for maxloop 11 CR = 1.1598 BPP = 0.2784

for maxloop 12 CR = 2.4019 BPP = 0.5764

Fig. 4 − Wpeppers Compressed by using STW algorithm.

for maxloop 10 CR = 1.3074 BPP = 0.3138

for maxloop 11 CR = 2.7471 BPP = 0.6593

Fig. 5 − Wpeppers Compressed by using WDR algorithm.

Bul. Inst. Polit. Iaşi, t. LX (LXIV), f. 3-4, 2014

for maxloop 10 CR = 1.2726 BPP = 0.3054


for maxloop 11 CR = 6707 BPP = 0.6410

Fig. 6 − Wpeppers Compressed by using ASWDR algorithm.

for maxloop 12 CR = 1.4186 BPP = 0.3405

for maxloop 13 CR = 2.7210 BPP = 0.6530

Fig. 7 − Wpeppers Compressed by using SPIHT_3D algorithm.

5. Comparison of Performance Parameters Tables 1 and 2 shows the values of PSNR and MSE for the different algorithms considered in this paper when CR and BP is approximately consider 1.3 and 0.3 respectively for TABLE 1 and for TABLE 2 CR and BPP is 2.5 and 0.6 respectively.


Table 1 MSE(% )



18.1991 11.9975 18.0313 18.1991 18.1991 11.9983

35.5303 37.3399 35.5705 35.5303 35.5303 37.3396


Usman Ali Khan et al.


Table 2 MSE(%) 10.1915 6.2820 9.9473 10.1915 10.1915 6.2820

PSNR(db) 38.0484 40.1498 38.1537 38.0484 38.0484 40.1498

6. Conclusions In this paper, we have implemented and compared techniques for image compression. These algorithms are Embedded Zerotree Wavelet (EZW), Set Partitioning In Hierarchical Trees (SPIHT), Wavelet Difference Reduction (WDR), Spatial-orientated Tree Wavelet (STW), 3D-Set Partitioning In Hierarchical Trees (3D-SPIHT) and Adaptively Scanned Wavelet Difference Reduction (ASWDR). With the help of these algorithms each image is compressed and then decompressed. For the purpose to compare image quality, we consider MSE and PSNR as quality parameters. MAXLOOP is selected for compression algorithms on the basis of CR and BPP. We select MAXLOOP by keeping two things in mind that we require a low compression ratio and a better

Bul. Inst. Polit. Iaşi, t. LX (LXIV), f. 3-4, 2014


result. We can select less number of MAXLOOP but due to less number of steps we get smaller compression time. On the basis of calculated performance, comparisons amongst the algorithms are carried out. For a specific value of CR and BPP the results of SPIHT technique is best among all these techniques. It has low MSE and high PSNR values. By the help of these algorithms we sustain good reproduction of the images as well as compression and also we can preserve the image quality. In future, many methodological aspects like scale parameters, choice of the mother wavelet, threshold values etc of the wavelet technique will always require further investigations and can lead for enhanced outcome. Acknowledgments. We would like to thank Mr. Abbass Abbassi and Mr. Bilal Shahid for the support and constructive comments.

REFERENCES DeVore R.A., Jawerth B., Lucier B.J., Image Compression Through Wavelet Transform Coding. IEEE Transactions on Information Theory, 38, 2, 719−746, March 1992. Islam A., Pearlman W.A., An Embedded and Efficient Low-Complexity Hierarchical Image Coder. In Proc. of SPIE 1999, Visual Communications and Image Processing, San Jose, CA, 3653, 294−305, Jan. 1999. Jai A., Potnis A., Wavelet Based Video Compression Using STW, 3D-SPIHT & ASWDR Techniques: A Comparative Study. International Journal of Advances in Engineering & Technology, 3, 2, 224−234, 2012. Kim B.J., Pearlman W.A., An Embedded Wavelet Video Coder Using ThreeDimensional Set Partitioning in Hierarchical Trees (3D-SPIHT). In Proc. of Data Compression Conference 1997, Snowbird, USA, 251−260, March 1997. Kim B.J., Xiong Z., Pearlman W.A., Low Bit-Rate Scalable Video Coding with 3-D Set Partitioning in Hierarchical Trees (3-D SPIHT). IEEE Transactions on Circuits and Systems for Video Technology, 10, 1374−1387, Dec. 2000. Lewis A.S., Knowles G., Image Compression Using the 2-D Wavelet Transform. IEEE Transactions on Image Processing, 1, 2, 244−250, April 1992. Li J., Lei S., An Embedded Still Image Coder with Rate-Distortion Optimization. IEEE Transactions on Image Processing, 8, 7, 913−924, 1999. Malvar H., Progressive Wavelet Coding of Images. In Proc. of IEEE Data Compression Conference (DCC’99), Salt Lake City, UT, 336−343, March 1999. Namuduri K.R., Ramaswamy V.N., Feature Preserving Image Compression. In Pattern Recognition Letters, 24, 15, 2767−2776, Nov. 2003. Negahdaripour S., Khamene A., Motion-based Compression Ofunderwater Video Imagery for Operations of Unmanned Submersiblevehicles. Computer Vision and Image Understanding, 79, 1, 162−183, 2000. Qi X., Tyler M., A Progressive Transmission Capable Diagnostically Lossless Compression Scheme for 3D Medical Image Sets. International Journal of Information Science, 175, 217−243, 2005.


Usman Ali Khan et al.

Said A., Pearlman W.A., Image Compression Using the Spatial-Orientation Tree. IEEE Int. Symp. on Circuits and Systems, Chicago, IL, 279−282, 1993. Said A., Pearlman W.A., A New, Fast and Efficient Image Codec Based on Set Partitioning in Hierarchical Trees. IEEE Transactions on Circuits and Systems for Video Technology, 6, 3, 243−250, 1996. Shapiro J.M., Embedded Image Coding Using Zerotrees of Wavelet Coefficients. IEEE Transactions on Signal Processing, 41, 12, 3445−3462, 1993. Strang G., Nguyen T., Wavelet and Filter Banks. Wellesley-Cambridge Press, Boston, 1996. Tian J., Wells R.O. Jr., A Lossy Image Codec Based on Index Coding. IEEE Data Compression Conference, DCC ’96, 456, 1996a. Tian J., Wells R.O. Jr., Image Data Processing in the Compressed Wavelet Domain. 3rd International Conference on Signal Processing Proc., B. Yuan and X. Tang, (Eds.), 978−981, Beijing, China, 1996b. Treil N., Mallat S., Bajcsy R., Image Wavelet Decomposition and Application. GRASP Lab 207, University of Pennsylvania, Philadelphia, Technical Report MS-CIS89-22, April 1989. Usevitch B.E., A Tutorial on Modern Lossy Wavelet Image Compression: Foundations of JPEG 2000. In IEEE Signal Processing Magazine, 18, 5, 22−35, Sep. 2001. Walker J.S., Nguyen T.O., Adaptive Scanning Methods for Wavelet Difference Reduction in Lossy Image Compression. Proceedings of IEEE International Conference on Image Processing, 3, 182−185, 2000. Walker J.S., Wavelet-based Image Compression. In Transforms and Data Compression Handbook, CRC Press LLC, Boca Raton, 2001.

DIFERITE TEHNICI DE COMPRESIE A IMAGINILOR PE BAZĂ DE WAVELET: STUDIU COMPARATIV (Rezumat) În această lucrare se urmăreşte implementarea mai multor tehnici wavelet de compresie a imaginilor. Acestea sunt: zerotree încorporat pe bază de wavelet (EZW – wavelet-based embedded zeroree), partiŃionarea mulŃimilor în arbori ierarhici (SPIHT), reducerea diferenŃelor de wavelet (WDR – wavelet difference reduction), arbori wavelet orientaŃi spaŃiali (STW), partiŃionarea seturilor 3D în arbori ierarhici (3D-SPIHT) şi reducerea diferenŃelor de wavelet cu scanare adaptivă (ASWDR - adaptively scanned wavelet difference reduction). Pentru implementarea acestor tehnici am folosit MATLAB R2010a. Cu ajutorul acestor implementări am putut măsura eficacitatea metodelor menŃionate. Dintre algoritmii JPEG, compresia imaginilor bazată pe metoda wavelet furnizează rezultate semnificativ mai bune, ea constituind o metodă cu adevărat eficientă pentru compresia imaginilor. Cu ajutorul acestor algoritmi, am identificat o serie de parametri pentru măsurarea performanŃelor, precum PSNR, CR, BPP şi MSE. Prin calcularea acestor parametri putem compara metodele menŃionate. Prin folosirea acestor metode de compresie putem obŃine valori îmbunătăŃite ale MSE şi PSNR care demonstrează că pentru prelucrarea imaginilor acestea sunt mai eficiente decât DCT.

Suggest Documents