Efficient greyscale image compression technique

0 downloads 0 Views 3MB Size Report
representative codewords to form the codebook. From the .... generate the expanded codebook from the traditional VQ codebook. ..... In VQ, 32.043 dB of image.
OPTO−ELECTRONICS REVIEW 19(1), 104–113 DOI: 10.2478/s11772−010−0073−0

Efficient greyscale image compression technique based on vector quantization Y.C. HU*1, J.C. CHUANG2, C.C. LO3, and C.Y. LI1 1Department

of Computer Science and Information Management, Providence University, Taichung, Taiwan 433, R.O.C. 2Department of Computer Science and Communication Engineering, Providence University, Taichung, Taiwan 433, R.O.C. 3Department of Computer Science and Information Engineering, Providence University, Taichung, Taiwan 433, R.O.C. In this paper, a novel greyscale image coding technique based on vector quantization (VQ) is proposed. In VQ, the recon− structed image quality is restricted by the codebook used in the image encoding/decoding procedures. To provide a better image quality using a fixed−sized codebook, the codebook expansion technique is introduced in the proposed technique. In addition, the block prediction technique and the relatively address technique are employed to cut down the required storage cost of the compressed codes. From the results, it is shown that the proposed technique adaptively provides better image quality at low bit rates than VQ.

Keywords: image compression; vector quantization, codebook design, LBG algorithm.

1. Introduction Due to the limitations of data storage and transmission bandwidth, the need for digital image compression is essen− tial. From the literature, vector quantization (VQ) is a useful scheme for greyscale image compression [1–3]. It can also be used for speech compression. VQ can be applied to the multimedia applications that having a limited computation power because its low bit rate and simple image decoding procedure. In general, VQ can be divided into three parts: codebook generation, image encoding, and image decoding. The goal of codebook generation procedure is to generate a set of representative codewords to form the codebook. From the literature, the LBG algorithm is the most commonly used algorithm for codebook design [1]. The LBG algorithm is a clustering−based algorithm. Typically, a good codebook can be designed by using the LBG algorithm when the ini− tial codebook is well−selected. In the image encoding procedure, each greyscale image to be compressed is first divided into a set of non−over− lapped image blocks of n ´ n pixels. Each image block can be viewed as an image vector of k dimensions where k = n ´ n. To compress the image, each image block is processed in the left−to−right and top−to−bottom order. Given one image block x and a codebook of N codewords, the closest code− word in the codebook for x is to be determined. *e−mail:

104

[email protected]

To find out the closest codeword for each image block x, the squared Euclidean distance (SED) between each code− word cwi and x is calculated. The SED value of two given image vectors x, cwi of k pixels can be computed as follows k

d( x, cw i ) = å ( x i - cw ij ) 2 .

(1)

j =1

A total of N SED values are calculated to find out the closest codeword in the codebook for x. The codeword cor− responding to the least SED value is then selected. The com− pressed code of x is the index of its closest codeword in the codebook. When each image block is sequentially pro− cessed in the same way as mentioned above, a set of the indices, also called index table, is generated. In the image decoding procedure, the compressed image of VQ is to be reconstructed. Here, the same codebook of N codewords as that was used in the image encoding proce− ~ the log N dure is used. To recover each compressed block x, 2 bits index of the closest codeword in the codebook for x~ is extracted. Then, the corresponding codeword of this index ~ When each is employed to recover the compressed block x. compressed block is sequentially reconstructed in the same way, the decoded image of VQ is obtained. The required bit rate of VQ is (log2N )/k bpp when a codebook of N k−dimensional codewords is used. For example, the bit rate of VQ is equal to 0.5 bpp when N and k are 256 and 16, respectively. Generally, the reconstructed image quality of VQ highly depends on the codebook used.

Opto−Electron. Rev., 19, no. 1, 2011

If a representative set of codewords is designed, a good reconstructed image quality of the compressed image is achieved. In the LBG algorithm, several rounds of data clustering and centroid updating are executed to design the VQ code− book. Typically, a higher computational cost is consumed when a large−sized codebook is designed by the LBG algo− rithm. Several improved algorithms had been proposed to cut down the computational cost or design better codebook based on the LBG algorithm [4–9]. In addition, some code− book search algorithms had been proposed to accelerate the image encoding procedure of VQ without incurring any extra image distortion [10–15]. To cut down the bit rate of VQ, two main approaches are introduced. The former approach is to further losslessly encode the index table of VQ. Some index compression techniques of this approach had been proposed [16–19]. In this approach, additional computational cost is required for the post−processing work. The main advantage of this approach is that there is no extra image quality loss for losslessly index table compression. The later approach sacrifices the image quality of VQ to cut down the bit rate. Several schemes of this approach had been proposed [20–24]. The quadtree segmentation vector quantization technique that exploits the spatial similarity among neighbouring pixels by using the quadtree segmenta− tion technique had been proposed in 1999 [20]. In 2001, the sub−sampling vector quantization scheme had been pro− posed [21]. In this scheme, two adjacent similar blocks are merged and subsampled to form a block. The subsampled block is then compressed by VQ. The inter−block correla− tion between each two adjacent blocks is exploited in this scheme. In 2007, a VQ−based image compression scheme that exploits the inter−block and intra−block correlations had been proposed [22]. The similar block prediction technique is employed to encode the image blocks by their similar neighbouring encoded blocks. Besides, two codebooks are used in the proposed scheme to exploit the intra−block cor− relation within each image block. In 2008, a novel VQ− −based image coding scheme had been introduced [23]. The block prediction technique and the relatively addressing technique are employed to cut down the bit rate of VQ. To provide a better image quality of the reconstructed image using a fixed−sized VQ codebook while keeping a low bit rate, a new image coding technique based on VQ is proposed. The rest of this paper is organized as follows. In Sect. 2, the proposed technique based on VQ is introduced. In Sect. 3, the experimental results are shown. Finally, some conclusions are given in Sect. 4.

2.1. Codebook expansion procedure Suppose the VQ codebook CB = {cw0, cw1, …, cwN–1} of N codewords was previously generated by using the accele− rated version of the LBG algorithm [4]. Let F denote the expanding factor. To generate the expanded codebook ECB of N×F codewords, where ECB = {ecw 0 , ecw 1 , …, ecwNF–1}, the codewords in CB are first sorted by their sum values in ascending order. Each codeword cwi of CB is copied and stored in ecwi´F of ECB. The remanding codewords in ECB are generated by linear prediction of these copied codewords. The following equation is used to generate j−th codeword ecwj in ECB where j is less than or equal to F×(N – 1) if j mod F = 0 ì cw ê j ú ï êë F úû ï . ecwi = í F -j mod F j mod F ´ cw æ j ö otherwise ´ cwê j ú + ï ê ú F F ç ê ú +1÷ ï êë F úû èë F û ø î (2)

In this equation, N codewords in ECB are directly copied form CB in the first case. In addition, each remaining code− word in ECB is computed based on the linear prediction technique in the second case. Note that some codewords in ECB cannot be generated by using Eq. (2). In fact, a total of (F – 1) codewords in ECB cannot be processed in Eq. (2). Such expanded codewords can be generated by using the extrapolation technique. An example of codeword mapping from CB to ECB is depicted in Fig. 1. In this example, the expanding factor F is set to 2. In Fig. 1, the shaded codewords in ECB are directly copied from CB. These remaining (un−shaded) codewords in ECB are generated by using the linear prediction tech− nique. Furthermore, the expanded codeword ecw2N–1 with light−grey shadow is generated by using the extrapolation technique.

2.2. Proposed encoding procedure

2. Proposed method In the VQ scheme, the reconstructed image quality is limi− ted by the codebook used. To provide a better image quality in VQ, a larger−sized codebook is needed. To avoid using a larger−sized codebook while achieving a better image Opto−Electron. Rev., 19, no. 1, 2011

quality, the expanded codebook is used in the proposed method. The codebook expansion technique is introduced to generate the expanded codebook from the traditional VQ codebook. The usage of expanded codebook for VQ requires more storage cost for each index compressed to a small−sized VQ codebook used. To remedy this problem, the relatively addre− ssing technique is employed to losslessly process the indices. In addition, the block prediction technique is used to encode the image blocks by their similar encoded neighbours to cut down the bit rates with a slightly image quality loss.

After the expanded codebook ECB with the expanding fac− tor F is generated, the image encoding procedure can be started. The flowchart of the proposed encoding procedure is depicted in Fig. 2. The given image is partitioned into a set of non−overlapped image blocks of n ´ n pixels. Image

Y.C. Hu

105

Efficient greyscale image compression technique based on vector quantization

Fig. 3. Search order of encoded neighbours for x in block prediction technique.

Fig. 1. Example of codeword mapping from CB to ECB with F = 2.

blocks are sequentially processed in the order of left−to−right and then top−to−bottom. If the image block x to be processed is either in the first column or row of the image, it is then compressed by VQ using the expanded codebook. Let Ix denote the index of the closest codeword in the expanded codebook for x. The index Ix is further processed by the relatively addressing technique. For each remaining image block x to be processed, we need to determine whether it can be encoded by its similar encoded neighbour in the block prediction technique. The search order of the encoded neighbours of x is depicted listed in Fig. 3. In the block prediction technique, two con−

trol thresholds SR and TH are previously set. SR records the total number of the distinct encoded neighbours to be searched for x. TH records the allowable distance for deter− mining whether two image blocks are similar. According to Fig. 3, the distinct adjacent left and upper encoded neigh− bours are to be searched when SR is set to 2. In the block prediction technique, a total of SR distinct encoded neighbours of x are selected. The SED between each candidate and x is computed. The encoded neighbour having the minimal squared Euclidean distance dist with x is chosen. If dist is less than or equal to TH, x is encoded by the code pattern of its similar encoded neighbour as shown in Table 1. Otherwise, x is compressed by VQ using ECB. Let Ix denote the index of the closest codeword in ECB for x. The index Ix will be further compressed by using the rela− tively addressing technique. Table 1. Encoding rule for block prediction technique. Factor

SR

Code patterns

SR = 2

(0)2, (1)2

SR = 4

(00)2, (01)2, (10)2, (11)2

Now, we start to describe the details of the relatively addressing technique. Let RT denote the predefined range threshold that records the allowable range. Besides, Iri denotes the reference index Iri for each index. Recall that the indices to be processed can be divided into two different ca− tegories. In the first category, each index is corresponding to the image block located either in the first column or the first row of the image. The reference index Iri for each index cor− responding to the image block in the first row of the image is set to its immediately left index. The reference index Iri for each index corresponding to the image block in the first column of the image is set to its immediately above index. In the second category, each index has at least four adjacent encoded neighbours. The reference index Iri can be set to either its adjacent left index or upper index. The distance between Ix and Iri can be calculated by using the following equation dra = I x - I ri .

Fig. 2. Flowchart of proposed image encoding procedure.

106

(3)

If the calculated distance dra ranges from –(RT/2) to (RT/2) – 1, Ix is classified as a close index to Iri. Then, Iri is encoded by the rule described in Table 2 based on dra. Othe− rwise, Ix is classified as a non−close index to Iri. That is, Ix is far away from Iri and the original index of Ix is stored. Here,

Opto−Electron. Rev., 19, no. 1, 2011

© 2011 SEP, Warsaw

we need to store additional 1−bit indicator indRA to distin− guish the two possible processing ways in the relatively addressing technique. The storage cost for each possible encoding method of the proposed scheme is listed in Table 3. Each image block x that is either in the first column or the first row of the image is compressed by VQ using ECB to get the index Ix of the clo− sest codeword in ECB. Then, Ix is further processed by the relatively addressing technique. Therefore, (1 + log2RT) bits and (1 + log2N×F) bits are needed for the close index and non−close index to the reference index, respectively. For each remaining block x, it may be encoded by its similar encoded neighbour by using the block prediction technique or it is compressed by VQ with ECB and then processed by the relatively addressing technique. Here, 1−bit indicator indBP is required to record whether the block prediction technique is used. A total of (+ log2SR) bits are needed when x is encoded by its similar encoded neighbour. Otherwise, x is first encoded by VQ with ECB to get Ix. Then, Ix is further processed by the relatively addressing technique. In other words, (2 + log2RT) bits and (2 + log2N×F) bits are needed for close index and non−close index to the reference index, respectively. Fig. 4. Flowchart of proposed image decoding procedure.

Table 2. Encoding rule for the close index Ix in relatively address− ing technique. dra

Code in decimal value

– (RT/2)

0

– (RT/2) + 1

1

– (RT/2) + 2

2

. . .

. . .

(RT/2) – 1

RT – 1

2.3. Proposed decoding procedure To reconstruct the compressed image, the VQ codebook CB of N codewords and the compression data are needed. Besides, the parameters F, SR, TH, and RT are needed to correctly decode the image. The codebook expansion proce− dure that was described in Sect. 2.1 is executed to generate

the expand codebook ECB of N×F codewords before the actually decoding work is executed. Recall that the image blocks are encoded in the left−to−right and top−to−bottom order, the same order is used to decode them. The flowchart of the proposed decoding procedure is depicted in Fig. 4. To recover y that is either in the first row or the first co− lumn of the image, two possible cases can be found. We need to extract 1−bit indicator indRA to determine whether the extracted index is either a close index or non−close index to the reference index. When indRA equals (0)2, it indicates that a close index is to be extracted. Otherwise, a non−close index is to be extracted. Then, log2RT bits or log2N×F bits are extracted from the compressed data to form the close index and the non−close index, respectively. For each close index of log2RT bits, it is translated back to dra by according to Table 2. Then, the index Ix of

Table 3. Analysis of encoding method, indicator codes, and code length of the proposed method. Factors

Positions x is in first column or first row

Encoding methods VQ with ECB

Indicator codes

Code length

relatively addressing for close index

(0)2

1 + log2RT

relatively addressing for non−close index

(1)2

1 + log2(N×F)

(0)2

1 + log2SR

relatively addressing for close index

(10)2

2 + log2RT

relatively addressing for non−close index

(11)2

2 + log2(N×F)

block prediction for a similar encoded neighbour x has at least four encoded neighbours block prediction without a similar neighbour

Opto−Electron. Rev., 19, no. 1, 2011

VQ with ECB

Y.C. Hu

107

Efficient greyscale image compression technique based on vector quantization log2N×F bits can be calculated according to the following equation I x = I ri + dra .

(4)

The compressed image block y that corresponds to a close index can be then reconstructed by the Ix−th code− word in ECB. For each non−close index, the block y can be directly recovered by its corresponding codeword in ECB. To recover y that is neither in the first row nor the first column of the image, 1−bit indicator indBP is extracted to determine whether the block prediction technique was employed or not. If indBP with a value (0)2 is found, y will be recovered by its similar encoded neighbour. We need to extract log2SR bits from the compressed data to form the code pattern of the similar neighbour. Then, the code pattern can be translated back to the log2N×F bits index of the simi− lar neighbour according to Table 1. If indBP valued (1)2 is found, we need to extract addi− tional 1−bit indicator indRA to determine the decoding ways of the relatively address technique. We know that the cur− rent decoding index is a close index or non−close index to the reference index, when indRA valued (0)2 and (1)2, respec− tively. Then, log2RT bits or log2N×F bits are extracted from the compressed data to get the close index and the non−close index, respectively. Each close index is first translated back to dra. Then, the index Ix of can be computed by using Eq. (4). The compressed image block y that corresponds to a close index can be then reconstructed by the Ix−th code− word in ECB. For each non−close index, the block y can be directly recovered by its corresponding codeword in ECB. By sequentially decoding each image block using the above− −described rules, the compressed image can be generated.

PSNR = 10 ´ log 10

2552 . MSE

(6)

Typically, PSNR is considered an indication of image quality rather than a definitive measurement; however, it is a commonly used measurement for evaluating the image quality. In the experiments, six test images “Airplane”, “Girl”, “Goldhill”, “Lenna”, “Peppers” and “Toys” of 512 × 512 pixels as shown in Fig. 5 are used to evaluate the average performance of comparative schemes. Among them, “Air− plane”, “Boat”, and “Toys” are within the training set for codebook design, while the others three images are outside the training set. Reconstructed image qualities of the VQ scheme using different codebook sizes are shown in Table 4. It is shown that the image quality increases as the codebook size increases in VQ. To understand the performance of the proposed code− book expansion procedure, average results of the image qualities of VQ with the use of the expanded codebooks are listed in Table 5. From the results, the image quality incre− ases as the increment of the expanding factor. Average

3. Experimental results To understand the performance of proposed scheme, a vari− ety of experiments have been performed. All the experi− ments were performed on the IBM compatible PC with a Pentium 3G Hz CPU and 1G RAM. Four greyscale ima− ges “Airplane”, “Boat”, “Goldhill” and “Toys” of 512×512 pixels were used as the training images to design the VQ codebooks by using the LBG algorithm [1]. In the simula− tions, the termination threshold of the LBG algorithm was set to 0.001. The mean square error (MSE) between the original re− constructed images of 512×512 pixels is defined as MSE =

512 512 1 å å ( oij - rij )2 . 512 ´ 512 i =1 j

(5)

Here, oij and rij denote the original and encoded pixels, respectively. The quality of the reconstructed image is measured by means of the peak signal−to−noise−ratio (PSNR), which is defined as

108

Fig. 5. Greyscale testing images of size 512 ´ 512 pixels.

Opto−Electron. Rev., 19, no. 1, 2011

© 2011 SEP, Warsaw

Table 4. Reconstructed image qualities of VQ scheme using different codebook sizes. Sizes Images

N = 32 (0.3125 bpp)

N = 64 (0.375 bpp)

N = 128 (0.4375 bpp)

N = 256 (0.5 bpp)

N = 512 (0.5625 bpp)

N = 1024 (0.625 bpp)

Airplane

28.092

29.364

30.507

31.422

32.327

33.191

Girl

28.565

29.472

30.403

31.181

32.027

32.658

Goldhill

27.678

28.935

29.853

30.674

31.537

32.396

Lenna

28.118

29.233

30.299

31.022

31.802

32.489

Peppers

28.389

29.536

30.441

31.172

31.877

32.426

Toys

27.600

29.177

30.496

31.569

32.690

33.476

Average

28.074

29.286

30.333

31.173

32.043

32.773

image quality gains 0.509 dB, 0.761 dB, and 0.859 dB are obtained when expanding factors valued 2, 4, and 8 are used, respectively. To understand the performance of the relatively address− ing technique, average bit rates of the relatively addressing technique for VQ using the expanded codebooks are listed in Table 6. Here, two reference positions are used in the simulations for relatively addressing. In Table 6, L and U denote the adjacent left index and the adjacent upper index to the current processing index for the relatively addressing technique. It is shown that a lower bit rate is obtained when the reference index is set to the adjacent upper index of the current processing index. The relatively addressing technique can be viewed as a lossless index coding technique for VQ indices. The required bit rate for VQ with the expanded codebook is log2(N×F)/k bpp. In Table 6, the expanding factor F and the vector dimensions are set to 2 and 16, respectively. By using the relatively addressing technique, the best bit rates for VQ with expanded codebooks of 128, 256, 512, 1024 code− words are 0.336 bpp, 0.402 bpp, 0.471 bpp, 0.531 bpp, respectively. Beside, it is shown that the bit rates of the rela− tively addressing technique reference to the upper index are lower than those of the relatively addressing technique re− ference to the left index. Therefore it is suggested that the

reference position for the relatively addressing technique should be set to the upper index. Table 5. Average image qualities of VQ with expanded codebooks. Expanding factors Sizes

F=1 (non−expanded)

F=2

F=4

F=8

32

28.074

28.594

28.821

28.908

64

29.286

29.845

30.106

30.203

128

30.333

30.823

31.091

31.189

256

31.173

31.640

31.892

32.003

512

32.773

32.449

32.730

32.859

To understand the performance of the block prediction technique, average image qualities and bit rates of the block prediction technique for VQ with the expanded codebooks are given in Tables 7 and 8, respectively. Recall that SR denotes the number of distinct encoded neighbours used in block prediction technique. In the simulations, SR valued 2 and 4 for block prediction are simulated. The expanding factor F is set to 2. Four different sizes of expanded code− books 128, 256, 512, 1024 are used in the experiments. According to the results in Table 7, the image qualities decrease as the increment of the TH values. The image

Table 6. Average bit rates of relatively addressing technique for VQ with the expanded codebooks (F = 2) and different reference positions (RP). (N, RP)

RT 2

4

8

16

32

64

128

256

(64, L)

0.336

0.341

0.340

0.361

0.391

0.442

x

x

(64, U)

0.336

0.339

0.351

0.358

0.389

0.441

x

x

(128, L)

0.402

0.404

0.415

0.415

0.421

0.453

0.503

x

(128, U)

0.403

0.404

0.415

0.414

0.419

0.451

0.502

x

(256, L)

0.485

0.486

0.491

0.482

0.473

0.483

0.515

0.565

(256, U)

0.488

0.487

0.491

0.480

0.471

0.481

0.513

0.565

(512, L)

0.567

0.567

0.565

0.559

0.546

0.533

0.544

0.577

(512, U)

0.568

0.567

0.564

0.559

0.544

0.531

0.575

0.575

Opto−Electron. Rev., 19, no. 1, 2011

Y.C. Hu

109

Efficient greyscale image compression technique based on vector quantization

Fig. 6 Averaged bit rates of the proposed method when N = 64 and F = 2.

Fig. 9. Averaged bit rates of the proposed method when N = 512 and F = 2.

quali−ties of the block prediction technique with SR = 2 are approximately the same to those of the block prediction technique with SR = 4. It may, due to that most similar encoded neighbour, can be found either in the adjacent left index or the adjacent upper index of the current processing index. In Table 8, the required bit rates decrease as the increment of the TH values. The required bit rates of the block prediction technique with SR = 2 are lower than those of the block prediction technique with SR = 4 from the Table 8. Therefore, it is suggested that SR should be set to 2 for block prediction. Experimental results of the proposed method using ex− panded codebook of 128, 256, 512, and 1024 codewords are listed in Figs. 6 to 9. The expanding factor F is set to 2. In other words, the VQ codebooks sized 64, 128, 256, 512 are used to generate the expanded codebooks. The reference position for relatively addressing is set to the adjacent upper index of the current processing index based on the results shown in Table 6. The search range SR for block prediction

is set to 2 according to the results in Tables 7 and 8. Diffe− rent values of RT are tested to find out the best threshold for the relatively addressing technique. Compared to the results in Tables 7 and 8, it is shown that the proposed method requires much lower bit rates than those of VQ with block prediction. In other words, the use of relatively addressing significantly cuts down the bit rates of the proposed method. In Figs. 6 and 7, the lowest bit rates are achieved when RT are set to 16 and 32 in the proposed method. Besides, the lowest bit rates are obtained when RT are set to 64 and 128 in the proposed method in Figs. 8 and 9. Therefore, it is suggested that RT should be set to (N×F)/8 in the proposed method. Comparative results of the proposed method with RT = (N×F)/8 and VQ are given in Fig. 10. The required bit rate of VQ with a codebook of 64 codewords is 0.375 bpp. From Table 4, an average image quality of 29.286 dB is obtained by VQ. When the VQ codebooks of 64 codewords are used in the proposed method, 29.610 dB of image quality gain at 0.249 bpp is achieved. 33.60% bit rate reduction is obtained while having an image quality gain of 0.324 dB. Average image quality of 30.441 dB is achieved at 0.272 bpp by using the proposed method when the VQ codebooks of 128 codewords are used. Note that average image quality of 30.333 dB is obtained at 0.4375 bpp in VQ. In other words, an average of 37.83% bit rate reduction of the proposed method is obtained while having the image quality gain of 0.108 dB. An average image quality of 31.191 dB is achieved at 0.307 bpp by using the proposed method with VQ code− books of 256 codewords. In VQ, the average image quality of 31.173 dB is obtained at 0.5 bpp. An average of 38.60%

Fig. 7. Averaged bit rates of the proposed method when N = 128 and F = 2.

Fig. 8. Averaged bit rates of the proposed method when N = 256 and F = 2.

110

Fig. 10. Comparative results of proposed method (PM) and VQ.

Opto−Electron. Rev., 19, no. 1, 2011

© 2011 SEP, Warsaw

Table 7 Average image qualities of block prediction technique for VQ with the expanded codebooks (F = 2). (N, SR)

TH 200

400

600

800

1000

1200

(64, 2)

29.837

29.812

29.780

29.728

29.671

29.610

(64, 4)

29.838

29.813

29.781

29.735

29.679

29.618

(128, 2)

30.809

30.768

30.711

30.635

30.545

30.441

(128, 4)

30.812

30.770

30.712

30.632

30.530

30.431

(256, 2)

31.612

31.537

31.439

31.321

31.191

31.049

(256, 4)

31.614

31.535

31.428

31.298

31.142

30.997

(512, 2)

32.399

32.303

32.142

31.986

31.805

31.648

(512, 4)

32.399

32.275

32.109

31.919

31.734

31.544

bit rate reduction is obtained while having an average image quality 0.018 dB. Besides, 32.142 dB of image quality is obtained at 0.307 bpp in the proposed method with VQ codebooks of 512 codewords. In VQ, 32.043 dB of image

Fig. 11. Compressed images using VQ codebooks of 64 codewords. Opto−Electron. Rev., 19, no. 1, 2011

quality is obtained at 0.5625 bpp. An average of 45.42% bit rate reduction is obtained while having an image quality gain of 0.099 dB.

Fig. 12. Compressed images of comparative schemes using VQ codebooks of 128 codewords.

Y.C. Hu

111

Efficient greyscale image compression technique based on vector quantization Table 8. Average bit rates of block prediction technique for VQ with the expanded codebooks (F = 2). (N, SR)

TH 200

400

600

800

1000

1200

(64, 2)

0.387

0.334

0.304

0.287

0.273

0.262

(64, 4)

0.399

0.349

0.322

0.304

0.292

0.283

(128, 2)

0.419

0.363

0.334

0.314

0.298

0.286

(128, 4)

0.428

0.373

0.344

0.325

0.311

0.300

(256, 2)

0.457

0.397

0.364

0.341

0.324

0.310

(256, 4)

0.460

0.400

0.369

0.346

0.329

0.317

(512, 2)

0.499

0.433

0.396

0.371

0.351

0.335

(512, 4)

0.497

0.430

0.394

0.369

0.350

0.335

Compressed images of VQ and the proposed method using codebooks of 64, 128, 256, 512 codewords are listed in Figs. 11 to 14, respectively. Two testing images “Airplane” and “Lenna” are used to demonstrate the visual quality of the

proposed method and VQ. Two compressed images of the proposed method that have approximately the same bit rate or image quality of VQ are shown in each figure.

Fig. 13. Compressed images using VQ codebooks of 256 code− words.

Fig. 14. Compressed images using VQ codebooks of 512 code− words.

112

Opto−Electron. Rev., 19, no. 1, 2011

© 2011 SEP, Warsaw

4. Conclusions A novel image compression scheme based on VQ is pro− posed in this paper. The idea of codebook expansion is introduced in this scheme. By exploiting the high correla− tion among neighbouring image blocks, the block predic− tion technique is employed to cut down the bit rates of VQ. In addition, the relatively addressing technique is used to decrease the storage costs of the indices. From the results, it is suggested that the range threshold RT for relatively addressing should be set to (N×F)/8 for the relatively addressing technique. Besides, the reference posi− tion for relatively addressing is suggested to be adjacent upper index of the current processing index. By choosing suitable control thresholds, the proposed scheme provides a better image quality than VQ while keeping a lower bit rate when a fixed−size VQ codebook is used. To further improve the reconstructed image quality of the proposed scheme, we will work on codebook expansion procedure to design better expanded codebooks in the future.

References 1. Y. Linde, A. Buzo, and R.M. Gray, “An algorithm for vector quantizer design”, IEEE T. Commun. 28, 84–95 (1980). 2. N.M. Nasrabadi and R.A. King, “Image coding using vector quantization: a review”, IEEE T. Commun. 36, 957–971 (1988). 3. A. Gersho and R.M. Gray, Vector Quantization and Signal Compression, Boston, MA: Kluwer Academic Publishers, Boston, 1992. 4. C.C. Chang and Y.C. Hu, “A fast codebook training algo− rithm for vector quantization”, IEEE T. Consum. Electr. 44, 1201–1208 (1998). 5. C.Q. Chen, “An enhanced generalized Lloyd algorithm”, IEEE Signal Proc. Let. 11, 167–170 (2004). 6. S.M. Pan and K.S. Cheng, “An evolution−based Tabu search approach to codebook design”, Pattern Recogn. 40, 476–491 (2007). 7. 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. Inf. 87, 447–463 (2008). 8. J.Z.C. Lai, Y.C. Liaw, and J. Liu, “A fast VQ codebook gen− eration algorithm using codeword displacement”, Pattern Recogn. 41, 315–319 (2008).

Opto−Electron. Rev., 19, no. 1, 2011

9. C.W. Tsai, C.Y. Lee, M.C. Chiang, and C.S. Yang, “A fast codebook generation algorithm via pattern reduction”, Pat− tern Recogn. Lett. 30, 653–660 (2009). 10. J.S. Pan, Z.M. Lu, and S.H. Sun, “An efficient encoding al− gorithm for vector quantization based on subvector tech− nique”, IEEE T. Image Process. 12, 265–270 (2003). 11. Y.C. Hu and C.C. Chang, “An effective codebook search al− gorithm for vector quantization”, Imaging Sci. J. 51, 221–234 (2003). 12. Z. Pan, K. Kotani, and T. Ohmi, “Improved the−law−of−co− sines−based fast search method for vector quantization by up− dating angular information”, Pattern Recogn. Lett. 27, 688–695 (2006). 13. S.X. Chen, F.W. Li, and W.L. Zhu, “Fast searching algo− rithm for vector quantization based on features of vector and subvector”, IET Image Process. 2, 275–285 (2008). 14. Y.C. Hu, B.H. Su, and C.C. Tsou, “Fast VQ codebook search algorithm for greyscale image coding”, Image Vision Comput. 26, 657–666 (2008). 15. J.Z.C. Lai and Y.C. Liaw, “A novel encoding algorithm for vector quantization using transformed codebook”, Pattern Recogn. 42, 3065–3070 (2009). 16. C.H. Hsieh and J.C. Tsai, “Lossless compression of VQ in− dex with search−order coding,” IEEE T. Image Process. 5, 1579–1582 (1996). 17. Y.C. Hu and C.C. Chang, “Low complexity index−com− pressed vector quantization for image compression”, IEEE T. Consum. Electr. 45, 1225–1233 (1999). 18. T.C. Lu and C.C. Chang, “Data compressor for VQ index ta− bles”, Fundam. Inf. 65, 353–371 (2005). 19. C.C. Chang, G.M. Chen, and Y.C. Hu, “A novel index cod− ing scheme for vector quantization”, Fundam. Inf. 71, 215–227 (2006). 20. Y.C. Hu and C.C. Chang, “Variable rate vector quantization scheme based on quadtree segmentation”, IEEE T. Consum. Electr. 45, 310–317 (1999). 21. Y.C. Hu and C.C. Chang, “Image coding schemes based on subsampling vector quantization”, Opt. Eng. 40, 108–114 (2001). 22. Y.C. Hu, C.C. Lin, and K.L, Chi, “Block prediction vector quantization for greyscale image compression”, Fundam. Inf. 78, 257–270 (2007). 23. 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. Inf. 87, 313–329 (2008). 24 K. Sasazaki, S. Saga, J. Maeda, and Y. Suzuki, “Vector quantization of images with variable block size”, Appl. Soft Comput. 8, 634–645 (2008).

Y.C. Hu

113