You are on page 1of 6

2612

IEEE TRANSACTIONS ON COMMUNICATIONS, VOL. 43, NO. 11, NOVEMBER 1995

A High-Quality Fixed-Length Compression Scheme for Color Images


Panos Nasiopoulos and Rabab K. Ward

Abstruct- We present a new compression method which compresses 8 x 8 picture blocks by fixed-length codewords. The compression operation is performed on the discrete cosine transforms, DCT, of each block. As a result, our method combines the distinct advantage of being fixed-length with the high image quality obtained by the DCT based compression methods. Our method has excellent error-resistancecharacteristics since it does not have the synchronization and error propagation problems inherent in variable-length coding methods.

I.

INTRODUCTION

ANY RECENT applications in image compression involve transform-based coding techniques [ 11-[51. In Fig. 1. Imagc obtained by applying AMBTC on 4 x 4 DCT coefficients. specific, the discrete cosine transform (DCT) has become the most popular and is used in the Joint Photographic Experts fixed length and yields image quality comparable to that of Group (JPEG) compression method, the Consultive Committee the DCT based coding method% We present a novel fixedon International Telephony and Telegraphy (CCITT) method length coding method which partitions the DCT coefficients and the different versions of the Moving Picture Experts Group of 8 x 8 pixel blocks of color images into groups. Each group (MPEG) compression methods [l], [3]-[5]. This is because is then encoded by fixed length codewords. In Section VI, we the DCT-based encoders result in relatively large compression compare our method with AMBTC and JPEG. rates and high quality reconstructed images [2]. To obtain a. A FIXED LENGTH CODING OF FREQUENCY COEFFICIENTS high compression rates, variable-length coding (VLC) is used Our compression method compresses the DCT coefficients to encode a weighted version of the transform coefficients. In variable-length coding, different blocks of the picture are using some principles from the absolute moment block trunencoded by blocks of data of different lengths. Thus, if an cation coding (AMBTC). In its original form, AMBTC is error in the data stream representing the compressed picture applied on 4 x 4 pixel blocks of the picture and not on is undetected, the effects of this error propagate throughout its transform coefficients [6]. AMBTC encodes each 4 x 4 the rest of the data bits. This necessitates the use of special pixel block by a two-level quantizer which preserves the synchronization schemes in conjunction with the error detec- blocks mean and absolute central moment. The DCT-based tion and correction codes [l], [3], [7]. Another disadvantage compression schemes such as JPEG, CCITT and MPEG, of VLC is the need for a rate buffer to control the channel rate. encode the DCT coefficients of 8 x 8 pixel blocks of the On the other hand, fixed-length compression methods such picture [ 11-[5]. Applying AMBTC in its known form on these as absolute moment block truncation coding (AMBTC), have DCT coefficients does not result in a favorable compression no synchronization problems [6]. Every block of the picture is ratio; more seriously such direct application results in degraded encoded by a fixed number of bits and, thus, the compression decompressed pictures as shown in Fig. 1. This is irrespective rates of AMBTC are the same for all images. This leads to of whether the block truncation scheme is applied on 4 x 4 DCT easy implementation and a variety of applications. Another coefficient blocks or different block sizes of the coefficients. The problem of compressing the DCT coefficients using important advantage of the fixed length coding methods is their application in VTR and VCR coding techniques. These the block adaptive quantization principles of AMBTC is twoapplications require a fixed number of bits assigned to each folds. The first is how to partition the 8 x 8 DCT coefficients image due to various constraints present in the tape recording into groups so that each group may be compressed using this technology. The drawback of AMBTC, however, is that the adaptive quantization principle. This is discussed in Section quality of the reconstructed images is inferior to that of the III. The second fold addresses how to use AMBTC to compress a group of DCT coefficients. This is discussed below. transform-based methods. One important difference between the values of the DCT The aim of this study is to develop a fixed-length compression method which has the distinct advantage of being coefficients and the grey levels of a block of a picture is that the values of the DCT coefficients assume positive, negative Paper approved by B. G. Haskell, the Editor for Image Communications Systems of the IEEE Communications Society. Manuscript received July 13, and zero values, whereas the pictures grey levels assume 1993; revised March 24, 1994. This work was supported by the National positive and zero values only. If the decoder changes the Sciences and Engineering Research Council of Canada under Grant 5-81758. sign of a DCT coefficient from positive to negative or vice The authors are with the Department of Electrical Engineering, University versa, then the quality of the decompressed picture is affected of British Columbia, Vancouver, B.C. V6T 124, Canada. IEEE Log Number 9414695. unfavorably. This is because the sign of the DCT coefficients
0090-6778/95$04.00 0 1995 IEEE

IEEE TRANSACTIONS ON COMMUNICATIONS, VOL. 43, NO. 11, NOVEMBER 1995

2673

acOl
LUMINANCE

?05

ac

06

16

CHROMINANCE

Fig. 3. Zig-zag sequence of quantized DCT coefficients.

SUPERBLOCK
CHROMINANCE

V
I I

Fig. 2. Compression of a 3 x (32 x 16) color image area into a 40 x 16 superblock.

carries important information about direction of change of intensities. Using block truncal ion coding, it is then necessary to encode the positive and negative coefficients separately. It is also desired to encode the zero coefficients separately and not include them with the positive or negative groups. This is because the numLber of zero coefficients for an 8 x 8 DCT block is large and usually coristitutes up to 50% or more of the total number of coefficients. Consider a sequence of m DCT coefficients that consists of p positive coefficients, n negative and m - ( p n) zero coefficients. Let xp, be a positive coefficient. Then the sample mean is given by

zp = - p p s , 0 XP$ >
p
i=l

l P

(1)

and the sample first absolute central moment by


yp

=-

l P

lxp,- zpI, xp,> 0.

(2)

than its corresponding mean. We also need to identify if the pixels value is zero. This leads to a five-level quantizer for each block (and not a two-level quantizer as in AMBTC). Each pixel thus needs a 3 b identifier to identify which of the five levels the pixel belongs to. To reduce the amount of information to be transmitted, we categorize one of the positive or negative groups as more important or dominant in some sense. Then we compress the dominant group as in AMBTC, i.e., using a two-level quantizer. The nondominant group shall also be represented by a two-level quantizer, however the value of one of the levels, the level with the smaller absolute magnitude, shall be replaced by zero. To categorize one of the positive or negative groups of coefficients as dominant, we base our classification on the extent of the spread in the values of the coefficients of the same group and the number of coefficients in each group. A reasonable measure of the extent of the spread is the sample first absolute central moment, 5, or 6,. If the value of this absolute central moment for the positive coefficients, tip, is greater than that of the negative coefficients, d,, then we declare the positive group to be dominant and vice versa. In the case that the central moments of both groups are equal (which is not a rare case), then the total number of positive and total number of negative coefficients are used to determine which of the two groups is the dominant one. 111. APPLICATION OUR DCT FIXED OF LENGTH CODING ON COLOR IMAGES

p i=l

Encoding the p coefficients by AMBTC at the receiver, the two-level quantizer values arc

In this section, we describe a scheme for partitioning the DCT coefficients of an 8 x 8 pixel region into different blocks (3) which are then efficiently compressed by our method. The chrominance signals (the U and V components) are sampled at lower spatial resolution than the Y (luminance) signal as where -yP = and q is the number of pixels greater than shown in Fig. 2. This scheme is the same as that used by the or equal to zP. DigiCipher proposal [3]. The DCT is applied on each 8 x 8 Let x , ~ a negative coeff cient, i.e., xnz < 0. Then it can be pixel block and the resulting coefficients are then quantized be shown that for the negathre coefficients the two negative by a set of nonuniform weights [3], [4]. Lower compression quantization levels are given by rates are obtained by dividing the quantization weights prior to their application on the DCT coefficients by a factor greater b, = x - , ^In for x , 5 zn , 4 than 1. This factor is called the quality factor. Following the (4) Yn application of the quantization weights and the quality factor, a, = zn -for xni > 5 . , n - 11 the coefficients are reordered into a one-dimensional array by From (3) and (4) we notice that to reconstruct each pixel reading out the entries of the two dimensional array along a we need to know whether xI% or x ; is greater than or less zigzag sequence as shown in Fig. 3. ,

P --

__ x p + 7 TP
-

for xp, 2 zp

2674

IEEE TRANSACTIONS ON COMMUNICATIONS, VOL. 43, NO. 11, NOVEMBER 1995

Fig. 4. Parhtioned onginal luminance 8 x 8 block of DCT coefficients into five regions.

Fig. 5. Partitioned onginal chromnance 8 x 8 block of DCT coefficients into three regions.

Let us first consider partitioning the luminance signal Y . In order to efficiently implement our fixed length compression method, we partition the total number of coefficients into fiv'e regions as shown in Fig. 4. Region 1 is composed of the dc coefficient plus the two ac coefficients with the smallest frequencies. Because of their relatively large significance, we do not use our method to compress the coefficients of this region. Instead, the quantized values of these coefficients are represented by 8 and 7 b, respectively, when the quality factor is equal to 3. Regions 2, 3 and 4 are each encoded using our fixed compression method described in the section above. The rationale behind this block partitioning is that the absolute values of the coefficients nearest to region 1 are expected to be relatively larger than the ones further and thus are more important and should be compressed with relatively Iess expected errors. Assume that AMBTC is to be applied on a group of p positive coefficients X I , 2 , . . . ,xp. The question is: what 2 should the relative values of the coefficients 2 1 , 2 2 , . . . ,xp be, so that after compression and decompression by AMBTC, the coefficients with large values are preserved better than the others? It can be shown that to preserve the positive coefficients whose values are greater than the mean ZCp = E:='=, ( xz), these coefficients should be all equal (Appendix A). Further-

Since it is desired to preserve or reproduce the coefficients nearest to region 1 with least errors, we shall choose region 2 so that its coefficients are expected to follow 1) or 2) above. Thus, we choose region 2 to be composed of two coefficients ac03 and ac04 which are adjacent to region 1 (Le., are relatively large in magnitude) and the other seven coefficients are far from region 1 (i.e., are expected to be relatively small in magnitude). Therefore, a c 0 3 and a c o 4 are expected to be better preserved by AMBTC because of the following. and If a ~ o 3 ac04 have opposite signs then one will belong to the dominant group and the other to the nondominant group. In this case, it is straight forward to show that each term will be exactly reproduced if the absolute value of that term is large enough with respect to the other coefficients with the same sign in region 2. This is usually the case, since the other coefficients being much further from the DC term are expected to be much smaller in magnitude. If both terms ac03 and a c 0 4 happened to have the same sign, then it is most likely that they belong to the dominant group and the error in the reproduction of each coefficient is (ac03~ac04)z. The same reasoning behind choosing the composition of region 2 applies to designing the different boundaries of region 3. Region 4 is then formed of the coefficients lying in between the high and low frequencies of regions 2 and 3. Finally, region 5 contains the highest frequencies of the more, block. This region is chosen so that when the quality factor 1) if one coefficient only is greater than Z P , then AMBTC is equal to 3 or less, all of the resulting weighted coefficients preserves this coefficient exactly; are expected to have zero values and, thus, no encoding of 2) if only two coefficients are greater than the mean, then this region is necessary. If the value of the quality factor is the closer the values of these coefficients are to each greater than 3, some of the coefficients of region 5 may not other, the smaller is the error in their reproduction. If be zeros. In this case, we only preserve the two coefficients these two coefficients are equal in value, then they are with the largest absolute values in the dominant group. All the reproduced exactly; other coefficients are encoded so as to have zero values. The 3) the same as in 2) applies for k coefficients. positions of the two largest coefficients are also encoded. Similar results to the above apply for n negative coefficients The partitioning of the chrominance DCT block differs from X I , 2 , . . . ,x,, except that the coefficients to be reproduced that of the luminance one and involves only 3 regions as shown 2 , with less error are required to be smaller than the average z. in Fig. 5. The quantized values of the first two coefficients are

IEEE TRANSACTIONS ON COMMUNC~LTIONS, VOL. 43, NO. 11, NOVEMBER 1995

2615

Fig. 6. Image obtained by using our nethod (RMSE = 4.76).

Fig. 9. Difference image of Fig. 6 (our method).

Fig. 7. Image obtained by using AMBTC (Rh4SE = 6 8 ) .8.

Fig. 10. Difference image of Fig. 7 (AMBTC).

Fig. 8. Image obtained byJFEG (REASE = 3.90).

Fig. 11. Difference image of Fig. 8 (JPEG)

represented by 9 and 7 b, respectively, while the coefficients of region 2 are compressed by our fixed-length coding method as described in the previous scction (Appendix B). Region 3 is similar to region 5 of the luminance coefficients, except that we here always transmit the two coefficients with the largest absolute values in the dominant group, regardless of the value of the quality factor. The numbers of bits used to represent the different coefficients and their locations when the quality factor is equal to 3 are shown in Appendix B.
IV. RESULTS We now compare our FLC method with the other fixedlength compression method, the Absolute Moment Block Truncation Coding (AMBTC) (Figs. 6 and 7, respectively). The root mean square error (RMSE) for the luminance component ( Y )of the image obtained by FLC is 4.76 while that of AMBTC is 6.88. Because the RMSE is not an especially

accurate measure of visual quality, and since the improvement in the picture quality is not as obvious from Figs. 6 and 7 as from the large screen, we include the difference images. These show the loss of information and the degradation incurred in the edges in the picture. Actually, the quality of the pictures obtained by our fixed-length coding scheme is extremely close to that of the variable-length JPEG encoding scheme. Fig. 8 shows the image of Lena obtained by JPEG. The compression rate for this image is 11.11 : 1 and the RMSE is 3.90. Better compression rates can be obtained by JPEG but at some loss of image quality. Figs. 9-11 show difference images for Figs. 6-8, respectively.
Figs. 12 and 13 show the decompressed images of an old

city obtained by our FLC method and AMBTC, respectively. The RMSE for the image obtained by our method is 5.92, significantly smaller than the 7.35 for the image obtained by AMBTC (Table I). Figs. 14 and 15 show difference images for Figs. 12 and 13, respectively.

2676

IEEE TRANSACTIONS ON COMMUNICATIONS, VOL. 43, NO. 11, NOVEMBER 1995

Fig. 12. Image obtained by using our method (RMSE = 5.92).

Fig. 14. Difference image of Fig. 12 (our method).

Fig 13. Image obtained by using AMBTC (RMSE = 7.35).

Fig. 15. Difference image of Fig. 13 (AMBTC)

RMSE

AND

TABLE I COMPRESSION FOR FLC AND AMBTC RATES

We show how to segment the DCT coefficients of an 8 x 8 block into regions and how to encode the coefficients of each region so that high-quality pictures and high compression rates are obtained. We then compare our method with AMBTC, the other known fixed-length coding method and we show that our method gives superior pictures and better compression ratio.

We observe that the edges of the images obtained by AMBTC are noisy and have a ragged appearance. On the other hand, the images obtained by our method are almost perfectly preserved. The compression rate obtained by our method is 11.11 : 1 when the quality factor is equal to 3 and becomes larger as the quality factor is decreased, while the AMBTC compression rate is 9.14 : 1. If the mean and the first absolute central moment of the AMBTC blocks are represented by 6 and 4 b, respectively [6] then the compression rate of AMBTC is driven to 11 : 1 but at further loss in the quality of the decompressed picture. Thus, our method retains the fixed length encoding advantage of AMBTC but gives considerably better quality pictures than AMBTC.
V. CONCLUSION

APPENDIX A
Assume there are p coefficients to be quantized by AMBTC. To achieve our objective let us denote the coefficients with values greater than or equal to the mean value by and the coefficients with values xp by Z L , Z L ~Z, L ~. . . , ZL, smaller than the mean by xsl, x s 2 ,. . . ,XS, . Obviously, r q = p . To preserve XL, we need to minimize (b, - Z L , ) ~ , i.e., =(bp ; L ) ~= 0. Substituting (3) in the above equation a X we obmn
~

dL2

(5)

or
rr

-az,
2q

1 + -rx,
2q

-C

x s z - xL,

This paper describes a fixed-length color-image compression method. Our method combines the distinct advantage of being fixed-length and at the same time retains the high image quality of DCT-based coding methods. Fixed-length encoding schemes are simpler to implement than variablelength ones and are not susceptible to the error propagation and synchronization problem inherent in the variable-length coding methods.

1;

2q

- 1J = 0.

(6)

Substituting obtain

E,s z X
4

p z , - E, L , in (6) we eventually z
(7)

IEEE TRANSACTIONS ON COMMUNICATIONS, VOL. 43, NO. 11, NOVEMBER 1995

2611

Region1

dc: Y N V
819 bits

acl: YNV
717 bits

ac2: Y
7 bits

Y Regions
2,3,,4

mean of dominant group


4 bits
3 bits

llarge level of non-dominant1


4 bits
3 bits

a! of dominant group 6 bits

UV -Region 2

5 bits
location of 1st coefficient
5 bits

Y Region 5 If GI > 3.0 & UV Region 3

coefficients of dominant group 3+1 (sign) bits

location of 1st coefficient

4 bits
-

If Le., E, xL, ~is chosen to satisfy-this equation, shownXL, be Z L then the error in (b, , XL,) can be to

the error in z~~ is { $ [ z L ~ x L z ~ L 3to z ~ the smaller ~ , . , in the error in Z L ~ In general, the closer X L ~ x h 2 , and X L ~ value to each other the smaller the error in representing each.

If

(xL2ixL3)]}2. Thus the closer

X L ~

X L ~

X L ~ ,then

APPENDIX B
Let us consider the following cases. , 1) When only one coefficient is greater than Z i.e., q = 1, then 1(7) is always satisfied. Therefore, if only one term is greater than or equal to the mean value then the error in its vector quantization is zero and the term is reproduced exactly. and X L ~ greater are 2 ) When only two coefficients X L ~ than Z Le., q = 2, (7) is satisfied when z~~ = ,, X L l +LZ which is true only when XL, = X L ~ In this . and X L ~ equal to is case, the error in quantizing X L ~ zero. If 3 ; does not satisfy the above equation, then ~ ~ X the error in iquantization is [ ] + L -xL 2 for each XL, and X L ~ .Thus, the closer X L ~ and ~ 1 in value the ; ~ smaller the error in representing each one of them. , only greater 3) When q = 3 we have X L ~ xhZ and X L ~ than xp. If z ~ ,= xhZ = X L ~ ,then the error in quantization is zero for each of X L ~ X L ~ X L ~ . , and Appendix B is shown at the top of this page.
REFERENCES Advanced Digital Television-System Description, submitted to Working Party 1 by David Sarnoff Research Center and Philips Laboratories, Jan. 20, 1992, K. B. Benson and D. G. Fink, HDTV, Advanced Televisionf o r the 1990s. New York McGraw-Hill, 1991. DigiCipherTM HDTV System Description, submitted to Working Party 1 by General Instrument Corporation on behalf of the American Television Alliance, Aug. 22, 1991. Digital compression and coding of continuous-tonestill images, Part I, Requirements and Guidelines ISODEC DIS Draft Int. Standard 10918-1, Oct. 1991. R. K. Jurgen, Digital video, IEEE Spectrum, vol. 29, no. 3, pp. 24-30, Mar. 1992. M. D. Lema and 0. R. Mitchell, Absolute moment block truncation coding and its application to color images, IEEE Trans. Commun., vol. COM-32, pp. 1148-1157, Oct. 1984. K. M. Rose and A. Heiman, Enhancement of one-dimensionalvariablelength DPCM images corrupted by transmission errors, IEEE Trans. Commun., vol. 37, pp. 373-379, Apr. 1989.

You might also like