# Introduction any modern imaging systems are still producing gray-scale images, color images are more preferred due to the larger amount of information contained by them [1]. There are many compression systems were used to compress the color images; these systems include those that use mathematical transforms such as Discrete Cosine Transform (DCT) transform [2][3][4], neural networks [5][6][7][8], wavelet transform [9][10][11], fractal [12][13][14], quad tree systems [15][16][17], and others [18][19][20][21][22]. Data compression provides two advantages: reducing storage space and transmission time by finding the humanly imperceptible differences [23][24]. The quad tree algorithms are based on simple averages and comparisons. Quad-tree image compression is a method for splitting an image into homogenous sub-blocks. Defining the whole image as a single block, the method is performed according to some problem specific homogeneity criteria. Each block is examined to check whether it is homogenous or not. If it is not, then it will be split into four same-sized blocks. The method terminates when there is no other blocks to be split or when all blocks to be split are smaller than a pre-selected size. The minimum size of the blocks is set, to avoid over segmentation [25][26][27][28].A major advantage of the quad tree system for data compression is the simplicity of its approach. Unlike many other compression systems, a quad tree algorithm can compress images relatively quickly on a personal computer [29,30]. Usually, distortion in images is measured by the PSNR (Peak-to-peak Signal to Noise Ratio). This ratio is often used as a quality measurement between the original and a compressed image. There is no standard way of defining distortion and PSNR for color images. The simplest way is to just average the distortions of the three RGB color components [31,32]. In this paper, an algorithm is applied on color images. The remainder of this paper is organized as follows: in Section 2, the proposed algorithm is illustrated. Experimental results and discussion are presented in Section 3 and finally, some conclusions are addressed in Section 4. # II. # Proposed algorithm This algorithm contains two systems based on quad tree. Each one contains three different cases. The RGB color images are represented by three components. In gray-scale image there is a high correlation between neighbor pixels. In color image, in addition to this, there is also a high correlation between color components [2,3]. Therefore, the proposed systems are applied on the all components altogether. In the first system, one component is chosen to be divided using quad tree at specified threshold value. During the dividing of this component, even if the condition of quad tree division is not verified for the other two components, they are divided simultaneously using the same coordinates and block size of the chosen component. The condition is represented by difference value is greater than threshold value. There are three cases of this system are described as follows: 1. The image is divided according to the component R using quad tree. At the same time, the dividing process is applied on the other two components G and B respectively. After the dividing is completed, the three components will have the same numbers, sizes, and coordinates of all blocks. 2. This case is similar to the first one, except, the image is divided according to the second component G, and the dividing process is applied on the other two components R and B respectively. 3. The third case is similar to the previous two cases, except, the image is divided according to the third ( D D D D ) F2012 Year component, and the dividing process is applied on the other two components R and G respectively. In each case, the image is divided giving the following information for the three components: number of blocks, sizes, minimum value and difference between maximum and minimum values for each block. The three components have the same coordinates and sizes for all blocks. In the three components, any block has three min values and three diff values, one for each component. The second system is similar to the first one including the above three cases, except, the three difference values are averaged for each block. The obtained information of every block is one coordinates, one size, three minimum values and one average difference value. The two systems are illustrated in details in the next sub section. Several quality measures can be found in the open literature of the field. The most used measures are (distortion evaluation): The mean squared errors (MSE) and the popular peak signal to noise ratio (PSNR) [2].With gray level images, the PSNR is expressed by: MSE While, for color RGB images case [32], we have used the relation given in ? ? ? ? ? ? ? ? + + × × = ) ( ) ( ) ( 3 255 log 10 PSNR 2 10 B MSE G MSE R MSE (2) ( ) 2 1 0 1 0 ij ij y X 1 ?? ? = ? = ? × = N i M j M N MSE (3) and, : are, respectively, the original and reconstructed intensities belonging to R, G or B component. The compressed image is evaluated with the compression ratio (CR) or withthebite-rateperpixel(bpp) defined as follows: bits in image Compressed bits in size image color RGB Original CR = (4) CR bits 24 bpp = (5) a) Example This example is proposed to describe the processes of the two systems. The example is applied on a sample of color image for size 8x8x3. The R component is firstly chosen to be divided using quad tree. The other two components will be divided using the same coordinates and block size of the chosen divided component, even if the condition of quad tree division is not verified for one or both components. In the first system, each block has three min values and three difference values, one for each component. For instance, the block of coordinates (4, 0) has the three minimum values (80, 25, and 11) and the three difference values (5, 77, and 6), see Fig. 1 and table 1 for more details. While, the second system has three minimum values and one average difference. The above mentioned block of coordinates (4, 0) has the same three minimum values and one average difference value (29), see Fig. 2 # Experimental results and discussion In order to test the performance of the two proposed systems, they are applied using the same settings on four famous color images. These images are called Splash, Lena, Sailboat, and Pepper; see Fig. -7). The columns S1R, S1G, and S1B represent the three components of the color image for the first system. The other forty eight experiments are carried out using the second system using the same threshold values that are proposed with the first system. The obtained results are shown in the second three columns of the Figures ( 4-7). The columns S2R, S2G, and S2B are represented for the second system. The compression ratio is obtained by dividing the size of the original image file by the size of the compressed output file. From the above experiments of the two systems, Tables (2)(3)(4)(5) show the obtained compression ratios, bpp, PSNR and number of blocks in the compressed images. All programs are written using the Matlab software. From figures (4-9) and Tables (2-5), it can be seen the following: -In the two systems, the number of blocks decreases when the original image has low details (for instance Splash image); see Table 5 and Figure (9). -In the first system, the compression ratio is ranged between 1.0406:1 and 79.7275:1, while with the second system, the compression ratio is between 1.3379:1 and 102.5068:1. It is seen that the second system has the highest compression ratio. -In the first system, the bpp is rangedbetween 23.0633 and 0.3010, while with the second system, the bpp is between 17.9381 and 0.2341. It is seen that the second system has the lowest bpp value. -In the first system, the PSNR is rangedbetween 16.7784 and 10.7710, while with the second system, the PSNR is between 16.0773 and 15.5210. -The visual quality of the compressed images and PSNR values are inversely proportional tothe compression ratio; see figures (4-7). -In the two systems, the compression ratios increase when the original image has low details (for instance Splash image); see table 2 and Figure (8). - The compressed images quality increase when the image is divided according to the component G. # - The compression ratios are proportional to the threshold values. In Table 6, is presented comparative results among our proposed two systems and others, compression ratio is measured in terms of bpp and the image quality in terms of PSNR. S1 R S1 G S1 B S2 R S2 G S2 B S1 R S1 G S1 B S2 R S2 G S2 B Image Name Threshold = 0.1 Threshold = 0.2 S1 R S1 G S1 B S2 R S2 G S2 B S1 R S1 G S1 B S2 R S2 G S2 B Sailboat 1. # Conclusion This paper presents two efficient systems that have the ability to compress colour images in easy way. The division processes of image into blocks for the two systems are based on quad tree. At the dividing of one component, the other two components are divided using the same division even if the condition of quad tree division is not verified for them. After the division process is completed, the three components will have the same number and size of blocks. During the experimental results, the compression ratios, bit rate per pixel and PSNR are computed. The compression ratios of images are increased by increasing the value of threshold while the quality of the compressed images may be decreased. It was also noticed, the division according to the G component is the best giving good quality of the compressed images with appropriate compression ratios, and the performance of the second system is better than the first one. The compression ratios of the second system are ranged between 0.25 and 0.80 at threshold value 0.1, and between 0.78 and 0.94 at threshold value 0.2. 12![Fig. 1 : Diagram shows the processes of the first system](image-2.png "Fig. 1 :Fig. 2 :") 3![.The dimension and the size of each image are 512x512x3 and 786432 bytes respectively. Ninety six experiments are done using the two systems, twenty four on each image. The first forty eight experiments are carried out using the first system; the threshold values are 0.1, 0.2, 0.3 and 0.5. The obtained results are shown in the first three columns of Figures (4](image-3.png "( 3 )") ![Compression Algorithm based on Quad tree](image-4.png "") 341563752![Fig. 3 : Original images](image-5.png "Fig. 3 :Fig. 4 : 1 Fig. 5 :Fig. 6 : 3 Fig. 7 : 5 Table 2 :") 8![Fig.8: The compression ratios of the two systems at the proposed threshold values](image-6.png "Fig. 8 :") 9![Fig. 9 : The number of blocks for the two systems at the proposed threshold values](image-7.png "Fig. 9 :") 1Minimum ValuesDifference Values0 1 2 30 10 18 19 95 95 99 98 8 15 22 24 98 101 95 95 35 30 48 46 99 100102101 36 37 45 50 95 1001021000 10 18 8 15 30 45950 0 0 0 76 57483 82 81 84 73 72 75 715 683 80 85 83 73 70 71 70 80 85 84 80 75 74 73 71807055R781 81 80 80 75 75 75 70(a)RGB colorG0 1 2 3 460 65 67 73 72 77 71 60 64 66 72 74 75 76 64 65 64 74 73 71 71 60 61 63 73 74 77 71 28 30 30 50 51 52 5360 65 66 60 64 60 62710 0 0 0 51 46RGB compressedimage6 595 96 102 52 52 50 50 25 30 25 50 52 54 552550777image7100 94 100101 51 54 56 57(b)B0 2 3 110 12 14 17 17 16 13 17 11 12 14 14 14 10 15 14 17 16 16 15 15 10 11 16 16 16 16 1410 12 14 11 12 10 11100 0 6 0 02 57416 12 11 13 44 13 105 615 12 11 12 12 12 11 17 11 11 11 11 10 121110634716 11 11 11 11 10 12(c)0 2 3 4 5 6 7Minimum ValuesAverage Difference0 1 2 30 10 18 19 95 95 99 98 8 15 22 24 98 101 95 95 35 30 48 46 99 100102101 36 37 45 50 95 1001021000 10 18 8 15 30 4595483 82 81 84 73 72 75 71705 683 80 85 83 73 70 71 70 80 85 84 80 75 74 73 7180R781 81 80 80 75 75 75 70(a)RGB color imageG0 1 2 3 4 6 560 66 67 73 72 77 71 60 67 66 72 74 75 76 64 66 64 74 73 71 71 60 62 63 73 74 77 71 28 28 30 50 51 52 53 95 98 102 52 52 50 50 25 30 25 50 52 54 5560 65 66 60 64 60 62 2571 500 0 0 0 6 293 57 15RGB compressed image7100 100101 51 54 56 57(b)B0 2 3 110 15 14 17 17 16 13 17 13 12 14 14 14 10 15 16 17 16 16 15 15 10 17 16 16 16 16 1410 12 14 11 12 10 1110416 12 11 13 44 13 105 615 11 11 12 12 12 11 17 11 11 11 11 10 121110716 12 11 11 11 10 12(c) 3 42012Year19Volume XII Issue XIII Version ID D D D ) F(Global Journal of Computer Science and Technology© 2012 Global Journals Inc. (US) 5 6Novel Color Image Compression Algorithm based on Quad treeImage NameThreshold = 0.1 S1 R S1 G S1 B S2 R S2 G S2 B S1 R S1 G S1 B S2 R S2 G S2 B Threshold = 0.2Sailboat30528 59800 50796 30528 59800 50796 7548 27240 27416 7548 27240 27416Lena13972 22924 19012 13972 22924 19012 3912 8368 6536 3912 8368 6536Peppers 15556 22676 17548 15556 22676 17548 5612 10448 6888 5612 10448 6888Splash4068 9248 8416 4068 9248 8416 2592 5940 5720 2592 5940 57202012Image Name Sailboat LenaThreshold = 0.3 S1 R S1 G S1 B S2 R S2 G S2 B S1 R S1 G S1 B S2 R S2 G S2 B Threshold = 0.5 1084 9212 11152 1084 9212 11152 148 1756 1784 148 1756 1784 620 2324 1536 620 2324 1536 32 432 64 32 432 64YearPeppers 2032 4964 2348 2032 4964 2348 732 2216 588 732 2216 588 Splash 1252 3868 3496 1252 3868 3496 380 1820 1136 380 1820 1136206x 10 4Threshold=0.1S1 R34 x 10Threshold=0.2( D D D D ) F Volume XII Issue XIII Version INumber of blocks0 1 5 4000 6000 8000 10000 12000 2 3 4 Number of blocksSailbootLenaPepper Threshold=0.3SplashS1 G S1 B S2 R S2 G S2 B0 0.5 2.5 1000 1500 2000 2500 1 1.5 2 Number of blocks Number of blocksSailbootLenaPepper Threshold=0.5SplashGlobal Journal of Computer Science and Technology0 2000Sailboot Image IV.Lena System1 Proposed Pepper System 2SplashSailboot Other Systems Lena YCbCr [2] CBTC-PF[32] 0 500 JPEG [32] 1.5 30.47 1.47Pepper NNET [33] Splash ------© 2012 Global Journals Inc. (US) * New PCA-based Compression Method for Natural Color Images ,SAbadpour A Kasae IPM Workshop on Computer Vision 7 May 2005 * Color image compression algorithm based on the DCT transform combined to an adaptive block scanning FouziDouak RedhaBenzid NabilBenoudjit AEU -International Journal of Electronics and Communications 65 1 2011 * Quality access control of compressed color images using data hiding AmitPhadikar PSanti Maity AEU -International Journal of Electronics and Communications 64 9 2010 * Correlation-based approach to color image compression Signal Processing: Image Communication EvgenyGershikov EmiliaLavi-Burlak MoshePorat October 2007 22 * Colour image segmentation using fuzzy clustering systems and competitive neural network BSowmya BSheelaRani Applied Soft Computing 11 3 2011 * A Neural Network Approach for Color Image Compression in Transform Domain S. Immanuel AlexPandian JAnitha International Journal of Recent Trends in Engineering 2 2 2009 * A novel hardware-oriented Kohonen SOM image compression algorithm and its FPGA implementation WKurdthongmee Journal of Systems Architecture 54 10 2008 * An ASIC implementation of Kohonen's map based colour image compression NSudha Real-Time Imaging 2004 10 * Noisy face recognition using compression-based joint wavelet-transform correlator JoewonoWidjaja Optics Communications 285 6 * Context-based embedded image compression using binary wavelet transform HongPan Li-ZuoJin Xiao-HuiYuan Si-YuXia Liang-ZhengXia Image and Vision Computing 28 6 2010 * Color Image Compression Using Wavelet and Ridgelet Transform M SJoshi RR Manthalhkar Y VJoshi Proceedings of 3rd IEEE International Conference on Image Processing 3rd IEEE International Conference on Image Processing 2010 1 * Speeding-up Fractal Color Image Compression Using Moments Features Based on Symmetry Predictor LEGeorge EAAl-Hilo Eighth International Conference on Digital Object Identifier 2011. 2011 Information Technology: New Generations (ITNG) * Isometric process behavior in fractal color image compression by zero-mean method LEGeorge EAAl-Hilo Computer Engineering and Technology (ICCET), 2010 2nd International Conference on 2010 6 * A novel fractal technique for color image compression SKGhosh JMukherjee India Annual Conference, Proceedings of the IEEE INDICON 2004. 2004 * Finite automata encoding geometric figures HelmutJürgensen LudwigStaiger HidekiYamasaki Theoretical Computer Science 381 1-3 2007 * Block image retrieval based on a compressed linear quadtree Yung-KuanChan Image and Vision Computing 22 5 2004 * AN EFFICIENT COLOR CODING SCHEME FOR COLOR IMAGES USING QUAD TREE DECOMPOSITION AND COLOR PALETTES NUdaya Kumar1 K. PadmaVasavi World Journal of Science and Technology 1 8 2011 * Image compression scheme based on curvelet transform and support vector machine YuanchengLi QiuYang RunhaiJiao Expert Systems with Applications 37 4 2010 * Color image compression based on block truncation coding using pattern fitting principle BhabatoshBibhas Chandra Dhara Chanda Pattern Recognition 40 9 2007 * An HVS based adaptive quantization scheme for the compression of color images GSreelekha PSSathidevi Digital Signal Processing 20 4 2010 * Novel adaptive color space transform and application to image compression ShishirSatish Kumar Singh Kumar Signal Processing: Image Communication 2011 26 * A novel color image watermarking scheme in nonsampled contourletdomain Pan-Pan Xiang-YangNiu Yi-PingWang Ming-YuYang Lu Expert Systems with Applications 38 3 2011 * Efficient region segmentation on compressed gray images using quadtree and shading representation Kuo-LiangChung Hsu-LienHuang -IHsueh Lu Pattern Recognition 37 8 2004 * Efficient quadtree based block-shift filtering for deblocking and deranging GuangtaoZhai WeisiLin JianfeiCai XiaokangYang WenjunZhang Journal of Visual Communication and Image Representation 20 8 2009 * Vector quantization of images with variable block size KazuyaSasazaki SatoSaga JunjiMaeda YukinoriSuzuki Applied Soft Computing 8 1 2008 * A generalization of quad-trees applied to shape coding RKutil CGfrerer Systems, Year Novel Color Image Compression Algorithm based on Quad tree Signals and Image Processing (IWSSIP), 2011 18th International Conference on 2011 * Image compression using area subdivision algorithm relying on Quadtree DM Anand Kumar1 Demudubabu Asian Journal of Computer Science and Information Technology 2 3 2012 Ch Mohan Babu * Qualitative Image Compression Algorithm Relying on Quadtree AAEl-Harby GMBehery Vision and Image processing 2008 8 GVIP) * On color transforms and bit allocation for optimal subband image compression EvgenyGershikov MoshePorat Signal Processing: Image Communication 2007 22 * Color image compression based on block truncation coding using pattern fitting principle BhabatoshBibhas Chandra Dhara Chand Pattern Recognition 40 2007 * A New Approach for Compressing Color Images using Neural Network AshikurRahman AK MChowdhury Mofizur Rahman CIMCA Proceedings 12-14 Vienna -Austria 2003. February 2003