Author s copy. On a predictive scheme for colour image quantization. 1. Introduction. Y. C. HU *1, W. L. CHEN 1, C. C. LO 2, and C. M.

Similar documents
A LOSSLESS INDEX CODING ALGORITHM AND VLSI DESIGN FOR VECTOR QUANTIZATION

An Information Hiding Scheme Based on Pixel- Value-Ordering and Prediction-Error Expansion with Reversibility

A Reversible Data Hiding Scheme for BTC- Compressed Images

A Revisit to LSB Substitution Based Data Hiding for Embedding More Information

A Review on LBG Algorithm for Image Compression

Optimization of Bit Rate in Medical Image Compression

A new predictive image compression scheme using histogram analysis and pattern matching

A Very Low Bit Rate Image Compressor Using Transformed Classified Vector Quantization

A Grayscale Image Steganography Based upon Discrete Cosine Transformation

A reversible data hiding based on adaptive prediction technique and histogram shifting

Compression of Image Using VHDL Simulation

A Robust Color Image Watermarking Using Maximum Wavelet-Tree Difference Scheme

Segmentation using Codebook Index Statistics for Vector Quantized Images

A GENETIC C-MEANS CLUSTERING ALGORITHM APPLIED TO COLOR IMAGE QUANTIZATION

An Associative Watermarking based Image Authentication Scheme

Fingerprint Image Compression

Differential Compression and Optimal Caching Methods for Content-Based Image Search Systems

An Adaptive and Deterministic Method for Initializing the Lloyd-Max Algorithm

Fast Fractal Image Encoder

Feature-Guided K-Means Algorithm for Optimal Image Vector Quantizer Design

COLOR IMAGE COMPRESSION BY MOMENT-PRESERVING AND BLOCK TRUNCATION CODING TECHNIQUES?

Adaptive Steganography Method Based on Two Tiers Pixel Value Differencing

MRT based Adaptive Transform Coder with Classified Vector Quantization (MATC-CVQ)

Modified SPIHT Image Coder For Wireless Communication

CHAPTER 4 REVERSIBLE IMAGE WATERMARKING USING BIT PLANE CODING AND LIFTING WAVELET TRANSFORM

Texture Image Segmentation using FCM

Image Compression Using SOFM

Multilevel Compression Scheme using Vector Quantization for Image Compression

Available online at ScienceDirect. Procedia Computer Science 89 (2016 )

Reversible Image Data Hiding with Local Adaptive Contrast Enhancement

CHAPTER 6 INFORMATION HIDING USING VECTOR QUANTIZATION

A NOVEL SECURED BOOLEAN BASED SECRET IMAGE SHARING SCHEME

REVERSIBLE DATA HIDING SCHEME BASED ON PREDICTION ERROR SORTING AND DOUBLE PREDICTION.

A Image Comparative Study using DCT, Fast Fourier, Wavelet Transforms and Huffman Algorithm

sensors ISSN

Region Segmentation for Facial Image Compression

Scalable Coding of Image Collections with Embedded Descriptors

COPYRIGHT PROTECTION OF PALETTE IMAGES BY A ROBUST LOSSLESS VISIBLE WATERMARKING TECHNIQUE *

Image Compression with Competitive Networks and Pre-fixed Prototypes*

Joint Image Classification and Compression Using Hierarchical Table-Lookup Vector Quantization

Compression of Stereo Images using a Huffman-Zip Scheme

A Novel Approach for Deblocking JPEG Images

ISSN (ONLINE): , VOLUME-3, ISSUE-1,

Hybrid Stegnography using ImagesVaried PVD+ LSB Detection Program

FRACTAL IMAGE COMPRESSION OF GRAYSCALE AND RGB IMAGES USING DCT WITH QUADTREE DECOMPOSITION AND HUFFMAN CODING. Moheb R. Girgis and Mohammed M.

International Journal of Advanced Research in Computer Science and Software Engineering

CHAPTER 6. 6 Huffman Coding Based Image Compression Using Complex Wavelet Transform. 6.3 Wavelet Transform based compression technique 106

Data Hiding on Text Using Big-5 Code

On the Selection of Image Compression Algorithms

A Vector Quantization Technique for Image Compression using Modified Fuzzy Possibilistic C-Means with Weighted Mahalanobis Distance

A Framework to Reversible Data Hiding Using Histogram-Modification

A novel approach for vector quantization using a neural network, mean shift, and principal component analysis-based seed re-initialization

THREE DESCRIPTIONS OF SCALAR QUANTIZATION SYSTEM FOR EFFICIENT DATA TRANSMISSION

Modified No Search Scheme based Domain Blocks Sorting Strategies for Fractal Image Coding

Quality Measurements of Lossy Image Steganography Based on H-AMBTC Technique Using Hadamard Transform Domain

Toward Optimal Pixel Decimation Patterns for Block Matching in Motion Estimation

Code Transformation of DF-Expression between Bintree and Quadtree

Implementation and Analysis of Efficient Lossless Image Compression Algorithm

IMAGE COMPRESSION. Chapter - 5 : (Basic)

So, what is data compression, and why do we need it?

An Efficient Single Chord-based Accumulation Technique (SCA) to Detect More Reliable Corners

SIGNAL COMPRESSION. 9. Lossy image compression: SPIHT and S+P

(12) Patent Application Publication (10) Pub. No.: US 2006/ A1. Zhou et al. (43) Pub. Date: Jun. 29, 2006

LETTER Improvement of JPEG Compression Efficiency Using Information Hiding and Image Restoration

AN EFFICIENT CODEBOOK INITIALIZATION APPROACH FOR LBG ALGORITHM

Dictionary Based Compression for Images

An Improved DCT Based Color Image Watermarking Scheme Xiangguang Xiong1, a

An Efficient Image Compression Using Bit Allocation based on Psychovisual Threshold

A Survey of Fragile Watermarking-based Image Authentication Techniques

IMPROVED RHOMBUS INTERPOLATION FOR REVERSIBLE WATERMARKING BY DIFFERENCE EXPANSION. Catalin Dragoi, Dinu Coltuc

COPYRIGHT PROTECTION OF PALETTE IMAGES BY A ROBUST LOSSLESS VISIBLE WATERMARKING TECHNIQUE *

A Novel Fragile Watermark-Based Image Authentication Scheme for AMBTC-Compressed Images

An Improved Reversible Data-Hiding Scheme for LZW Codes

Hierarchical Minimum Spanning Trees for Lossy Image Set Compression

Visual Cryptography of Animated GIF Image Based on XOR Operation

Digital Image Steganography Techniques: Case Study. Karnataka, India.

Robust Lossless Data Hiding. Outline

Wireless Communication

A new approach to the secret image sharing with steganography and authentication

Detecting Clusters and Outliers for Multidimensional

Digital Image Steganography Using Bit Flipping

On the Selection of Image Compression Algorithms

CHAPTER 6 MODIFIED FUZZY TECHNIQUES BASED IMAGE SEGMENTATION

CHAPTER 4 SEMANTIC REGION-BASED IMAGE RETRIEVAL (SRBIR)

Accelerating Mean Shift Segmentation Algorithm on Hybrid CPU/GPU Platforms

Image Matching Using Run-Length Feature

Color reduction by using a new self-growing and self-organized neural network

AN EFFICIENT VIDEO WATERMARKING USING COLOR HISTOGRAM ANALYSIS AND BITPLANE IMAGE ARRAYS

Hybrid filters for medical image reconstruction

Improved Reversible Data Hiding in Encrypted Images Based on Reserving Room After Encryption and Pixel Prediction

5.7. Fractal compression Overview

KeyWords: Image Compression, LBG, ENN, BPNN, FBP.

Image Compression Algorithm and JPEG Standard

Fast Wavelet-based Macro-block Selection Algorithm for H.264 Video Codec

Digital Signal Processing

DIFFERENTIAL IMAGE COMPRESSION BASED ON ADAPTIVE PREDICTION

Highly Secure Invertible Data Embedding Scheme Using Histogram Shifting Method

Random Traversing Based Reversible Data Hiding Technique Using PE and LSB

Comparative Study on VQ with Simple GA and Ordain GA

Collaborative Rough Clustering

Transcription:

OPTO ELECTRONICS REVIEW 20(2), 159 167 DOI: 10.2478/s11772 012 0023 0 On a predictive scheme for colour image quantization Y. C. HU *1, W. L. CHEN 1, C. C. LO 2, and C. M. WU 3 1 Department of Computer Science and Information Management Providence University, 200 Chung Chi Rd., Taichung 43301, Taiwan, R.O.C. 2 Department of Computer Science and Information Engineering Providence University 200 Chung Chi Rd., Taichung 43301, Taiwan, R.O.C. 3 Department of Electronic Engineering Chung Yuan Christian University Chung Li 32023, Taiwan, R.O.C. In this paper we proposed an improved colour image quantization scheme based on predictive coding. Since the neighbour ing colour pixels are quite similar in most colour images, the similarity among the encoded pixels is exploited. In the pro posed scheme the encoded distinct neighbouring colours are collected to form a smaller state palette. If the closest colour in the state palette is quite similar to the current encoding colour pixel, the index of the closest colour in the state palette is recorded. Otherwise, the closest colour in original colour palette for the current encoding colour pixel is searched and the corresponding index is recorded. The experimental results show that the proposed method achieves good image qualities while requiring much lower bit rates for colour image compression. Keywords: colour image quantization, palette design, colour palette, predictive coding. 1. Introduction Colour images are widely used in common multimedia ap plications. Typically, each pixel in the RGB colour image consists of three components: red, green and blue. Each co lour component of one colour pixel is often represented and stored with one byte. There are 16.8 million possible co lours in one 24 bit/pixel RGB colour image. A total of 786 KB is needed to store one RGB colour image of 512 512 pixel in a raw format. Therefore, the research toward a co lour image compression becomes more and more important. From the literature colour image quantization (CIQ) is a commonly used scheme for the colour image compression [1,2]. The basic concept of CIQ encodes one RGB colour image by using a pre designed colour palette. The colour palette consists of the representative colours that are gene rated from the given colour image. The CIQ scheme can be divided into three procedures: palette design, image encod ing and image decoding. In the image encoding procedure the closest colour in the palette for each colour pixel is searched. The index of the closest colour is taken as the compressed code of the colour pixel. The CIQ compressed result of each RGB image is the index table that consists of the set of the indices of all the colour pixels. The com pressed codes of CIQ consist of the index table and the colour palette. In the image decoding procedure each colour pixel is sequentially recovered by using the colour pixel of the re * e mail: ychu@pu.edu.tw trieved index in the colour palette. The image quality of CIQ compressed image highly depends on the colour pa lette used in the image encoding/decoding procedures. Ge nerally, the image quality of the reconstructed image in creases when the palette size increases. From the literature some palette design algorithms have been proposed. Typically, the palette design algorithms are classified into two categories: the splitting based algorithms and clustering based algorithms. The median cut method [1], the variance based algorithm [3], the radius weighted mean cut method [4], and the pixel mapping using reduction of colour space dimensionality [5] belong to the splitting based category. Basically, the splitting based algorithms share a common structure to generate the colour palette. They separate the colour space of the colour image into two disjoint spaces according to the splitting criteria. The split ting procedure is repeatedly executed for the sub spaces until the desired number of subspaces is reached. Finally, the centroid of each subspace is computed and taken as the representative palette colour. The major difference among these algorithms is the way to split the given space. In the second category, several clustering based algo rithms have been proposed [6 13]. The K means algorithm is the well known clustering algorithm for data grouping [6]. Some modified algorithms such as the fuzzy c means algorithm [7 8], the genetic c mean algorithm [9], the co lour finite state LBG algorithm [11] and the improved k means algorithm [12] have been proposed. In general, the clustering based algorithms consume more computational cost than those of the splitting based algorithms. However, Opto Electron. Rev., 20, no. 2, 2012 Y. C. Hu 159

On a predictive scheme for colour image quantization the clustering based algorithms general better colour pa lettes than the splitting based algorithms when the initial palettes are well selected. In 2009 Hu et al. proposed two palette design algorithms for CIQ [13]. The first algorithm employs the splitting based approach and generates colour palettes at a low com putational cost. The second algorithm is a modified K means algorithm in which it designs the initial colour pal ette by using the first algorithm. Better colour palettes are generated in the second algorithm than the first algorithm. The computational cost of the second algorithm is much higher than that of the first algorithm. In order to cut down the computational cost of the k means algorithm for palette design, the accelerated k means algorithm was proposed in 2008 [14]. In this algo rithm, three filters are used to reduce the computational cost while keeping the same performance of the k means algo rithm. In 2007 the modified K means algorithm with the use of the stable flags was introduced [15]. An important obser vation of this algorithm is that most training pixels are clas sified into the same groups in the successive rounds of the means algorithm. By using the stable flags of the training pixels, the computational cost can be significantly reduced while generating approximately the same qualities of the colour palettes. In the image encoding procedure of CIQ the close colour pixel in the palette is searched. To cut down the computa tional cost of the image encoding procedure, some fast image encoding algorithms have been proposed [16 18]. In 2001 the concept of reduction of colour space dimensiona lity was introduced to speed up the image encoding proce dure [16]. The fast image encoding algorithm based on the principal component analysis technique has been proposed [17]. In addition, the accelerated pixel mapping scheme that exploits the relationship between squared Euclidean dis tance and squared mean distance has been proposed as well [18]. In CIQ log 2 k bits index is stored when a colour pa lette of k colours is used in the image encoding procedure. For example the index of 8 bits is stored when the colour palette of 256 colours is used in CIQ. In order to cut down the storage cost of the indices, the image encoding algo rithm based on quadtree segmentation (QTCIQ) has been proposed [19]. The similarity among neighbouring colour pixels is exploited by variable sized block segmentation. In the image encoding procedure, the RGB colour image to be processed is divided into non overlapped image blocks of n n pixels. Each n n image block is then processed in the order of left to right and top to down. The quadtree seg mentation technique is employed by dividing each image block x into variable sized blocks based on their block activity. Here a predefined threshold TH is used to deter mine whether one given block is smooth or complex. To determine the block activity of x, the average colour pixel x of all the pixels is computed. Then, average squared Euclidean distance (ASED) between each colour pixel in x and the average colour pixel x is computed. If ASED is greater than TH, x is classified as a complex block. Other wise, x is classified as a smooth block. In order to record block activity of each block, 1 bit indicator value 0 and 1 are used to represent the smooth and complex blocks, respec tively. If x is classified as a smooth block, it will not be fur ther divided. On the other hand, a complex block x of n n pixels is further divided into four equal sized sub blocks of ( n 2) ( n 2) pixels. Each sub block is sequentially pro cessed by using the above mentioned steps until the block size of it is equal to 1 1. After quadtree segmentation is executed, possible block size of one smooth block may be of size n n, ( n 2) ( n 2),, 2 2. When a three level quadtree is employed in QTCIQ, three possible image blocks of size 4 4, 2 2, and 1 1 are used. To compress each smooth block x, the closest palette colour of x is searched and the index is recorded. For each 1 1 image block, the closest palette colour is searched and the corresponding index is stored. After compressing the smooth blocks and these 1 1 image blocks, if needed, the image blocks of n n pixels are compressed. By sequentially encoding each n n block in the same way, the given colour image is then compressed. By collecting the quadtree codes and those indices for each n n block, the compressed codes of the colour image are obtained. In addition to the lossy approach for the reduction of CIQ bit rate, the lossless post processing of the index table has been proposed to cut down the storage cost of CIQ with out incurring any extra image distortion [20]. In this method the high degree of similarity among neighbouring indices by using a sorted palette is exploited. The indices that were compressed by CIQ are classified into three categories. Every category employs a different encoding rule to process the indices. Two versions of the proposed method are intro duced. The major difference between them is that the rela tively addressing technique and the Huffman coding tech nique are used to process the indices of the second category, respectively. Based on the study of digital image compression tech niques, we find that the vector quantization (VQ) scheme has a high degree of similarity to CIQ [21 27]. The perfor mance of VQ and CIQ is worse than that one of JPEG and JPEG 2000. However, they are suitable for some multime dia applications such as progressive image transmission, general purpose computation on graphics units and applica tions with a low computational power decoder. The VQ scheme was proposed for the compression of the grayscale images in 1980 [21]. Basically, VQ consists of three proce dures: codebook generation, image encoding, and image decoding. The goal of the codebook generation procedure is to design a set of representative codewords that will be used in the image encoding/image decoding procedure. From the literature, the LBG algorithm is the most commonly used algorithm for the codebook design [21]. In the image encoding procedure of VQ, the grayscale image to be compressed is divided into a set of non over 160 Opto Electron. Rev., 20, no. 2, 2012 2012 SEP, Warsaw

lapped image blocks. Then, the closest codeword in the codebook for each image block is determined. The index of the closest codeword is stored and is taken as the com pressed code of the image block. In the image decoding pro cedure, each compressed image block is rebuilt by the corre sponding codeword in the codebook of the extracted index. Basically, VQ and CIQ share the same image encod ing/decoding structures. The concept of the k means algo rithm had been employed to design the codebook and the colour palette for VQ and CIQ, respectively. The well known algorithms that have been proposed based on the k means algorithm are called the LBG algorithm [21] and the k means algorithm [6] for VQ and CIQ, respectively. The major difference is that VQ and CIQ work on the com pression of the grayscale image block and colour pixels, respectively. In addition, the codebook used in VQ is gene rally designed by using some selected grayscale images. However, the colour palette used in CIQ is produced by using one colour image. The study of the VQ scheme helps us to design the pro posed scheme. To cut down the storage cost of CIQ while keeping good reconstructed image qualities of the com pressed images, a lossy image coding algorithm based on predictive coding for CIQ is proposed in this paper. The similarity among neighbouring colour pixels in the colour image is exploited. The distinct similar encoded neighbours are used to encode the colour pixels to cut down the required bit rate. The rest of this paper is organized as follows. In Sect. 2, the proposed scheme shall be introduced. Some experimental results shall be shown in Sect. 3 to verify the performance of the proposed method. Finally, some conclu sions will be given in Sect. 4. 2. The proposed scheme The goal of the predictive CIQ (PCIQ) scheme is to cut down the bit rates of CIQ while keeping good reconstructed image qualities of the compressed images. To achieve the goal, the similarity among neighbouring colour pixels is exploited. If similar encoded neighbour can be used to rep resent the current processing pixel, the required bit rate can be reduced. The details of the proposed scheme are des cribed in the following. 2.1. Image encoding procedure Let CP ={p 1, p 2,..,p k } denote the colour palette of k colours that was previously generated. Let maxen denote the maxi mal number of distinct encoded neighbours that will be used to organize the state palette SP. To encode the given RGB colour image, the colour pixels in the image are processed in the order of left to right and top to bottom. If the colour pixel cp to be compressed is in either the first row or the first column of the image, cp is encoded by the traditional CIQ scheme with the use of the colour palette CP of k colours. The closest colour pixel in CP for cp is searched and the index is recorded. The closest colour pixel is the one with the minimum squared Euclidean distance to cp. The squared Euclidean distance between p j and cp can be calculated according to the following equation d( p, cp) [ p () t cp()] t j 3 t 1 Here p j denotes the jth colour pixel in CP. The storage cost for the index is of log 2 k bits. To compress cp that is neither in the first row nor in the first column of the image, the state palette SP must be con structed first. The search order of the distinct encoded nei ghbours for cp is depicted in Fig. 1. The indices in these 12 positions are sequentially searched until maxen is reached. It may happen that the number of the actually searched neighbours is less maxen. Therefore, the number of the actu ally searched neighbours of cp for the construction of state palette is recorded in asen. 7 8 9 10 11 6 3 2 4 12 5 1 cp Fig. 1. Search order of distinct encoded neighbours. An example of the construction of SP in PCIQ with dif ferent values of maxen is introduced here. Figure 2 lists the neighbouring encoded indices of the colour pixel cp to be compressed. To construct SP when maxen is set to 2, the indices valued 36, 36, and 35 are sequentially searched according to the search order depicted in Fig. 1. Two dis tinct indices valued 36, 35 are found and the resultant SP = {p 36, p 35 } is generated. Similarly, to construct SP when maxen is set to 4, the indices valued 36, 36, 35, 33, 33, and 34 are sequentially searched, and the resultant SP ={p 36, p 35, p 33, p 34 } is generated. To construct SP when maxen is set to 8, the indices valued 36, 36, 35, 33, 33, 34, 36, 35, 36, 33, 32, and 32 are sequentially searched, and the resultant SP ={p 36, p 35, p 33, p 34, p 32 } is generated. In this example, only 5 distinct indices are found. 36 35 36 33 32 34 35 36 33 32 33 36 cp Fig. 2. Example of state palette construction. After generating SP of asen colours, the closest colour in SP for cp is searched and the calculated distance is stored in dist SP. If the computed distance is less than or equal to the predefined threshold DTH, the log 2 asen bits index of the closest colour in SP for cp is stored. The coding rule for different asen values is listed in Table 1. Possible code pat Opto Electron. Rev., 20, no. 2, 2012 Y. C. Hu 161 j 2 (1)

On a predictive scheme for colour image quantization terns for the encoding the searched index are also included. Continuing the example described above, the value of asen is equal to 5 when maxen is set to 8. If the third colour p 33 in SP is used to encode cp, 3 bits index with value (010) 2 is stored. Table 1. Index encoding rule for the state palette in PCIQ. Asen values Code length Code patterns 1 0 N/A 2 1 (0) 2, (1) 2 3 4 2 (00) 2, (01) 2, (10) 2, (11) 2 5 8 3 (000) 2, (001) 2, (010) 2, (011) 2, (100) 2, (101) 2, (110) 2, (111) 2 9 12 4 (0000) 2, (0001) 2, (0010) 2, (0011) 2, (0100) 2, (0101) 2, (0110) 2, (0111) 2, (1000) 2, (1001) 2, (1010) 2, (1011) 2 Table 2. Indicators and the storage cost of PCIQ. Position Indicator Storage cost Remark cp is either in the first row or the first column N/A log 2 k bits Eecode cp by CP cp in other 0 1 + log 2 asen bits Eecode cp by SP position 1 1 + log 2 k bits Eecode cp by CP If dist SP is greater than DTH, the closest colour in CP is searched and the distance is stored in dist CP.Ifdist CP is equal to dist SP, no refinement can be made. Therefore, the index of the closest colour searched in SP is recorded by using log 2 asen bits. Otherwise, log 2 k bits index of the closest colour searched in CP is stored. To distinguish the two encoding rules for each colour pixel, additional 1 bit indicator is stored. The indicator and the storage cost for the encoding of the colour pixel is listed in Table 2. 2.2. Image decoding procedure To reconstruct the compressed image, the same colour pa lette CP of k colours is stored. In addition, the maximal number of the distinct encoded neighbours maxen that is to be used to generate the state palette SP is stored. To recover cp that is either in the first row or in the first column of the image, log 2 k bits index is extracted and the correspond ing colour pixel in CP is used to represent cp. If cp is neither in the first row nor the in first column of the image, 1 bit indicator is extracted first. If the indicator equals (0) 2, it indicates that cp was compressed by the clo sest colour in the state palette SP. Therefore, the same pro cess as mentioned in Sect. 2.1 is used to construct SP and the number of the actually searched encoded neighbour asen is now available. Then, log 2 asen bits index is extracted from the compressed codes. Finally, the corre sponding colour pixel in SP is used to represent cp. An example that recovers the colour pixel cp when maxen is set to 8 is described in the following. Figure 2 is treated as the current decoding status for cp. Suppose the extracted indicator equals (0) 2. By sequentially checking the decoded neighbours according to the search order listed in Fig. 1, we find that 5 distinct decoded neighbours are found. In other words, SP ={p 36, p 35, p 33, p 34, p 32 } is then recon structed. Also, the value of asen is set to 5 in this example. Suppose the 3 bits index (010) 2 is extracted from the com pressed codes. The third colour pixel in SP, e.g. p 33, is used to represent cp. If the indicator valued (1) 2 is found, it indicates that cp was compressed by the closest colour in CP. Then, the index of log 2 k bits is extracted from the compressed codes and the corresponding colour pixel in CP is used to represent cp. By sequentially processing each colour pixel cp in the left to right and then top to bottom order, the com pressed image can be then reconstructed. 3. Experimental results In order to verify the efficiency of the proposed scheme, a variety of experiments has been performed. All the experi ments were performed on the IBM compatible PC with a Pentium 3G Hz CPU and 1G RAM. Six RGB colour images of 512 512 pixels Airplane, House, Lenna, Peppers, Sailboat and Tiffany as it is shown in Fig. 3 are used in our experiments. In the simulations, palettes sizes of 16, 32, 64, 128, and 256 colours are designed by using the accelerated version of the K means clustering algorithm [13]. In addition, the fast pixel mapping algorithm that is equivalent to the full search algorithm is used in PCIQ to cut down the computational cost [18]. In the simulations, the colours in the initial palettes were selected from the diagonal line of the colour images with the limitation that colour pixels with the same values only ap pear once. In addition, is set to 0.0001 for controlling the termination of the K means algorithm. For any M N colour image, mean squared error (MSE) between the original image and the reconstructed image is defined as M N 1 2 MSE xijh xijh M N ( ). (2) 3 3 i 1 j 1h 1 Here x ij and x ij denote the original and the compressed colour pixels of 3 dimensions, respectively. Besides, peak signal to noise ratio (PSNR) between the original image and the compressed image is calculated. PSNR 10 255 log 10 MSE db (3) Note that MSE denotes the mean squared error between the original and compressed colour images. Note that PSNR is generally considered as an indication of image quality rather than a definitive calculation. However, it is a com monly used measurement for evaluating image quality. Typically, a large PSNR value indicates that the difference between two given images is quite small. From the litera ture, when the PNSR value between two given images is 2 162 Opto Electron. Rev., 20, no. 2, 2012 2012 SEP, Warsaw

Fig. 3. Testing images of 512 512 pixels. greater than or equal to 30 db, it is assumed that these two images are quite similar and it is hard to distinguish them via Human Visual System (HVS). The reconstructed image qualities of CIQ using different palette sizes are shown in Fig. 4. From the results, the recon structed image quality increases when a larger sized palette is used in CIQ. Average image qualities of 27.808 db, 32.281 db, and 36.596 db are obtained when the palettes of size 16, 64, and 256 are used, respectively. Results of the image qualities and the bit rates of PCIQ when asen is set to 4 are listed in Figs. 5 and 6, respectively. Here, the colour palettes of 256 colours are previously used. From the results, it is shown that the image qualities and the bit rates of the proposed scheme decrease when the value of DTH increases. Among these six images Airplane achie ves the best image qualities while requiring the lowest bit rates. On the contrary, Sailboat achieves the worse perfor mance. That may be due to the proposed scheme which is much suitable for the compression of the smooth images. From the results, an average image quality of 36.518 db is achieved at 4.924 bpp in PCIQ when DTH is set to 25. In addition, the average image quality of 35.557 db is obtained in PCIQ when the bit rate equals 3.820 bpp when DTH is set to 125. Compared to the CIQ at approximately bit rates, the gains of image qualities are 6.511 db and 7.749 db, respec tively. In order to understand the performance of the proposed PCIQ scheme with different asen values by using the colour palettes of size 256, simulation results of PCIQ when asen are set to 2, 4, 8 are listed in Fig. 7. In Fig.7 the comparative results of CIQ and QTCIQ are also included. The bit rates are ranged from 3.623 bpp to 5.440 bpp in the proposed Fig. 5. Image qualities of compressed images of PCIQ when asen is set to 4 using colour palettes of 256 colours. Fig. 4. Image qualities of compressed images of CIQ. Fig. 6. Bit rates of compressed images of the PCIQ when asen is set to 4 using the colour palettes of 256 colours. Opto Electron. Rev., 20, no. 2, 2012 Y. C. Hu 163

On a predictive scheme for colour image quantization Fig. 7. Comparative results of CIQ, QTCIQ and PCIQ with different maxen values (PCIQ maxen) by using colour palettes of 256 colours. scheme when asen is set to 2. The corresponding image qualities are ranged from 35.141 db to 36.506 db. The bit rates of the proposed scheme when asen is set to 4 are ranged from 3.627 bpp to 4.924 bpp and the corresponding image qualities are ranged from 35.250 db to 36.518 db. Figure 7 shows the results of the proposed scheme when asen is set to 8 provide slightly worse performance than those of the proposed scheme when asen is set to 4. The bit rates of CIQ are ranged from 3 bpp to 8 bpp and the corresponding image qualities are ranged from 25.397 db to 36.596 db. In addition, the bit rates of QTCIQ are ranged from 3.693 bpp to 8.440 bpp and the corresponding image qualities are ranged from 34.080 db to 36.523 db. Both QTCIQ and PCIQ provide better performance than CIQ. PCIQ achieves higher image qualities at lower bit rates than QTCIQ. Comparative results of CIQ, QTCIQ and the proposed PCIQ scheme using the colour palettes of size 128 are listed in Fig. 8. Similarly, PCIQ provides better performance than CIQ and QTCIQ. The bit rates of the proposed scheme when asen is set to 2 are ranged from 3.331 bpp to 4.315 Fig. 8. Comparative results of CIQ, QTCIQ and PCIQ with different maxen values (PCIQ maxen) by using colour palettes of 128 colours. Fig. 9. Average percentage of colour pixels that are encoded by the similar encoded neighbours in the state palette in PCIQ. bpp and the corresponding image qualities are ranged from 33.876 db to 34.486 db. The bit rates are ranged from 3.362 bpp to 4.032 bpp in PCIQ when asen is set to 4. The corre sponding image qualities are ranged from 33.960 db to 34.494 db. According to the results shown in Figs. 7 and 8, it is suggested that the asen should be set to 4 in PCIQ. Fig. 10. Compressed images of CIQ using colour palettes of 16 colours. 164 Opto Electron. Rev., 20, no. 2, 2012 2012 SEP, Warsaw

Fig. 11. Compressed images of CIQ using colour palettes of 256 colours. Results of the percentage of the colour pixels that are encoded by the similar encoded neighbours in the state pal ette in PCIQ are listed in Fig. 9. The total number of colour pixels increase when DTH increases. 57.152%, 68.075%, and 75.434% colour pixels are encoded by the similar nei ghbours in the state palette by using PCIQ with 256 colour palettes when DTH values are 50, 100, and 150, res pectively. In addition, the total number of colour pixels that are encoded by the state palette increase when maxen increases. 57.152%, 65.919%, and 73.677% colour pixels are encoded by the similar neighbours in state palette by using PCIQ with 256 colour palettes when maxen values are 2, 4, and 8, respectively. Similar results can be found in PCIQ with the use of 128 colour palettes. When more colour pixels are encoded by the similar neighbors in the state palette, the bit rate decreases in PCIQ. To understand the visual qualities of the compressed images of CIQ, the compressed images of CIQ with the co lour palettes of size 16 and 256 are listed in Figs. 10 and 11, respectively. From the results in Fig. 10, the false contours can be easily found in these reconstructed images. That is because the colour palettes of 16 colours cannot cover enough representative colours. From the results in Fig. 11, it is hard to distinguish the difference between the compressed images of CIQ and the original test images. The reconstructed images of the proposed PCIQ scheme with 256 colour palettes when DTH values are set to 25 and 150 are listed in Figs. 12 and 13, respectively. Average image qualities of 36.518 db and 35.250 db are achieved by using PCIQ in Figs. 12 and 13, respectively. The average bit rates of 4.924 bpp and 3.627 bpp are required for these images, respectively. The visual qualities of these images are approximately the same to the original test images. Fig. 12. Reconstructed images of PCIQ with 256 colour palettes when DTH is set to 25. Opto Electron. Rev., 20, no. 2, 2012 Y. C. Hu 165

On a predictive scheme for colour image quantization 4. Conclusions In this paper, a low bit rate colour image compression method based on colour image quantization is proposed. The predictive coding based on the encoding neighbours is designed to exploit the high degree of similarity among neighbouring colour pixels. The total number of the distinct neighbours can be adaptively selected. From the results, it is suggested that it should be set to 4. The proposed scheme also achieves good image qualities while keeping low bit rates. Average image qualities of 36.518 db and 35.250 db are achieved in the proposed scheme when the bit rates are 4.924 bpp and 3.627 bpp, respectively. Compared to CIQ and QTCIQ, the proposed scheme achieves the best performance. Acknowledgements This research was supported by the National Science Coun cil, Taipei, R.O.C. under contract NSC 98 2221 E 126 008 and NSC 99 2221 E 126 004 MY2. References Fig. 13. Reconstructed images of PCIQ with 256 colour palettes when DTH is set to 150. 1. P. Heckbert, Colour image quantization for frame buffer display, Comp. Graph. 16, 297 307 (1982). 2. T. Michael and A. Charles, Colour quantization of images, IEEE T. Signal Process. 39, 2677 2690 (1991). 3. S.J. Wan, P. Prusinkiewicz, and S.K.M. Wong, Variance based colour image quantization for frame buffer display, Colour Res. Appl. 15, 52 58 (1990). 4. C.Y. Yang and J.C. Lin, RWM cut for colour image quanti zation, Comp. Graph. 20, 577 588 (1996). 5. S.C. Cheng and C.K. Yang, A fast novel technique for col our quantization using reduction of colour space dimensio nality, Pattern Recogn. Lett. 22, 845 856 (2001). 6. J.T. Tou and R.C. Gonzalez, Pattern Recognition Principles, Addison Wesley, Reading, 1974. 7. Y.W. Lim and S.U. Lee, On the colour image segmentation algorithm based on the thresholding and the fuzzy c means technique, Pattern Recogn. 23, 935 952 (1990). 8. D. Ozdemir and L. Akarun, A fuzzy algorithm for colour quantization of images, Pattern Recogn. 35, 1785 1791 (2002). 9. P. Scheunders, A genetic c means clustering algorithm ap plied to colour image quantization, Pattern Recogn. 30, 859 866 (1997). 10. T. Kanungo, D.M. Mount, N.S. Netanyahu, C.D. Piatko, R. Silverman, and A.Y. Wu, An efficient k means clustering algorithm: analysis and implementation, IEEE T. Pattern Anal. 24, 881 892 (2002). 11. Y.L. Huang and R.F. Chang, A fast finite state algorithm for generating RGB palettes of colour quantized images, J. Inf. Sci. Eng. 20, 771 782 (2004). 12. M.E. Celebi, Improving the performance of k means for colour quantization, Image Vision Comput. 29, 260 271 (2011). 13. Y.C. Hu, M.G. Li, and P.Y. Tsai, Colour palette generation schemes for colour image quantization, Imaging Sci. J. 57, 46 59 (2009). 14. Y.C. Hu and B.H. Su, Accelerated k means clustering algo rithm for colour image quantization, Imaging Sci. J. 56, 29 40 (2008). 15. Y.C. Hu and M.G. Li, A k means based colour palette de sign scheme with the use of stable flags, J. Electron. Imag ing 16, 033003 (1 11) (2007). 16. K.F. Hwang and C.C. Chang, A fast pixel mapping algo rithm using principal component analysis, Pattern Recogn. Lett. 23, 1747 1753, (2002). 17. S.C. Cheng and C.K Yang, A fast novel technique for co lour quantization using reduction of colour space dimensio nality, Pattern Recogn. Lett. 22, 845 856 (2001). 18. Y.C. Hu and B.H. Su, Accelerated pixel mapping scheme for colour image quantization, Imaging Sci. J. 56, 67 78 (2008). 19. Y.C. Hu, C.Y. Li, J.C. Chuang, and C.C. Lo, Variable rate colour image quantization based on quadtree segmentation, Opto Electron. Rev. 19, 282 289 (2011). 166 Opto Electron. Rev., 20, no. 2, 2012 2012 SEP, Warsaw

20. Y.C. Hu, C.Y. Chiang, W.L. Chen, and W.K. Chou, Loss less index coding for indexed colour images, accepted and to appear in Imaging Sci. J. 21. Y. Linde, A. Buzo, and R.M. Gray, An algorithm for vector quantizer design, IEEE T. Commun. 28, 84 95 (1980). 22. C.C. Chang and Y.C. Hu, A fast codebook training algo rithm for vector quantization, IEEE T. Consum. Electr. 44, 1201 1208 (1998). 23. Y.C. Hu and C.C. Chang, An effective codebook search al gorithm for vector quantization, Imaging Sci. J., 51, 221 234 (2003). 24. P.Y. Tsai, Y.C. Hu, and H.L. Yeh, Fast VQ codebook gen eration method using codeword stability check and finite state concept, Fundam. Inform. 87, 447 463 (2008). 25. Y.C. Hu, B.H. Su, and C.C. Tsou, Fast VQ codebook search algorithm for grayscale image coding, Image Vision Comput. 26, 657 666 (2008). 26. Y.C. Hu, P.Y. Tsai, and C.C. Lo, New bit reduction of vec tor quantization using block prediction and relatively ad dressing, Fundam. Inform. 87, 313 329 (2008). 27. Y.C. Hu, J.C. Chuang, and C.C. Lo, Efficient grayscale im age compression technique based on VQ, Opto Electron. Rev. 19, 104 113 (2011). Opto Electron. Rev., 20, no. 2, 2012 Y. C. Hu 167