Voronoi Tessellated Halftone Masks - Semantic Scholar

Report 1 Downloads 24 Views
Proceedings of 2010 IEEE 17th International Conference on Image Processing

September 26-29, 2010, Hong Kong

VORONOI TESSELLATED HALFTONE MASKS G. J. Garateguy, G. R. Arce

D. L. Lau

University of Delaware Dept. of Electrical and Computer Eng. Newark, DE 19716

University of Kentucky Dept. of Electrical and Computer Eng. Engineering Lexington, KY 40506

ABSTRACT A new algorithm to build blue noise masks using centroidal Voronoi tessellations (CVT) and a variant of Lloyd’s Algorithm is presented. The algorithm takes advantage of the optimality properties of CVTs and through a modified version of Lloyd’s algorithm, achieves optimization of the stacked binary patterns that build the mask. A new ordering for binary pattern design is presented, as well as a new metric that allows the creation of quality profiles of the masks. The masks generated by this method are used to halftone sample images, and quality profiles are created. It is shown that CVT masks outperform masks created by DBS and VaC according to the new metric defined and thorough visual inspection of halftoned images.

(a) Continuous tone

(b) CVT Mask

(c) DBS

(d) VaC

Index Terms— Halftoning, Centroidal Voronoi tessellations, Blue-noise masking, Cell aspect ratio measure 1. INTRODUCTION Blue noise masks are critical in the digital halftoning industry, due to their capacity to produce high quality halftones resembling those created by means of error diffusion [1] but with much lower computational complexity. Halftones are simply obtained by thresholding a continuous tone image on a pixel by pixel basis with fixed value elements of the mask. The design of blue noise masks is thus of great importance in the printing industry. Among the various methods used for mask generation, are void and cluster (VaC) [2] and DBS [3]. VaC has low implementation complexity as it is based on linear filtering of the binary patterns, iteratively breaking clusters by moving one of its minority pixels to the largest void in the array. DBS on the other hand, consists in the minimization of the local mean square error between the perceived halftone and the perceived image and yields the best visual quality at the expense of high computational complexity. The algorithm proposed in this paper, takes advantage of the optimality properties of CVTs [4] for the design of binary patterns while requiring moderate computational power. Although Voronoi Tessellations have been used before for the generation of high quality halftones, those algorithms have a much higher computational complexity than the simple masking technique [5, 6]. The algorithm in [5] for example, consists in the optimization by means of weighted Voronoi diagrams of an initial halftoned image. This method requires a high computational load, since numerical integration is required for the calculation of the centroids of weighted Voronoi cells. The algorithm proposed here in contrast, uses regular Voronoi tessellations to perform a global opti-

978-1-4244-7993-1/10/$26.00 ©2010 IEEE

529

Fig. 1. a) Continuous tone image, halftones obtained by thresholding with b) CVT Mask, c) DBS mask, and d) VaC mask mization of the positions of minority pixels at each step of the mask generation. This technique permits the creation of very good blue noise patterns according to Lau and Ulichney blue noise model [7] yielding high quality blue noise masks (see Figure 1). In the following sections we show that through the use of Voronoi tessellations and a modification of Lloyd’s algorithm, a smooth global optimization of the inter-point distance between minority pixels can be achieved. Using a set of appropriate metrics we also show that the proposed algorithm outperforms VaC and DBS yet it does not considerably increase the computational complexity with respect to VaC. Section 2 starts with a reformulation of the mask generation problem and the stacking constraint for binary patterns. The cell aspect ratio measure rg is introduced to quantify the degree of spatial uniformity of binary patterns and to create a profile of the different gray levels of the mask. In Section 3 the mask generation algorithm is presented and in Section 4 the quality of the masks produced is compared to other methods, using sample halftoned images and metric comparisons. Section 5 concludes with some observations and remarks.

ICIP 2010

2. MASK CONSTRUCTION AND OPTIMALITY CRITERIA Denoting by H[n] the halftoned image, by S[n] the mask and by I[n] the continuous tone image where n = [m, n] are the coordinates of a pixel, the relation between these matrices can be summarized in the following equation  1 if I[m, n] > S[m mod M, n mod N ] (1) H[n] = 0 if I[m, n] ≤ S[m mod M, n mod N ], where M and N are the dimensions of the mask S[n]. The mask takes values in the discrete set {0, 1, .., G − 2} and the image I[m, n] = I[n] which in general have different size than the mask (e.g. MI × NI ) takes values in the set {0, 1, .., G − 1}. The procedure to design a halfone mask is to first design G − 1 binary patterns Ig , corresponding to each of the gray levels g ∈ {1, .., G − 1}, and then stack all the patterns to obtain the mask.  1 , if g > S[n]  I [n], I [n] = (2) S[n] = G−1 g g=0 g 0 , if g ≤ S[n]. In order to recover a particular binary pattern by thresholding the mask with a constant gray level the stacking constraint should be enforced (Ig [n] = 1 if Ig−1 [n] = 1). Also to accurately represent a given gray level, all binary patterns must have a concentration of minority pixels such that E[Ig [n]] = g/(G − 1). Finally, all binary patterns Ig must tile with themselves, end to end, along their edges such that no discontinuity in texture is created across the boundaries. This property is called wrap-around property and is achieved by using an L2 distance that wraps around the pattern. The use of this distance is essential in the calculation of the Voronoi tessellation of a pattern since it eliminates the border effects present when the regular L2 distance is used. Usually the approach to build a mask is to design a set of binary (G−2) patterns {Ii }i=1 in a sequential order i.e. from g = 1 to g = G − 2. In the proposed method, two sets of stacked and non-overlapping (G−2)/2 (G−2)/2 and {Iiw }i=1 are built sequentially. binary patterns {Iib }i=1 The supra index b stands for black since the I b patterns will arise when the mask is thresholded with g > (G − 1)/2 and w stands for white since those patterns will arise for g < (G − 1)/2. The initialization step begins with the patterns I0b and I0w being the all zero patterns, and then patterns in the two sets from i = 1 to i = (G − 2)/2 are created. As the two sets must be non-overlapping, b w and Ig−1 have to be jointly taken into the past binary patterns Ig−1 account for the placement of minority pixels in the present patterns Igb and Igw . This leads to a new set of stacking constraints

if if

Igb [n] = 1

if

b Ig−1 [n] = 1

Igw [n] = 1

if

w Ig−1 [n] = 1.

Igb [n] = 1 Igw [n] = 1

⇒ ⇒

G−2 )1M ×N + B − W, 2

⎪ ⎩

(5)

530

2 √ 1/ 1 − g 

,

for 0 < g  ≤

,

for

,

for

1 4 3 4

< g ≤

1 4 3 4

,

(6)

< g ≤ 1

for the ith cell in the tessellation as the ratio of the distance from the point that generates the cell zg,i to the farthest vertex of the cell (denoted by rmax,i ), over the distance from zg,i to the nearest vertex of a cell (denoted by rmin,i ). Finally the cell aspect ratio metric is defined as the maximum of all the γi ratios from all the cells in the tessellation, i.e. rg = max{γi } for i = 1, ..., K where K is the number of minority pixels in Ig This metric is a good uniformity measure of inter-point distance and as its value approaches one, the mean inter-point distance between neighboring minority pixels approaches λb .

b)

rmin,i

rmin,i

zg,i rmax,i

(4)

√ 1/ g 

with the principal frequency defined as fb = 1/λb and g  = g/(G − 1), g = 0, .., G − 1. Minority pixels have to be distributed in an aperiodic and isotropic manner and the pattern does not have to contain any low frequency spectral components. In [7], Lau and Ulichney pointed out that the concept of principal wavelength as the distance between minority pixels, is a good optimality measure only when g  < 14 or g  > 34 . When 14 < g  < 34 , due to the aliasing effect, some level of clustering must be allowed to avoid artifacts. Therefore in a good blue noise pattern, the mean inter-point distance is expected to deviate from λb in that region. As the main tool to characterize how close a dot pattern is to the ideal blue noise model in the spatial domain, a new measure called the cell aspect ratio metric rg is introduced. The cell aspect ratio metric quantifies the distortion of the Voronoi cells in the Voronoi tessellation with respect to the ideal CVT. Figure 2 depicts examples r is defined of an ideal and a distorted cell. The ratio γi = rmax,i min,i

a)

and the halftone mask is obtained as S=(

λb =

⎧ ⎪ ⎨

(3)

Iiw [n] = 0 for i = g, ..., G−2 2 Iib [n] = 0 for i = g, ..., G−2 . 2

Then the matrices B and W are the defined as   Igb W = (G−2)/2 Igw . B = (G−2)/2 g=1 g=1

where 1M ×N is a matrix of dimension M × N filled with ones. The generation order described above allows the creation of more evenly distributed binary patterns in diametrically opposed gray levels. If a sequential order is used instead, (from g = 1 to g = G − 2) a degradation in the binary pattern quality is appreciated at levels generated at the end of the sequence. The optimality criterion used for the design of binary patterns is the minimization of interpoint distance variance and the blue noise model defined by Lau and Ulichney in [7]. Following [7], a good binary pattern must have an average distance between nearest neighboring minority pixels as close as possible to:

γi =

rmax,i rmin,i

Vi

1

zg,i rmax,i

Vi

γi =

rmax,i rmin,i

Fig. 2. a) distorted cell b) ideal cell

≈1

3. MASK GENERATION The mask generation is based on a variation of Lloyd’s algorithm, and on the ordering defined in the previous section. The key feature introduced in the mentioned algorithm, is a constant μg that controls the amount of distance that each point can move towards the centroid of its cell. Starting from an initial distribution of points K {zg,i }K i=1 the Voronoi tessellation {Vi }i=1 induced by this distribution is calculated. Then the centroids {z∗g,i }K i=1 of each Voronoi cell are computed and the initial set of points {zg,i }K i=1 is updated with zg,i ← μg .(z∗g,i − zg,i ) + zg,i . The procedure is repeated Ngiter times and finally the algorithm returns the set {zg,i }K i=1 . Figure 3e, shows a binary pattern generated according to this procedure using μg = 1 and Ngiter = 50. It can be seen that the pattern generated using Lloyd is superior to the ones generated using VaC or DBS. This is the result of the global optimization approach taken by the new algorithm, whereas VaC and DBS use local optimization algorithms that might not achieve the global minimum in the variance of the interpoint distance [4]. In addition, it is important to note that in the new algorithm, the points are allowed to move in a continuous space at each iteration. Thus a smoother optimization can be performed quantizing the positions of the points at the end of the process. However, in the process of mask generation, the stacking constraint must be taken into account and in that case the quality of the binary patterns obtained using Lloyd is not optimal. When some of the points are fixed due to the stacking constraint, the quality of the subsequent binary patterns strongly depends on the initial binary pattern. As the quality of the whole set of binary patterns rather than a particular binary pattern must be optimized, a joint optimization of the patterns have to be performed. To that end, we use an alternative representation of the set of binary patterns. This representation is tractable and allows a selective optimization of the positions of points depending on the level where they were added to the pattern. The added points at a given binary pattern will be represented by the Kg containing the coordinates of the added minority pixset {zg,i }i=1 els at that level. A binary pattern is represented by the union of the sets of points added in the previous and the present generated pat Kj . Using this representation when the terns as Ig = gj=1 {zj,i }i=1 binary pattern Ig is altered by the modified Lloyd’s algorithm all the previous binary patterns will be altered as well. In order to minimize the distortion of the firsts binary patterns, the set of parameters μg and Ngiter is chosen in such a way that the constant μg decreases as g increases, gradually reducing the amount of optimization in the stacked patterns.

Mask generation algorithm The mask generation algorithm is performed according to the following steps. For g = 1 to (G − 2)/4 b by adding Kg points in available po1. Initialize Igb from Ig−1 sitions (e.g. using VaC).  Kj asso2. Run Lloyd’s algorithm in the set Igb = gj=1 {zbj,i }i=1 b iter ciated with Ig using parameters μg and Ng . 3. Quantize Igb to get Igb . If some of the positions are already occupied move that points to the nearest available positions b w [n] = 0 and Ig−1 [n] = 0). (where Ig−1

531

Fig. 3. Voronoi tessellations of patterns from a) Vac, c) DBS, e) Lloyd and RAPSD of patterns from b) Vac, d) DBS, f) Lloyd w by adding Kg points in available po4. Initialize Igw from Ig−1 b w [n] = 0). sitions (where Ig [n] = 0 and Ig−1  Kj w 5. Run Lloyd’s algorithm in the set Ig = gj=1 {zw j,i }i=1 associated with Igw using parameters μg and Ngiter . 6. Quantize Igw to get Igw . If some of the positions are already occupied move that points to the nearest available positions w [n] = 0). (where Igb [n] = 0 and Ig−1 b w 7. store Ig , Ig

For g = (G − 2)/4 + 1 to (G − 2)/2 b pattern in available posi1. add Kg points to the previous Ig−1 tions to obtain Igb in such a way that the low frequency content of the resulting pattern is minimized (e.g. searching for minimums in a lowpass filtered version of the binary pattern). w pattern in available posi2. add Kg points to the previous Ig−1 w tions to obtain Ig as in step 1.

After the completion of all the binary patterns, the mask is found )1M ×N + B − W were B and W are defined in as S = ( G−2 2 Equation 4. 4. EXPERIMENTAL RESULTS To compare the quality of the proposed algorithm, metric profiles for three different masks (Figure 5) and halftoned sample images (Figure 4) are shown. The masks used in the experiments are of sizes

Fig. 4. Halftoned images using: a) Vac, b) DBS, c) CVT mask and d) error diffusion. The VaC mask shows some artifacts in the middle of the grayscale due to the lack of clustering in that range while CVT and DBS masks avoid the artifacts by allowing a higher level of clustering.

3.4

3.4

3.2

3.2

3

3

2.8

2.8

2.6

2.6

2.4

2.4

2.2

2.2

2

2

1.8

1.8

1.6

1.6

Vac DBS CVT Mask

g

Cell aspect ratio − r

256 × 256 with G = 256 levels. The VaC mask was designed using a Gaussian filter with σ = 1.5 and for the CVT mask the parame2 2 ters selected were μi = e−i /2×4 , N1iter = 50 and Niiter = 2 for i > 1. From Figure 5 the superiority of the CVT mask can be appreciated in the range g < 64 and g > 192 where the Voronoi cells of the CVT mask are much more uniform than the cells in VaC and DBS masks. In the range 64 < g < 192, as explained in Section 2 some level of clustering must be allowed in order to avoid the presence of artifacts and therefore the cell aspect ratio measure does not give good information about the pattern quality. To evaluate the quality of the mask in this region sample halftoned images are shown in Figure 4. The image halftoned with the VaC mask shows some artifacts in the middle of the grayscale. On the other hand the images halftoned with DBS and CVT masks lack of high frequency artifacts but present some amount of clustering with the CVT mask being the one that have less clustering. In addition we also present a halftoned image (see Figure 4d) generated using Floyd and Steinberg error diffusion algorithm [1]. This neighbour process gives better results than any of the masking processes but at the expense of higher computational complexity due to its recursive nature.

1.4 20

40

1.4 60 200 Grey level − g

220

240

Fig. 5. Comparison of the cell aspect ratio measure for different masks.

5. CONCLUSIONS Centroidal Voronoi tessellations are known to be the optimal solutions to the problem of minimizing the interpoint distance of a set of points [4]. The proposed algorithm takes advantage of this property in conjunction with a symmetrical ordering for binary pattern generation. Masks generated using the proposed algorithm are very good in the sense of the blue noise model [7] and under the new metric presented outperforms DBS and VaC. As a final remark if the masks generated are used to halftone images for printing purposes we have to take into account the dot gain of the printer in the design of the mask. To that extent the mask will only need to have a certain level of coverage gc . Using the proposed algorithm the same spatial resolution can be achieved if G−2 binary patterns are created, but in this case having E[Ii ] = gi with 0 < gi < gc for i = 1, ..., (G − 2)/2 and 1 − gc < gi < 1 for i = (G − 2)/2 + 1, ..., (G − 2). 6. REFERENCES [1] R. W. Floyd and L. Steinberg, “An adaptive algorithm for spatial gray-scale,” Proceedings Society Information Display, vol. 17, no. 2, pp. 75–78, 1976.

[2] R. A. Ulichney, “The void-and-cluster method for dither array generation,” in Proc. SPIE, Human Vision, Visual Proc. and Digital Disp. IV, 1993, vol. 1913. [3] M. Analoui and J. P. Allebach, “Model based halftoning using direct binary search,” in Proc. SPIE, Human Vision, Visual Proc., Digital Disp. III, August 1992, vol. 1666. [4] V. Faber Q. Du and M. Gunzburger, “Centroidal voronoi tessellations: Applications and algorithms,” SIAM Review, vol. 41, no. 4, pp. 637–676, 1999. [5] Adrian Secord, “Weighted voronoi stippling,” Proc. of the 2nd int. symp. on Non-photorealistic animation and rendering, pp. 37–43, 2002. [6] C. Van Overveld T. Strothotte O. Deussen, S. Hiller, “Floating points: a mehtod for computing stipple drawings,” Computer Graphics Forum 19, , no. 3, August 2000. [7] D. L. Lau and R. Ulichney, “Blue-noise halftoning for hexagonal grids,” IEEE Trans. on Image Proc., vol. 15, no. 5, pp. 1270 – 1284, May 2006.

532