You are on page 1of 8

Advanced Computing: An International Journal ( ACIJ ), Vol.2, No.

5, September 2011

ANALYSIS OF SPIHT ALGORITHM FOR SATELLITE IMAGE COMPRESSION


K Nagamani(1) and AG Ananth(2)
(1)

Assistant Professor, R V College of Engineering, Bangalore-560059.


knmsm_03@yahoo.com
(2)

Professor, R V College of Engineering, Bangalore-560059.


antisro@yahoo.com

ABSTRACT
Wavelets offer an elegant technique for representing the levels of details present in an image. When an image is decomposed using wavelets, the high pass component carry less information, and vice-versa. The possibility of elimination of the high pass components gives higher compression ratio in the case of wavelet based image compression. To achieve higher compression ratio, various coding schemes have been used. Some of the well known coding algorithms are EZW (Embedded Zero-tree Wavelet), SPIHT (Set Partitioning in Hierarchical Tree) and EBCOT (Embedded Block Coding with Optimal Truncation). SPIHT has been one of the popular schemes used for image compression. In this paper the performance of the SPIHT (Set Partitioning in Hierarchical Trees) compression technique for satellite images are studied. The satellite rural and urban images have been used for the present analysis. The standard Lena image is used for the purpose of comparison. For a given compression ratio, the PSNR (peak signal to noise ratio) values are computed to evaluate the quality of the reconstructed image. The analysis carried out clearly suggests that the PSNR values increases with the level of decomposition. For the satellite images the PSNR values achievable are less compared to that of Standard Lena Image and the SPIHT Algorithm are better suited for compression of Satellite urban Images.

KEYWORDS
SPIHT, Compression ratio, PSNR, Threshold, Bit rate

I INTRODUCTION
The embedded zero tree wavelet algorithm (EZW) is a simple, yet remarkably effective, image compression algorithm, having the property of the bits in the bit stream are generated in order of importance, yielding a fully embedded code. The embedded code represents a sequence of binary decisions that distinguish an image from the null image. Using an embedded coding algorithm, an encoder can terminate the encoding at any point thereby allowing a target rate or target distortion metric to be met exactly. Also, given a bit stream, the decoder can cease decoding at any point in the bit stream and still produce exactly the same image that would have been encoded at the bit rate corresponding to the truncated bit stream. In addition to producing a fully embedded bit stream, EZW consistently produces compression results that are competitive with
DOI : 10.5121/acij.2011.2503 25

Advanced Computing: An International Journal ( ACIJ ), Vol.2, No.5, September 2011

virtually all known compression algorithms on standard test images. Yet this performance is achieved with a technique that requires absolutely no training, no prestored tables or codebooks, and requires no prior knowledge of the image source. The SPIHT algorithm, developed by Said and Pearlman in 1996 is a fast and efficient image compression algorithm works by testing ordered wavelet coefficients for significance in a decreasing bit plane order, and quantizing only the significant coefficients. The high coding efficiency obtained by this algorithm is due to a group testing of the coefficients of a wavelet tree. The SPIHT (Set Partitioning in Hierarchical Trees) algorithm is a refined version of EZW algorithm. It can perform better at higher compression ratios for a wide variety of images than EZW. The algorithm uses a partitioning of the trees in a manner that tends to keep insignificant coefficients together in larger subsets. The SPIHT algorithm groups the wavelet coefficients and trees into sets based on their significance information. The encoding algorithm consists of two main stages, sorting and refinement. In the sorting stage, the threshold for significance is set as 2n, where n is the bit level, and its initial value is determined by the number of bits required to represent the wavelet coefficient with the maximum absolute value. Significance for trees is obtained by checking all the member detail coefficients.

II SPIHT ALGORITHM
Before the algorithm is explained, certain notations are to be made familiar. The data structure used by the SPIHT algorithm is similar to that used by the EZW algorithm. The wavelet coefficients are again divided into trees originating from the lowest resolution band (band I). The coefficients are grouped into 2 x 2 arrays that, except for the coefficients in band I, are offsprings of a coefficient of a lower resolution band. The coefficients in the lowest resolution band are also divided into 2 x 2 arrays. However, unlike the EZW case, all but one of them are root nodes. The coefficient in the top-left comer of the array does not have any offspring. The trees are further partitioned into four types of sets, which are sets of coordinates of the coefficients: O (i, j) This is the set of coordinates of the offsprings of the wavelet coefficient at location (i, j). D (i,j) This is the set of all descendants of the coefficient at location (i,j) H is set of all root nodes. L (i,j) This is the set of coordinates of all the descendants of the coefficient at location except for the immediate offsprings of the coefficient at location (i,j). So, L (i, j) =D (i, j) - O (i, j) A set D (i, j) or L (i,j) is said to be significant if any coefficient in the set has a magnitude greater than the threshold. The algorithm makes use of three lists: the list of insignificant pixels (LIP), the list of significant pixels (LSP), and the list of insignificant sets (LIS). The LSP and LIS lists contain the coordinates of coefficients, while the LIS contains the coordinates of the roots of sets of type D or L .The initial value of the threshold is given as
26

Advanced Computing: An International Journal ( ACIJ ), Vol.2, No.5, September 2011

n =log2cmax

(1)

Where, Cmax is the maximum magnitude of the coefficients to be encoded. The LIP list is initialized with the set H. Those elements of H that have descendants are also placed in LIS as type D entries. The LSP list is initially empty. In each pass, the members of the LIP are first processed, then the members of LIS. This is essentially the significance map encoding step. In the refinement step the elements of LSP are processed. Each coordinate contained in LIP is examined first. If the coefficient at that coordinate is significant (i.e., it is greater than 2n), a 1 is transmitted, followed by a bit representing the sign of the coefficient (1 for positive, 0 for negative). Then that coefficient is moved to the LSP list. If the coefficient at that coordinate is not significant, a 0 is transmitted. After examining each coordinate in LIP, the sets in LIS are examined. If the set at coordinate (i,j) is not significant, a 0 is transmitted. If the set is significant, a 1 is transmitted. If the set is of type D, each of the offsprings of the coefficient at that coordinate is checked. For each coefficient that is significant, a 1 is transmitted, the sign of the coefficient, and then the coefficient is moved to the LSP. For the rest a 0 is transmitted and their coordinates are added to the LIP. If this set is not empty, it is moved to the end of the LIS and marked as type D. This new entry into the LIS has to be examined during this pass. If the set is empty, the coordinate (i, j) is removed from the list. If the set is of type D, each coordinate in D (i,j) is added to the end of the LIS as the root of a set of type D. Again, note that these new entries in the LIS have to be examined during this pass. Then (i, j) is removed from the LIS. Once each of the sets in the LIS (including the newly formed ones) is processed, a refinement step is started. In the refinement step each coefficient that was in the LSP prior to the current pass is examined and output the nth most significant bit of | ci,j |. The coefficients that have been added to the list in this pass are ignored because, by declaring them significant at this particular level, the decoder has already been informed of the value of the nth most significant bit. This completes one pass. Depending on the availability of more bits or external factors, n is decremented by one and the process continues. Peak Signal to Noise Ratio (PSNR): The PSNR is calculated with the following formula
MaxgreyLev * MN el PSNR = 10log10 g (x, y ) f (x, y ) xy

(2)

Where g (x,y) is the compressed image, f (x,y) is the raw image , M is the image width, N is the image height and max. gray level is the max. value of f (x,y). A Max grey level = 255 has been used (as there are 0 to 255 grey levels represented with 8 bits in the BMP format images).

III RESULTS AND DISCUSSIONS


The images used for compression are all 256 X 256, 8-bit grayscale images either in BMP or in JPEG format. It means that the images consist of 256 X 256 = 65,536 pixels, and each pixel is represented by 8 bits or 1 byte. A standard Lena image is used as a reference.

27

Advanced Computing: An International Journal ( ACIJ ), Vol.2, No.5, September 2011

The SPIHT algorithm has been implemented on MATLAB software and tested for three sample images namely: satellite rural image, satellite urban image, and the standard Lena image. The bit rate is kept constant and level of decomposition is varied from level 1 to level 5. The corresponding values of compression ratios and PSNR are determined for the three types of images and for different levels of decomposition. The PSNR values for the compression ratio of ~8 derived for different levels of decomposition for the LENA image are tabulated in Table 1. It is evident from the table that the PSNR values increases very rapidly from 11 - 35 dB for decomposition levels from 1-5 and reaches a maximum value of ~35 db for the 5th level of decomposition. For the Lena image high PSNR values can be achieved. Keeping the compression ratio ~8, the PSNR in dB for different decomposition levels has been derived for the satellite rural image is tabulated in Table 2. The table indicates that the PSNR values for satellite images increases rapidly form 3 12 with the increase of decomposition levels from 1-5.and attains a maximum value of PSNR for the 5th highest decomposition level ~12.6 dB. Further increase in the level of decomposition of the image will not show any improvement in the PSNR.
Table1. The variation of PSNR in dB and Compression ratio for the LENA image

Image Type Level PSNR in dB Lena 1 2 3 4 5 11.60 21.96 31.95 35.25 35.81

Compression Ratio 8 8 8 8 8

Figure 1 shows the original Lena Image and the reconstructed image after compression using a SIPHT algorithm for the 5th level of decomposition. It can be seen from the figure using SPIHT algorithm the original LENA image can be reproduced with highest quality.

28

Advanced Computing: An International Journal ( ACIJ ), Vol.2, No.5, September 2011

Figure 2 shows the original satellite rural image and the reconstructed image for the highest level of decomposition It is evident from the figure that the image quality of the reconstructed image is not very good and cannot be improved further even with the increase of levels of decomposition. Using the SPIHT algorithms the PSNR values achieved for satellite images are much lower compared to that of LENA image.

Figure 1a Original Lena Figure 1b The Image of size 256X256 Reconstructed Lena in BMP format Image for the Level 5 with PSNR in dB is 35.81 and Compression ratios 8

29

Advanced Computing: An International Journal ( ACIJ ), Vol.2, No.5, September 2011

Table 2. The variation of PSNR in dB and Compression ratio for the Satellite rural image Image Type Level PSNR in dB Compression Ratio Rural 1 2 3 4 5 3.70 9.47 11.25 12.40 12.60 8 8 8 8 8

For the same compression ratio ~8, the PSNR in dB for different decomposition levels has been derived for the satellite urban image is tabulated in Table 3. The table indicates that the PSNR values increases rapidly from 5- 19 dB for the increase of decomposition levels from 1-5. The maximum PSNR achievable for the 5th highest decomposition level is ~19.0 dB. Further increase in the level of decomposition of the image will not show any improvement in the PSNR.

Figure 2a Original Satellite Rural Image of size 256X256 in BMP format

Figure 2bThe Reconstructed Satellite Rural Image for the Level 5 with PSNR in dB is 12.60 and Compression ratios 8

30

Advanced Computing: An International Journal ( ACIJ ), Vol.2, No.5, September 2011

Table 3. The variation of PSNR in dB and Compression ratio for the Satellite urban image Image Type Level PSNR in dB Compression Ratio Urban 1 2 3 4 5 5.70 12.06 17.00 18.55 19.00 8 8 8 8 8

Figure 3 shows the original satellite urban image and the reconstructed image for the highest level of decomposition It is evident from the figure that the image quality of the reconstructed image is better than the rural image as the PSNR values are higher for the urban image (~19dB) compared to that of rural image (~13 dB) and cannot be improved further even with the increase of levels of decomposition using the SIHPT algorithms The PSNR values achieved for satellite imageries are found to be much lower compared to that of LENA image.

Figure 3a Original Satellite Urban Image of size 256X256 in BMP format

Figure 3bThe Reconstructed Satellite Urban Image for the Level 5 with PSNR in dB is 19 and Compression ratios 8

IV CONCLUSION
From the results presented the following conclusions can be drawn 1. The SIPHT algorithm indicates that there is rapid increase in PSNR values with the increase of decomposition from levels 1-5. The Quality of the reconstructed image for
31

Advanced Computing: An International Journal ( ACIJ ), Vol.2, No.5, September 2011

both the standard LENA image and Satellite imageries improves with level of decomposition. 2. For satellite imageries the SPHIT algorithm show much lower PSNR values and reduction in the quality of the reconstructed image compared to that of LENA image . The PSNR values do not show any significant improvement beyond the level 5.

3. The PSNR values derived for satellite Urban Images for 5th level are found to be higher (~19 dB) compared to that of satellite rural images (~12.6) and show that the SPHIT algorithm is better suited for compressing Urban images. ACKNOWLEDGEMENT The Authors are thankful to Dr Ganesh Raj Dy Director, ISRO for providing the satellite images, Head, Dept of Telecommunication, RV Engineering College for encouragement in carrying out the present research work. REFERENCE
1. P J Burt and E H Adelson The Laplacian Pyramid as a compact image code IEEE Trans. on Communication. Vol 31, pp 532-540, (1983). 2. Bryan Usevitch, A Tutorial on Modern Lossy Wavelet Image Compression : Foundations of JPEG 2000, IEEE Signal Processing Magazine, 2001. 3. Creusere, C. D. A New Method of Robust Image Compression based on the Embedded zerotree wavelet Algorithm, IEEE Trans. on Image processing Vol.6, No 10, pp 1436-1442 , (1997). 4. R. A. DeVore, B. Jawerth, and B. J. Lucier, Image Compression Through Wavelet Transform Coding, IEEE Trans. On Information Theory, Vol. 38, No. 2, pp. 719 - 746, (1992). 5. A. S. Lewis and G. Knowles, Image Compression Using the 2-D Wavelet Transform, IEEE Trans. on Image Processing, Vol. 1, No. 2, pp. 244-250, April (1992) 6. J.M.Shapiro, An Embedded Wavelet Hierarchical Image Coder, Proc. IEEE Int. Conf. Acoust. Speech, Signal Processing, San Francisco, CA, (1992). 7. J.M.Shapiro,Embedded Image Coding Using Zerotrees of Wavelet Coefficients, IEEE Trans. on Signal Processing, Vol. 41, pp 3445-3462, (1993) 8. M Vetterli, J Kovacevic and D J Legall Perfect Reconstruction Filter Banks for HD TV representation and coding Image communication Vol 2 essing Magazine . Vol 8, pp 349-364 (1990) 9. A. Said and W.A. Pearlman, A New, Fast and Efficient Image Codec Based on Set Partitioning in Hierarchical Trees, IEEE Trans. on Circ and Syst for Video Tech, Vol 6, no. 3, pp 243-250, June 1996. 10. Said and A. Pearlman, An Image Multiresolution Representation for Losssless and Lossy Compression. IEEE Trans. Image Processing, Vol. 5, No. 9, pp 243-250, Sept. 1996.

32

You might also like