An efficient color image compression technique

ABSTRACT


INTRODUCTION
Because of the advances in various aspects of digital electronics like image acquisition, data storage space and display, many new applications of the digital imaging have emerged within the last decade.However, several of those applications don't seem to be widespread as a result of needed large space of storing.Consequently, the image compression has grown tremendously over the last decade and various image compression algorithms have been proposed [1,2].Picture compression reduces the amount of data required to represent a digital image.The reduction process is the removal of unnecessary data.It needs considerable amount of storage capacity and transmission bandwidth to transfer multimedia material in uncompressed form.This makes transmission slow and time-consuming.Photos transmitted over the World Wide Web are an excellent example of why data compression is important.Compression can be distributed to lossless [3,4] or lossy [5,6], relying on whether all the information is not gotten eliminate of or some of it is ignored through the compression process [7].In the circumstance of lossless compression, the recovered data is similar to the original, although, for lossy compression, the restored data is a detailed look-alike of the original.Wherever lossless compression is intended for data like in bank records, even a change of a sole character can be terrible.Similarly, for medical or satellite pictures, if there is any loss during compression, it can lead to artifacts in the reconstruction that may give wrong interpretation.In lossy compression, the amount of loss in the data locates the standard of the reconstruction and does indeed not lead to change in the information content.Juncai Y. and Guizhong D. [8] have been presented a new color image compression method using human visual distinction sensitivity characteristics.Firstly, they converted the input image into YCrCb and divided the image into sub regions.They applied DCT for each and every blocks and quantization.3 quantization matrices have built by combining the distinction sensitivity characteristics of human being visual system.Afterwards, they used Huffman code.L. Starosolski, [9] proposed effective color space changement for lossless image compression.H. B. Kekre, et al. [10] introduced Image Compression system using vector quantization and hybrid wavelet transform.Kronecker product for two various transforms can be used to create hybrid wavelet transform.Ali H. Ahmed and Loay E. George, [11] presented color image compression technique based on wavelet, differential pulse code modulation and quadtree coding.Recently, different image models based on fractional total variation have been provided [12].Space and wavelet domain damage are used in the models for images with or without noise.Various factors like image compression, image restoration, image coding and so on, have been discussed [13][14][15][16][17][18][19][20][21].
Within our proposed method, for color image compression, the edge detection and computerized derivation of local thresholds are used.The algorithm is composed of 3 main stages where the image is categorized using edge detection and divided into n×n blocks.Then Discrete Cosine Transform (DCT) is used on the partitioned image with quantized coefficients that ordered using adaptive block scanning.The variance/mean adaptive threshold will compute to eliminate weak coefficients.It will rely upon each color space and blocks in each color space.Experimental results display advance results in compression ratio, bits per pixel and peak signal to noise ratio for the reconstructed image.The effective of compression ratio depending on the nature of the image file.The rest of our paper is organized as follows.In section 2, we explain the core process that assigns local thresholds.Section 3 describes the adaptive block scanning method and Section 4 presented the proposed image compression strategy.Results and discussion are given in section 5 and the paper came to the conclusion with section 6.

ADAPTIVE THRESHOLD (LOCAL MEANS AND LOCAL VARIANCES)
Thresholding techniques are often applied to segment images divide ino dark objects and bright backgrounds, or the other way round.This also offers data compression and fast data processing [22,23].The easiest way is through a technique called global thresholding, where one threshold value is chosen for the entire image which is obtained from the global information.However, once the background has non-uniform illumination, a fixed or global threshold value will poorly segment the image.Thus, the value of local threshold value that changes dynamically over the image is required.This technique is called adaptive thresholding.Below, we introduce an automatic method that calculates adaptive local thresholds for the image compression.The easy methods, Means and Variances adaptive threshold are used, which it based on local properties of the parts.Let m(x,y), the local mean at position (x,y) of windows size w × w , m(x,y) can be computed using the summation over all pixel values g(i,j) within that window and can be written as follows, Also, the computation of the local variance v (x, y) [23] is described as: (2)

ADAPTIVE BLOCK SCANNING
Intended for the aim to obtain the best possible compression ratio (CR), discrete cosine transform (DCT) has been widely employed in image and video coding systems, where zigzag scan is usually used for DCT coefficient organization and it is the last level of processing a compressed image in a transform coder, before it is use in final entropy encoding step.Multiple scanning services are being used (i.e., vertical, hilbert, zigzag and horizontal) for various spatial prediction direction on the block.However, due to local prediction errors the standard zigzag scan is not effective all time.So, we apply our proposed effective scanning method in [24] which centered on Sorting Method.It includes proven good on image compression rather than zigzag scan.

THE PROPOSED IMAGE COMPRESSION APPROACH
The input image is primarily classified into edge and non-edge portions using Canny edge detector [25].
Since the Canny edge detector is a significant and traditionally used contribution to edge detection techniques.
After that the image is subdivided into 8x8 blocks and DCT coefficients are calculated for each and every block.Then quantization process is applied, which it means reducing the number of bits by reducing the hight-frequency coefficients least importance to zero.The quantization is performed conferring to quantization table.The quantized values are rearranged relating to adaptive scan setup as described in section 3.If the block is classified as edge or non-edge block then one case (a or b) will be used as described in step 6.Inside the following two methods, a variable threshold is created that varies with both each color space (as describe in the following CS method) and also in each block in each color space (as seen in the next DCS method).After discarding minor coefficients, the remaining coefficients are compressed by the Huffman Encoder.Encoding color image is done using this propoed methods: − Method based on color space (CS): The proposed compression algorithm of CS is constituted of eight main steps that could be summarized as follows: Step 1: Apply canny operator for edge extraction on each color space image.
Step 2: Compute the adaptive threshold (variance/mean) for each color space to eliminate weak coefficients.
Step 3: Divide the image into 8x8 sub images.
Step 4: Apply DCT on the partitioned image (64 coefficients will be obtained: 1 DC coefficient and 63 AC coefficients.
Step 6: Classify the blocks to edge and non-edge blocks, and then used one case from the following cases: a.For edge block, make all the coefficients (less than adaptive variance threshold/ more than adaptive mean threshold) zeros.For non-edge block used only DC coefficient.b.For edge and non-edge block, make all the coefficients (less than adaptive variance threshold/more than adaptive mean threshold) zeros.
Step 7: Order the coefficients using zigzag/adaptive block scanning ordering (as in section 3).
Step 8: Apply Huffman encoding.− Method depends on blocks in each color space (DCS): The algorithm of the DCS can be summarized as the following steps: Step 1: Apply canny operator for edge extraction on each color space image Step 2: Divide the image into 8x8 sub images.
Step 3: Apply DCT on the partitioned image (64 coefficients will be obtained: 1 DC coefficient and 63 AC coefficients.
Step 5: Compute the adaptive threshold (variance/mean) for each block in each color space to eliminate weak coefficients.
Step 6: Classify the blocks to edge and non-edge blocks, and then used one case from the next cases: a.For edge block, make all the coefficients (more than (adaptive variance/mean threshold)) zeros.And then for non-edge block used only DC coefficient.b.For edge and non-edge block, make all the coefficients (more than adaptive (variance/mean) threshold) zeros.
Step 7: Order the coefficients using zigzag/adaptive block scanning ordering (as in section 3).
Step 8: Apply Huffman encoding.The decoding process is the invers of encoding scheme.

EXPERIMENTAL RESULTS
In this section, experiments are shown to demonstrate the performance of the proposed image coding approach.Different color images in the RGB space with different characteristics are tested in the experiments including tree, baboon and goldhill of size 256×256 and tree2, lena, barbara and airplane of size 512 × 512.The various compression methodss can be compared depending on certain performance measures.Compression ratio (CR) is outlined because the quantitative relation of the quantity of bits needed to represent the information before compression to the quantityr of bits needed once compression.Rate is the average number of bits per sample or pixel (bpp), in the matter of image.Distortion is quantified by a parameter known as mean square error (MSE).MSE points to the common worth of the square error between the first signal and therefore the reconstruction.The quality of the reconstruction is the peak signal-to-noise ratio (PSNR) is indicated by the top parameter.PSNR is the ratio of square of the peak value of the signal to the mean square error, set by decibels.

Non-adaptive method
All follows cases in this method are using canny edge detection and zigzag scan: For edge and non-edge blocks, make all the coefficients (more than adaptive variance threshold) zeros.The analysis factors of proposed non-adaptive method on different images are given in Table 1.The results show, the utilization of variance threshold for each block in each color space (DCS 4 and DCS4-4) has increase the CR while preserving the image quality.

Adaptive method
Every follows cases in this method are using canny edge detection and adaptive scan: − Case 1 (ACS1): in this case, mean adaptive threshold for each color space is computed.For edge block make all the coefficients (more than adaptive mean threshold) zeros.For non-edge block only DC coefficient is used.− Case 2 (ACS2): in this case, local variance for each color space is computed, and for edge block make all the coefficients (less than adaptive variance threshold) zeros.For non-edge block only DC coefficient is used.− Case 3 (ACS3): in this case, local variance for each color space is computed.For edge and non-edge blocks make all the coefficients (less than adaptive variance threshold) zeros.− Case 4 (ADCS1): in this case, mean adaptive threshold for each block in each color space is computed.For edge block make all the coefficients (more than adaptive mean threshold) zeros.For non-edge block only DC coefficient is used.− Case 5 (ADCS2): in this case, mean adaptive threshold for each block in each color space is computed.For edge and non-edge blocks make all the coefficients (more than adaptive mean threshold) zeros.− Case 6 (ADCS3): in this case, local variance for each block in each color space is computed.For edge block make all the coefficients (more than adaptive variance threshold) zeros.For non-edge block only DC coefficient is used.− Case 7 (ADCS4): in this case, local variance for each block in each color space is computed.For edge and non-edge blocks make all the coefficients (more than adaptive variance threshold) zeros.The reconstructed images are shown in Figure 1.The four curves as shown in Figure 2 and Figure 3 are demonstrate that ACS3 compression performance is higher than CS3 compression performance.Various comparisons have recently been performed to prove the effectiveness of the presented methodology over other similar methods [26] for color image compression, as in Table 3.The results show that compression ratio of images are improved.The quantity of improvement is dependent greatly on the nature of the image; for images with little non-edge blocks, such as Baboon image, the improvement is less significant, however for images with a lot of non-edge blocks, the improvement are significant.

CONCLUSION
Through this work, a new way of color image compression is proposed using adaptive computerized derivation of local thresholds.The suggested approach is based upon adaptive threshold computation to remove weak coefficients.Our approach is decomposed into several cases with different parameters.These types of cases based on applying low quality loosy compression on non-edge areas and high quality loosey compression on edge parts of images.Outcomes show the improvement of adaptive method over the non-adaptive method in quantitative PSNR terms and very particularly in visual quality of the reconstructed images.As a future work, we will implement the proposed approach on clutter background images or in case where the subject has a mono-texture and mono-color while the background has complicated textures and colors.

Figure 1 .Figure 2 .Figure 3 .
Figure 1.The compressed images using the proposed adaptive method Case 1 (CS1): in this case, mean adaptive threshold for each color space is computed.For edge block make all the coefficients (more than adaptive mean threshold) zeros.For non-edge block only DC coefficient is used.− Case 2 (CS2): in this case, variance adaptive threshold for each color space is computed.For edge block make all the coefficients (less than adaptive variance threshold) zeros.For non-edge block only DC coefficient is used.− Case 3 (CS3): in this case, variance adaptive threshold for each color space is computed.For edge and non-edge blocks, make all the coefficients (less than adaptive variance threshold) zeros.− Case 4 (DCS1): in this case, mean adaptive threshold for each block in each color space is computed.For edge block make all the coefficients (more than adaptive mean threshold) zeros.For non-edge block only DC coefficient is used.− Case 5 (DCS2): in this case, mean adaptive threshold for each block in each color space is computed.For edge and non-edge blocks, make all the coefficients (more than adaptive mean threshold) zeros.− Case 6 (DCS3): in this case, variance adaptive threshold for each block in each color space is computed.For edge block make all the coefficients (more than adaptive variance threshold) zeros.For non-edge block only DC coefficient is used.− Case 7 (DCS4): in this case, variance adaptive threshold for each block in each color space is computed.

Table 1 .
Compression ratio, bitrate and psnr values attained by non-adaptive method

Table 2 .
Compression ratio, bitrate and psnr values attained by adaptive method

Table 3 .
Comparison PSNR (DB), CR and BPP of the proposed methods (DCS3 and ADCS) and other method