Enhancing the Color Set Partitioning in Hierarchical Tree (SPIHT) Algorithm Using Correlation Theory

: Problem statement: Efficient color image compression algorithm is essential for mass storage and the transmission of the image. The compression efficiency of the Set Partitioning in Hierarchical Tree (SPIHT) coding algorithm for color images is improved by using correlation theory . Approach: In this study the correlation between the color channels are used to propose the new algorithm. The correlation between the color channels are analyzed in various color spaces and the color space CIE-UVW in which the color channels are highly correlated is taken. The most correlated U channel is considered as base color and compressed by using the wavelet filter and the SPIHT algorithm. The linear approximation of the two of the color components (V and W) based on the primary color component U is used to code subordinate color components. The image is divided into N*N blocks in each color channels. The linear approximation coefficients are calculated for each block of the subordinate colors V and W as functions of the base color. Only these coefficients of each block are coded and send to the receiver along with the SPIHT coding of the base color. Results: By using this algorithm, a significant (4 dB mean value) Peak Signal to Noise Ratio (PSNR) improvement is obtained compared to the traditional coding scheme for the same compression rate and reduces the coding and decoding time. Also the proposed compression algorithm reduces the complexity in coding and decoding algorithms. Conclusion: This algorithm allows the reduction of complexity for both coding and decoding of color images. It is concluded that a significant PSNR gain and visual quality improvement is obtained. It is found that in color image coding, this algorithm is superior to the traditional de-correlation based methods and reduces the coding and decoding time.


INTRODUCTION
The uncompressed image data requires a large storage capacity and transmission bandwidth. The purpose of the image compression algorithm is to reduce the amount of data required to represents the image with less degradation in the visual quality and without any information loss (Ghosh and Bhaumik, 2010). In a monochrome image, the neighboring pixels are more correlated. The Discrete Cosine Transform (DCT) and wavelet transform are commonly used to reduce the redundancy between the pixels and for energy compaction. The JPEG standard uses the DCT and the JPEG2000 (Rabbani, 2002) standard uses the wavelet transform. The coefficients of transformation are coded using suitable coding algorithm like Embedded Zero Tree Wavelet (EZW) (Shapiro, 1993) coding or SPIHT (Said, 1996) coding.
In color image, correlation exists between the neighboring pixels of each color channel and as well as between the color channels (San, 2006). In the traditional color image compression algorithm the redundancy between the color channels are reduced by transforming them into a de-correlated color space such as YCbCr, YPbPr, YIQ, YUV. The luminance component contains more details than the chrominance components. To obtain higher compression rate with significant PSNR, the luminance component is compressed at lower rate and the chrominance components are compressed at higher rate (Kassim, 2003) (Shen, 1997). Each channel is coded separately and the combined bit stream is send to the receiver.
In this study, the correlations between the colorchannels are analyzed in various color spaces. Based on the correlation theory a new compression algorithm is proposed. If two sets of data are more correlated, then one set can be represented as a linear function of another set. Only the linear approximation coefficients are needed to represent the data set. Based on the correlation analysis, it is found that the color channels in CIE-UVW color spaces are more correlated compared to other color spaces. The most correlated color channel U is taken as base color. The image is divided into N*N blocks in each color channels. The linear approximation coefficients are calculated for each block of the subordinate colors V and W as functions of the base color. Only these coefficients of each block are coded and send to the receiver along with the SPIHT coding of the base color. The performance of the proposed algorithm and the traditional color SPIHT are compared in this study and it is found that correlation based SPIHT algorithm is superior to the traditional decorrelation based SPIHT algorithm.

MATERIALS AND METHODS
Correlation is a parameter which measures the relation between two or more variables. The range of correlation co-efficient is from -1.00 to +1.00. The -1.00 represent a perfect negative correlation and +1.00 represents a perfect positive correlation and a value of zero represents no correlation. The most commonly used type of correlation coefficient is linear correlation (Pearson correlation) and defined as in equation 1 (Gershikov, 2007).
where, a and b are the color planes where, Λ is the covariance which measures the extent to which two random variables (color planes in this research) are related to each other. It is the measure of the interaction between brightness values in two color channels of the image: where, µ a and µ b are arithmetic mean values and defined as: x (i, j) MN = = µ = ∑∑ (4) Selection of color space: In this research, it is found that correlation exists between the color channels in all color spaces. The inter-color correlations of 1, 2 and C3 components (Roterman, 2007) in various color images are calculated. The correlation co-efficient is calculated according to equation-1. The local correlation, which is the correlation of color components in an N×N block, is calculated (Lew and Doros, 2010). Afterwards the mean value of correlations of all sub-blocks in an image is calculated. For three primary color components 1-C3, three pairs of cross correlations are calculated as correlation of 1 and C2 colors, 1 and C3 colors and 2 and C3 colors.
Correlation between color channels in various color spaces for several images is calculated. The average of the three correlations is calculated for various color spaces and is tabulated in (Table 1). It is observed that in CIE-UVW color space the three channels are more correlated than other color spaces. Hence the best color space for correlation based color image compression is the CIE-UVW color space.

Selection of base color:
For three primary color components U, V and W, three pairs of cross correlations are calculated as correlation of U and V colors, U and W colors and V and W colors. The results are summarized in (Table 2).
The following observations are made: 1.Among the three cross correlations between U-V, U-Wand V-W components the cross correlation of V-W tends to be smaller. In other words, V and W color components are the most uncorrelated colors.
The following relation holds generally: In other words, the U component is more correlative than the other two color components. The most correlated color channel U is selected as base color and the other two color channels are considered as sub-ordinate colors.
Coding algorithm: The first step of the coding algorithm is to apply a color component transform to the RGB image to obtain the image in CIE-UVW uniform chromaticity color space as given in equation: Table1: The average correlation between color channels in various color spaces Images  Step 2: Linear Approximation of V and W Color Components.
The two color components in the image domain are highly correlated in a small neighborhood. The high correlation suggests a linear function for the subordinate color channels in terms of base color (Y= a*X +b). The following steps are used to compute the approximate coefficients a and b for V and W color channels (Hasan et al., 2010): • Each color channels of the image is divided into N×N blocks • Linear approximation coefficients for the dependent colors in each block are calculated The V and W colors are encoded using polynomial expansion of these colors as a function of the U as stated in equations 6-7: V1 a1* u b1 = + V1 a2 * u b1 = + Where ak and bk are the coefficients of linear approximation. Only the reduced set of coefficients ak and bk are transmitted to the receiver. The criterion for calculating the coefficients is to minimize the mean square error between actual pixel values of V and linear approximated pixel values of V1 and the same for W as given in equation 8 and 9: The optimal coefficients are a1, b1 , a2 and b2 are calculated as shown in equations 10, 11, 12 -13: where, 'cov' is the covariance between the color channels and 'var' is the variance of the color channel in the N*N block. For coding the expansion coefficients a1, b1, a2 and b2 the lossless bit plane and variable runlength coding is used. For encoding the base color U, the 9 by 7 wavelet filter and SPIHT coding are used.
For the coefficients of the centered scaling and wavelet sequences, the numerical values in an implementation-friendly form are taken. Computational savings of the scheme are gained from the length of the filters (convolution with a 9-tap filter is slower than with a series two-tap filters) and due to a minimum dependency between the coefficients, the whole computation can be done in one memory block of the original signal size.
Since images are two-dimensional signals, the scheme is extended to 2D space by applying the transform row-and column-wise, respectively. As a consequence four sub bands arise from one level of the transform. One low-pass sub band containing the coarse approximation of the source image called LL sub band and three high-pass sub bands that exploit image details across different directions. They are HL for horizontal, LH for vertical and HH for diagonal details. In the next level of the transform, the LL band is used for further decomposition and replaces it with respective four sub bands. This forms the decomposed image.
Step 4: SPIHT coding scheme: After the application of the wavelet filter, the image is decomposed into subbands, such that lower sub-bands corresponds to higher image frequencies and higher sub-bands corresponds to lower image frequencies (LL band), where most of the image energy is concentrated. The next step is to apply an efficient coding algorithm. One of the most advanced coding algorithms is the SPIHT (Ghrare et al., 2009) coding. The SPIHT coding algorithm uses three lists. They are: • List of Significant Pixels (LSP) • List of Insignificant Pixels (LIP) and • List of Insignificant Sets (LIS) The LSP and LIP represents the coordinates of the individual coefficients and LIS represents the set of coefficients.
The following steps are used in SPIHT coding: Set the threshold. Set LSP to empty. Set LIP to the coordinates of all the roots. Set LIS to the coordinates of all the roots that have descendants.

Sorting pass:
It checks all the coefficients in LIP for significance. If significant it sets the output to 1 and moves the coefficients to LSP, else it sets the output to 0.

Refinement pass:
For each entry in the LSP, except those included in the last sorting pass, output the nth most significant bit of the coefficients.

Decrement the threshold and if need continue the loop from:
The result is in the form of a bit stream.
The algorithm has several advantages. The first one is an intensive progressive capability -the decoding (or coding) can be interrupted at any time and a result of maximum possible detail can be reconstructed with one-bit precision. This is very desirable when transmitting files over the internet, since users with slower connection speeds can download only a small part of the file, obtaining much more usable result when compared to other codec such as progressive JPEG. Second advantage is a very compact output bit stream with large bit variability -no additional entropy coding or scrambling has to be applied.
. Decoding algorithm: The steps of decoding algorithm are as follows.
Step1: Reconstruct the base color U by using SPIHT decoder and inverse wavelet transform.
Step2: Reconstruct the V and W color components of each block by using the corresponding pixel values of U color component and the linear approximation coefficient of each block:

RESULTS
The proposed correlation based color SPIHT (CBCSPIHT) algorithm is implemented using MATLAB 7.0. The Intel Pentium-IV Processor is used to run the program. Ten 24 bit color images Lena, Peppers, Monarch, Sail, Rose, Parrot, Igloo, House, Beach and Tree are taken as test images. The performance of the proposed coding algorithm using inter-color correlation is evaluated. As a comparison benchmark the (PSNR) values, based on Mean Square Error (MSE) are calculated for the proposed algorithm and traditional de correlation based color SPIHT algorithm (DBCSPIHT) as in equation 17. The results are listed in (Table 3), it is observed that about 0.4547 dB to 7.4753 dB gains in PSNR is obtained with the proposed algorithm compared to SPIHT coding for same compression rate: The visual qualities are compared for the proposed algorithm with the SPIHT and are shown in the ( Fig.  from 1-4) for the images Lena, Peppers, House and Beach. A better visual quality improvement is observed with the correlation based approach algorithm than the traditional SPIHT coding:

DISCUSSION
• During the compression of the image, the number of decomposition level applied in the wavelet filter also plays a vital role. The effect of selection of decomposition levels on the reconstructed output for both the algorithms are shown in (Fig. 5) for the image Rose. It is evident that at the fourth level of decomposition itself the chrominance details are almost reconstructed in the correlation based approach. Whereas, the chrominance detail are not reconstructed in the traditional SPIHT. The effect of decomposition level on PSNR values for the images Lena, Peppers and Rose are tabulated. The CBCSPIHT also reduces the complexity in algorithm • It is observed that the coding and decoding time are reduced much in CBCSPIHT compared to the traditional DBCSPIHT. About 16 seconds is saved during coding and about 9 seconds time is saved during the decoding of the color image.

CONCLUSION
A new Algorithm to color image compression is proposed. This Algorithm is based on exploiting the inter-color correlations between the color primaries instead of transforming them into a de correlated color space. The algorithm is implemented, by employing the 9 by 7 wavelet filter and SPIHT coding for coding the primary color Y. The first-order linear approximation (y = a*x + b) of the two of the color components (V and W) based on the primary color component Y is used to code sub ordinate color component. This algorithm allows the reduction of complexity for both coding and decoding of color images. It is concluded that a significant PSNR gain varies from 0.4547 dB (for Parrot image) to 5.2068 dB (for Peppers image) is obtained with reduced complexity in algorithm. Also it is concluded that in color image coding, a correlation based approach is superior to the traditional decorrelation methods. It is concluded that the coding and decoding time are reduced much in CBCSPIHT compared to the traditional DBCSPIHT.