LOSSY COMPRESSION OF STOCHASTIC HALFTONES WITH JBIG2

Magesh Val liappan and Brian L. Evans Dave A. D. Tompkins and Faouzi Kossentini

Dept. of Electrical and Computer Eng. Dept. of Electrical and Computer Eng.

The UniversityofTexas at Austin University of British Columbia

Austin, TX 78712-1084 USA Vancouver, B.C. V6T 1Z4 Canada

fmagesh,b [email protected] fdavet,[email protected] c.ca

ibility for enco der designs. An enco der could segment bi- ABSTRACT

level images into text, halftone, and generic regions, and

The JBIG2 standard supp orts lossless and lossy co ding mo d-

enco de each region separately [3, 4]. For halftone regions,

els for text, halftone, and generic regions in bi-level im-

JBIG2 supp orts very high rates. This

ages. For the JBIG2 lossy halftone compression mo de,

pap er develops a new high-quali ty lossy JBIG2 enco ding

halftones are descreened b efore enco ding. Previous JBIG2

metho d tailored for sto chastic halftones. We develop visual

descreening implementations pro duce high-quali ty images

quality measures, whichwe use for rate-distortion tradeo s.

for clustered dot halftones at high compression rates but

Weachieve an additional 35 compression over the b est re-

signi cantly degrade the image quality for sto chastic half-

p orted metho d [5]. We implement the metho d in the JBIG2

tones, even at muchlower rates. In this pap er, we develop

co dec available at http://spmg.ece.ubc.ca/jbig2.

1 a exible, computational ly ecient, JBIG2-compliant

metho d for compressing sto chastic halftones that reduces

2. BACKGROUND

noise, artifacts, and blurring; 2 quality measures for lin-

ear and nonlinear distortion in compressed halftones; and

JBIG2 uses a form of vector quantization for compressing

3 rate-distortion tradeo s for the enco der parameters.

halftones. First, the enco der descreens inverse halftone

the bi-level image into a grayscale image with reduced spa-

1. INTRODUCTION

tial resolution. Gray levels serve as indices into a halftone

pattern dictionary, whichischosen by the enco der. Then,

Digital halftoning converts a continuous-tone image into a

the enco der enco des the halftone pattern dictionary and

bi-level image halftone for printing and display on binary

grayscale image bitplanes losslessly using the generic mo de

devices. Bi-level images consist of a single rectangular bit

of op eration, and cho oses the orientation for the halftoning

plane. Pixels are either assigned black or white to create

grid. The deco der rst deco des the bitplanes to construct

an illusio n of continuous shades of gray.

the grayscale image and then constructs the bi-level im-

Halftoning by ordered dithering thresholds a grayscale

age by placing the dictionary patterns corresp onding to the

image by using a p erio dic mask of threshold values. In

grayscale values at their appropriate p ositions and orienta-

clustered dot ordered dithering, black dots are clustered

tions. Thus, the spatial resolution and numb er of gray levels

in large blobs. Since clustered dot halftones are resistant

directly a ect the quality and compression ratio. Perceptu-

to ink spread, they are the most common among printed

ally is achieved by preserving the lo cal

halftones. Sto chastic halftoning varies the thresholding ac-

average gray level but not the bi-level image itself.

cording to lo cal statistics in the image in order to shap e

One descreening metho d [5] maps each non-overlappin g

the quantization noise into the high frequencies where the

M  M window of halftone pixels to one grayscale pixel

human visual system is less sensitive. Sto chastic halfton-

value that is equal to the numb er of black pixels in the

ing requires more computation and generally yields b etter

halftone window. For non-angled grids, this metho d yields

2

visual quality than ordered dithering [1].

M + 1 gray levels. For angled grids, a mask is used with

Current fax machines only supp ort one lossless com-

the window so that adjacent patterns do not overlap, and

2

pression mo de that has b een optimized for textual data [2]

the numberofgray levels is area of the mask +1  M +1.

and causes data expansion when applied to halftones. The

This metho d is conceptually and computationall y simple,

Joint Bi-Level Exp erts Group JBIG is a sub committee of

and works well for ordered dithered halftones. When this

b oth the ISO/IEC and the ITU-T that is developing a sec-

metho d is applied to sto chastic halftones, the grayscale im-

ond international standard for bi-level

age su ers from noise, blur, and artifacts, which degrade

for use in printers, fax machines, scanners, and do cument

the reconstructed halftone quality[5].

storage and archiving. JBIG2 adds lossy compression and

For sto chastic halftones, inverse halftoning metho ds in

supp orts several di erent co ding mo dels for text, halftone

descending order of quality are set theoretic [10], nonlinear

and generic regions. JBIG2 should b e nalized in Fall 1999.

denoising [7], adaptive smo othing [6], overcomplete

JBIG2 sp eci es the bit stream syntax, which places

expansion [8], wavelet denoising [9], pro jection onto convex

strict requirements on deco der designs but leaves much ex-

sets [11], and vector quantization [12]. The inverse halftones

have the same spatial resolution as the halftone but with

M. Valliappan and B. Evans were supp orted by a US Na-

6{8 bits of precision p er pixel. For higher compression,

tional Science Foundation CAREER Award under grant MIP-

a JBIG2 enco der would create a grayscale image at lower

9701707. D. Tompkins and F. Kossentini were supp orted by the

spatial resolution and fewer gray levels. Natural Sciences and Engineering Research Council of Canada.

3. PROPOSED ENCODING METHOD 4. QUALITY METRICS

We develop quality metrics to evaluate the p erformance

The prop osed enco der in Fig. 1 takes a sto chastic halftone

of the prop osed enco ding metho d. The prop osed enco d-

as input and generates a JBIG2-compliant bitstream as out-

ing metho d attempts to preserve the useful information

put. The free parameters are grid size and orientation, num-

present in the sto chastic halftone while discarding as much

b er of quantization levels, and sharp ening control.

noise and distortion as p ossible. So, we compare the input

The pre lter should suppress high-frequency noise, spu-

halftone with the original grayscale image.

rious tones, and Nyquist frequencies in sto chastic halftones,

Signal to noise ratios SNRs assume that the only source

and it should have a at passband resp onse to minimize

of degradation in a pro cessed signal is additive noise. Com-

distortion [13]. To meet these criteria while maintaining

pression and halftoning also intro duce linear and nonlinear

computational simplicity,we design a symmetric 3  3 -

distortion. Because the human visual system resp onds in-

nite impulse resp onse lter with p ower-of-two co ecients

" 

1 2 1 dep endently to linear distortion and noise, we develop a

[13]: 2 4 2 . The pre lter pro duces a grayscale image quality measure for each e ect [13 , 18]. We quantify the

1 2 1 linear distortion by constructing a minimum mean squared

at the same spatial resolution as the halftone.

error Weiner lter so that the residual image is uncorre-

The decimator consists of a lowpass anti-aliasing lter

lated with the input image. The residual image represents

followed bydownsampling by M in each dimension. The

the nonlinear distortion plus additive indep endent noise.

lter sums the pixel intensities within the pattern mask.

To quantify the e ect of nonlinear distortion and noise

For unangled grids, this corresp onds to a cuto frequency

on quality,we sp ectrally weight the residual by a contrast



of in each dimension. This pro cess is very similar to

sensitivity function CSF. A CSF is a linear approximation

M

[5] except that the mask and the window are applied to

of the human visual system resp onse to a sine waveofa

the ltered grayscale values instead of the bi-level image

single frequency [13, 18]. A lowpass CSF assumes that the

and that the numb er of resulting gray levels is signi cantl y

observer do es not fo cus on one p oint in the image but freely

higher. In our implementation , we combine the pre lter

moves the eyes around the image. We form a weighted SNR

and the anti-aliasin g lter. Since the input would b e a bi-

P P

2

jX u; v C u; v j

level image, we replace multiplicati ons with additions. For

u v

P P

WSNR = 10 log

10

2

a33 smo othing lter and a window size of M  M ,we

jD u; v C u; v j

u v

2

need at most M +2 additions for each grayscale value.

2

The quantizer uses N gray levels N  M + 1. Con-

where C u; v isalowpass CSF, and X u; v  and D u; v 

ventional quantization with 32 or fewer levels M  5

are the Fourier transforms of windowed original and residual

would create false contours [14]. Toavoid contouring, we

images, resp ectively. A higher WSNR means higher quality.

dither the input image using a multi-level version [15 ] of

To prevent WSNRs to b e biased by large DC comp onents,

mo di ed error di usion [16]. Error di usion, whichisa

we initiall y remove the DC comp onent of the images.

typ e of 2-D sigma-delta mo dulation, shap es the quantiza-

To quantify the e ect of linear distortion, we compute

tion noise into the higher frequencies. Mo di ed error dif-

a Linear Distortion Measure

fusion controls the amount of linear distortion by means of

P P

j1 H u; v jjX u; v C u; v j

a sharp ening control parameter L, which requires an extra u v

P P

LDM =

jX u; v C u; v j

addition and multiplicati on p er input pixel. Wecho ose L

u v

to comp ensate for the blurring in the previous stages. To

where H u; v  is the Fourier transform of the Weiner lter

achieve higher compression, we could further quantize the

that mo dels the pro cess. H u; v islowpass, so 1 H u; v 

gray levels with a slight loss in quality. In our implementa-

is highpass. Because of the weighting by X u; v , the LDM

tion, we use a four-tap Floyd-Steinb erg error di usion lter

only measures those frequencies which are present in the

which has dyadic co ecients. It is the smallest error di u-

original image. A higher LDM means lower quality.

sion lter known to pro duce high-quality halftones [13, 17 ].

The size, shap e, and orientation of the patterns directly

5. RESULTS

a ect the reconstructed halftone quality. Halftone patterns

o

oriented at 45 can yield p erceptually b etter results [1]. The

We compress the 512  512 Floyd-Steinb erg error di used

p ossible patterns dep end on the rendering device. We use

halftone of the grayscale image barbara shown in Fig. 2.

metho ds similar to [5] to generate halftone patterns for b oth

Figs. 3{9 show the e ect of the enco ding parameters. Table

angled and non-angled clustered dot masks.

1 gives the compression rates and distortion. The distortion

measures assume a 600 dpi rendering device and a 40 cm

viewing distance. For lossy compression, the enco der uses a y clustered dot halftones [5]. Lossless pattern dictionary generated b PrefilterDecimator Quantizer

Encoder

As shown in Table 1, the existing Group 4 MMR fax

standard expands the original image by 148 whereas the

arithmetic JBIG2 generic MQ lossless co der gives a com-

If the image is enco ded without Symbol pression ratio of 1.73.

Dictionary

a pre lter, then the noise intro duced by sto chastic half-

toning is visible Fig. 3. By pre ltering, we reduce the

Figure 1: Prop osed JBIG2 enco ding metho d for compress-

high-frequency noise and some of the detail Fig. 4. We

ing halftones. Free parameters are pattern grid size M ,

comp ensate for the frequency distortion by adjusting the

numb er of quantization levels N , and sharp ening control L.

sharp ening parameter Fig. 5. The sharp ening parameter

The pre lter would b e applied only for sto chastic halftones.

improves visual quality but decreases the compression ratio

Figure 2: Original halftone of the barbara image. Figure 3: Reconstructed halftone without pre ltering using

a44 grid M = 4 and N = 17 gray levels. Same as [5].

Fig. 4{6. Fig. 6 depicts oversharp ening contrast distor-

tion.

Using a larger grid size and an angled screen can achieve

b etter quality for the same bit rate Figs. 5 and 7. In-

creasing the grid size increases compression Figs. 7 and 8.

Quantizing the descreened image to fewer gray levels further

increases compression Fig. 9. Rate-distortion curves Fig.

10 represent the variation of distortion and compressed im-

age size with resp ect to the grid size and sharp ening control

parameter. For linear distortion, an optimal value of the

sharp ening control parameter exists. Beyond the optimal

value, the reconstructed halftones are oversharp ened and

distortion increases, which increases b oth rate and distor-

tion. WSNR do es not change signi cantly with the sharp-

ening control parameter but changes dramatically with the

grid size. The sharpness control parameter can b e used to

trade o compressed image size for improved quality.

Enco der Parameters Distortion Size

Image L M N LDM WSNR Bytes

Orig. { { { { { { 32768

Figure 4: Reconstructed halftone with a pre lter using a

MMR { { { { { { 81420

4  4 grid M = 4 with all 17 gray levels N = 17.

MQ { { { { { { 18907

o

Fig. 3 { 4 17 0 0.163 15.4 dB 5374

o

Fig. 4 { 4 17 0 0.181 16.5 dB 4356

6. CONCLUSION

o

Fig. 5 0.5 4 17 0 0.091 16.0 dB 5152

o

Fig. 6 1.5 4 17 0 0.292 14.8 dB 6352

Wehave develop ed a JBIG2-compliant metho d for enco d-

o

Fig. 7 0.5 6 19 45 0.116 18.7 dB 4961

ing sto chastic halftones. To descreen the halftone, we pre-

o

Fig. 8 0.5 8 33 45 0.155 15.7 dB 3983

lter, decimate, and quantize. Pre ltering reduces high-

o

Fig. 9 0.5 8 16 45 0.158 14.0 dB 3318

frequency noise, spurious tones, and Nyquist frequencies.

Decimation reduces spatial resolution. Quantization uses

Table 1: Visual quality and size of the JBIG2 bitstream for

mo di ed Floyd-Steinb erg error di usion to shap e the quan-

the barbara image for the enco der parameters: sharp ening

tization error into the higher frequencies and control the

control L, M  M blo ck size, N quantization levels, and

sharpness. We analyze the rate-distortion tradeo s for the

orientation . Section 4 de nes LDM and WSNR. MMR

enco der parameters: orientation of the halftone grid; deci-

and MQ are lossless JBIG2 mo des. MMR is same as the

mation factor which also sp eci es the halftone grid; number

current fax standard. MQ uses arithmetic co ding.

of quantization levels; and sharp ening control. To measure

Figure 5: Reconstructed halftone with pre ltering and Figure 7: Reconstructed halftone with pre ltering and

sharp ening L =0:5 using a 4  4 grid M = 4 with sharp ening L =0:5 using a 6  6 grid M = 6 angled

o

all 17 gray levels N = 17. at 45 with all 19 gray levels N = 19.

Figure 6: Reconstructed halftone with pre ltering and Figure 8: Reconstructed halftone with pre ltering and

sharp ening L =1:5 using a 4  4 grid M = 4 with sharp ening L =0:5 using an 8  8 grid M = 8 angled

o

all 17 gray levels N = 17. at 45 with all 33 graylevels N = 33.

distortion, we develop a quality measure for linear distor-

tion and one for nonlinear distortion and additive noise.

For the same level of distortion, our metho d can achievean

additional 35 compression over the metho d in [5], as seen

by comparing the results Figs. 3 and 8 in Table 1.

7. REFERENCES

[1] R. Ulichney, Digital Halftoning. MIT Press, 1987.

[2] Fascimile Coding Schemes,vol. VI I. Geneva, Switzerland:

CCITT Rec. T.4 T.6, 1984.

[3] K. Denecker, S. Van Assche, and I. Lemahieu, \A fast au-

to correlation based context template selection scheme for

lossless compression of halftone images," Proc. SPIE Color

Imaging Conf.,vol. 3300, pp. pp. 262{272, Jan. 1998.

[4] D. A. D. Tompkins and F. Kossentini, \A fast segmentation

algorithm for bi-level image compression using JBIG2," in

Proc. IEEE Int. Conf. Image Proc., Oct. 1999.

[5] B. Martins and S. Forchhammer, \Halftone co ding with

Figure 9: Reconstructed halftone with pre ltering, sharp- JBIG2," IEEE Trans. Image Proc., to app ear.

ening L=0.5 and quantized to N =16gray levels using

[6] T. D. Kite, N. Damera-Venkata,B.L.Evans, and A. C.

o

an 8  8 grid M = 8 angled at 45 .

Bovik, \A high quality, fast inverse halftoning algorithm for

error di used halftones," in Proc. IEEE Int. Conf. Image

Proc.,vol. 2, pp. 64{8, Oct. 1998. 0.4

8

enkata, T. D. Kite, M. Venkataraman, and [7] N. Damera-V Sharpness Parameter

0.35 L = 0.0

B. L. Evans, \Fast blind inverse halftoning," in Proc. IEEE

7 L = 1.0

Int. Conf. Image Proc.,vol. 2, pp. 71{4, Oct. 1998.

0.3 6

[8] J. Luo, R. de Queiroz, and Z. Fan, \A robust technique for

avelet transform," IEEE

image descreening based on the w 0.25 5

Trans. Signal Proc.,vol. 46, pp. 1179{94, Apr. 1998.

0.2

LDM

[9] Z. Xiong, M. Orchard, and K. Ramachandran, \Inverse half-

toning using ," in Proc. IEEE Int. Conf. Image

0.15

Proc.,vol. 1, pp. 569{72, Sept. 1996.

verse halftoning," Proc. IEEE [10] N. T. Thao, \Set theoretic in 0.1

4

Int. Conf. Image Proc.,vol. 1, pp. 783{6, Oct. 1997.

0.05

3

[11] S. Hein and A. Zakhor, \Halftone to continuous-tone conver-

2

n co ded images," IEEE Trans. Image sion of error-di usio 0

2000 3000 4000 5000 6000 7000 8000 9000 10000 11000

oc.,vol. 4, pp. 208{16, Feb. 1995.

Pr Compressed Image Size (bytes)

a Linear distortion measure

[12] J. Z. C. Lai and J. Y. Yen, \Inverse error-di usion using

ector quantization," IEEE Trans. Image Proc.,

classi ed v 0 ol. 7, pp. 1753{8, Dec. 1998. v 8 Sharpness Parameter L = 0.0

7

Design and Quality Assessment of Forward and [13] T. D. Kite, L = 1.0

5

Inverse Error Di usion Halftoning Algorithms. PhD thesis,

ersityofTexas, Austin, Texas, Aug. 1998.

The Univ 6

t, The Reproduction of Colour.Fountain [14] R. W. G. Hun 10

Press, 1995. 5

WSNR

[15] T. Morita and H. Ochi, \Progressive transmission of contin-

15

uous tone images using multi-level error di usion metho d,"

rans. Comm.,vol. 82-B, pp. 103{11, Jan. 1999.

IEICE T 4

hbach and K. Knox, \Error-di usion algorithm with [16] R. Esc 20

3

edge enhancement," J. Opt. Soc. Am. A,vol. 8, pp. 1844{

2 50, Dec. 1991.

25

yd and L. Steinb erg, \An adaptive algorithm for spa-

[17] R. Flo 2000 3000 4000 5000 6000 7000 8000 9000 10000 11000

yscale," Proc. Soc. Image Display,vol. 17, no. 2,

tial gra Compressed Image Size (bytes)

pp. 75{7, 1976.

b Weighted signal-to-noise ratio

[18] N. Damera-Venkata, T. D. Kite, W. S. Geisler, B. L. Evans,

Figure 10: Rate-distortion curves for the barbara image.

and A. C. Bovik, \Image quality assessment based on a

Each curve is plotted byvarying the sharpness parameter

degradation mo del," IEEE Trans. Image Proc., to app ear.

L 2 [0; 1] for a sp eci c value of M 2f2;3;4;5;6;7;8g.