Using Modified Set Partitioning In Hierarchical Tree Algorithm with Discreet Cosine Transform to Compress Color Images

The aim of this research is to investigate the performance of a suggested image compression system. The scheme of the proposed system utilizes Tap 9/ 7 wavelet transforms to decomp ose the image signal, an d then uses Discrete Cosine Transform (DCT), and uniform quantization; to compress the approximat e coefficients. The det ail coefficients are coded by hierarchical uniform quantization, and then the original and modified Set Partitioning In Hierarchica l Tree (SPIHT) methods were applied on each color band separately. At the end some spatial coding steps were applied on List of Significant Pix els (LSP) like Run Length Encoding (RLE) and Shift Coding to gain more compression. The test results indicate that the modified compression scheme shows a good performance aspect in addition to its simplicity.


1-Introduction
Image compression is one of the applications of digital images compression.The objective of image compression is to reduce both spatial and spectral redundancy of the image data in order to be able to store or transmit data in an efficient form [1]. algorithms and lossy algorithms.A lossless algorithm reproduces the exact original file.A lossy algorithm, as its name implies some loss of data, which may be unacceptable in many applications [2].See Figure 1.
In this research some relevant concepts to image compression discipline given.Also some of the common image compression techniques are illustrated.And explain the theoretical concept of image compression using the SPIHT algorithm which is the subject of this research.

Proposed System Layout
Figure2 presents the layout of the proposed compression system; it consists of the following steps : 1.In the first step the image data is decomposed into (RGB) color components, then they transformed to another color domain (i.e., YC b C r bands).f.Perform linear coding (i.e., the run-length encoding and shift coding) on the List of Significant Pixels (LSP).

The Color Transform
It is a one-to-one transformation, applied to the input (R,G, and B) image data.The transformation output is an image representation which is more amenable to efficient compression than the raw data image.
The color transform is utilized in image compression schemes, because it helpful to reduce the spectral redundancy, also it exploits some of the characteristics of the human vision system to improve the compression performance.
YC b C r color space was used in compression schemes of both video sequences and still images.In this way 80% of the information will be in the Y sub band and 20% will be in the C b , C r sub bands, the goal of this preprocessing is to prepare the image for encoding process by eliminating any irrelevant information.

Down Sample
In this operation the (C b ,C r ) components have been down sampled by 2 to get an effective compression.
PDF created with pdfFactory Pro trial version www.pdffactory.comThe adopted down sampling method was the averaging method, where the average value of each (2×2) block is determined, and taken as a value that represents block in the down sampled image see Fig. 3.

Biorthogonal Wavelet Filters
After applying the color transform, the produced YC b C r bands were decomposed by using the biorthogonal 9/7 (also called Tab9/7 because the filters lengths are 9 and 7 for low and high pass filters, respectively).It has risen to special prominence because they were selected to be the kernel transform in JPEG2000 standard [4].
The effects of the number of transform passes (1, 2, and 3) on the MSE and PSNR of Lena image were determined, and the results tabulated in table1.

Quantization of Detail Coefficients
Image quantization is the process of reducing the number of possible values of a quantity, and consequently reducing the number of bits needed to represent it.
The uniform quantization was used to code the transformed wavelet coefficients sub bands ) LH, HL, and HH (to achieve better compression result.As well as that it is used to reduce the number of bits needed to store the coefficients of these sub bands. In this work a quantization function was used to determine the quantization step (Q step ) for each coefficients BndW (x,y) as follow : Where, BndW () is the array of wavelet transform coefficients.BndQ () is the quantization index array.

Discrete Cosine Transform (DCT)
Is a transform coding method consists of four steps.The source image is first partitioned into subblocks of size 8 × 8 pixels in dimension.Then, each block is transformed from spatial domain to frequency domain using a 2 -Dimension (2D) DCT basis function.The resulting frequency coefficients are quantized and finally output to a lossless entropy coder.DCT is an efficient image compression method since it can decorrelate pixels in the image (because the cosine bases are orthogonal) and compact most of the image energy into a few transformed coefficients.
Moreover, DCT coefficients can be quantized according to some human visual characteristics.Therefore, the JPEG image file format is very efficient.This makes it very popular, especially in World Wide Web.However, in JPEG2000 the wavelet transform is used instead of DCT due to its better compression performance To turn the image back to its original domain the inverse transform must be applied, the inverse DCT is given by: 9) Where P' is the reconstructed image.0≤x<n and 0≤y<m are the image pixels coordinates.C is the transformed image.n, m is the number of pixels.

Uniform Quantization of the DCT Coefficients
In this operation, the uniform quantization was applied on the ACtransform coefficient, using the equation (4), and the Q step of the (x,y) th AC-coefficients, will be determined by the following equation:

The Modified SPIHT Coding
It is important to have the encoder and decoder test sets for significance in the same way.The coding algorithm therefore uses three lists called list of significant pixels (LSP), list of insignificant pixels (LIP), and list of insignificant sets (LIS).These are lists of coordinates (i,j) that in the LIP and LSP represent individual coefficients, and in the LIS represent either the set D(i, j) (a type A entry) or the set L(i, j) (a type B entry).The LIP contains coordinates of coefficients that were insignificant in the previous sorting pass.In the current pass they are tested, and those that test significant are moved to the LSP.In a similar way, sets in the LIS are tested in sequential order, and when a set is found to be significant, it is removed from the LIS and is partitioned.The new subsets with more than one coefficient are placed back in the LIS, to be tested later, and the subsets with one element are tested and appended to the LIP or the LSP, depending on the results of the test.The refinement pass transmits the nth most significant bit of the entries in the LSP.See Figure 3.
In the modified SPIHT coding we will take 4 unadjacent pixels to build the spatial orientation tree, in this way the number of roots will be increase and the number of levels will be decrease by 1 (LL will represent the roots only and its children will be in the LH, HL and PDF created with pdfFactory Pro trial version www.pdffactory.comHH), in this way building trees will be more efficient than before (in the original SPIHT algorithm that was taking 4 adjacent pixels), Figure ( 4) illustrates the spatial orientation tree of the original and the modified SPIHT algorithm.

Mapping to Positive
In this operation each value will be mapped to be positive, the following mapping equation had been used to convert the signed integer into positive integers Where, X represents the signed integer value of the LSP.This type of the mapping insure that all coefficients values are mapped to positive integers, and to keep the optimal number of bits needed to be used by shift coder as small as possible.

Run Length Encoding (RLE)
RLE consists of the process of searching for repeated runs of symbols in an input stream, and replacing them by a run count.In this work, the indexes of LSP values will contain repeated values for all i indexes, so it is best to encode them by RLE to reduce the space needed to store the compressed file.

S -Shift Optimizer and Shift Coding
The mechanism applied to compute the optimal length "N", in bits of the shift codeword is based on scanning all possible codeword lengths, starting from "1"bits and proceeding more till the numbers "N max "bits; which represent the minimum number of bits required to represent the maximum coefficient value "Max"in the LSP parameters.This number "N max "is considered as the length "in bits "of the second "auxiliary" codeword.The scan method was applied to test all possible values of bits that can be assigned to the first "shortest " codeword, so the length rang of the first codeword is [1,N max ], then the codeword produced by applying sshift optimizer are send to the compression bitstream(which represents the compressed data file) .

Comparison between the test results of the Original SPIHT, Modified SPIHT and Modified SPIHT with DCT & RLE.
The following Table illustrates comparison between the results of these methods for each image.Figure 4 and Figure5 show the reconstructed images of each method.

Conclusions
From the previous table charts and images, the following can be concluded: 1 Figure2 presents the layout of the proposed compression system; it consists of the following steps : 1.In the first step the image data is decomposed into (RGB) color components, then they transformed to another color domain (i.e., YC b C r bands).2. For each sub-band: a. Down sampling the C b & C r bands.b.Transform the sub-band using Biorthogonal Wavelet transform (tap 9/7).c.Apply the hierarchal quantization on the detail coefficients.d.Perform DCT & uniform quantization on the approximate coefficients (LL3 sub-band).e. Apply the modified SPIHT method on each color band separately.
For example JPEG image compression employs YC b C r space.Greater compression is achieved when the spatial resolution for the color components C b and C r are reduced, and then coarser quantization is applied on all components for (Y C b C r ).YC b C r color space was used by Kodak for encoding images on photo (Compact Disk) CD system [3].The linear transform from RGB to YC b C r generates one luminance space Y and two chrominance (C b and C r ) spaces: [5].The forward DCT formula is given by [6]: PDF created with pdfFactory Pro trial version www.pdffactory.comthe transform coefficients 0≤i<n and 0≤i<m are the indexes of the transform coefficients .P xy is the value of the pixel (x,y).n is the image width (number of columns).m is the image height (number of rows).
lowest quantization step value for AC-coefficients.γ is the incrimination rate.(x,y)are the frequency indices, whose values are within the range [0… Block length-1].

Figure
Figure (1) the most popular image compression methods

Figure ( 2 )
Figure (2) Block diagram of the proposed system

Table ( 1) The effects of wavelet transform passes
PDF created with pdfFactory Pro trial version www.pdffactory.com