Aperiodic Micro Screen Design using DBS and Training - CiteSeerX

Report 0 Downloads 20 Views
Aperiodic Micro Screen Design using DBS and Training Dhiraj Kacker and Jan P. Allebach Electronic Imaging Systems Laboratory, School of Electrical and Computer Engineering, Purdue University, West Lafayette, IN-47906, USA. fkacker,[email protected]

ABSTRACT

With the advent of high resolution (1200+ dpi) desktop printers, the use of conventional 128128 screens can produce a distinctive periodicity in the printed images. A new method for design of multiple 3232 screens using Direct Binary Search and training is proposed. The screens are seamless with each other; and a small number of these screens are randomly tiled over the entire support of the continuous-tone image. These are then used to threshold the image to create the halftone image. Due to the random tiling of the screens, the resulting halftones do not have any periodicity in them. The resulting screens also have lower memory requirements than 128128 screens. Experimental results also show that the exact ordering of the screens is not crucial to the quality of the nal halftone. Therefore, no additional information about the ordering of the multiple screens needs to be stored. Keywords: Halftone, Screen, DBS, Training, Human Visual System

1. INTRODUCTION

A number of techniques for design of macro screens have been proposed.1{10 They are typically 128128 pixels in size. These have been primarily used in printing of images at resolutions of 300-600 dpi. For images printed at 600 dpi, each screen width/height corresponds to about a fth of an inch and is large enough to avoid the perception of periodicity by repeated application of the same screen. At higher print resolutions (1200+ dpi), a 128128 screen would correspond to less than a tenth of an inch on the printed paper; and at these resolutions, the periodicity caused by repeated applications of the same screen starts to become visible. Therefore, there is a need to design screens that can overcome this inherent drawback in the use of conventional 128128 screens. In this paper, the design of multiple 3232 micro screens is proposed. The screens are randomly tiled over the entire support of the gray scale image to create the halftone. This is illustrated in Fig. 1. By randomly tiling the screens over the image, the periodicity in regions of almost constant tone is removed. The screens so designed must exhibit certain important properties. First, halftones produced by any random tiling of the screens must not show perceptible boundary artifacts. The screens designed must therefore produce halftone textures that are seamless with each other in any order. Secondly, the quality of the halftone produced must as good as that produced by the 128128 screens. The algorithm proposed in this paper has two main steps to it. In the rst step, screens are designed using Direct Binary Search (DBS).11{13 DBS is an iterative algorithm that improves the quality of a given initial halftone by minimizing an error metric, dictated by a Human Visual System (HVS) model, between the halftone and the continuous-tone image. Halftone texture stacks are designed for 3232 constant tone gray scale images. The textures are designed to satisfy the stacking constraint in order to derive screens from them. The screens are designed in concert to prevent boundary artifacts in the halftones created by tiling the screens randomly over the entire support of a continuous-tone image. In the second step, the quality of halftones produced by the screens is improved by training the screens with a database of high resolution images. The screen values are then either changed or swapped if the modi cation in the threshold values reduces the overall error metric, obtained from the HVS used in DBS, between the halftones and the corresponding continuous-tone images in the database. The paper is organized as follows. The design of the screens using DBS is illustrated in the next section. Improving halftone quality by training these screens with a database of images is discussed after that. The paper concludes with results obtained from this approach. Research supported by the Hewlett-Packard Company

Screen #1 Screen #2 Screen #3 Screen #4

(a) Figure 1.

(b)

Four screens randomly tiled; (a) halftone and (b) corresponding screen map. Gray level 1

Gray level 2

Gray level 1

Gray level 2

Gray level 3

Gray level 4

Gray level 3

Gray level 4

(a) Figure 2.

(b)

Halftone stacks for design of a 22 screen; (a) a valid stack, (b) an invalid stack.

2. SCREEN DESIGN USING DBS

A screen is a 2 dimensional array of threshold values used to generate a halftone image from a continuous-tone image. The halftone is created by tiling one or more screens over the continuous-tone image and comparing the gray values with corresponding thresholds of the screen(s). If the gray value at a given location is less than the threshold value, a dot is placed there. Let f [i; j ] be the continuous-tone image and g[i; j ] be the corresponding halftone image obtained by using screens. Assume that K 3232 screens s1 ; : : : ; sK are used to create the halftone by tiling the screens. De ne a screen map m[k; l] as

m[k; l] = 1; 2; : : :; K where [k; l] denotes the index of a screen block (see Fig. 1(b)). Then

qij = m[bi=32c; bj=32c]

Gray level 1

Gray level 2

1

1 2

Gray level 3

Final Screen

Gray level 4

1

Figure 3.

3

1

3

2

4

2

22 screen design using halftone stacks.

provides the index to the screen at the location [i; j ]. The halftone g[i; j ] is therefore given by

g[i; j ] =



0 1

if f [i; j ]<sq [i mod 32; j mod 32] otherwise ij

(1)

where a `0' corresponds to placing a dot at that location.

2.1. Screen Design from Constant Tone Texture Stacks

A screen can be thought of as being formed by a stack of halftones, one halftone for each gray level, which satisfy the stacking property. Let this stack of textures be represented by g[i; j ; x], where [i; j ] are the coordinates and x represents the gray level. Then the stacking property can be stated as If x1 < x2 then g[i; j ; x1 ] = 1 ) g[i; j ; x2] = 1

(2)

Fig. 2 shows two stacks of halftones for a 22 screen, the stacking constraint is met in (a) and not in (b). This stack is created starting from the lowest gray level and going up to the highest gray level by turning o a certain number of dots at each transition. Therefore, the halftone corresponding to the lowest gray level will have all dots turned on and the halftone corresponding to the highest gray level will have all dots turned o . In order to render equally spaced tones of gray in the halftone image, it is necessary to turn o an equal number of dots when going from one gray level to the next in the halftone stack. Therefore, in the design of a 128128 screen for 256 gray 128 = 64 dots have to be turned o from one gray level to the next (actually, as no dots are turned o levels, 128256 at gray level zero, some gray levels will have 65 instead of 64 dots turned o ). For a 3232 screen with 256 gray levels, 4 dots are turned o at each level. The rst location in the stack at which a given dot is turned o decides the threshold value in the screen at the coordinates of that dot. This method is illustrated for a 22 screen in Fig. 3. In the method proposed in this paper, DBS is used to design the stack of halftone textures from which the screens are derived. Given an initial halftone and the corresponding continuous-tone image, DBS explores possible toggles (turning dots on/o ) and swaps between neighboring dots to improve the quality of the halftone. A visually perceived error between the halftone and the continuous-tone image is calculated using a model of the human visual system. A change (toggle/swap) is said to improve the quality of the halftone if it results in a decrease in this error. The HVS is modeled as a linear shift invariant lter. Let h[i; j ] be this linear shift invariant lter, f [i; j ] the continuous-tone image, g[i; j ] the halftone image and e[i; j ] the error at each dot location. Then

e[i; j ] = (f [i; j ] ? g[i; j ])h[i; j ] N X N X = (f [i ? k; j ? l] ? g[i ? k; j ? l])h[k; l] k=?N l=?N

(3)

where h[i; j ] has support from [?N; ?N ] to [N; N ] and `' represents 2-D convolution. The overall perceived error E is then calculated as the sum of the square of these errors, i.e.

E =

X i;j

(e[i; j ])2 :

(4)

The DBS algorithm proceeds as follows. The halftone g is scanned in a raster order. At each dot location, a toggle and swaps with each of the eight neighbors are explored. Therefore, nine changes per dot location are considered. Let g0 1 ; : : : ; g0 9 be the nine new halftones obtained from the toggle and eight swaps (a few of the new halftones might be identical to g as some of the swaps may not result in any change). For each of these new halftones, the visually perceived error, E 0 m ; m = 1; : : : ; 9, is calculated. The corresponding change in error, Em , is given by Em = E 0 m ? E Let, Emin = min m Em and m0 = arg min Em : m

(5) (6)

If Emin < 0, the change corresponding to m0 reduces the visually perceived error by a maximum and hence is accepted by replacing g with gm0 . In this manner, the entire halftone is scanned repeatedly until the number of changes accepted is less than 1% of the number of pixels in the halftone. At rst glance it may appear that in order to calculate the Em 's, (3) will have to be re-computed for each g0 m . It has in fact been shown that the Em 's can be eciently calculated using lookup tables and performing a few additions and multiplications.14 Using this procedure, a 3232 halftone texture is designed for each constant tone value to derive a 3232 screen. Let g[:; :; l]; l = 0; 1; :::; 255 be the 256 textures that need to be designed. In order to force the stacking constraint, textures are designed in increasing order of gray values. The texture corresponding to gray level 0, g[:; :; 0], is an all black (all 0) texture and g[:; :; 255] is an all white (all 1) texture. The texture designed for gray level l is used as the starting point for designing the texture for gray level l + 1. As there is a constraint to only turn dots o (to meet the stacking property), it may not always be possible to nd toggles that would result in a decrease in the perceived error. Therefore dots are turned o at locations that result in a minimum increase in the error. As explained earlier, for a 3232 screen and 256 gray levels, four dots need to be turned o . Once dots have been turned o at these four locations, DBS is run on the texture again to improve its quality. This time though only swaps that do not violate the stacking property are considered as candidate changes, thus preserving both the average tone value and the stacking constraint. Let g[i1; j1 ; l + 1],g[i2; j2 ; l + 1],g[i3; j3 ; l + 1] and g[i4 ; j4 ; l + 1] be the four locations at which the dots are turned on. The algorithm, therefore, is as follows 1. g[:; :; l + 1] = g[:; :; l]. Let m = 1 P +1 8 [i; j ] 2. E = ((fl+1 [i; j ] ? g[i; j ; l + 1])h[i; j ])2 , where fl+1 [i; j ] = l255 i;j

AAAAAAA AAAAAA AAAAAA AAAAAAA AAAAAA AAAAAA AAAAAAA AAAAAA AAAAAAA AAAAAA AAAAAAA AAAAAA AAAAAAA AAAAAA AAAA AAAAA AAAA AAAAA AAAA AAAAA AAAA AAAAA AAAA AAAAA AAAA AAAAA AAAA AAAAA AAAA AAAAA

Halftone Stack

g

k-1

Halftone from previous stack

g

k

Halftone being designed

Assume circular boundaries

Figure 4.

Ensuring continuity at screen boundaries.

3. [im; jm ] = arg min E for toggling o dot [i; j ] [i;j] 4. g[im; jm ; l + 1] = 1 5. m = m + 1, if m4 go to 2 6. For each [im ; jm ] do the following until no swaps are accepted (a) For the eight swaps, calculate Emin and m0 as in (5) and (6). (b) If Emin < 0 accept the swap corresponding to m0 and update [im ; jm ] with the pixel location it was swapped with.

2.2. Multiple Screens and Ensuring Continuous Boundaries

The screens will be randomly tiled over the images and therefore need to produce halftones that do not exhibit any boundary artifacts. In order to facilitate this, the following methodology is adopted. The rst screen is designed using the algorithm explained above. Halftone textures at each gray level of the stack of the second screen are designed with the additional constraint of having the texture at the same gray level from the stack of the rst screen at its boundaries. Let sk ; k = 1; 2; 3; : : : be the screens and gk [:; :; l]; l = 0; 1; :::; 255 be the corresponding halftone stacks. Then g2 [:; :; l] is designed with g1 [:; :; l] at the boundaries. Due to this added constraint, each g2 [:; :; l] is di erent from g1 [:; :; l]. Hence the resulting screen s2 is di erent from s1 . This is illustrated in Fig. 4. As shown, a 22 tiling of the textures is used. Note that by assuming circular boundaries in this tiling, the texture from the rst stack is at all four edges of the texture from the second stack. As a result of this procedure, each g2 [:; :; l] can be tiled with g1 [:; :; l] without the appearance of any boundary artifacts. Hence, the screens derived from the two stacks when tiled randomly on an image, create halftones that do not exhibit any boundary artifacts. In order to design more screens, a number of di erent techniques were tried. These included (a) designing stacks with textures from the rst stack always at the boundaries (g1 [:; :; l] at the boundaries of gk [:; :; k]; k = 2; 3; : : :) (b) partially designing stacks and iterating through all of them so that each stack had almost equal constraints and (c) designing stacks with halftone textures from the previous stack (gk?1 [:; :; l] at the boundary of gk [:; :; l]). Experimental results showed that the last method works the best. The overall strategy is therefore 1. Design the rst screen s1 by designing all g1 [:; :; l] for l = 0; 1; : : :; 255: Let k = 2. 2. Design gk [:; :; l] with gk?1 [:; :; l] at the boundaries for l = 0; 1; :::; 255. Hence derive sk . 3. k = k + 1. Go to 2 if more screens need to be designed.

Visual error metric Continuous tone image database

Apply screens

screen update

Figure 5.

Overall training strategy.

2.3. Tiling Screens

In order to meet the goal of removing periodicity in regions of constant tone, there should ideally be a large number of screens that are randomly tiled over the image. Of course, the larger the number of screens, the more memory is required for storing them and the more dicult it is to ensure that halftones produced by them will tile seamlessly. Therefore, there is a need to nd the minimum number of screens required to break the periodicity. It is also important to note that no single screen should be tiled next to itself in order to avoid small segments that exhibit periodicity. Clearly, two screens would not be sucient as that would lead to a checkerboard pattern in the tiling. Hence the minimum number of screens to be used should be three. The screens are tiled on the continuous-tone image in a raster scan fashion. Consider lling up the screen map m[k; l]. The rst screen is chosen randomly and its index placed at m[0; 0]. The next screen is chosen randomly from the others and its index placed at m[0; 1]. In this manner the rst row is lled, always ensuring that no index is placed next to itself. Similarly, each row is lled up one by one choosing indices di erent from the one immediately above and the one immediately to the left.

3. TRAINING

In this section, the training procedure for improving the quality of the halftones produced by tiling the screens is elucidated. The training is performed on high resolution images as the nal aim is to obtain good halftone quality at high print resolutions. The training procedure is as follows. Let f1 ; : : : ; fM be the images in the database and s1 ; : : : ; sK the K screens. Let g1 ; : : : ; gM be the halftones of the images formed by tiling these screens randomly over the continuous-tone images and e1 ; : : : ; eM the corresponding visually perceived errors. Experimental results showed that two types of changes should be investigated. Increment/decrement the values of the screen by one and/or swap threshold values with neighboring pixels. Any change in the kth screen at location [rk ; sk ] can potentially toggle all pixels [il ; jl ], in the halftone gl ; l = 1; : : : ; M , for which ml [bil =32c; bjl=32c] = k and [il mod 32; jl mod 32] = [rk ; sk ]. Here, ml [:; :] is the screen map of the lth halftone gl . If g^l 's are the new halftones created due to a change in the screen values and e^l 's the corresponding errors, the change in error for each image is given by El =

X i;j

(^el [i; j ])2 ?

X i;j

(el [i; j ])2 :

(7)

Note that El is not calculated directly as in (7), but instead using the ecient update mentioned in Sec. 2.1. The overall change in error is given by E =

M X l=1

El :

(8)

If E is less than zero, then the change in the screen value is accepted, otherwise it is not. The overall training procedure is as follows

1. Create g1 ; : : : ; gM from f1 ; : : : ; fM using a tiling of the screens s1 ; : : : ; sK . 2. Calculate e1; :::; eM using (3). 3. For each each threshold value of every screen, do the following (a) Swap the threshold with each of its eight neighbors and calculate El , l = 1; :::; M , for each swap. (b) Increment/decrement the threshold value and calculate El , l = 1; :::; M , for the increment/decrement. (c) Identify the change corresponding to the minimum E , and let Emin = changes min E .

(d) If Emin < 0 accept the corresponding change, and update each halftone g1 ; : : : ; gM by toggling the dots a ected by the change in the screen value.

4. If the number of total changes to threshold values is above ve, go to 3, otherwise stop. A block diagram of this entire approach is shown in Fig. 5.

4. RESULTS

This section demonstrates results from the use of 3232 micro screens. Results are shown for the design of 4 screens. Three high resolution images, obtained from a Kodak Photo CD, were used in the training. Figure 6 shows low resolution versions of these images. The size of the images used in the training was 20483072. In order to demonstrate the quality of the halftones produced, results are shown for 5761024 blocks of the images printed at 150 dpi. Figures 7 { 11 show halftones obtained with the parrot image. The parrot image was in the training set. Figure 7 is obtained by applying a single 128128 screen and Fig. 8 is obtained by applying a single 3232 screen. Figure 9 is obtained by randomly tiling four 3232 screens designed using only DBS. Figure 10 is obtained by tiling four screens after the training; and Fig. 11 is obtained by tiling the screens in an order di erent from that used in the training. Figures 12 and 13 show halftones obtained with the lighthouse image. The lighthouse image was not in the training set. Figure 12 is a halftone obtained by using a single 128128 screen; and Fig. 13 is obtained by tiling four 3232 screens designed using DBS and training. Some important conclusions can be drawn from the results. 1. The halftone quality for multiple 3232 screens is, in general, comparable to that produced by the 128128 screen with the added advantage of removing periodicity in regions of almost constant tone. 2. As four 3232 screens are used, the memory requirement is only a fourth of that required for a 128128 screen. 3. The exact ordering of the screens is not crucial, as is obvious from Figs. 10 and 11. Hence no additional information about the ordering needs to be stored. 4. Lastly, and most importantly, the quality of the halftone of an image not in the training set is comparable to the quality of the halftone of an image in the training set.

5. CONCLUSION

A new method for design of multiple 3232 screens has been proposed. It has been shown that the quality of the halftones produced by these screens is comparable to that produced by 128128 screens with the added advantage of removing periodicity in printing of images at high resolutions. Also, the memory requirements of these screens is less than that required by the conventional 128128 screens.  For

a more detailed look at the results, please see http://yake.ecn.purdue.edu/~kacker/optscr/

(a)

(b)

Figure 6.

Figure 7.

Images used in the training.

(c)

Parrot image halftoned with a single 128128 screen.

REFERENCES

1. J. P. Allebach and R. N. Stradling, \Computer-aided design of dither signals for binary display of images," Appl. Opt. 18, pp. 2708{2713, August 1979. 2. J. Dalton, \Computer techniques for halftone optimization," in SPSE 42nd Annual Conference Digest, May 1989. Boston, MA. 3. J. Sullivan, L. Ray, and R. Miller, \Design of minimum visual modulation halftone patterns," Trans. System, Man, Cyb. 21, pp. 33{38, January 1991. 4. R. Rolleston and S. J. Cohen, \Halftoning with random correlated noise," J. of Electronic Imaging 1, pp. 209{ 217, April 1992. 5. T. Mitsa and K. J. Parker, \Digital halftoning technique using a blue-noise mask," J. Opt. Soc. Am. A 9, pp. 1920{1929, November 1992.

Figure 8.

Parrot image halftoned with a single 3232 screen.

6. J. Sullivan and L. Ray, \Digital halftoning with correlated minimum visual modulation patterns," U. S. Patent No. 5,214,517 assigned to Eastman Kodak Company, 1993. 7. R. A. Ulichney, \Void-and-cluster method for dither array generation," Human Vision, Visual Processing, and Digital Display IV 1913, pp. 332{343, 1993. 8. Q. Lin, \Screen design for printing," in Proceedings of the 1995 IEEE International Conference on Image Processing, pp. 331{334, October 1995. Washington, DC. 9. J. P. Allebach and Q. Lin, \FM screen design using DBS algorithm," in Proceedings of the 1996 IEEE International Conference on Image Processing, pp. 549{552, September 1996. Lausanne, Switzerland. 10. K. E. Spaulding, R. L. Miller, and J. Schildkraut, \Methods for generating blue-noise dither matrices for digital halftoning," J. Electronic Imaging 6, pp. 208{230, April 1997. 11. M. Analoui and J. P. Allebach, \Model-based halftoning using direct binary search," in Proceedings of SPIE, vol. 1666, pp. 96{108, SPIE, February 1992. San Jose, CA. 12. J. P. Allebach, T. J. Flohr, D. P. Hilgenberg, and C. B. Atkins, \Model-based halftoning via direct binary search," in Proceedings of IS&T's 47th Annual Conference, pp. 476{482, May 1994. Rochester, NY. 13. D. J. Lieberman and J. P. Allebach, \Digital halftoning using the direct binary search algorithm," in Proceedings of the 1996 IS&T International Conference on High Technology, pp. 114{124, September 1996. Chiba, Japan. 14. D. Lieberman and J. P. Allebach, \Ecient model based halftoning using direct binary search," in Proceedings of the 1997 IEEE International Conference on Image Processing, pp. 775{778, October 1997. Santa Barbara, CA.

Figure 9.

Figure 10.

Parrot image halftoned with four 3232 screens designed using only DBS.

Parrot image halftoned with four 3232 screens designed using DBS and training.

Parrot image halftoned with four 3232 screens designed using DBS and training applied in an order di erent from that used in the training.

Figure 11.

Figure 12.

Lighthouse image halftoned with a single 128128 screen.

Lighthouse image halftoned with four 3232 screens designed using DBS and training. The lighthouse image was not a part of the training set.

Figure 13.