RC2-filterDesign_s

17
Digital Filter Design Using Fractional-Pixel Sum Henry R. Kang Color Imaging Consultant Rolling Hills Estates, CA. 90274 ABSTRACT A new method for designing digital filters, based on the fractional- pixel sum, was proposed. The formulation of the fractional-pixel sum for producing digital filters was illustrated with examples. Several digital moving-average filters were produced by this method and were applied to inverse bilevel images back to continuous-tone. The method was experimental verified with the ISO-N7 image under three different resolutions. These continuous-tone ISO originals were converted to bilevel by five halftone techniques. Bilevel images were then inverted to continuous-tone by using the filters derived from the fractional-pixel- sum method. Each inverted image was compared with its continuous-tone original with respect to the filter type, image resolution, and halftone technique. Differences in images were assessed by three computational metrics and visual evaluation. The computational metrics were not able to evaluate image quality; the visual observation was a better measure for assessing image quality. Digital filters generated by this method were shown to be effective for inversing halftoned images. At high resolution of 600 dpi, this method produced inverted images with qualities approaching their contone originals. At medium resolution of 300 dpi, the qualities of inverted images were good with greatly reduced edge jaggedness and without blocking. Finally, the advantages and disadvantages of the method were discussed. Keywords: digital filter, inverse halftoning, fractional-pixel sum, sub- pixel, and resolution conversion. 1. INTRODUCTION Digital filters are powerful tools for the digital image processing. They have been used in the image smoothing, scaling, interpolation, zooming, resolution conversion, edge enhancement, pattern recognition, and image restoration. Hence, many mathematical theories and constructs have been employed for designing digital filters such as the discrete Fourier transform, discrete cosine transform, mathematic morphology, 1

Transcript of RC2-filterDesign_s

Page 1: RC2-filterDesign_s

Digital Filter Design Using Fractional-Pixel Sum

Henry R. KangColor Imaging Consultant

Rolling Hills Estates, CA. 90274

ABSTRACT

A new method for designing digital filters, based on the fractional-pixel sum, was proposed. The formulation of the fractional-pixel sum for producing digital filters was illustrated with examples. Several digital moving-average filters were produced by this method and were applied to inverse bilevel images back to continuous-tone. The method was experimental verified with the ISO-N7 image under three different resolutions. These continuous-tone ISO originals were converted to bilevel by five halftone techniques. Bilevel images were then inverted to continuous-tone by using the filters derived from the fractional-pixel-sum method. Each inverted image was compared with its continuous-tone original with respect to the filter type, image resolution, and halftone technique. Differences in images were assessed by three computational metrics and visual evaluation. The computational metrics were not able to evaluate image quality; the visual observation was a better measure for assessing image quality. Digital filters generated by this method were shown to be effective for inversing halftoned images. At high resolution of 600 dpi, this method produced inverted images with qualities approaching their contone originals. At medium resolution of 300 dpi, the qualities of inverted images were good with greatly reduced edge jaggedness and without blocking. Finally, the advantages and disadvantages of the method were discussed.

Keywords: digital filter, inverse halftoning, fractional-pixel sum, sub-pixel, and resolution conversion.

1. INTRODUCTION

Digital filters are powerful tools for the digital image processing. They have been used in the image smoothing, scaling, interpolation, zooming, resolution conversion, edge enhancement, pattern recognition, and image restoration. Hence, many mathematical theories and constructs have been employed for designing digital filters such as the discrete Fourier transform, discrete cosine transform, mathematic morphology, neural network, and wavelet.

The fractional-pixel (fracpix or sub-pixel) technique was originally developed for the resolution conversion and scaling.1,2 The sub-pixel method simultaneously performs the resolution conversion and smoothing of bilevel images. This approach has been modified and expended into the sub-pixel-sum method that utilized the resolution conversion twice for applications to inverse halftoned bilevel images. 3 The sub-pixel-sum had the advantages of partially retaining original image textures and low computational cost. But there were several drawbacks to this inverse halftoning method. One was the blocking or pixelation at low conversion ratios and the other was the phase-dependent outputs (shift-variant).

In this paper, a method for generating digital moving-average filters was proposed that used the sub-pixel sum via resolution conversions. The proposed method produced digital filters for inverting bilevel images that removed the blocking appearance and had no phase-dependent problem.

2. FORMULATION AND CHARACTERISTICS

The sub-pixel-sum method for designing digital filters consists of five steps. First, the source and intermediate window sizes are chosen. The imaginary sub-pixels are then created and the numbers of sub-

1

Page 2: RC2-filterDesign_s

pixels for the source and intermediate pixels are determined. Second, the source image is converted to the intermediate resolution, and source sub-pixels within the boundary of an intermediate pixel of interest are added to give pseudo-gray values for the intermediate pixel. Third, the intermediate resolution is converted back to the source resolution to produce destination pixels. Fourth, the destination pixels are transformed as a linear combination of source pixels, which are then shifted with respect to the center position to produce a set of directional masks. Fifth, selected directional masks within the set are combined to form digital filters.

Fig. 1. The five-step process for producing digital filters.

2.1 Sub-Pixel CreationThe creation of sub-pixels is governed by the sizes of source and intermediate windows, which can be

chosen freely. The ratio of the intermediate window size, WI, to the source window size, WS, is the conversion ratio, Я; for two-dimensional image plane Я = (WI,x/WS,x) (WI,y/WS,y), where subscripts x and y represent the directions of the window.

Next, a whole pixel is divided into many sub-pixels for the source and intermediate pixels. The number of sub-pixels for each source and intermediate pixel is computed by using Equations (1) and (2), respectively. The sub-pixel becomes the smallest element for representing all source and intermediate pixels.

DS,x = WI,x / GCD(WS,x, WI,x), and DS,y = WI,y / GCD(WS,y, WI,y), (1)

DI,x = WS,x / GCD(WS,x, WI,x), and DI,y = WS,y / GCD(WS,y, WI,y), (2)

where DS and DI are the source and intermediate pixel dimensions in the number of sub-pixels, respectively, the subscripts x or y again indicate the directions. GCD is the greatest common denominator between the source window size in the number of the source pixels and the intermediate window size in the number of intermediate pixels. The source and intermediate pixel sizes, AS and AI, in the number of sub-pixels are given in Eqn. (3).

AS = DS,x DS,y , and AI = DI,x DI,y . (3)

2.2 Sub-Pixel SummationUpon determining the numbers of sub-pixels for the source and intermediate pixels, the source

resolution is converted to the intermediate resolution. Equation (4) computes the pseudo-gray value of an intermediate pixel by summing source sub-pixels that are intercepted with the intermediate pixel.

WS,y WS,x

pI(i, j) = Xmn . pS(m, n), (4) m=1 n=1

and Xmn = WS(m, n) WI(i, j),

2

Source window

size

Sub-pixel-sum to create

intermediate pixels

Resolution conversion to intermediate

size

Generate directional masks

by phase shift

Resolution conversion to

source resolution

Sub-pixel-sum to create

destination pixels

Linear combination of directional masks

to form filters

Page 3: RC2-filterDesign_s

where pI is the pseudo-gray value of the intermediate pixel obtained from the resolution conversion where indices i and j indicate the intermediate pixel location with i the row number and j the column number, pS is the source pixel value within the selected window and indices m and n indicate the source pixel location with m the row number and n the column number. The two-dimensional image plane is ordered from top-to-bottom and left-to-right. This pixel ordering is used for all image planes in this paper. Xmn is the intersection area (in the number of sub-pixels) between source pixels and the intermediate pixel of interest.

2.3 Gray-Level GenerationThe third step is to convert intermediate pixels back to the initial resolution by using Eqn. (5), which

is the inverse of Eqn. (4), to generate the destination pixels, pD.

WI,y WI,x

pD(m, n) = Xij . pI(i, j), (5) i=1 j=1

and Xij = WI(i, j) WS(m, n).

Xij is the intersection area (in the number of sub-pixels) between intermediate pixels and the source pixel of interest. Equation (5) further expands the number of discrete levels.

2.4 Directional Masks by Phase ShiftThe destination pixels, pD, are expressed as the linear combination of source pixels, pS, that is

accomplished by substituting Eqn. (4) into Eqn. (5). Now, the phase relation of each pD(m, n) with respect to center position pD(mc, nc) is taken into account, where mc = INT{(WS,y+1)/2}, nc = INT{(WS,x+1)/2}, and “INT” operator takes the integer part of the resulting number, for the 3×3 window mc = INT{(WS,y+1)/2} = 2 and nc = INT{(WS,x+1)/2} = 2. The source pixel positions given in Eqn. (4) are shifted to account for the phase change. The shifting does not limit to the center position, any specified location of the sliding window can be used. The coefficients on the right-hand side of the resulting expression for each destination pixel give the weights of source pixels to form the destination pixel. For each destination pixel, the coefficients provide a directional mask. Figure 2 depicts the basis set of directional masks for the conversion of the 3×3 source window to the 2×2 intermediate window. Not surprisingly, the center position pD(2,2) is the average mask. And, the masks on the opposite and diagonal sides of the center are mirror images.

pD(1,1) pD(1,2) pD(1,3)0 0 0 0 0 0 0 0 00 16 8 8 8 8 8 16 00 8 4 4 4 4 4 8 0

pD(2,1) pD(2,2) pD(2,3)0 8 4 4 4 4 4 8 00 8 4 4 4 4 4 8 00 8 4 4 4 4 4 8 0

pD(3,1) pD(3,2) pD(3,3)0 8 4 4 4 4 4 8 00 16 8 8 8 8 8 16 00 0 0 0 0 0 0 0 0

Fig. 2. The directional masks of the 3-to-2 conversion.

2.5 Filter by Linear Combination of Masks

3

Page 4: RC2-filterDesign_s

The digital filters are built from the basis set of directional masks by selectively combining them. A general expression for the linear combination of masks is given in Eq. (6).

WS,y WS,x

Γ(m,n) = Bmn pD(m, n) , (6) m=1 n=1

where Γ(m,n) is the resulting digital filter, Bmn is the weight of the mask in the filter with a range of [0, 1]. In most applications Bmn is either 0 or 1. The resulting Γ(m,n) is then normalized by dividing with its greatest common denominator of coefficients. And, the complement filter, Ѓ(m,n), is computed as the sum of the largest and smallest elements in the digital filter minus each element.

Ѓ(m,n) = Γt – Γ(m,n). (7.1)

Γt = MAX[Γ(m,n)] + MIN[Γ(m,n)] (7.2)

Figure 3 summarized the process of deriving the moving-average filter of the total-sum and its complement for the 3-to-2 conversion. The total sum is obtained by adding all pD masks in Fig. 2 together. Other selected combinations of directional masks for the 3-to-2 conversion are given in Fig. 4.

Fig. 3. The moving-average filter of the total-sum and its complement for the 3-to-2 conversion.

Total sum

Near neighbors (1,2)+(2,1)+(2,2)

+(2,3)+(3,2)

Diagonal (1,1)+(2,2)

+(3,3)

Horizontal (1,1)+(1,2)

+(1,3)

Vertical (1,1)+(2,1)

+(3,1)4 10 4 1 2 1 2 3 1 0 0 0 0 4 2

10 25 10 2 3 2 3 9 3 4 10 4 0 10 5

4 10 4 1 2 1 1 3 2 2 5 2 0 4 2

Complement of total sum

Complement of near neighbors

Diagonal (1,3)+(2,2)

+(3,1)

Horizontal (2,1)+(2,2)

+(2,3)

Vertical (1,2)+(2,2)

+(3,2)25 19 25 3 2 3 1 3 2 2 5 2 2 2 2

19 4 19 2 1 2 3 9 3 2 5 2 5 5 5

25 19 25 3 2 3 2 3 1 2 5 2 2 2 2

Fig. 4. Examples of the moving-average filters derived from the directional masks of 3-to-2 conversion.

The total sum and nearest-neighbor sum are isotropic and are essentially digital representations of point-spread-functions (PSF) with varying degrees of dispersion. Complementary filters are suitable for filling holes or for use in digital camera to increase resolution by interpolation from surrounding pixels. Diagonal filters of different orientations are the mirror image to one another. Vertical filters are the transpose of the corresponding horizontal filters. Many basis sets can be generated from various conversion ratios, and numerous digital filters can be produced by selectively summing of directional masks. Several examples are given in Figures 5 to 7. Note that the point spreading nature of the total-sum filters decreases as the conversion ratio increases for a given window size; for example, digital filters of 5-to-3 (Я=0.36) conversion have a much narrower spreading than the corresponding filters of 5-to-2 (Я=0.16) conversion.

Diagonal Horizontal Vertical Near neighbors

4

40 4Normalization

GCD = 4

16

100 4040

40 1616

16 10 4

25 10

4 410

10 ComplementΓt = 29

25

4

19

19

19

19

2525

25

Page 5: RC2-filterDesign_s

Total sum(1,1)+(2,2)+(3,3)

+(4,4)+(5,5)(1,1)+(1,2)+(1,3)

+(1,4)+(1,5)(1,1)+(2,1)+(3,1)

+(4,1)+(5,1)(2,3)+(3,2)+(3,3)

+(3,4)+(4,3)4 12 18 12 4 2 3 3 1 1 0 0 0 0 0 0 0 4 4 2 1 4 5 4 112 36 54 36 12 3 10 11 5 1 0 0 0 0 0 0 0 12 12 6 4 7 8 7 418 54 81 54 18 3 11 17 11 3 4 12 18 12 4 0 0 18 18 9 5 8 9 8 512 36 54 36 12 1 5 11 10 3 4 12 18 12 4 0 0 12 12 6 4 7 8 7 44 12 18 12 4 1 1 3 3 2 2 6 9 6 2 0 0 4 4 2 1 4 5 4 1

Complement of total sum

Diagonal (1,5)+(2,4)+(3,3)

+(4,2)+(5,1)

Horizontal(3,1)+(3,2)+(3,3)

+(3,4)+(3,5)

Vertical(1,3)+(2,3)+(3,3)

+(4,3)+(5,3)Complement of Near neighbors

73 49 31 49 73 1 1 3 3 2 2 6 9 6 2 2 2 2 2 2 9 6 5 6 973 49 31 49 73 1 5 11 10 3 2 6 9 6 2 6 6 6 6 6 6 3 2 3 667 31 4 31 67 3 11 17 11 3 2 6 9 6 2 9 9 9 9 9 5 2 1 2 573 49 31 49 73 3 10 11 5 1 2 6 9 6 2 6 6 6 6 6 6 3 2 3 673 49 31 49 73 2 3 3 1 1 2 6 9 6 2 2 2 2 2 2 9 6 5 6 9

Fig. 5. The digital moving-average filter derived from the 5-to-2 conversion.

Cross

Diagonal (1,1)+(2,2)+(3,3)

+(4,4)+(5,5)

Horizontal(1,1)+(1,2)+(1,3)

+(1,4)+(1,5)

Vertical(1,1)+(2,1)+(3,1)

+(4,1)+(5,1)

Near neighbors(2,3)+(3,2)+(3,3)

+(3,4)+(4,3)0 1 3 1 0 1 3 5 6 0 0 0 0 0 0 0 0 3 2 0 0 1 3 1 01 33 82 33 1 3 90 126 45 6 0 0 0 0 0 0 0 54 36 0 1 21 46 21 13 82 195 82 3 5 126293126 5 3 54 111 54 3 0 0 111 74 0 3 46 87 46 31 33 82 33 1 6 45 126 90 3 2 36 74 36 2 0 0 54 36 0 1 21 46 21 10 1 3 1 0 0 6 5 3 1 0 0 0 0 0 0 0 3 2 0 0 1 3 1 0

Complement of total sum

Diagonal (1,5)+(2,4)+(3,3)

+(4,2)+(5,1)

Horizontal(3,1)+(3,2)+(3,3)

+(3,4)+(3,5)

Vertical(1,3)+(2,3)+(3,3)

+(4,3)+(5,3)Complement of Near neighbors

195194192194195 0 6 5 3 1 0 0 0 0 0 0 1 3 1 0 87 86 84 86 87194162113162194 6 45 126 90 3 1 18 37 18 1 0 18 54 18 0 86 66 41 66 86192113 0 113192 5 126293126 5 3 54 111 54 3 0 37 111 37 0 84 41 0 41 84194162113162194 3 90 126 45 6 1 18 37 18 1 0 18 54 18 0 86 66 41 66 86195194192194195 1 3 5 6 0 0 0 0 0 0 0 1 3 1 0 87 86 84 86 87

Fig. 6. The digital moving-average filters derived from the 5-to-3 basis set.

Total sum Cross sum 135° diagonal Horizontal4 12 20 26 20 12 4 3 7 11 14 11 7 3 2 3 3 3 1 1 1 2 6 10 13 10 6 212 36 60 78 60 36 12 7 11 15 18 15 11 7 3 10 11 11 5 1 1 2 6 10 13 10 6 220 6010013010060 20 11 15 19 22 19 15 11 3 11 18 19 13 5 1 2 6 10 13 10 6 226 7813016913078 26 14 18 22 25 22 18 14 3 11 19 25 19 11 3 2 6 10 13 10 6 220 6010013010060 20 11 15 19 22 19 15 11 1 5 13 19 18 11 3 2 6 10 13 10 6 212 36 60 78 60 36 12 7 11 15 18 15 11 7 1 1 5 11 11 10 3 2 6 10 13 10 6 24 12 20 26 20 12 4 3 7 11 14 11 7 3 1 1 1 3 3 3 2 2 6 10 13 10 6 2Complement of sum Complement of cross 45° diagonal Vertical

84 80 76 73 76 80 84 24 20 16 13 16 20 24 1 1 1 3 3 3 2 2 2 2 2 2 2 280 68 56 47 56 68 80 20 16 12 9 12 16 20 1 1 5 11 11 10 3 6 6 6 6 6 6 676 56 36 21 36 56 76 16 12 8 5 8 12 16 1 5 13 19 18 11 3 10 10 10 10 10 10 1073 47 21 2 21 47 73 13 9 5 1 5 9 13 3 11 19 25 19 11 3 13 13 13 13 13 13 1376 56 36 21 36 56 76 16 12 8 5 8 12 16 3 11 18 19 13 5 1 10 10 10 10 10 10 1080 68 56 47 56 68 80 20 16 12 9 12 16 20 3 10 11 11 5 1 1 6 6 6 6 6 6 684 80 76 73 76 80 84 24 20 16 13 16 20 24 2 3 3 3 1 1 1 2 2 2 2 2 2 2

Fig. 7. The digital moving-average filters derived from the 7-to-2 conversion.

5

Page 6: RC2-filterDesign_s

These filters are tiled to an input image, pi(k,l), on a pixel-by-pixel basis and are moved in a predefined traversal path from the beginning to the end of the image (e.g. top-to-bottom and left-to-right). This type of filters performs a weighted average of pixels within the domain of the filter; therefore, they are called “moving-average filters”. Equation (8) defines the computations of the weighted average, where each input pixel in the window is multiplied with the corresponding filter element. The products are then added together and weighted by a normalizing factor to give the output pixel, po(k, l).

mc nc

po(k, l) = (gmax/wsum) Γ(m,n) pi(k+m, l+n) , (8.1) m = -mc n = -nc

WS,y WS,x

wsum = Γ(m,n). (8.2)m=1 n=1

where gmax is the maximum gray level, for an 8-bit representation gmax = 255, and wsum is the sum of all weights in the moving-average filter.

3. RESULTS AND DISCUSSION

Selected digital filters obtained from the sub-pixel-sum method (Figures 4 to 7) were tested for inversing the bilevel ISO-N7 (three musicians) images with three resolutions (160, 300, and 600 dpi) that were halftoned by five different halftone methods.4 The inverted image was evaluated against the contone original with respect to image resolution, conversion ratio, and halftone technique.

3.1 Halftone TechniqueEach ISO original was halftoned to bilevel by using five different halftone techniques: two sets of

clustered-dots with different size and frequency,5 two sets of line screens with different screen angle and frequency,6 and an error diffusion of the Shiau-Fan filter.7,8

Dot-082 is a set of four clustered-dot screens, one for each primary color. Each screen has four centers, forming a quad-dot pattern for the purpose of doubling the apparent screen frequency. Cyan screen has 80 levels with a screen angle of 27 and a screen frequency of 35.8 lines per inch (lpi) at 160 dpi, 67.1 lpi at 300 dpi, and 134.2 lpi at 600 dpi. Magenta screen is the mirror image of the cyan screen, having the same size and frequency as cyan screen but a different screen angle of 63. Yellow screen has 85 levels with a screen angle of 41 and a screen frequency of 34.7 lpi at 160 dpi, 65.1 lpi at 300 dpi, and 130.2 lpi at 600 dpi. Black screen has 81 levels with an angle of 0 and a frequency of 35.6 lpi at 160 dpi, 66.7 lpi at 300 dpi, and 133.3 lpi at 600 dpi.

Dot-128 is also a set of four clustered quad-dot screens. All four screens have the same 128 levels and the same screen angle of 45. They are shifted or inverted with respect to one another for the purpose of minimizing artifacts. The screen frequencies are 28.3 lpi at 160 dpi, 53.0 lpi at 300 dpi, and 106.1 lpi at 600 dpi.

Line-066 is a set of four angled line screens with quad-dot patterns. Cyan screen has 136 levels with a screen angle of 14 and a screen frequency of 27.4 lpi at 160 dpi, 51.4 lpi at 300 dpi, and 102.9 lpi at 600 dpi. Magenta screen has the same size and frequency as cyan screen but a different angle of 76 . Yellow screen has 128 levels and a screen angle of 90 (vertical line screen). Black screen has 128 levels and an angle of 45 . Both yellow and black screens have the same screen frequencies as Dot-128.

Line-074 was also a set of four angled line screens with quad-dot arrangements, having relatively higher tone-level and lower frequency than the corresponding Line-066 screens. Cyan screen had 160 levels with an angle of 28 and a screen frequency of 25.3 lpi at 160 dpi, 47.4 lpi at 300 dpi, and 94.9 lpi at 600 dpi. Magenta screen had the same size and frequency as cyan but a different angle of 62 . Yellow screen was a

6

Page 7: RC2-filterDesign_s

vertical line screen of 128 levels, having the same frequencies as Dot-128. Black screen had 144 levels with an angle of 45 and a screen frequency of 26.7 lpi at 160 dpi, 50.0 lpi at 300 dpi, and 100.0 lpi at 600 dpi.

These screens were designed for bi-level devices with resolution of 600600 dpi or higher. Therefore, at 600 dpi, screen frequencies were high enough to meet a minimal frequency requirement for rendering acceptable quality. They, however, were not adequate for devices with lower resolutions, showing apparent dot or line patterns at 300 dpi and a very coarse appearance at 160 dpi. These inadequacies were intended for this study because poor halftoned images could really test the capability of this inverse halftoning technique.

The Shiau-Fan error filter is a left-side extended filter to minimize worm structures of the error diffusion.7,8 It has five weights with values in powers of 2 to simplify implementation and reduce computational cost. The residue value from the pixel of interest p(m,n) is passed to 5 neighboring pixels according to their weights given in the following error filter:

p(m,n) 8/161/16 1/16 2/16 4/16

3.2 Image Quality MetricsThree computational metrics were used to assess the sub-pixel-sum method for the inverse halftoning.

The first metric was the mean deviation (MD), edif, defined in Eqn. (11), the second metric was the absolute mean deviation (AMD), eamd, defined in Eqn. (12), and the third one was the root mean square (RMS) error, erms, defined in Eqn. (13) between the inverted (or halftoned) image and contone original on a pixel-by-pixel basis. The inverted image and contone original were encoded in 8-bit representations, where the halftoned images were represented by the number 0 for “on” pixels and 255 for “off” pixels because Adobe Photoshop uses the inverse polarity.

H L

edif = { [ po(k, l) – pi(k, l)] } / (H L) (11) k=1 l=1

H L

eamd = { | po(k, l) – pi(k, l)| } / (H L) (12) k=1 l=1

H L

erms = { [ po(k, l) – pi(k, l)]2 / (H L) }1/2 (13)k=1 l=1

Equation (11) computed the average difference between two digital images of equal sizes at the pixel-by-pixel level, where H and L were the height and length, respectively, of the input image in pixels. The average difference was used for determining the overall intensity change; a value of near zero indicates that the overall intensity is preserved. AMD of Eqn. (12) and RMS of Eqn. (13) should be able to reveal the magnitude of difference between two images.

Visual comparisons were also made. The original, halftoned, and inverted images were printed by a Tektronix Phaser 740 printer. Visual assessments were done by one observer only and were subjective and unscientific.

3.3 Results of Computational MetricsAverage differences of inverted images with respect to their contone originals were very small (Table

1). They were in the neighborhood of -0.5 of the 8-bit representation, indicating that there was no significant change of the total image intensity after the halftone process and two resolution conversions from original to inversion. In particular, inverted images from error-diffused halftone inputs had a zero average difference for all resolutions and conversion ratios, indicating that the intensity was totally conserved between the inverted image and its contone original.

7

Page 8: RC2-filterDesign_s

Table 1. Average differences between original and inverted image with respect to resolution, conversion ratio, and halftone method.

Filter Resolution

Dot082 Dot128 Line066 Line074 ED-SF

3-to-2 total-sum(Я = 0.44)

160 dpi -0.5 -0.5 -0.4 -0.4 -0.0300dpi -0.5 -0.4 -0.4 -0.4 -0.0600 dpi -0.5 -0.4 -0.5 -0.4 -0.0

5-to-2 total-sum(Я = 0.16)

160 dpi -0.5 -0.5 -0.4 -0.4 0.0300dpi -0.5 -0.4 -0.5 -0.4 0.0600 dpi -0.5 -0.4 -0.5 -0.4 0.0

5-to-2 near-neighbors

(Я = 0.16)

160 dpi -0.5 -0.5 -0.4 -0.4 -0.0300dpi -0.5 -0.4 -0.5 -0.5 -0.0600 dpi -0.5 -0.4 -0.5 -0.5 -0.0

5-to-2 diagonal-sum

(Я = 0.16)

160 dpi -0.5 -0.5 -0.4 -0.4 -0.0300dpi -0.5 -0.4 -0.4 -0.4 -0.0600 dpi -0.5 -0.4 -0.5 -0.5 -0.0

5-to-2 horizontal-

sum(Я = 0.16)

160 dpi -0.5 -0.5 -0.4 -0.4 -0.0300dpi -0.5 -0.4 -0.5 -0.5 -0.0600 dpi -0.5 -0.4 -0.5 -0.5 -0.0

7-to-2 total-sum

(Я = 0.082)

160 dpi -0.5 -0.5 -0.4 -0.4 -0.0300dpi -0.5 -0.4 -0.5 -0.5 -0.0600 dpi -0.5 -0.4 -0.5 -0.5 -0.0

7-to-2 cross-sum

(Я = 0.082)

160 dpi -0.5 -0.5 -0.4 -0.4 -0.0300dpi -0.5 -0.4 -0.4 -0.4 0.0600 dpi -0.5 -0.4 -0.5 -0.4 0.0

AMD Results between original and inverted image were tabulated in Table 2 for ISO-N7 at three resolutions (160, 300, and 600 dpi) processed by five halftone techniques. AMD errors ranged from 5 to 42 counts out of 255 between inverted and original images. They were the average of four color planes: cyan, magenta, yellow, and black. Each color component had a different mean value, but it did not deviate far from the overall mean (< 2 counts). MSE results were given in Table 3 for the same ISO images at the same conditions. These two computational measures had the same trend with respect to parameters of interest. AMD and MSE consistently showed the following goodness order for the halftone techniques: Error Diffusion > Line-074 > Line-066 > Dot-082 > Dot-128. Error diffusion gave the closest match to the original, where screening methods had higher errors.

As shown in Tables 2 and 3, computational metrics did not give significant differences with respect to image resolution. In most cases, they were within 3 counts from each other by using the same moving-average filter and halftone technique. At closer looks, high resolution at 600 dpi had the lowest error, followed by 300 dpi and 160 dpi, but the differences were very small.

Computational measures indicated that the image quality with respect to filter type followed the order of (7-to-2-total-sum 7-to-2-cross, Я = 0.082) > (5-to-2-nearest-neighbor 5-to-2-horizontal, Я = 0.16) > (5-to-2-diagonal 5-to-2-total-sum, Я = 0.16) > (3-to-2-total-sum, Я = 0.44). It seemed that the size of the filter played an important role in the image quality; higher filter size and lower conversion ratio gave better image qualities.

8

Page 9: RC2-filterDesign_s

Table 2. Absolute mean differences between original and inverted image with respect to resolution, conversion ratio, and halftone method.

Filter Resolution

Dot082 Dot128 Line066 Line074 ED-SF

3-to-2 total-sum(Я = 0.44)

160 dpi 35.1 41.4 28.4 26.0 13.5300dpi 34.6 40.7 28.0 25.8 13.7600 dpi 33.4 39.9 26.7 24.3 11.7

5-to-2 total-sum(Я = 0.16)

160 dpi 21.7 28.8 18.8 16.7 9.4300dpi 21.7 28.7 18.9 16.9 9.9600 dpi 19.1 26.7 16.2 13.9 5.9

5-to-2 near-neighbors

(Я = 0.16)

160 dpi 16.5 23.2 16.2 14.5 10.1300dpi 16.8 23.2 16.4 14.9 10.7600 dpi 13.2 20.4 12.9 11.1 5.9

5-to-2 diagonal-sum

(Я = 0.16)

160 dpi 23.3 29.9 19.8 17.9 9.7300dpi 23.3 29.6 19.8 18.1 10.3600 dpi 20.9 27.8 17.3 15.3 6.4

5-to-2 horizontal-

sum(Я = 0.16)

160 dpi 17.8 22.9 16.9 15.0 10.5300dpi 18.0 22.9 17.1 15.3 11.1600 dpi 14.8 20.2 13.8 11.7 6.6

7-to-2 total-sum

(Я = 0.082)

160 dpi 14.0 18.4 14.7 13.2 9.8300dpi 14.3 18.5 14.9 13.5 10.3600 dpi 10.6 15.4 11.4 9.7 5.8

7-to-2 cross-sum

(Я = 0.082)

160 dpi 13.2 13.6 14.3 13.1 11.0300dpi 13.5 13.8 14.4 13.4 11.3600 dpi 9.5 10.0 10.8 9.5 7.0

Table 3. Root-mean-square errors between original and inverted image with respect to resolution, conversion ratio, and halftone method.

Filter Resolution

Dot082 Dot128 Line066 Line074 ED-SF

3-to-2 total-sum(Я = 0.44)

160 dpi 48.1 56.0 39.8 35.8 18.3300dpi 47.7 55.5 39.6 35.9 19.0600 dpi 46.2 54.4 38.1 33.9 15.6

5-to-2 total-sum(Я = 0.16)

160 dpi 30.2 39.3 27.5 24.3 15.4300dpi 30.7 39.4 28.0 25.1 17.1600 dpi 26.6 36.5 23.8 20.0 8.6

5-to-2 near-neighbors

(Я = 0.16)

160 dpi 24.2 32.2 24.8 22.5 17.4300dpi 25.4 32.8 25.8 23.8 19.3600 dpi 18.8 28.2 19.8 16.7 9.4

5-to-2 diagonal-sum

(Я = 0.16)

160 dpi 32.0 40.5 28.8 25.9 15.5300dpi 32.4 40.5 29.2 26.5 17.0600 dpi 28.7 37.8 25.5 22.0 9.1

5-to-2 160 dpi 25.4 31.5 25.3 22.9 17.7

9

Page 10: RC2-filterDesign_s

horizontal-sum

(Я = 0.16)

300dpi 26.3 32.1 26.2 24.1 19.4600 dpi 20.3 27.5 20.5 17.4 10.2

7-to-2 total-sum

(Я = 0.082)

160 dpi 21.9 26.3 23.1 21.3 17.8300dpi 23.2 27.2 24.2 22.6 19.5600 dpi 16.0 21.6 17.8 15.3 10.5

7-to-2 cross-sum

(Я = 0.082)

160 dpi 21.9 22.2 22.9 21.9 19.9300dpi 23.3 23.5 24.1 23.2 21.4600 dpi 15.7 16.0 17.1 15.6 13.0

3.4 Visual ObservationsA different order for the effect of halftone techniques was obtained from visual comparisons: Error

Diffusion > Dot-082 > Dot-128 > Line-074 > Line-066. At 160 dpi, error-diffused inputs produced a rather coarse appearance to the inverted images, whereas dot-screened inputs gave smooth inverted images with noticeable screen patterns and line-screened inputs showed strong angled line patterns for inverted images. Unlike computational measures that had lower errors for line screens, the dot screens were more appearing than line screens in all cases. This observation was yet one more evidence that the visual assessment is a better indicator for image quality even through it is subjective and less scientific.

Also, visual observations showed significant improvements in image quality as resolution increased. Inverted images had marginal qualities at 160 dpi; screen patterns were seen in most, if not all, conversion ratios. Some patterns were very objectionable. At 300 dpi, decent qualities with some minor screen patterns were obtained for most screened images and good qualities for all error-diffused images. Inverted images appeared a little lighter, less sharp, poorer resolution, and few details than the original. At 600 dpi, all inverted images looked like their originals with slightly lower lightness, contrast, and sharpness.

Visually, inversed images using these moving-average filters were not sensitive to conversion ratio if the window size was 55 or higher; they looked similar under the same window size and halftone technique. But, a window size of 33 was too small to remove screen patterns.

A major advantage of using these convolution filters for the inverse halftoning was that inverted images had much less blocking and greatly reduced edge jaggedness even at low conversion ratios. The tradeoff was that images were blurry when resolutions were low such as 160 dpi.

4. CONCLUSIONS

In this paper, a systematic approach for designing digital moving-average filters was proposed that could be used for digital image processing such as smoothing and inverse halftoning. These filters were shift-invariant and could be made to have the directional masking. These filters were applied for inversing halftoned images to contone; the inverted images had no blocking or pixelation. They produced good quality for error-diffused images and acceptable quality for dot screens if the screen frequency was reasonably high or image resolution was not too low ( 300 dpi). These filters produced marginal qualities for the inverted images when the bilevel inputs were halftoned by line screens. To remove screen patterns, the filter size needed to be on the order of the screen period (in the number of input pixels).

Compared to the sub-pixel-sum, the image processing by digital-filters requires a much higher computational cost because the moving-average filter performs WS,xWS,y multiplications and additions to give just one output pixel, and each input pixel must be subjected to these same computational operators . This method, however, could be implemented as integer arithmetic to reduce computation cost and system complexity. Moreover, the applications of these filters are not limited to the inverse halftoning; they can be used for other applications such as smoothing, filling, and interpolating.

10

Page 11: RC2-filterDesign_s

ACKNOWLEDGEMENT

Many thanks to IS&T, Heidelberg, and Dr. Yee S. Ng of NexPress Solution for providing IS&T NIP16 Test Targets.

REFERENCES

1. H. R. Kang, “Resolution conversion and scaling of digital images,” ICPS ’94 and IS&T’s 47th Annual Conf., vol. II, pp. 524-526 (1994).

2. H. R. Kang, Color technology for Electronic Imaging Devices, Chap. 8, pp. 177-207, SPIE press (1997).3. H. R. Kang, “Inverse halftoning by using fractional-pixel sum”, to be published.4. ISO/JIS-SCID, “Graphic technology – Prepress digital data exchange – Standard color image data,” JIS X

9201-1995 (1995).5. H. R. Kang, Color Digital Halftoning, Chapter 13 “Clustered-Dot-Ordered Dither”, pp. 213-260, SPIE

and IEEE press (1999).6. H. R. Kang, Color Digital Halftoning, Chapter 15 “Microcluster Halftoning”, pp. 335-352, SPIE and

IEEE press (1999).7. J. Shiau and Z. Fan, “Method for quantization gray level pixel data with extended distribution set”, U.S.

Patent 5,353,127 (1994).8. H. R. Kang, Color Digital Halftoning, Chapter 16 “Error Diffusion”, pp. 357-400, SPIE and IEEE press

(1999).

11