Color Image Compression Based on Wavelet , Differential Pulse Code Modulation and Quadtree Coding

The objective of this study is to introduce a low cost color image lossy color image compression. The RGB image data is transformed to YUV color space, then the chromatic bands U&V are down-sampled using dissemination step. The bi-orthogonal wavelet transform is used to decompose each color sub band, separately. Then, the Differential Pulse-Code Modulation (DPCM) is used to encode the Low-Low (LL) sub band. The other wavelet sub bands are coded using scalar Quantization. Also, the quad-tree coding process is applied on the outcomes of DPCM and quantization processes. Finally, the adaptive shift coding is applied as high order entropy encoder to remove the remaining statistical redundancy to achieve good efficiency in the performance of the compression process. The introduced system was applied on a set of standard color image; the attained compression results indicated good efficiency in terms of compression gain while keeping the fidelity level above the acceptable level.


INTRODUCTION
The need for data compression as a topic acquired its importance because it is a solution key for pypass the insufficient storage space and limited bandwidth of data transmission (Havaldar and Medioni, 2004;Salomon, 2004).The programs used to compress still images are, in fact, using the designed techniques that exploit unimportant sensory information and statistical redundancies.More images program-ers rely on the use of two techniques (i.e., sub-band coding and transform coding).Sub-band coding decomposes signal into a number of sub-bands, using band-pass filter like wavelet transform (Katz and Gentile, 2005).Transform coding uses a mathematical transformation like DCT and FFT.
An interest was grown in the recent years about utilizing the benefits of wavelet coding to process both images and audio applications.The concept of wavelet coding, like other transform coding techniques, is based on the idea that the coefficients of transform decorrelates the samples values of the signal, such that they can be coded in more compressive way in comparison with the case of direct compression of the original samples values themselves (Dhubkarya and Dubey, 2009).
The issues taken into consideration when developing the proposed system are summarized in the following: • Develop a system can get the benefits of existing spectral redundancy in the input image.The system should use the proper mapping model to generate uncorrelated color image bands convey low data content.• Decompose the spatial variation of image signal into sub bands each one conveys certain part of the signal that has specific spectral characteristic.• Prune the existing local spatial correlation may exist in each sub-band.• Utilize proper set of entropy encoders to efficiently prune the existing statistical redundancy may found in produced transformed data.
The need for image compression algorithms that can operate concurrently to satisfy the conflicting demands by users; which are high compression ratio and preservation of fidelity level between the reconstructed image variant and the original image.This demand has led researchers in the past two decades to introduce several different coding methodologies.et al. (2007) suggested a compression system based on the bi-orthogonal wavelet filters; because orthogonal filters have suitable property of energy preservation whereas biorthogonal filters lack of Fig. 1: The layout of proposed lossy image compressor it.Since, Daubechies, Symlet and Coiflet filters have good property of energy conservation, more vanishing moments, regularity and asymmetry than other orthogonal filters; these transforms were adopted in the their suggested system.Also, they used bi-orthogonal wavelet filter out of Daubechies, Symlet and Coiflet for lossy fingerprint image compression.They have applied Daubechies, Symlet and Coiflet Wavelet Transforms (WT) at different orders (i.e., 1 to 5) decomposition levels on the fingerprint images (Gornale et al., 2007).Singh et al. (2011) referred that the properties of wavelet transform greatly help in identification and selection of significant and non-significant coefficients amongst the wavelet coefficients, DWT represents image as a sum of wavelet function (wavelets) on different resolution levels.So, the basis of wavelet transform can be composed of functions satisfy the requirements of multi-resolution analysis.So, the choice of wavelet function for image compression depends on the image application and the content of image.They presented a review of the fundamentals of image compression based on wavelet.Also, they discussed some of the important features of wavelet transform in compression of images.Finally, they evaluated and compared the compression performance of three different wavelet families (i.e., Daubechies, Coiflets, Biorthogonal) by measuring the image fidelity objectively (using peak signal-to-noise ratio) and subjectively (using visual image quality), beside to compression ratio (Singh et al., 2011).Ruchika et al. (2012) proposed the use of DWT to compress wide variety of medical images.They indicated that the application of thresholds on DWT coefficients in addition to Huffman encoding leads to major reduction in image statistical redundancy (Singh et al., 2011).The test results indicated that the system performance is promising when applied on medical images (Ruchika et al., 2012).Ahmed et al. (2015) have proposed a lossy compression scheme uses different signal representation method.Firstly, they used Cubic Bezier Surface (CBI) representation to prune the image component that shows large scale variation.The produced cubic Bezier surface is subtracted from the image signal to get the residue component.Then, biorthogonal wavelet transform was applied to decompose the residue component (Singh et al., 2011).

Gornale
Finally they used some lossless coding method to boost the compression gain (Ahmed et al., 2015).

MATERIALS AND METHODS
Like any typical image compression schemes, the introduced system consists of two individual units: • Image compressor used to compress real still color images with little rate of subjective distortion • Image decompressor used to retrieve the raster image.In the following sections details for the implied stages of each unit are given.

Lossy image compressor:
As shown in Fig. 1 this unit consists of the following stages: Image loading: Initially, the input image is loaded as bitmap (raster) formatted.Then, the loaded image data is analyzed into the Basic Color Components (RGB).

Color transform:
The advantage of dealing with the color representation YUV is to get proper image data representation that is closer to performance nature of Human Vision System (HSV); the intensity band (i.e., Y) is the most, subjectively, informative channel of the color image; While the chromatic bands U and V, normally, convey less subjective information.
Chromatic bands downsampling: Since the chrominance components (U and V) holds only 10% of the whole image information and HSV doesn't have high spatial resolution against these band; so these bands are down sampled by 2 to produce the down sampled components (i.e., U down and V down ).This down sampling step will not cause significant subjective distortions in the color image.
Biorthogonal wavelet transform: In this study, the biorthogonal wavelet transform (tap 9/7) is used as spatial signal decomposer for each subband, individually.Biorthogonal wavelet decomposition was chosen due its compressive efficiency and modern wide use in standards lossless and lossy compression scheme (for example in ISO JPEG2000 standard).In wavelet transform coding the image is divided into four subbands each one can easily encoded separately.
The bio-orthogonal tap 9/7 wavelet filters are applied to the (Y, U down and V down ) color bands separately.The transform will decompose the data of each colors band into four subbands (i.e., LL, LH, HL and HH).The following set of equations describes the four "lifting" steps and the two "scaling" steps applied to accomplish the bi-orthogonal (9/7) wavelet decomposition:

DPCM:
The approximation subband (LL) is passed through the delta coding step (i.e., using the differences between the adjacent LL's coefficients: The direction of the delta scanning is illustrated in Fig. 2 shown below.Quantization: Quantization is, simply, the process of reducing the number of bits that are needed to store the values of coefficients by reducing their accuracy, the main objective of quantization is to reduce the highfrequency coefficients least importance to zero.In the proposed system, the uniform scalar quantization operation was adopted to quantize the coefficients of each sub band individually; this step will reduce the number of bits needed to represent the coefficients approximately and preparing it to the shift coding step.The coefficients of each subband are quantized with an appropriate quantization step value (Qstp).The transform coefficients are categorized according to its subband member-ship to (L n , H n … H 2 , H 1 ).The rounded subband (L n ) coefficients are quantized using low quantization step, which is always smaller than the quantization step used to quantize the detail subbands' coefficients.Also, the quantization step of the high level detail subband coefficients is smaller than that for low level subband.
In the proposed system, a hierarchal relationship was adopted to determine the value of scalar quantization step that used to quantize the wavelet (i.e., detail) coefficients belong to each subband, separately.The way of selecting the variation nature of quantization step across the subbands was based on the criteria "diminishing the range of wavelet coefficients values without making significant degradation in image quality".The adopted hierarchal scalar quantization step was governed by the following equations: where, Q step (n) = The quantization step of n th subband α = The rate of increase of quantization step its value should be less than 1 β = The additional ratio for quantization step for HH subband, its value is always (≥1) Quadtree coding: In this step, the process of quadtree coding is applied to encode the quantized detail bands (i.e., LH, HL and HH) subbands of (Y, U down and V down ).The quadtree method divides the subband into four equal sized square blocks.Then, each block is tested to check if it has at least non-zero coefficient Fig. 3: The layout of the enhanced shift-key encoder value (i.e., not empty) or not (i.e., empty).In case the tested block is not empty it will be divided into four sub-blocks and made the search process on the sub blocks (4×4) is retested alone.This process begins with whole subband quantized coefficients and stops when reaching to the smallest sub-blocks have size (2×2); if that block is not empty then its 4 coefficients values are stored in a temporary buffer, Buf(), along with the quadtree partitioning binary code.

Entropy encoding using shift coding:
the proposed image compressor unit is applying lossless compression of the non-empty blocks coefficients which are already registered in temporary buffer Buf(). Figure 3 illustrates the layout of the developed entropy coder; which is designed to remove the statistical redundancy efficiently.
The histogram of sequence of data registered in Buf() is concentrated around the high peak located at the value (0).Therefore, the use of shift coding will be appropriate for the entropy encoding the data to attain high compression gain.The implemented enhanced shift coder implies the following steps: Mapping to positive: This step maps the sequence elements values to be positive numbers.This step makes the coding process of the next step mapping step is done be representing each negative element value as positive odd number and each positive value is represented as even number.This conversion can be applied using the following simple mapping equation: where, m in (i) = The mapped i th sequence element m out (i) = The corresponding mapped value key encoder value (i.e., not empty) or not (i.e., empty).In case the tested block is not empty it will be divided into four blocks and made the search process on the subblocks (4×4) is retested alone.This process begins with coefficients and stops when blocks have size (2×2); if that block is not empty then its 4 coefficients values are stored in a temporary buffer, Buf(), along with the : The last step of the proposed image compressor unit is applying lossless empty blocks coefficients which are already registered in temporary buffer Buf(). Figure 3 illustrates the layout of the developed entropy ich is designed to remove the statistical The histogram of sequence of data registered in Buf() is concentrated around the high peak located at the value (0).Therefore, the use of shift coding will be coding the data to attain high compression gain.The implemented enhanced This step maps the sequence elements values to be positive numbers.This step makes the coding process of the next step easier.This mapping step is done be representing each negative element value as positive odd number and each positive value is represented as even number.This conversion can be applied using the following simple mapping sequence element = The corresponding mapped value Histogram packing: The histogram of the positive sequence elements will show long tail with long many gaps places (i.e., many values doesn't occur in the sequence); this leads to significant reduction of the compression gain when using shift encoder.So, it is proper to make a compaction in the histogram values.Then, the positive buffer's elements values are remapped according to the packed histogram elements.

Elements pairing stage:
This step is applied to detect the most redundant pair of subsequent elements and replace the pair by single value (i.e., Max+1), where Max is the highest registered value of all elements.After each pairing step increment Max value by 1.The pairing operation can be repeated for a number of times (M); where M is a predefined parameter value.
After the Pairing step, the new histogram of the produced sequence is calculated and stored as overhead information is compression stream; because it is necessary to do the decoding operation.Then, it is sorted in descending order and the elements values a remapped according to the indexes of their values in the histogram.

Determination of optimal shift key value:
to shift key encoding mechanism, the small valued symbols which have high occurrence probabilities are assigned short codewords, while the large values symbols are assigned long codewords ( Ananth, 2012).So, for determining the optimal key value that separating the short codewords from the long ones, an optimizer algorithm was introduced.This optimizer search for the best short codeword length (n and the corresponding long codeword (n together lead to lowest value of total bits (T to encode the whole input symbols; that is: The histogram of the positive sequence elements will show long tail with long many gaps places (i.e., many values doesn't occur in the sequence); this leads to significant reduction of the compression gain when using shift encoder.So, it is e a compaction in the histogram values.Then, the positive buffer's elements values are remapped according to the packed histogram elements.This step is applied to detect the most redundant pair of subsequent elements and the pair by single value (i.e., Max+1), where Max is the highest registered value of all elements.After each pairing step increment Max value by 1.The pairing operation can be repeated for a number of times (M); where M is a predefined parameter value.
fter the Pairing step, the new histogram of the produced sequence is calculated and stored as overhead information is compression stream; because it is necessary to do the decoding operation.Then, it is sorted in descending order and the elements values are remapped according to the indexes of their values in the Determination of optimal shift key value: According to shift key encoding mechanism, the small valued symbols which have high occurrence probabilities are ile the large values symbols are assigned long codewords (Veenadevi and ).So, for determining the optimal key value that separating the short codewords from the long ones, an optimizer algorithm was introduced.This st short codeword length (n S ) and the corresponding long codeword (n L ) which both together lead to lowest value of total bits (T Bits ) required to encode the whole input symbols; that is: Shift encoding: As last step, the traditional shift encoding step is applied such that the small coded element is coded using the leading bit value "0" concatenated with n S bits used to represent the element value; while the large valued element is coded u leading bit value "1" concatenated with n represent the element value.
Image decompressor unit: Figure 4 presents the layout of the Image Decompressor.The order of the corresponding inverse operations (to those used in image compressor) is arranged in reverse order.Also, Figure 5 presents the layout of the corresponding shift key decoder.
The highest value of the input elements to the As last step, the traditional shift encoding step is applied such that the small coded element is coded using the leading bit value "0" bits used to represent the element value; while the large valued element is coded using the leading bit value "1" concatenated with n L bits used to Figure 4 presents the layout of the Image Decompressor.The order of the corresponding inverse operations (to those used in essor) is arranged in reverse order.Also, Figure 5 presents the layout of the corresponding shift

TESTS RESULTS
Different sets of tests been performed to evaluate the performance of the proposed color image compression system in terms of Compression Ratio (CR), Peak Signal to Noise ratio (PSNR).The effectiveness of the following system parameters was investigated: • The number of wavelet passes (Npass) • Initial quantization step (Q) for the detail subbands coefficient (LH, HL and HH) • The descending rate parameter (α) Beta increment ratio (β) Table 1 lists the specifications of the standard images used as test material in this study work.Table 2 presents the default values for the investigated parameters.
Table 3 to 5 lists the attained performance parameters of the proposed system when applied on Lena, Barbara gray and Baboon respectively using different number of passes; the listed results indicate acceptable compression results in terms of (CR), fidelity measures (PSNR) can be reached In all conducted tests, the values of three parameters were fixed and the value of the fourth parameter was changed to define its effectiveness on the compression system performance.The in above tables indicate the following remarks of the tested standard images Barbara Baboon 24 512×512 256×256 192 Table 2: The default values of the control parameters for all images αY/αU,V βY/βU,V 0.4/0.6 1.5/1.9

TESTS RESULTS
Different sets of tests been performed to evaluate performance of the proposed color image compression system in terms of Compression Ratio (CR), Peak Signal to Noise ratio (PSNR).The effectiveness of the following system parameters was The number of wavelet passes (Npass) tion step (Q) for the detail subbands The descending rate parameter (α) Table 1 lists the specifications of the standard images used as test material in this study work.Table 2 ues for the investigated Table 3 to 5 lists the attained performance parameters of the proposed system when applied on Lena, Barbara gray and Baboon respectively using different number of passes; the listed results indicate on results in terms of (CR), fidelity measures (PSNR) can be reached.
In all conducted tests, the values of three parameters were fixed and the value of the fourth parameter was changed to define its effectiveness on the compression system performance.The results listed in above tables indicate the following remarks: In all conducted tests, the values of three parameters were fixed and the value of the fourth parameter was changed to define its effectiveness on the compression system performance.The results listed in above tables indicate the following remarks: • In general, an increase in CR is occurred when values of the parameters (number of Passes, Q step , α, β) are increased; i.e., an associated decrease occurred in PSNR and an increase in MSE.• The parameter Q step is the most effective parameter on the compression performance; its increase causes significant increase on CR and decease in PSNR.
• The parameter No. of Wavelet Passes has significant impact compression performance; its increase shows an increase in CR and a decrease in PSNR.But in general it is less effective in comparison with Q step .• The parameter β is less effective on CR, PSNR and MSE.• Generally, the value of MSE is increased when increasing the value of any one of the four parameters.But, this increase varies according to the parameter type; the largest dependency is on α and the least dependency is on β.
Table 6 lists the compression results with and without applying DPCM on Lena image; We can notice the effectiveness of the step DPCM on the proposed system.
The results show clearly an increase in CR is occurred when DPCM is applied; also insignificant change in PSNR and MSE is occurred.Figure 6 shows samples of reconstructed image produced by the proposed method with the original image.
Looking at the results that have been obtained and compared with the results obtained by Ahmed et al. (2015) for images Lena and Barbara; we can see that the proposed system was able to get good compression ratio and acceptable image quality and a relatively short time coding process.In most cases the range of encoding, decoding time was within (0.3 to 0.7 sec).This is encouraging performance sign when taking into consideration that the proposed system is easy and simple and did not require any complexity in its design.
When comparing the results obtained by the proposed system with results of using standard JPEG, it can be noticed they are close in terms of compression ratio and image quality as well as the mean square error.

CONCLUSION
In this study, an image compression scheme based on using DPCM, wavelet, Quadtree and high order shift coding had been introduced.The following remarks are stimulated: • The use of DPCM had improved the compression performance (i.e., increase the CR while preserving the image quality).• The increase in quantization step causes an increase in compression ratio and a decrease in PSNR value.• Q step is the most effective parameter on compression performance; while the parameter β is the less effective one.• As a future work the developed system can be improved by merging the two transforms Wavelet and DCT in one coding scheme for image compression, the advantages of both transforms could be exploited to get better compression gain.

Fig. 2 :
Fig. 2: The direction of scanning coefficients values

Table 1 :
The characteristics of the tested standard images

Table 2 :
The default values of the control parameters for all images

Table 3 :
Test results for Lena image