(IJCSIS) International Journal of Computer Science and Information Security, Vol. 8, No.

9, December 2010

Hybrid Compression of Color Images with Larger Trivial Background by Histogram Segmentation
M.Mohamed Sathik1 , K.Senthamarai Kannan2 and Y.Jacob Vetha Raj3
Department of Computer Science, Sadakathullah Appa College, Tirunelveli, India mmdsadiq@gmail.com 2,3 Department of Statistics, Manonmanium Sundaranar University, Tirunelveli, India senkannan2002@gmail.com jacobvetharaj@gmail.com Abstract- A hybrid image compression method is proposed by which the background of the image is compressed using lossy compression and the rest of the image is compressed using lossless compression. In Hybrid Compression of Color Images with Larger Trivial Background by Histogram Segmentation(HCCILTBHS) , input color image is subjected to binary segmentation using histogram to detect the background. The color image is compressed by standard lossy compression method. The difference between the lossy image and the original image is computed and is called as residue. The residue at the background area is dropped and rest of the area is compressed by standard lossless compression method. This method gives lower bit rate than the lossless compression methods and is well suited to any color image with larger trivial background. Key Words- Segmentation, Erosion, Dilation, Image

smoothness in image compression, this method segments the image as main subject and background, then the background of the image is subjected to lossy compression and the main subject is kept unaffected. In the proposed work, for image compression, segmentation and morphological operations [23] are used. For segmentation, morphological operations such as erosion, dilation and closing there are lots of work has been carried out [24], [25]. A simple and a time efficient method for segmentation used in the proposed work is described in section II, section III gives a detailed description of the proposed method, the results and discussion are given in section IV and the concluding remarks are given in section V. II SEGMENTATION USING HISTOGRAM AND RUN LENGTH ENCODEING Let X be a matrix of order m x n x p, represents the color image of width m and height n. Here p represents the number of color planes. For RGB color images the value of p is 3. The domain for Xi,j,k is [0..255] , for any i=1..m, any j=1..n and any k = 1..p. A) Segmentation Using Histogram The architecture of segmentation using histogram is shown in figure 1. To make the process faster the high resolution input color image is down sampled 2 times. When the image is down sampled each time the dimension is reduced by half of the original dimension. So the final down sampled image (D) is of the dimension m x n x p. 4 4 Down Sample 2 Times Up Sample 2 Times Gray Scale Conversion (G) Binary Segmentation (B) Figure -1 The down sampled color image is converted to gray scale image using equation (1). Gi,,j = 0.299 Di,,j,,0 + 0.587 Di,j,1 + 0.114Di,j,2 …(1) The histogram (H) is computed for the gray scale image. The most frequently present gray scale value (Mh) is determined from the histogram as indicated by a vertical line in figure 2 by equation (2).

I. INTRODUCTION Even though the memory capacities of computers have increased as new technologies are emerging, the requirement of more storage space is also increasing as more data are needed to be stored. In the case of image data, the spatial and color resolutions are increased for the betterment of image quality, thus requires more space to store images. Image compression is one of the solutions to meet the storage requirements. In image compression, there are two major classifications; they are lossless [1]-[5] and lossy [6] compression. In lossless image compression, the entire data can be restored after decompression, but not in the case of lossy compression. Vector quantization [7],[8] , wavelet transformation [9]-[13] techniques are widely used in addition to various other methods[15]-[17] in image compression. The problem in lossless compression is that, the compression ratio is very less; where as in the lossy compression the compression ratio is very high but may loose vital information of the image. The quality of images are measured in lossy compression methods using various techniques [18],[19]. Some of the works carried out in hybrid image compression [20],[21] incorporated different compression schemes like PVQ and DCTVQ in a single image compression. But the proposed method uses lossless and lossy compression methods like [22] to compress a single image The proposed method performs a hybrid compression, which makes a balance on compression ratio and image quality by preserving the vital information. In this approach the main subject in the image is very important than the background image. Considering the importance of image components, and the effect of

Histogram Computation (H) Range Calculation (L & U)

http://sites.google.com/site/ijcsis/ ISSN 1947-5500

(IJCSIS) International Journal of Computer Science and Information Security, Vol. 8, No. 9, December 2010

Mh = arg{max(H(x))}


The background value of the images is having the highest frequency in the case of homogenous background. In order to surmise background textures a range of gray level

loss in the vital area of the image. To achieve this, HCCILTBHS first converts the input RGB image into Gray Scale image (G) and segments it into background and foreground image as described in section II. The segmented image (  ) is a binary image determined by a histogram based algorithm as described in section II A. The lossy compressed RGB color image (  ) is created by compressing the original input image by standard lossy compression method. Then a residual image (  ) is computed by finding the difference between original image and lossy compressed image at vital area and is compressed by standard lossless compression method. The  ,  c and

 c are stored which are used to formulate the hybrid image (  ). The residue at foreground area is a linear vector of size
K and is extracted as per equation (8)

ik   ij - ij if  ij is 1 …(8) Finally the composed  is stored to get the
Figure - 2 values are considered for segmentation. The range is computed using the equations (3) and (4). L = max( Mh – 30,0) U = min( Mh + 30,255) …(3) …(4) Compressed Image. The compression ratio is expected to be comparatively better than lossless image compression and the image quality is to be better than lossy compression. More details are discussed in section IV. The block diagram in figure 3 gives the overall picture of this method. The entire operation in HCCILTBHS can be written in steps as follows HCCILTBHS Algorithm: 1. Read the RGB input image  . 2. Down Sample  two times to get D. 3. Convert D into Gray Scale Image G. 4. Segment to detect background area (  ) from G.

The gray scale image G is segmented to detect the background area of the image using the function given in equation (5) Bi,j = (Gi,j > L) and (Gi,j < U) …(5) After processing the pixel values for background area is 1 in the binary image B. To avoid the problem of over segmentation the binary image is subjected to sequence of morphological operations. The binary image is eroded with smaller circular structural element (SE) to remove smaller segments as given in equation (6).

B  BSE


Then the resultant image is subjected to morphological closing operation with larger circular structural element as given in equation (7). .

 two times to get  6. Lossy compress  to get  7. Find the residual image  by subtracting  from  at foreground area with regard to  . 8. Lossless compress  to get  c 9. Lossless compress  by RLE to get  c 10. Store  c ,  and  c .
5. Up sample

B  B  SE


B) Run Length Encoding (RLE) The run length encoding method is used to compress the binary segmented image. The number of continuous zeros and ones available alternatively in every line of the image counted and are stored. The decoding can be achieved by reading the sequence of numbers and reproduce the binary image by placing zeros and ones accordingly. III. PROPOSED HYBRID IMAGE COMPRESSION METHOD The ‘Hybrid Compression of High Resolution Color Images with Larger Trivial Background Images (HCCILTBHS)’ method compresses the image with insignificant loss in background of the image and with no


Segmentation Using Histogram

2 

Run Length Encoding


Input Color Image

Lossy Compression -

Loss less Compression of RGB Residues


Figure – 3 Block Diagram of HCCILTBHS The decompression is the reverse of the above operations. Initially all the compressed components  ,  c and

 c are restored from compressed file. The lossy image

 is decompressed; the binary segment information is loaded by run length decoding method. The lossless
http://sites.google.com/site/ijcsis/ ISSN 1947-5500

(IJCSIS) International Journal of Computer Science and Information Security, Vol. 8, No. 9, December 2010

 c . The hybrid image can be formed by adding the residue  at
information on residuals can be restored from vital area with the lossy image. IV RESULTS AND DISCUSSION The HCCILTBHS method is implemented according to the description in section III and tested with a set of twelve images shown in figure 5. The results obtained from the implementation of the proposed algorithms are shown in figures from 4 ,6 and table I. The compressed hybrid image by HCCILTBHS is shown in figure 4.e. Figure

4.a shows the original input image, figure 4.c shows the lossy compressed image of 4.a. In Figure 4.b the white area shows the detected vital area. From figure 4.d the error between lossy compressed image and the input image. It can be observed from figure 4.f that there is no difference in hybrid image from input image at foreground area. This indicates that there is no loss at foreground area. There are small differences in the background area can be observed. The compressed bit rates of the twelve test images are computed and tabulated in table 1.

a) Input Image

b)Binary Segmented Image

c)Lossy Compressed Image

d) Lossy Error (|a –c|)

e) Hybrid Image

f)Hybrid Error ({a – e|) Figure 4– Input and output images.

Figure 5 - Test Images (1 to 12 from left to right and top to bottom)


http://sites.google.com/site/ijcsis/ ISSN 1947-5500

(IJCSIS) International Journal of Computer Science and Information Security, Vol. 8, No. 9, December 2010

Table I – Bits Per Pixel (bpp) for Lossless, Lossy and Hybrid Compression Methods for test Images. Images Loss Less Lossy Bit Hybrid Bit rate Bit Rate Rate 1 12.4661 0.6181 10.5004 2 12.4370 0.3663 4.6582 3 14.082 0.8794 13.241 4 13.5499 0.5938 3.6106 5 5.9264 0.3557 5.7787 6 7.9622 0.3481 5.5602 7 10.8759 0.6363 9.6273 8 11.8418 0.5843 9.9861 9 14.4508 0.8725 11.5291 10 14.4690 0.6516 6.6611 11 7.2551 0.2938 1.6436 12 7.4225 0.4597 4.9224 The ‘lossless bit rate’ column indicates the bit rates achieved by compressing the input image by standard (JPEG200) compression method in lossless mode. The ‘Lossy Bit Rate’ column of table 1 indicates the bit rates achieved by standard JPEG compression method in lossy mode (Quality 20). The ‘Hybrid Bit rate’ column indicates the bit rate achieved by the proposed method (HCCILTBHS). Figure-6 shows the bit rates of compressed test images using lossless, lossy and proposed method. It can be easily noticed that the bit rate achieved by HCCILTBHS is less comparing to lossless bit rate and is higher than the bit rate of lossy compression bit rate. V. CONCLUSION In HCCILTBHS, the bit rate is lesser than lossless compression and quality is higher than lossy compression methods. The computation time is higher because of the overhead of segmenting background and storing this information and residual. The bit rate depends on the percentage of foreground area of the image. As the area increases the bit rate also increases since the numbers of pixels to be stored in lossless mode are increased. Since the foreground of the image is preserved, this compression method can be well suited for any kind of image database which compresses images with larger and trivial background in offline. Improved segmentation and lossless compression methods may be incorporated in future to get better results. ACKNOLEDGEMENT The authors express their gratitude to University Grant Commission and Manonmanium Sundaranar University for financial assistance under the Faculty Development Program. REFERENCES
[1] Xiwen OwenZhao, Zhihai HenryHe, “Lossless Image Compression Using Super-Spatial Structure Prediction”, IEEE Signal Processing Letters, vol. 17, no. 4, April 2010 383




B it R ate(bp p)


JPEG2000 JPEG(Q30) Hybrid




0 1 2 3 4 5 6 Images 7 8 9 10 11 12

Figure – 6 Bit rates(bpp) obtained by Lossless, Lossy and Hybrid Compression Methods for test Images
[2] Aaron T. Deever and Sheila S. Hemami, “Lossless Image Compression With Projection-Based and Adaptive Reversible Integer Wavelet Transforms”, IEEE Transactions on Image Processing, vol. 12, NO. 5, May 2003. Nikolaos V. Boulgouris, Dimitrios Tzovaras, and Michael Gerassimos Strintzis, “Lossless Image Compression Based on OptimalPrediction, Adaptive Lifting, and Conditional Arithmetic Coding”, IEEE Transactions on Image Processing, vol. 10, NO. 1, Jan 2001 Xin Li, , and Michael T. Orchard “ Edge-Directed Prediction for Lossless Compression of Natural Images”, IEEE Transactions on Image Processing, vol. 10, NO. 6, Jun 2001. Jaemoon Kim, Jungsoo Kim and Chong-Min Kyung , “A Lossless Embedded Compression Algorithm for High Definition Video Coding” 978-1-4244-4291 / 09 2009 IEEE. ICME 2009 Rene J. van der Vleuten, Richard P.Kleihorstt ,Christian Hentschel,t “Low-Complexity Scalable DCT Image Compression”, 2000 IEEE. K.Somasundaram, and S.Domnic, “Modified Vector Quantization Method for mage Compression”, ’Transactions On Engineering, Computing And Technology Vol 13 May 2006 Mohamed A. El-Sharkawy, Chstian A. White and Harry ,”Subband Image Compression Using Wavelet Transform And Vector Quantization”, 1997 IEEE. Amir Averbuch, Danny Lazar, and Moshe Israeli ,”Image Compression Using Wavelet Transform and Multiresolution Decomposition”, IEEE Transactions on Image Processing, vol. 5, NO. 1, Jan 1996. Jianyu Lin, Mark J. T. Smith,” New Perspectives and Improvements on the Symmetric Extension Filter Bank for Subband /Wavelet Image Compression”, IEEE Transactions on Image Processing, vol. 17, NO. 2, Feb 2008. Yu Liu, Student Member, and King Ngi Ngan, “Weighted Adaptive Lifting-Based Wavelet Transform for Image Coding “,IEEE Transactions on Image Processing, vol. 17, NO. 4, Apr 2008. Michael B. Martin and Amy E. Bell, “New Image Compression Techniques Using Multiwavelets and Multiwavelet Packets” ,IEEE Transactions on Image Processing, vol. 10, NO. 4, Apr 2001. Roger L. Claypoole, Jr , Geoffrey M. Davis, Wim Sweldens ,“Nonlinear Wavelet Transforms for Image Coding via Lifting” , IEEE Transactions on Image Processing, vol. 12, NO. 12, Dec 2003. David Salomon, “Data Compression , Complete Reference”, Springer-Verlag New York, Inc, ISBN 0-387-40697-2. Eddie Batista de Lima Filho, Eduardo A. B. da Silva Murilo Bresciani de Carvalho, and Frederico Silva Pinagé “Universal












[14] [15]


http://sites.google.com/site/ijcsis/ ISSN 1947-5500

(IJCSIS) International Journal of Computer Science and Information Security, Vol. 8, No. 9, December 2010






Image Compression Using Multiscale Recurrent Patterns With Adaptive Probability Model” , IEEE Transactions on Image Processing, vol. 17, NO. 4, Apr 2008. Ingo Bauermann, and Eckehard Steinbach, “RDTC Optimized Compression of Image-Based Scene Representations (Part I): Modeling and Theoretical Analysis” , IEEE Transactions on Image Processing, vol. 17, NO. 5, May 2008. Roman Kazinnik, Shai Dekel, and Nira Dyn , ”Low Bit-Rate Image Coding Using Adaptive Geometric Piecewise Polynomial Approximation”, IEEE Transactions on Image Processing, vol. 16, NO. 9, Sep 2007. Marta Mrak, Sonja Grgic, and Mislav Grgic ,”Picture Quality Measures in Image Compression Systems”, EUROCON 2003 Ljubljana, Slovenia, 0-7803-7763-W03 2003 IEEE. Alan C. Brooks, Xiaonan Zhao, , Thrasyvoulos N. Pappas., “Structural Similarity Quality Metrics in a Coding Context: Exploring the Space of Realistic Distortions”, IEEE Transactions on Image Processing, vol. 17, no. 8, pp. 1261–1273, Aug 2008. Hong, S. W. Bao, P., “Hybrid image compression model based on subband coding and edge-preserving regularization”, Vision, Image and Signal Processing, IEE Proceedings, Volume: 147, Issue: 1, 16-22, Feb 2000

[21] Zhe-Ming Lu, Hui Pei ,”Hybrid Image Compression Scheme Based on PVQ and DCTVQ “,IEICE - Transactions on Information and Systems archive, Vol E88-D , Issue 10 ,October 2006 [22] Y.Jacob Vetha Raj, M.Mohamed Sathik and K.Senthamarai Kanna,, “Hybrid Image Compression by Blurring Background and Non-Edges. The International Journal on Multimedia and its applications.Vol 2, No.1, February 2010, pp 32-41 [23] Willian K. Pratt ,”Digital Image Processing” ,John Wiley & Sons, Inc, ISBN 9-814-12620-9. [24] Jundi Ding, Runing Ma, and Songcan Chen,”A Scale-Based Connected Coherence Tree Algorithm for Image Segmentation”, IEEE Transactions on Image Processing, vol. 17, NO. 2, Feb 2008. [25] Kyungsuk (Peter) Pyun, , Johan Lim, Chee Sun Won, and Robert M. Gray, “Image Segmentation Using Hidden Markov Gauss Mixture Models”, ” ,IEEE Transactions on Image Processing, VOL. 16, NO. 7, JULY 2007


http://sites.google.com/site/ijcsis/ ISSN 1947-5500

Sign up to vote on this title
UsefulNot useful

Master Your Semester with Scribd & The New York Times

Special offer for students: Only $4.99/month.

Master Your Semester with a Special Offer from Scribd & The New York Times

Cancel anytime.