• 沒有找到結果。

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

N/A
N/A
Protected

Academic year: 2022

Share "0. COLOR IMAGE COMPRESSION BY MOMENT-PRESERVING AND BLOCK TRUNCATION CODING TECHNIQUES?"

Copied!
5
0
0

加載中.... (立即查看全文)

全文

(1)

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

Chen-Kuei Yang!Ja-Chen Lin, and Wen-Hsiang Tsai

Department of Computer and Information Science, National Chiao Tung University Hsinchu, Taiwan 300, Republic

of

China.

ABSTRACT

A new color image compression technique based on moment-preserving and block truncation coding (BTC) is proposed. An input image is divided into non- overlapping blocks. And each block is coded by two representative colors, or equivalently, by two sets of tristimulus values

( R I , GI, B,)

and (R,,

G,, B2).

To compute the two representative colors of each block, some color moments of the block are preserved, and the two sets of desired tristimulus values are computed accordingly using analytic formulas. The compression ratio is 6 when the block size is 4 x 4 . Furthermore, a simple method is applied to quantize the bit map into 64 predefined bit maps and requantize each color component from 8 bits into 4 bits. An average compression ratio of 14.00 can be achieved.

I. INTRODUCTION

The block truncation coding (BTC) algorithm developed by Delp and Mitchell [ I ] is to use a two-level non-parameteric quantizer that adapts over the local regions of the input image. Many trichromatic models for color have been developed [2]. The components of the RGB model are highly correlated with one another, but most monitors use them as input signals. Lema and Mitchell [3] use the absolute the moment BTC technique on the three color planes of a color image separately. The resulting bit maps occupy more than 61 % of output code, and a compression ratio of 4 can be obtained for a 4 x 4 image block. Wu and Col1 [4] use a single bit map to quantize all the three color planes. This means that only one out of three bit planes need be preserved. Kurita and Otsu [ 5 ] use the mean vector and covariance matrix of color vectors to compute the principal score for each This work was supported partially by Na-tional Science Council, Republic of China under Grant NSC83-0408- A Also with the Department of Information Management,

E009 -0 1 0.

Ming Chum College, Taipei, R. 0. C.

pixel in the block and classify the pixels into two classes.

The two classes' mean vectors and a bit map are preserved. In these methods, a compression ratio of 6 can be obtained for a 4 x 4 block.

The remainder of this paper is organized as follows.

In Section 11, proposed color image compression using the moment-preserving and BTC techniques is described.

To improve the compression ratio, the three modifications of the proposed compression algorithm are described in Section 111. In Section IV, we present several experimental results to show the feasibility of the proposed method. Finally, some conclusions are made in Section V.

11. PROPOSED COLOR IMAGE PRESERVING AND BTC TECHNIQUES

Given an imagef with (r,

g , b)

tristimulus values, let FJ be a 4 X 4 block off and

P,

be a pixel in F, with tristimulus values

( r l , g,,

b,). Suppose that H is the compressed version of FJ and the pixels of H have only two sets of representative tristimulus values

(RI, G,,

8,) and

( R z , G,, Bz).

Let p1 be the fractions of pixels in H with tristimulus values

(R,, GI, Bl),

and p 2 the fractions of pixels in H with tristimulus values The proposed algorithm for color image compression using the moment-preserving and BTC techniques (abbreviated as CICMPBTC) is described as follows.

COMPRESSION USING MOMENT-

( R P G,,

B2).

Algorithm CICMPBTC

Step 1:Read in an M X N color image G .

Step 2:Partition G into non-overlapping 4 X 4 blocks

F j .

Step 3:For each block F, perform the following steps:

(a) preserve a set of color moments of F j to obtain a set of equations involving as variables the values o f ( R , ,

G,,

B , ) a n d ( R , ,

G,, B,);

(2)

(b) solve the equations to obtain the desired values of

( R I , G I , B,)

and

(R,, G,,

B,) if the spectral condition is 3-spectral; otherwise compute the desired uistimulus values using different methods for

F,

according to the spectral conditions (the details are described later) ;

(c) generate a 4 X 4 bit map for

F,

by assigning "0"

or "1" to each element

PI

of

F I

according to whether

( r l , g,,

bl) is closer to

( R I , G,,

B,) or

(d) allow 8 bits for each of the six uistimulus values (e) take the bit map and the six representative

(R,, G,,

B,);

( R I ,

G,,

B , ) a n d ( R , ,

G,, B,);

uistimulus values as output.

Several color moments of each block are preserved according to the moment-preserving principle which has also been applied to several other image processing tasks [6-91. A set of analytic formulas can be obtained accordingly to compute two sets of (R, G, B) tristimulus values for each block. They are described as follows:

m,. = C p , r f , ma. = C p , g f . mb. = C p , b f , (1)

m r = C p t r e , m # = C p ~ g m , m b = C p 8 b # ,

mr,b = C p , T # g # b L ,

1

where

p,

= -

n

for all

i ; n

is the total number of pixels in

F,; m,, m,,

and

m

are the means of the

( r , g ,

b ) tristimulus values, respectively;

mr2, m

2 , and mb2 are related to the variances of the

( r , g ,

b ) uistimulus values, respectively; and m g b is related to the correlation within the ( r , g , b) tristimulus values.

By preserving the above seven moments of

F ,

in the compressed version H, the resulting equations are as follows:

p l R , + p2R, = m., p,K: + p,R: = m,. , p l G l + p 2 G , = ma. p,G: + p,G: = ma..

plB, + p,B, = mb. p,B: + p2B: = m,. , (2)

PlKlGIBl + P,K,G,B, =m,#*'

PI + P 2 =mo.

where all the terms on the left-hand sides of the equalities are the moments of H and all those on the right-hand sides are the corresponding ones of

F I

computed according to (1). There are eight unknowns pl, p , ,

R I ,

G,, B,,

R,,

G,,

and B,. Note that we define

m,

= 1 so that pl

+

p2 = 1 =

m,.

Without loss of generality, we shift the values of the tristimulus values such that the three

mean

values

m,,

mg,

and mb are zero. After

( R I , G , ,

€3,) and

(R,, G,, B,)

are obtained from solving (2), these six values of color components should be rranslated back by adding to them the mean values

m,, m,

, and ?%, respectively.

Let U m , 2 ,

Um

2 , Omb2, and

o??&,b

denote the shifted moments of

m , ~

, m82,

mbz

, and ??&gb, respectively.

Assume that

p ,

2

p z .

Then

(R,, G,, Bl), (R,, G,,

B,),

p l ,

and

p 2

can be solved (with details omitted) to be:

P2 = ' - P , *

where

Note here that it is the appropriate selection of the seven color moments of (1) that leads to the possibility of obtaining the analytic solutions for

( R I , GI,

B,) and

( R , , G,,

B,) as described in (3).

Different techniques are applied to different color conditions (1 -spectral, 2-spect.ra1, or 3-spectral) in the 4x4 block, such that one of the two sets of (R, G, B) tristimulus values is assigned to each pixel in the block according to the Euclidean distance measure. The method of Lin and Tsai [lo] is used to compute suitable values for the two non-uniform color components for the 2- spectral condition. And the method of Tsai [l 11 is used to select a suitable value for the single non-uniform color component for the I-spectral condition. We focus on the 3-spectral case in this study. The mean of the original color component values of the block is used as a substitute for each uniform color plane. A compression ratio of 6 can be obtained by allowing 8 bits for each component of the two sets of (R, G, B) values and 16 bits for the 4 X 4 bit map.

111. THREE MODIFICATIONS OF PROPOSED CICMPBTC ALGORITHM

To improve the compression ratio, three modifications of the CICMPBTC algorithm (denoted as CICMPBTC-1, CICMPBTC-2, and CICMPBTC-3) are proposed. The CICMPBTC-1 algorithm is designed to remove the redundancy found in specifying the two sets

(3)

of representative tristimulus values

( R , , G,, B,)

and (

R,

,

G,, B,)

when the image block has uniform color planes. For example, when the image block has uniform red component values, the two tristimulus values sets are ( R , ,

G,, B,)

and ( R , , G , ,

B,)

with

R,=R,

being computed as the mean of all the red component values of the block. The proposed algorithm CICMPBTC- 1 uses a 3-bit SI code to represent the various spectral cases and saves the bits used to represent the duplicated tristimulus values when the image blocks have uniform color planes.

This coding method is found effective in improving the compression ratio. In order to improve the compression ratio further , we code the bit map more efficiently using the method of Yang and Tsai [12] which is based on the observation of the human visual system's sensitivity to edge and line patterns in small image blocks. This results in Algorithm CICMPBTC-2, which uses 6 bits to code the bit map of each image block after classifying the bit map into one of sixty-four predefined bit maps which includes almost all possible variations of edge and line patterns of size 4 X 4.

Algorithm CICMPBTC-2 follows the stcps of CICMPBTC-1 until the bit map is generated. Then the bit map is matched with the sixty-four predefined bit maps and the best-match bit map is chosen as the desired bit map. Each block is finally coded by the 3-bit SI code, some of six 8-bit tristimulus values, and a bit-map index except the case with the SI code being 000. From our experimental results, the average compression ratio was found to be about 8.05.

Furthermore, we apply further a simple method to requantize each color component from 8 bits into 4 bits.

This is equivalent to equally dividing the value range of each color component from 256 levels into 16 levels, and thus requantizing the color image into 4096 colors (16X 16X 16). And based on this simple method, we propose a third modification version (denoted as CICMPBTC-3) of the CICMPBTC algorithm, which requantizes the truncated data in the above way from the result produced by the CICMFBTC-2 algorithm. As a result, an average compression ratio of 14.00 can be achieved. For some randomized image contents, the compression ratio can be raised to about 20.

IV. EXPERIMENTAL RESULTS

The proposed algorithms have been tested on an IRIS Indigo workstation on several color images. Each color image has 24 bits/pixel and is 512x512 in size. A smaller value of the MAE (Mean Absolute Error) means that the reconstructed image is less distorted. Table 1 shows the comparative MAE values of the proposed algorithms CICMPBTC, CICMPBTC- 1, CICMPBTC-2, and CICMPBTC-3 (with color component requantization bit number c = 4 ) , respectively. For each method, the images "Lenna," "pepper," "jet," and "house," are tested.

Table 2 shows the compression ratios of the images

mentioned above. Tables 3 and 4 show the comparative MAE values and compression ratios yielded by Algorithm CICMPBTC-3 for which each color image mentioned above is requantized using r = 3 , 4 , 5 , 6 , or 7 bits for each color component.

Fig. 1 shows the standard images of "Lenna,"

"pepper," and "jet" of size 512x512 in (a), (b), and (c), respectively. Fig. 2, shows the compression results of

"Lenna" using Algorithms CICMPBTC- 1, CICMPBTC- 2, and CICMPBTC-3 (using 4 bits to requantize each color component), respectively. Fig. 3 shows the compression results of "Lenna," "pepper," and "jet" using Algorithm CICMPBTC-3 with 3 bits to requantize each color component in (a), (b), and (c), respectively.

From Tables 1 and 2 several facts can be observed.

First, Algorithm CICMPBTC- 1 is an error-free improvement on Algorithm CICMPBTC; reconstructed image qualities from CICMPBTC and CICMPBTC-1 are exactly the same. Second, Algorithm CICMPBTC-2 can both preserve reconstructed image quality and gain reasonable compression ratios due to the use of the sixty- four predefined bit maps. It requires fewer bits to code the bit map without sacrificing too much quality in the reconstructed image. From Figs. 2(a) and 2(b), we can find that the image quality is almost the same as that of the original. This proves the feasibility and efficiency of the proposed algorithm CICMPBTC. It can be seen from Figs. 2(c) and 3 that the resulting image quality is still good and acceptable (only with some slightly zigzag edges).We can find slight color difference only in gradually changing image regions (see image "Lenna,"

for example). This is due to the use of fewer bits to requantize the color components which makes more colors being requantized to identical ones. Note that when the image content is randomized, it will introduce less visual color difference in the reconstructed image (see images "pepper" and "jet," for examples).

V. CONCLUSIONS

A new approach to compressing color images has been proposed. The approach is based on the moment- preserving principle and the BTC technique. The proposed method preserves the spatial details in the image content and requires little memory. It has low computational complexity because analytic formulas have been provided for some of the compression steps.

RGB images can be compressed directly without any transformation. The proposed method is simple but produces compression results both high in compression ratios and good in reconstructed image quality. It is applicable not only to the RGB color model but also to any other trichromatic model.

REFERENCES

(4)

E. J. Delp and 0. R. Mitchell, "Image compression using block truncation coding," IEEE Trans. on Commun., vol. COM-27, pp. 1335-1342,1979.

W. K. Pratt, Digit Image Processing, 2nd edition, New York, U. S . A. : Wiley, 1991, Ch. 4, pp. 195- 218.

M. D. Lema and 0. R. Mitchell, "Absolute moment block truncation coding and its application to color images," IEEE Trans. on Commun., vol. COM-32, Yiyan Wu and David C. Coll, "Single bit map block

[71

[81

P I P O I

pp. 1148-1157,1984.

truncation coding for color image," IEEE Trans. on Commun., vol. 10, no. 5 , pp. 952-959, June 1992.

Takio Kurita and Nobuyuki Otsu, "A method of compression," IEEE Trans. on Commun., vol. 35,

block truncation coding for color image [I11

S . T. Liu and W. H. Tsai, "Moment-preserving I121 pp. 352-356, Mar. 1987.

comer detection," Pattern Recognition, vol. 23, No.

5 , pp. 441-460,1990.

Table 1. The comparative MAE values of Algorithms CICMPBTC,

L. H. Chen and W. H. Tsai, "Moment-preserving line detection," Pattern Recognition, vol. 21, pp.

S . C. Cheng and W. H. Tsai, "Image compression using moment-preserving edge detection," Proc. of IEEE Data Compression Conference, Snowbird, Utah, U. S . A., March 1992.

C. K. Yang, C. T. Wu, J. C. Lin, and W. H. Tsai,

"Color image sharpening by moment-preserving technique," submitted.

J. C. Lin and W. H. Tsai, "Feature-preserving clustering of 2D data for two-class problems using analytical formulas," IEEE Trans. on Pattern Analysis and Machine Intelligence, to appear.

W. H. Tsai, "Moment-preserving thresholding,"

Computer Vision, Graphics, and Image Processing, C. K . Yang and W. H. Tsai, "Improving block truncation coding using line and edge information for gray-scale image compression," submitted.

45-53, 1988.

vol. 29, pp. 377-393, 1988.

CICMPBTC-1, CICMPBTC-2, and CICMPBTC-3, resmtively, with color component requantization bit number A.

image CICMPBTC CICMPBTC- 1 CICMPBTC-2 CICMPBTC-3

Lenna 4.05 4.05 4.82 8.75

pepper 4.65 4.65 5.5 1 9.56

jet 3.77 3.77 4.3 1 8.86

house 2.03 2.03 2.17 6.94

Table 2. The compression ratios of Algorithms CICMPBTC, CICMPBTC- 1, CICMPBTC-2, and CICMPBTC-3, respectively, with color component requantization bit number

6

4.

image CICMPBTC CICMPBTC-1 CICMPBTC-2 CICMPBTC-3

Lenna 6.0 6.22 7.38 12.63

pepper 6.0 6.03 6.75 12.24

jet 6.0 8.56 9.60 16.48

house 6.0 7.36 8.48 14.65

average 6.0 7.04 8.05 14.00

Table 3 . The comparative MAE values of Algorithm CICMPBTC-3 with color component requantization bit number

5

= 3 , 4 , 5 , 6 , and 7, respectively.

image 3 bits 4 bits 5 bits 6 bits 7 bits

Lenna 15.75 8.75 5.91 4.99 4.82

pepper 17.30 9.56 6.64 5.74 5.53

jet 15.93 8.86 5.73 4.56 4.4 1

house 15.07 6.94 3.65 2.54 2.18

Table 4. The comparative compression ratios of Algorithm CICMPBTC-3 with color component requantization bit number

6

=3,4,5,6, and 7, respectively.

I

image Lenna 3 bits 15.34 4 bits 12.63 5 10.73 bits 6 9.33 bits 7 bits 8.25

10.58 7.97

I

14.90 12.24 10.39 9.02

20.24 16.48 13.89 12.01

house 17.96 14.65 12.40 10.74 9.48

average 17.1 1 14.00 11.85 10.28 9.07

(5)

Fig. 1 The standard images of (a) "Lenna," (b) "pepper," and (c) "jet1' of size 512x512.

(a) Compression ratio

=

6.22.

(b)

Compression ratio

=

7.38. (c) Compression ratio

=

12.63.

Fig. 2 The coded images of "Lenna," using CICMPBTC-I, CICMPBTC-2, and CICMPBTC-3 (with color component requantization

bit

number 5=4)

in

(a),

(b),

and (c), respectively.

(a) Compression ratio

=

15.34 (b) Compression ratio

=

14.90. (c)Compression ratio

=

20.24.

Fig.

3

The coded images of (a) "Lenna,"

(b)

"pepper," and (c) "jet" using CICMPBTC-3 (with color

component requantization

bit

number 6

=3),

respectively.

數據

Table 4. The comparative  compression  ratios  of  Algorithm CICMPBTC-3  with  color component  requantization  bit  number  6  =3,4,5,6, and 7, respectively
Fig. 2 The coded images of  "Lenna," using CICMPBTC-I, CICMPBTC-2, and CICMPBTC-3 (with  color component requantization  bit  number 5=4)  in  (a),  (b),  and (c), respectively

參考文獻

相關文件

• The  ArrayList class is an example of a  collection class. • Starting with version 5.0, Java has added a  new kind of for loop called a for each

了⼀一個方案,用以尋找滿足 Calabi 方程的空 間,這些空間現在通稱為 Calabi-Yau 空間。.

Real Schur and Hessenberg-triangular forms The doubly shifted QZ algorithm.. Above algorithm is locally

2.1.1 The pre-primary educator must have specialised knowledge about the characteristics of child development before they can be responsive to the needs of children, set

 Promote project learning, mathematical modeling, and problem-based learning to strengthen the ability to integrate and apply knowledge and skills, and make. calculated

This kind of algorithm has also been a powerful tool for solving many other optimization problems, including symmetric cone complementarity problems [15, 16, 20–22], symmetric

Miroslav Fiedler, Praha, Algebraic connectivity of graphs, Czechoslovak Mathematical Journal 23 (98) 1973,

利用 eigenvalue 的 algebraic multiplicity 以 及 geometric multiplicity, 可以幫助我們判別一個 square matrix 是否為