You are on page 1of 9

International Journal of Computational Intelligence and Information Security, August 2011 Vol. 2, No.

Content Specific Image Compression based on Luminance & Chrominance of the Image using Binary Plane Technique
1

M Ashok, 2 Dr.T. Bhaskara Reddy, 3Dr.M. Rama Krishna Reddy

Research Scholar, Department of Computer Science and Technology, Sri Krishna Devaraya University, Anantapur,India email:maram_ashokssjec@yahoo.com 2 Associate Professor, Department of Computer Science and Technology, Sri Krishna Devaraya University, Anantapur, India 3 Senior Lecturer In Electrical And Electronics Engineering, Govt. Polytechnic College, Uravakonda, Anantapur, India email:jeevanrkr@gmail.com

ABSTRACT
When working with color images , many processing algorithms and procedures can perform separation of pixel values in to their luminance and chrominance components. This paper presents a novel approach to compress the luminance and chrominance components using Lossy and Lossless Binary Plane Techniques respectively. The results are compared with the compression applied directly on RGB image using Lossy and lossless Binary Plane Techniques.

Key Words: Lossy and Lossless Binary Plane Techniques, Luminance, Chrominance, sub sampling 1. INTRODUCTION
The primary advantages of luma/chroma systems [4,7] such as Y'UV, are that they remain compatible with black and white analog television. Y' channel saves nearly all the data recorded by black and white cameras, so it produces a signal suitable for reception on old monochrome displays. In this case, the U and V are simply discarded. If displaying color, all three channels are used and the original RGB information can be decoded. Another advantage of Y'UV is that some of the information can be discarded in order to reduce bandwidth. The human Visual System has fairly little spatial sensitivity to color: the accuracy of the brightness information of the luminance channel has far more impact on the image detail discerned than that of the other two. Understanding this human shortcoming, the bandwidth of the chrominance channels can be reduced considerably. Therefore, the resulting U and V signals can be substantially "compressed".

2. PROBLEM STATEMENT compression rate compared to the Binary Plane Techniques applied on RGB plane of the image. In this paper we propose a novel approach in which chrominance data is processed separately from
luminance which allows to exploit the limited resolution of color perception in human visual system as related to perception of the light intensity. Also a lower information content of the chrominance channels is exploited. The color artifacts observed in other traditional technique are overcome. The chrominance components of color image data are processed independently using Lossy Binary Plane Technique[1,2] and Luminance components are compressed with Loss less Binary Plane Technique[1,2]. They achieve more

156

International Journal of Computational Intelligence and Information Security, August 2011 Vol. 2, No. 8

3. APPROACH 3.1 Binary Plane Encoding:


The RGB components of color image are converted into Y, Cb, Cr Components. The luminance (Y) is directly compressed using Lossless Binary Plane Technique as it is vital of the color image. The Chrominance components (Cb,Cr) are chroma sub sampled (4:2:0) [3,6]first and then compressed using Lossy Binary Plane Technique. Finally all the three compressed components are merged to generate the compressed image.

Cy: Compressed Y Component CCr: Compressed Cr Component

CCb: Compressed Cb Component

Binary plane image compression techniques have been categorized in two ways i.e. lossless and lossy. We have given the elucidation for both Lossless and Lossy Binary Plane Techniques to analyze the image. They are as follows.

3.2 Loss Less Binary Plane Technique[5]:


Lossless methods are characteristically chosen for applications where minute image particulars can be of utmost importance, for instance medical and space images or also in remote sensing etc. According to the BPT, two files bit plane and data tables, are to be created. The initial part bit plane seizes the bit 0 for every a pixel alike to preceding pixel and the bit 1 for every pixel diverse from preceding pixel. The subsequent part i.e. data table cling to the essential pixel values only, i.e. for a set of successive recurring values, one value is stored in the data table.

3.3 Lossy Binary Plane Technique:


According to this technique, the quantization is included as shown in Fig 2. The approach in the Lossy BPT coding, two codes i.e. code 1 and code 0 is employed to build the Bit Plane. The codes are

157

International Journal of Computational Intelligence and Information Security, August 2011 Vol. 2, No. 8

Code 1 is used to point toward that the current pixel is dissimilar to previous pixel. In this view, the current pixel is moved to the data table. Code 0 is utilized to designate that the existing pixel is precisely similar as preceding pixel or within the threshold boundary value. This procedure removes the storage of present pixel in the data table. The quantizer applied in the Lossy BPT coding catches a threshold value, which is diverged amid 4 and 32 to control the degree of quantization. The estimation for the existing pixel is completed based on the Threshold value. The existing pixel is estimated to preceding pixel if the existing pixel with the range as; (PP- TV/2)CP (PP+TV/2-1) There is a trade off between image quality and degree of quantization. A huge quantization[4] step size can create unacceptability large image distortion. Better-quality quantization show the way to lower compression rate. JPEG[9,10] employs to a large extent advanced step size for the high frequency coefficients with little noticeable image weakening.

4. PROCEDURE MAIN
BEGIN callConvertToYCbCr( ) // dividing the image into Y,Cb,Cr formates callLossLessComp( ) // conveting Y image into compressed using LossLess concept Call downsampling( ); //It decreases the Spatial resolution of Cb by factor of 2 Call downsampling( ); //It Decreases the Spatial resolution of Cr by factor of 2 callLossyComp( ) // conveting Cb image into compressed using Lossy concept callLossyComp( ) // conveting Cr image into compressed using Lossy concept callMerge( ) //merge these three compressed files END CONVERT_TO_YCbCr( ) BEGIN //converting sourc image to Y,Cr,Cb Open source image File; Open Y image file Open Cb image file Open Cr image file

158

International Journal of Computational Intelligence and Information Security, August 2011 Vol. 2, No. 8

y //holds the y image pixel cb //holds the cb image pixel cr //holds the cr image pixel a //holds image current pixel b //holds image next pixel c // holds image next next pixel While( (a=read(sours_image)!=eof) BEGIN b=read(sours_image) c=read(sours_image) y=caluclateY using a,b,c cb=calculate cb using a,b,c cr=calculate cr using a,b,c write y to Y_image_file write cb to Cb_image_file write cr to Cr_image_file END Close source image file Close Y image file Close Cb image file Close Cr image file END PROCEDURE LOSSLESS_COMPRESSION BEGIN /*Design code for selecting image Compress compress buttons*/ Cur_Byte //current byte Prv_Byte //Previous byte No of bytes //caluclating the no. of bytes BEGIN Open source image file Open data_table file Open bit_plane file Cur_byte=read from source image file Prv_byte=cur_byte Write Cur_byte to data_table while((cur_byte = read source image)!eof) BEGIN bpData=(byte) left shift the bit_plane data compare cur_bytewith prv_byte then write cur_byte to data_table bit_data= 0 prv_Byte=cur_Byte; increment no of Bits with 1 compare if no of Bits=8 then write bit_data to bit_plane file no of Bits=0 bpData=0 increment bpCount END If noOfBits not equal to 0) Then Write bit data to bit_plane Increment bit_plane Count Close the Source image file

159

International Journal of Computational Intelligence and Information Security, August 2011 Vol. 2, No. 8

Close the data_table file Close the Bit_plane file ////MERGE These data table and bit plane into singe file Open bit_plane file Open data_table file Open bpds file //merge file While ( (read byte from bit plane file)!eof) Write to bpds file While ( (read byte from data table file)!eof) Write to bpds file Close bit_plane file Close data_table file Close bpds file END PROCEDURE LOSSY_COMPRESSION BEGIN /* Design code for selecting image Compress compress buttons */ Cur_Byte //current byte Prv_Byte //Previous byte noOfbytes //caluclating the no. of bytes BEGIN Open source image file Open data_table file Open bit_plane file Cur_byte=read from source image file Prv_byte=cur_byte Write Cur_byte to data_table while((cur_byte = read source image)!eof) BEGIN bpData=(byte) left shift the bit_plane data if ( call compThresholdvalue( cur_byte , prv_byte)) //call this function to know the cur_pixel is in between threshold value or not then write cur_byte to data_table bit_data= 0 prv_Byte=cur_Byte; increment no ofBits with 1 compare if no ofBits=8 then write bit_data to bit_plane file no of Bits=0 bpData=0 increment bpCount END If no of Bits not equal to 0) Then Write bit data to bit_plane Increment bit_plane Count Close the Source image file Close bit_plane file Close data_table file Close bpds file ////MERGE These data table and bit plane into singe file Open bit_plane file Open data_table file Open bpds file //merge file

160

International Journal of Computational Intelligence and Information Security, August 2011 Vol. 2, No. 8

While ( (read byte from bit plane file)!eof) Write to bpds file While ( (read byte from data table file)!eof) Write to bpds file Close the Bit_plane file Close the data_table file Close bpds file END

5. BINARY PLANE DECODING:


In the reconstruction of the image first we demerge the compressed file and then, Loss Less inverse BPT applied on Y (Luminance) compressed file. Later inverse Lossy BPT is applied on Cb Cr (Chrominance) compressed files. This decompressed CbCr will undergo chroma (4:2:0) up sampling. Finally, Y Cb Cr components are converted into RGB components as shown in fig 3.

PROCEDURE FOR DECODING BEGIN Call demerg( ); // divides the compressed merge file into three Y,Cb,Cr compressed files Call LossLessDecomp( ) //Decompressing Losslesscompressed Y file Call LossyDecomp( ); //Decompressing Lossycompressed cb file Call LossyDecomp( ); //Decompressing Lossycompressed cr file Call Upsampling( ) //It increases the Spatial Resolution of the Cb by factor of 2 Call Resampling( ); //It increases the Spatial Resolution of the Cr by factor of 2 Call ConvertToRGB( ) //It converts the YCbCr Color model TO RGB color model END

6. RESULTS
Different images were used to measure the performance of Content Specific image compression method using BPT. The Binary plane technique applied on YCbCr planes Produces better compression rate than the BPT LossLess and Lossy techniques are applied on RGB plane. The results are summarized in table 1& 2.

161

International Journal of Computational Intelligence and Information Security, August 2011 Vol. 2, No. 8

In Lossy technique, by varying threshold value, the different compression rates can be achieved. If we increase the value of the threshold, more will be the compression rate but the degradation in quality of the image will be increased. Table No:1 Comparision of Size Between RGB BPT vs YCbCr BPT

Color Image LENNA T32 HWA

Raw Size 120000 196608 57132

RGB Loss Less BPT 125857 136155 36354

RGB Lossy BPT 76536 88659 25269

YCbCr BPT 52910 53762 17775

4 3.5 3 2.5 2 1.5 1 0.5 0 RGB Loss Less BPT RGB Lossy BPT YCbCr BPT Compresssion ratio compression ratio compression ratio LENNA T32 HWA

Fig No:4 Comparision of Size between RGB BPT vs YCbCr BPT Fig No 4 shows the comparision of size between RGB BPT (Loss Less & Lossy ) and Y Cb Cr BPT. Amount of size required to store the image for Y Cb Cr BPT is less as compared to RGB BPT (Loss Less & Lossy ) . Table 2: Comparision of Compression Ratio between RGB BPT vs YCbCr BPT RGB Loss Less BPT Compresssion ratio 0.9534 1.4444 1.5714 RGB Lossy BPT compression ratio 1.5678 2.2175 2.2695 YCbCr BPT compression ratio 2.268 3.657 3.2141

Color Image

LENNA T32 HWA

162

International Journal of Computational Intelligence and Information Security, August 2011 Vol. 2, No. 8

250000 200000 150000 LENNA 100000 50000 0 Raw Size RGB Loss Less BPT RGB Lossy BPT YCbCr BPT T32 HWA

Fig No 5 :Comparision of Compression Ratio between RGB BPT vs YCbCr BPT Fig No 5 shows the comparision of compression ratio between RGB BPT (Loss Less & Lossy )

and Y Cb Cr BPT. Compression ratio for Y Cb Cr BPT is more as compared to the RGB BPT (Loss Less & Lossy ). Hence the proposed Y Cb Cr BPT technique compression of color images. The memory requirement for BPT is very less because the processing is done byte by byte. In the case of the JPEG, the entire image needs to bring into memory. As per as the process complexity[8] is concerned, BPT is to be implemented simply. is better technique than other techniques for

7. CONCLUSIONS AND RECOMMENDATIONS


Compressing the color images efficiently is one of the major problems in multimedia applications. So we have tested the efficiency of color image compression using BPT algorithm. The LossLess BPT algorithm is applied for Y (luminance) and Lossy BPT for Cb,Cr (chrominance) of color image. This work may be extended for better compression by applying Huffman and arithmetic coding.

163

International Journal of Computational Intelligence and Information Security, August 2011 Vol. 2, No. 8

REFERENCES
[1] N.Subash Chandra ,M.Bala Raju, Dr.S.Mahaboob basha , M.Rama Krishna Reddy ,Dr.T.Bhaskara Reddy et al Loss Less Compression of images using binary plane,difference and huff man coding journal of theoretical and Applied information technology :1199-1203 dec 2008 et al An Hybrid approach of loss less

[2] N.Subhash Chandra ,M.Bala raju , Dr.S.Mahaboob basha compression 1682-3915

for color images Asian Journal of information Technology Vol II 472-474, 2008 ISSN

[3]ITU-T recommendation T 800 JPEG 2000 image coding system part 1 ITU Std ,july 2002 [Available :http://www.itu.int/ITU-T/ [4]Rafael C.Gonzalez ,Richard E.woods Digital image processing second edition Pearson education ,printice Hall [5]W.S.lee Edge adaptive predication for loss less image coding in proc. IEE data Compression

Conference, Snowbird Utah march 199,pp 483-490 [6]Skodras ,A.C. Christopoulis and T.Ebrahim ,2001 .The JPEG IEEE signal Proc. Mag 18(5) : 36-58 [7]sadashivappa et al Color image compression using SPIHT Algorithm international journal of computer Applications ( 0975-8887) Vol 16-No 7 February 2011 [8] Ghrare S.E.., M.A.M. Ali K.Jumari and M.ismail 2009 , An efficient low complexity lossless coding 2000 stilll image compression standard

algorithm for medical images Applied science 6 :1502-1508 DOI:10.3844/2009 [9]Wallace G.K. 1992 the JPEG still picture Compression Standard IEEE trans. Consumer electronics 38:2834 DOI:10.1109/30 125072 [10]Digital Media premier Dr you ling- Wong 2007

164