Home | Alpha Telephone | Domain Names | Web Hosting | Get Traffic | xrEvidence | xrSoccer

United States Patent

Previous       Show 10       Next


United States Patent 7,057,773
Ilbery June 6, 2006

Error diffusion using next scanline error impulse response


Abstract

An apparatus (1100) for halftoning an image is disclosed. The apparatus comprises means for determining an output value of a current pixel on a current scanline using a sum of an input value (1102) for the current pixel and a neighborhood error value (1150) at the current pixel, means (1124) for determining an error at the current pixel as the difference between (i) the sum of the input value (1102) for the current pixel and the neighborhood error value (1150) at the current pixel, and (ii) the output value (1120) of the current pixel; and means (1140) for adding a proportion of the error at the current pixel to neighborhood error values at as yet unprocessed pixels of a subsequent scanline in accordance with a next scanline error impulse response; wherein said next scanline error impulse response approximates a function which spreads with self-convolution in proportion to a degree of self-convolution.


Inventors: Ilbery; Peter William Mitchell (Dundas, AU)
Assignee: Canon Kabushiki Kaisha (Tokyo, JP)
Appl. No.: 10/029,267
Filed: December 28, 2001

Foreign Application Priority Data

Dec 29, 2000 [AU] PR2347

Current U.S. Class: 358/3.05 ; 358/3.26; 382/252; 382/275
Current International Class: H04N 1/405 (20060101); G06T 5/00 (20060101); H04N 1/409 (20060101)
Field of Search: 358/1.9,3.03,3.04,3.05,3.26 382/252,275


References Cited

U.S. Patent Documents
4955065 September 1990 Ulichney
5353127 October 1994 Shiau et al.
5521989 May 1996 Fan
5535019 July 1996 Eschbach
5835687 November 1998 Brown et al.
6130661 October 2000 Ilbery
Foreign Patent Documents
744936 Jun., 2001 AU
99/22510 May., 1999 WO

Other References

G Marcu, "Error diffusion algorithm with output position constraints for homogeneous highlight and shadow dot distribution", Journal of Electric Imaging, Jan. 2000, vol. 9(1), pp. 46-51. cited by other .
K.T. Knox, "Evolution of error diffusion", Journal of Electronic Imaging, Oct. 1999, vol. 8(4), pp. 422-429. cited by other .
J.Shiau, et al., "A set of easily implementable coefficients in error diffusion with reduced worn artifacts", SPIE, vol. 2658, pp. 222-225. cit- ed by other .
R. Ulichney, "Digital Halftoning", MIT Press, 1987, pp. 340-342. cited by other .
R.W. Floyd, et al., "An Adaptive Algorithm for Spatial Greyscale", Proceedings of the Society For Information Display, vol. 17, No. 2, pp. 75-77 (1976). cited by other .
G. Marcu, "An error diffusion algorithm with output constraints for homogeneous highlight and shadow dot distribution", Proceedings of The International Society for Optical Engineering, vol. 3300, pp. 341-352 (1998). cited by other .
D. Hong et al., "A Serpentine Error Diffusion Dernel with Threshold Modulation for Homogeneous dot Distribution", IS&Ts Recent Progress in Digital Halftoning II (1999) pp. 306-309. cited by other .
M. Nose et al., "Modified Error Diffusion with Smoothly Dispersed Dots in Highlight and Shadow", IS&Ts Recent Progress in Digital Halftoning II, (1999) pp. 310-313. cited by other .
R. Eschbach, Error Diffusion Algorithm with Reduced Artifacts, Proceedings of the IS&T's 45th Annual Conference, May 10-15, 1992, pp. 133-136. cited by other.

Primary Examiner: Rogers; Scott A.
Attorney, Agent or Firm: Fitzpatrick, Cella, Harper & Scinto

Claims



The invention claimed is:

1. A method of halftoning an image, said method comprising steps of: determining an output value of a current pixel on a current scanline using a sum of an input value for the current pixel and a neighbourhood error value at the current pixel; determining an error at the current pixel as the difference between (i) the sum of the input value for the current pixel and the neighbourhood error value at the current pixel, and (ii) the output value of the current pixel; and adding a proportion of the error at the current pixel to neighbourhood error values at as yet unprocessed pixels of a subsequent scanline in accordance with a next scanline error impulse response; wherein said next scanline error impulse response: approximates a function which spreads with self-convolution in proportion to a degree of self-convolution.

2. A method of halftoning according to claim 1, wherein: the next scanline error impulse response is a member of a plurality of next scanline error impulse responses, each of said plurality of next scanline error impulse responses approximating a function which spreads with self-convolution in proportion to the degree of self-convolution; each said member of said plurality of next scanline error impulse responses is associated with a corresponding error diffusion mask; and a corresponding size of each said error diffusion mask depends upon a grey value of a region to which said mask is applied.

3. A method of halftoning according to claim 1, wherein: the next scanline error impulse response is a sampling of a Cauchy distribution, said sampling being normalised so that a sum of next scanline error impulse response values is unity.

4. A method of halftoning according to claim 1, wherein: the next scanline error impulse response is left-right symmetric.

5. A method of halftoning an image, said image comprising a plurality of pixels each having an input value and an assignable output value that can take on one of at least two output values, where pixels are processed scanline by scanline, and scanlines are processed one at a time from the top of the image to the bottom of the image, and where a scanline is processed pixel by pixel either from left to right or from right to left, and where the processing for each pixel comprises the steps of: (a) determining the output value of a current pixel using a sum of the input value of the current pixel and a neighbourhood error value for the pixel; (b) determining an error at the current pixel as the difference between, firstly, the sum of the input value of the current pixel and the neighbourhood error value for the pixel, and secondly the output value of the pixel; (c) adding proportions of the error at the current pixel to the neighbourhood error values of yet to be processed pixels of the current and next scanline; and where the said proportions of the error at a current pixel are designed so that the next scanline error impulse response, being that function which maps (A) from a horizontal pixel offset; (B) to the total proportion of the error at the current pixel added to the neighbourhood error of that pixel of the next scanline which is displaced by the horizontal pixel offset from the current pixel, following complete processing of the current scanline; approximates a function which spreads with self-convolution in proportion to the degree of self-convolution.

6. A method as claimed in claim 5, where the next scanline error impulse response approximates a scaled sampling of a Cauchy distribution.

7. A method as claimed in claim 5, where the next scanline error impulse response approximates a function which has a Discrete Space Fourier Transform which is a replicated two-sided exponential function.

8. A method as claimed in any one of claims 5 to 7, where the output value of a current pixel is determined by comparison of the sum of the input value of the current pixel and the neighbourhood error value for the pixel against a threshold value.

9. A method as claimed in claim 8, where in step (c), for a current pixel at pixel position (i,j), being column i and scanline j, error at the current pixel is added to the neighbourhood error of only those pixels which are either: i) on the current scanline ahead of the current pixel at a pixel position (i+current_offset, j), where, for left to right processing of the current scanline, current_offset is greater than zero, and, for right to left processing of the current scanline, current_offset is less than zero, or (ii) on the next scanline below or behind the current pixel at a pixel position, (i-next_offset, j+1), where, for left to right processing of the current scanline, next_offset is greater than or equal to zero, and, for fight to left processing of the current scanline, next_offset is less than or equal than zero.

10. A method of halftoning an image, said image comprising a plurality of pixels each having an input value and an assignable output value that can take on one of at least two output values, where pixels are processed scanline by scanline and scanlines are processed one at a time from the top of the image to the bottom of the image, and where a scanline is processed pixel by pixel either from left to right or from right to left, and where the processing for each pixel comprises the steps of: (a) determining the output value of a current pixel using a sum of the input value of the current pixel and a neighbourhood error value for the pixel; (b) determining an error at the current pixel as the difference between, firstly, the sum of the input value of the current pixel and the neighbourhood error value for the pixel, and secondly the output value of the pixel; (c) selecting, using the current pixel input value, a set of proportions and a set of corresponding pixel position offsets, from a family of sets of proportions and corresponding pixel position offsets; (d) adding the selected proportions of the error at the current pixel to the neighbourhood error values of yet to be processed pixels at pixel positions offset from the current pixel by the selected corresponding pixel position offsets; and where each set of the said family of sets of proportions and corresponding pixel offsets, is designed so that the next scanline error impulse response corresponding to that set, being that function which maps (A) from a horizontal pixel offset; (B) to the proportion of the error at the current pixel added to the neighbourhood error of that pixel of the next scanline displaced by the horizontal pixel offset from the current pixel, following complete halftone processing of the current scanline using only the said set of proportions and corresponding pixel offsets; approximates a function which spreads with self-convolution in proportion to the degree of self-convolution.

11. A method as claimed in claim 10, where each next scanline error impulse response, corresponding to a set of proportions and pixel offsets, approximates a scaled sampling of a Cauchy distribution.

12. A method as claimed in claim 10, where each next scanline error impulse response, corresponding to a set of proportions and pixel offsets, approximates a function which has a Discrete Space Fourier Transform which is a replicated two-sided exponential function.

13. A method as claimed in claim 11 or 12, where the family of sets of proportions and pixel offsets together with the selection, using the current pixel input value, of a set of proportions and pixel offsets, are designed so as to minimise processing while also minimising the presence of artifacts in the halftone output artifacts including cross-over artifacts and poor spreading in sparse halftone patterns.

14. A method as claimed in claim 13, where the maximum absolute offset in each set of the family of sets of proportions and pixel offsets, varies so that the family of sets includes a set with small maximum absolute offset and a set with large maximum absolute offset and where intermediate input values primarily select sets with small maximum absolute offset, and extreme input values primarily select sets with large maximum absolute offset.

15. A method as claimed in claim 14, where the output value of a current pixel is determined by comparison of the sum of the input value of the current pixel and the neighbourhood error value for the pixel against a threshold value.

16. A method as claimed in claim 15, where in step (d), for a current pixel at pixel position (i,j), being column i and scanline j, error at the current pixel is added to the neighbourhood error of only those pixels which are either: (i) on the current scanline ahead of the current pixel at a pixel position (i+current_offset, j), where, for left to right processing of the current scanline, current_offset is greater than zero, and, for right to left processing of the current scanline, current_offset is less than zero, or (ii) on the next scanline below or behind the current pixel at a pixel position, (i-next_offset, j+1) where, for left to right processing of the current scanline, next_offset is greater than or equal to zero, and, for right to left processing of the current scanline, next_offset is less than or equal than zero.

17. A method of halftoning an image, said image comprising a plurality of pixels each having an input value and an assignable output value that can take on one of at least two output values, where pixels are processed scanline by scanline and scanlines are processed one at a time from the top of the image to the bottom of the image, and where a scanline is processed pixel by pixel either from left to right or from right to left, and where the processing for each pixel comprises the steps of: (a) determining the output value of a current pixel using a sum of the input value of the current pixel and a neighbourhood error value for the pixel; (b) determining an error at the current pixel as the difference between, firstly, the sum of the input value of the current pixel and the neighbourhood error value for the pixel, and secondly the output value of the pixel; (c) selecting, using the current pixel input value, a set of proportions and a set of corresponding pixel position offsets, from a family of sets of proportions and corresponding pixel position offsets, said set of proportions being in accordance with a next scanline error impulse response that approximates a function which spreads with self-convolution in proportion to a degree of self-convolution; (d) adding the selected proportions of the error at the current pixel to the neighbourhood error values of yet to be processed pixels at pixel positions offset from the current pixel by the selected corresponding pixel position offsets; and where each set of the said family of sets of proportions and corresponding pixel offsets, only includes pixel offsets corresponding to pixels on the same scanline as the current pixel or to pixels on the next scanline.

18. An apparatus for halftoning an image, said apparatus comprising: means for determining an output value of a current pixel on a current scanline using a sum of an input value for the current pixel and a neighbourhood error value at the current pixel; means for determining an error at the current pixel as the difference between (i) the sum of the input value for the current pixel and the neighbourhood error value at the current pixel, and (ii) the output value of the current pixel; and means for adding a proportion of the error at the current pixel to neighbourhood error values at as yet unprocessed pixels of a subsequent scanline in accordance with a next scanline error impulse response; wherein said next scanline error impulse response: approximates a function which spreads with self-convolution in proportion to a degree of self-convolution.

19. An apparatus for halftoning an image, said apparatus comprising: a memory for storing a program; a processor for executing the program, said program comprising: code for a determining step for determining an output value of a current pixel on a current scanline using a sum of an input value for the current pixel and a neighbourhood error value at the current pixel; code for a determining step for determining an error at the current pixel as the difference between (i) the sum of the input value for the current pixel and the neighbourhood error value at the current pixel, and (ii) the output value of the current pixel; and code for an adding step for adding a proportion of the error at the current pixel to neighbourhood error values at as yet unprocessed pixels of a subsequent scanline in accordance with a next scanline error impulse response; wherein said next scanline error impulse response: approximates a function which spreads with self-convolution in proportion to a degree of self-convolution.

20. A computer program product including a computer readable medium having recorded thereon a computer program for directing a processor to execute a method for halftoning an image, said program comprising: code for a determining step for determining an output value of a current pixel on a current scanline using a sum of an input value for the current pixel and a neighbourhood error value at the current pixel; code for a determining step for determining an error at the current pixel as the difference between (i) the sum of the input value for the current pixel and the neighbourhood error value at the current pixel, and (ii) the output value of the current pixel; and code for an adding step for adding a proportion of the error at the current pixel to neighbourhood error values at as yet unprocessed pixels of a subsequent scanline in accordance with a next scanline error impulse response; wherein said next scanline error impulse response: approximates a function which spreads with self-convolution in proportion to a degree of self-convolution.

21. A computer program embodie on a computer readable medium for directing a processor to execute a method for halftoning an image, said program comprising: code for a determining step for determining an output value of a current pixel on a current scanline using a sum of an input value for the current pixel and a neighbourhood error value at the current pixel; code for a determining step for determining an error at the current pixel as the difference between (i) the sum of the input value for the current pixel and the neighbourhood error value at the current pixel, and (ii) the output value of the current pixel; and code for an adding step for adding a proportion of the error at the current pixel to neighbourhood error values at as yet unprocessed pixels of a subsequent scanline in accordance with a next scanline error impulse response; wherein said next scanline error impulse response; approximates a function which spreads with self-convolution in proportion to a degree of self-convolution.
Description



COPYRIGHT NOTICE

This patent specification contains material that is subject to copyright protection. The copyright owner has no objection to the reproduction of this patent specification or related materials from associated patent office files for the purposes of review, but otherwise reserves all copyright whatsoever.

TECHNICAL FIELD OF THE INVENTION

The present invention relates to the field of digital image processing and more particularly to apparatus and method for digital halftoning continuous tone images.

BACKGROUND ART

Digital Images

An image is typically represented digitally as a rectangular array of pixels with each pixel having one of a restricted set of legitimate pixel values. Digital images may be black and white in which case the restricted set of legitimate pixel values is used to encode an optical density or luminance score. Digital images may also be colour where the restricted set of pixel values may encode an optical density or intensity score for each of a number of colour channels--for example Cyan, Magenta, Yellow and Black (CMYK) or Red, Green and Blue (RGB).

Digital images are common where the image value per pixel per colour channel is an 8 bit unsigned number--providing intensity values in the range 0 through 255. Such images are often called "continuous tone" images because of the reasonably large number (256) of legitimate intensity values.

Digital Halftoning

By contrast, digital images are often printed on devices which provide a more limited variation in intensity or colour representation per pixel. For example, many Bubble Jet printers only provide the ability to print or not print a dot of each of a Cyan, Magenta, Yellow and Black ink at each pixel position.

In order to print a digital image on a printer with lower colour resolution than the digital image, it is necessary to use the original image to generate an image with the required lower colour resolution such that the generated image has a similar appearance to the original image. This process of generating a digital image of similar appearance where each pixel colour value is within a smaller set of legitimate pixel colour values, is known as digital halftoning.

For ease of explanation, digital halftoning is hereafter described for the case where the input image is a single colour channel, 8 bit per pixel image and the halftoned image is a 1 bit per pixel (bi-level) image. The input image values are known as greyscale values or grey levels. Extensions of digital halftoning from this monochrome bi-level case to cases where the halftoned image pixels have more than 2 legitimate output values (multi-level halftoning) and extensions to digital halftoning of colour images can be performed. See for example, "Digital Halftoning" Ulichney R., MIT Press, 1987, pp 340 342.

Consider the case of a single colour channel, 8 bit per pixel, image which is halftoned to generate a 1 bit per pixel (bi-level) image which is printable on a black and white bubble jet printer, for which each pixel of the halftoned image has one of 2 legitimate pixel values, a "no dot" value and a "dot" value.

An image region in the halftoned image will print as a minimum optical density ("fully white") region when all pixels of the region have the "no dot" value corresponding to non-placement of an ink dot; it will print as a maximum optical density ("fully black") region when all pixels of the region have the "dot" value corresponding to placement of an ink dot; and it will print as an intermediate optical density (halftone) region when some of the pixels of the region have the "no dot" value and some of the pixels have the "dot" value.

A highlight (near white) region in the halftoned image will have only a few of the pixels with the "dot" value--in these regions the "dot" halftone output value is the minority or exceptional result. A shadow (near black) region will have only a few of the pixels with the "no dot" value--in these regions the "no dot" halftone output value is the minority or exceptional result.

The role of the halftoning process is to generate the printable image so that an appropriate number of ink dots will print in appropriate pixel positions so that there is a good match between the optical density of image regions in the original image and the average optical density of the matching image regions in the printed image.

Error Diffusion

Error diffusion is a digital halftoning method originally developed by Floyd and Steinberg and described in the publication "An Adaptive Algorithm for Spatial Greyscale", Proceedings of the SID 17/2, pp 75 77 (1976), Error diffusion as developed by Floyd and Steinberg is hereafter described as "standard error diffusion".

An overview of standard error diffusion is now provided.

The standard error diffusion algorithm processes pixels line by line from the top of the image to the bottom of the image. Each line (or "scanline") is processed one pixel at a time from left to right.

The standard error diffusion algorithm employs a pixel decision rule in which a modified input image pixel value is compared against a threshold value. If the pixel's modified input value is less than the threshold, then the pixel's halftone output value is assigned to be the lower halftone output value; and if it is greater, then the pixel's halftone output value is assigned to be the higher halftone output value.

Following determination of the pixel halftone output value, an error is determined for the pixel as the difference between the pixel's modified input value and the pixel's halftone output value. The error is distributed to neighbouring, as yet unprocessed, pixels according to a set of weighting coefficients.

A pixel's modified input value is the sum of the pixel's input image value and a neighbourhood error value for the pixel. The neighbourhood error for a pixel is the sum of the errors distributed to that pixel from previously processed neighbouring pixels.

The set of weighting coefficients is known as an error diffusion mask. Each weighting coefficient of the error diffusion mask is associated with a pixel offset. When a pixel is processed, the error distributed from the pixel to an as yet unprocessed pixel is the pixel error multiplied by the weight corresponding to the offset from the pixel to the unprocessed pixel.

Note that the error at a pixel which is distributed to its neighbours can be considered as a sum of the neighbourhood error at the pixel and the pixel-only error being the pixel's input value less the pixel's halftone output value.

The error diffusion mask described by Floyd and Steinberg is shown in FIG. 1. The error at a pixel is distributed in the proportions 7/16, 1/16, 5/16 and 3/16 to 4 neighbouring pixels which are as yet unprocessed as indicated in the diagram. FIG. 1 shows an error diffusion mask 100 in which an error for a current pixel 108 is distributed in the proportions indicated to four neighbouring pixels eg. 106 in the fractional proportions shown. Previously processed pixels eg. 110 are shown using a shaded representation, and it is noted that the current pixel 108 lies on a current scanline 102. Previously processed pixels lie above a bold line 104 in FIG. 1, and a scanline processing direction is depicted by a horizontal arrow 112.

It is noted that the sum of the weighting coefficients is 1. As a result 100% of a pixel's error is transferred to its neighbouring pixels. If the sum of weighting coefficients were greater than 1, then error would be amplified and could build up without bound. If the sum of weighting coefficients were less than 1, then error would be reduced. By having the sum of weighting coefficients equal to unity, the average intensity of a region of the halftoned image tends to match the average intensity of that region in the input image which is a very desirable characteristic of a halftoning process.

In implementations of standard error diffusion where multiplication of error by a weighting coefficient results in significant rounding errors, it is necessary to co-ordinate the calculation of error distributions to neighbouring pixels so that effectively 100% of current pixel error is transferred on. This can be achieved by determining error distributions to all but one of the neighbouring pixels by multiplication by a weight and determining the error distribution to the remaining neighbouring pixel by subtracting the other error distributions from the total error to be distributed.

For improved execution speed, error distributions corresponding to a particular pixel error value are often determined in advance and retrieved from a look up table.

In the Floyd and Steinberg error diffusion mask, the pixels which receive error distributions from a current pixel are on the current scanline and succeeding scanline only. An implementation of error diffusion with this mask requires the use of a single "line store" memory to store neighbourhood error values. The memory is referred to as a "line store" because it is required to store a neighbourhood error value for each pixel of a scanline. Many of the modifications to error diffusion which are referred to below are achieved at the cost of extra memory for an additional one or more line stores.

Error diffusion algorithms are used in the printing and display of digital images. Many modifications to the standard error diffusion algorithm have been developed.

Worm Artifacts

The error diffusion algorithm suffers from the disadvantage that in image regions of very low or very high intensity, it generates a pattern of image values in the halftoned image which are poorly spread--the exceptional values are concentrated in wavy lines. These patterns can be very noticeable and distracting to a viewer of the image--they are often known as "worm" artifacts.

FIG. 5 shows a section of a halftone output image generated by Floyd Steinberg error diffusion which shows worm artifacts. This halftone output was generated by bi-level halftoning of an 8 bit per pixel monochrome source image with a constant grey value of 253. FIG. 5 shows a halftone output image 500 which, as noted, shows worm artifacts, as illustrated by, for example, pairs of pixels 502, and a quadruplet of pixels 504.

Modifications to error diffusion have been developed to reduce worm artifacts.

Prior Art Methods of Reducing Worm Artifacts

One method of reducing worm artifacts is by addition of some randomisation. The randomisation may be achieved by adding noise to the input image, by adding noise to the thresholds or by randomising the error distribution to neighbouring pixels. A large amount of noise or randomisation can be added to fully avoid worm artifacts; however, this also seriously degrades the halftoned image.

Another method of reducing worm artifacts is to vary the direction in which scanlines are processed. By way of example, U.S. Pat. No. 4,955,065 titled "System for Producing Dithered Images from Continuous-tone Image Data" to Ulichney discloses error diffusion with perturbed weighting coefficients and bi-directional scanline processing.

Another method of reducing worm artifacts is by use of larger error diffusion masks. For example, in "Error Diffusion Algorithm with Reduced Artifacts", Eschbach R., Proceedings of the IS&T's 45th Annual Conference, May 10 15, 1992, either a large or a small error diffusion mask is used depending on the input image grey level. The large error diffusion mask is suited to use in image regions of very high or very low greyscale, reducing the worm artifacts in those regions. A disadvantage of this method is that large error diffusion masks which distribute error to pixels of more than 1 succeeding scanline require additional error line stores and associated processing.

A further method of reducing worm artifacts by use of an "extended distribution set" style of error diffusion mask is described in U.S. Pat. No. 5,353,127, titled "Method for Quantization Gray Level Pixel Data with Extended Distribution Set" to Shiau and Fan. This patent describes error diffusion masks including pixel positions of only the current and succeeding scanline with additional pixel positions on the next scanline to the left of (that is, behind) the current pixel.

FIG. 2 shows an error diffusion mask of U.S. Pat. No. 5,353,127. An error for a current pixel 208 is, in this case, distributed to five neighbouring pixels eg. 206, where each of these five pixels receives a fractional proportion of the error as indicated. Scanline processing is from left to right as depicted by an arrow 212, and previously processed pixels, eg. 210, are full shaded and lie above a bold line 204. The current pixel 208 lines on a current scanline 202. While this method is successful at reducing worm artifacts and only requires a single error line store, worm artifacts are still evident for bi-level halftoning of 8 bit grey scale image data, as can be seen in FIG. 6.

FIG. 6 shows example halftone output generated by bi-level error diffusion, using the mask of FIG. 2, for an 8 bit per pixel source image with constant grey value of 253, FIG. 6 shows an image 600 which exhibits worm artifacts as exemplified by reference numerals 602 and 604.

Prior Art Methods of Preventing Artifacts

While the above methods are successful in reducing worm artifacts, complete prevention of worm artifacts can also be achieved.

One method of preventing worm artifacts is by modulating threshold values. U.S. Pat. No. 5,535,019 titled "Error diffusion halftoning with homogeneous response in high/low intensity image regions" to Eschbach discloses a modification to error diffusion which adjusts the error diffusion threshold according to the halftone output and according to the input intensity using a threshold impulse function, for the purpose of preventing worm artifacts.

Another modification to error diffusion which prevents worm artifacts by threshold modulation is described in "A serpentine error diffusion kernel with threshold modulation for homogeneous dot distribution", Hong D., Kim C., Japan Hardcopy '98 pp 363 366, 1998 which is also published in IS&T's Recent Progress In Digital Halftoning II (1999) pp 306 309.

Another method of preventing worm artifacts is the addition of grey level dependent periodic noise to the input image, described in "Modified error diffusion with smoothly dispersed dots in highlight and shadow", Japan Hardcopy '98 pp 379 382, 1998 which is also published in IS&T's Recent Progress In Digital Halftoning II (1999) pp 310 313.

Another method of preventing worm artifacts is by imposing output position constraints. An example of this method is provided in "An error diffusion algorithm with output constraints for homogeneous highlight and shadow dot distribution", Marcu G., Proceedings of SPIE, Vol 3300, pp 341 352 (1998).

Disadvantages of Prior Art Methods of Preventing Worm Artifacts

In many cases the desirability of a halftoning algorithm is determined by how fast it executes and how easy it is to implement. For example, in software implementations in a printer driver on a general purpose computer, the algorithm execution speed is very important; whereas in special purpose hardware, the algorithm complexity and memory usage are very important because they relate strongly to the expense of the circuitry.

Use of additional line store memory by a halftoning algorithm generally indicates that it will execute slower in software and is more expensive to implement in hardware.

The modification to error diffusion disclosed in U.S. Pat. No. 5,535,019 to Eschbach requires use of memory for an additional line store to store threshold adjustment values generated by preceding scanlines for use by a current scanline. The modification also requires additional processing including addition of threshold impulse values and dampening of threshold values transferred to subsequent scanlines.

The modification to error diffusion described in the previously mentioned paper titled "A serpentine error diffusion kernel with threshold modulation for homogeneous dot distribution" also requires use of an additional line store memory to store threshold adjustment values. Additional processing is also required to diffuse threshold adjustment values.

The modification to error diffusion described in the previously mentioned paper titled "Modified error diffusion with smoothly dispersed dots in highlight and shadow" requires memory for additional line stores to store several neighbouring scanlines of processed input image data from which filtered input image values for a current scanline are determined; the filtered input image values arc used in turn to determine the noise to be added to the input image data.

The modification to error diffusion described in the previously mentioned paper titled "An error diffusion algorithm with output constraints for homogeneous highlight and shadow dot distribution" requires memory for additional lines stores to store halftoned image data for several previously processed scanlines. This modification also includes processing to exclude minority halftone output results when that result is present in a certain portion of the previously processed scanlines.

In summary, all the modifications listed above which prevent worm artifacts in error diffusion require use of additional line store memory together with the processing associated with use of that additional memory.

References made to prior art documents in the present description in no way constitutes an acknowledgment that the prior art documents are part of the common general knowledge.

SUMMARY OF THE INVENTION

It is an object of the present invention to substantially overcome, or at least ameliorate, one or more disadvantages of existing arrangements.

According to a first aspect of the invention, there is provided a method of halftoning an image, said method comprising steps of:

determining an output value of a current pixel on a current scanline using a sum of an input value for the current pixel and a neighbourhood error value at the current pixel;

determining an error at the current pixel as the difference between (i) the sum of the input value for the current pixel and the neighbourhood error value at the current pixel, and (ii) the output value of the current pixel; and

adding a proportion of the error at the current pixel to neighbourhood error values at as yet unprocessed pixels of a subsequent scanline in accordance with a next scanline error impulse response; wherein said next scanline error impulse response:

approximates a function which spreads with self-convolution in proportion to a degree of self-convolution.

According to another aspect of the invention, there is provided a method of generating an error diffusion mask suitable for use with any of the aforementioned methods.

According to another aspect of the invention, there is provided an error diffusion mask suitable for use with any of the aforementioned methods.

According to another aspect of the invention, there is provided a method of halftoning an image, said image comprising a plurality of pixels each having an input value and an assignable output value that can take on one of at least two output values, where pixels are processed scanline by scanline, and scanlines are processed one at a time from the top of the image to the bottom of the image, and where a scanline is processed pixel by pixel either from left to right or from right to left, and where the processing for each pixel comprises the steps of:

(a) determining the output value of a current pixel using a sum of the input value of the current pixel and a neighbourhood error value for the pixel;

(b) determining an error at the current pixel as the difference between, firstly, the sum of the input value of the current pixel and the neighbourhood error value for the pixel, and secondly the output value of the pixel;

(c) adding proportions of the error at the current pixel to the neighbourhood error values of yet to be processed pixels of the current and next scanline;

and where the said proportions of the error at a current pixel are designed so that the next scanline error impulse response, being that function which maps

(A) from a horizontal pixel offset;

(B) to the total proportion of the error at the current pixel added to the neighbourhood error of that pixel of the next scanline which is displaced by the horizontal pixel offset from the current pixel, following complete processing of the current scanline;

approximates a function which spreads with self-convolution in proportion to the degree of self-convolution.

According to another aspect of the invention, there is provided a method of halftoning an image, said image comprising a plurality of pixels each having an input value and an assignable output value that can take on one of at least two output values, where pixels are processed scanline by scanline and scanlines are processed one at a time from the top of the image to the bottom of the image, and where a scanline is processed pixel by pixel either from left to right or from right to left, and where the processing for each pixel comprises the steps of:

(a) determining the output value of a current pixel using a sum of the input value of the current pixel and a neighbourhood error value for the pixel;

(b) determining an error at the current pixel as the difference between, firstly, the sum of the input value of the current pixel and the neighbourhood error value for the pixel, and secondly the output value of the pixel;

(c) selecting, using the current pixel input value, a set of proportions and a set of corresponding pixel position offsets, from a family of sets of proportions and corresponding pixel position offsets;

(d) adding the selected proportions of the error at the current pixel to the neighbourhood error values of yet to be processed pixels at pixel positions offset from the current pixel by the selected corresponding pixel position offsets;

and where each set of the said family of sets of proportions and corresponding pixel offsets, is designed so that the next scanline error impulse response corresponding to that set, being that function which maps

(A) from a horizontal pixel offset;

(B) to the proportion of the error at the current pixel added to the neighbourhood error of that pixel of the next scanline displaced by the horizontal pixel offset from the current pixel, following complete halftone processing of the current scanline using only the said set of proportions and corresponding pixel offsets;

approximates a function which spreads with self-convolution in proportion to the degree of self-convolution.

According to another aspect of the invention, there is provided a method of halftoning an image, said image comprising a plurality of pixels each having an input value and an assignable output value that can take on one of at least two output values, where pixels are processed scanline by scanline and scanlines are processed one at a time from the top of the image to the bottom of the image, and where a scanline is processed pixel by pixel either from left to right or from right to left, and where the processing for each pixel comprises the steps of:

(a) determining the output value of a current pixel using a sum of the input value of the current pixel and a neighbourhood error value for the pixel;

(b) determining an error at the current pixel as the difference between, firstly, the sum of the input value of the current pixel and the neighbourhood error value for the pixel, and secondly the output value of the pixel;

(c) selecting, using the current pixel input value, a set of proportions and a set of corresponding pixel position offsets, from a family of sets of proportions and corresponding pixel position offsets, said set of proportions being in accordance with a next scanline error impulse response that approximates a function which spreads with self-convolution in proportion to a degree of self-convolution;

(d) adding the selected proportions of the error at the current pixel to the neighbourhood error values of yet to be processed pixels at pixel positions offset from the current pixel by the selected corresponding pixel position offsets;

and where each set of the said family of sets of proportions and corresponding pixel offsets, only includes pixel offsets corresponding to pixels on the same scanline as the current pixel or to pixels on the next scanline.

According to another aspect of the invention, there is provided an apparatus for halftoning an image, said apparatus comprising:

means for determining an output value of a current pixel on a current scanline using a sum of an input value for the current pixel and a neighbourhood error value at the current pixel;

means for determining an error at the current pixel as the difference between (i) the sum of the input value for the current pixel and the neighbourhood error value at the current pixel, and (ii) the output value of the current pixel; and

means for adding a proportion of the error at the current pixel to neighbourhood error values at as yet unprocessed pixels of a subsequent scanline in accordance with a next scanline error impulse response; wherein said next scanline error impulse response:

approximates a function which spreads with self-convolution in proportion to a degree of self-convolution.

According to another aspect of the invention, there is provided an apparatus for halftoning an image, said apparatus comprising:

a memory for storing a program;

a processor for executing the program, said program comprising:

code for a determining step for determining an output value of a current pixel on a current scanline using a sum of an input value for the current pixel and a neighbourhood error value at the current pixel;

code for a determining step for determining an error at the current pixel as the difference between (i) the sum of the input value for the current pixel and the neighbourhood error value at the current pixel, and (ii) the output value of the current pixel; and

code for an adding step for adding a proportion of the error at the current pixel to neighbourhood error values at as yet unprocessed pixels of a subsequent scanline in accordance with a next scanline error impulse response; wherein said next scanline error impulse response:

approximates a function which spreads with self-convolution in proportion to a degree of self-convolution.

According to another aspect of the invention, there is provided a computer program product including a computer readable medium having recorded thereon a computer program for directing a processor to execute a method for halftoning an image, said program comprising:

code for a determining step for determining an output value of a current pixel on a current scanline using a sum of an input value for the current pixel and a neighbourhood error value at the current pixel;

code for a determining step for determining an error at the current pixel as the difference between (i) the sum of the input value for the current pixel and the neighbourhood error value at the current pixel, and (ii) the output value of the current pixel; and

code for an adding step for adding a proportion of the error at the current pixel to neighbourhood error values at as yet unprocessed pixels of a subsequent scanline in accordance with a next scanline error impulse response; wherein said next scanline error impulse response:

approximates a function which spreads with self-convolution in proportion to a degree of self-convolution.

According to another aspect of the invention, there is provided a computer program for directing a processor to execute a method for halftoning an image, said program comprising:

code for a determining step for determining an output value of a current pixel on a current scanline using a sum of an input value for the current pixel and a neighbourhood error value at the current pixel;

code for a determining step for determining an error at the current pixel as the difference between (i) the sum of the input value for the current pixel and the neighbourhood error value at the current pixel, and (ii) the output value of the current pixel; and

code for an adding step for adding a proportion of the error at the current pixel to neighbourhood error values at as yet unprocessed pixels of a subsequent scanline in accordance with a next scanline error impulse response; wherein said next scanline error impulse response:

approximates a function which spreads with self-convolution in proportion to a degree of self-convolution.

BRIEF DESCRIPTION OF THE DRAWINGS

One or more embodiments of the present invention will now be described with reference to the drawings, in which:

FIG. 1 shows an error diffusion mask as described by Floyd and Steinberg;

FIG. 2 shows an error diffusion mask in accordance with U.S. Pat. No. 5,353,127 (Shiau and Fan);

FIG. 3 shows the mask positions of an exemplary error diffusion mask, designed in accordance with an arrangement described herein;

FIG. 4 shows a tabular representation of the mask weight values of the exemplary error diffusion mask shown in FIG. 3;

FIG. 5 shows a halftone output image generated in accordance with the Floyd Steinberg mask shown in FIG. 1;

FIG. 6 shows an exemplary halftone output image in accordance with bi-level error diffusion, using the mask shown in FIG. 2;

FIG. 7 shows a halftone output image produced using the mask shown in FIG. 3;

FIG. 8 shows distribution of pixel errors for error diffusion using a single error line store;

FIG. 9 shows error diffusion processing for an arbitrary pixel;

FIG. 10 shows an alternate arrangement of error diffusion processing on a per pixel basis;

FIG. 11 shows error diffusion processing per pixel in accordance with current and next scanline error impulse response functions;

FIG. 12 provides a representation of a conservative vector field;

FIG. 13 shows an nth next scanline error impulse response function using an approximate Cauchy distribution;

FIG. 14 shows self convolutions of a next scanline error impulse response function for Floyd Steinberg error diffusion;

FIG. 15 shows self convolutions of a next scanline error impulse response function for U.S. Pat. No. 5,353,127 error diffusion;

FIG. 16 shows self convolutions of a next scanline error impulse response function in accordance with a Cauchy distribution;

FIG. 17 is a block diagram representation of a system for performing pixel processing in accordance with a first arrangement described herein;

FIG. 18 shows a block diagram representation of a system for pixel processing using a second arrangement of the Cauchy distribution;

FIG. 19 shows an exemplary family of error diffusion masks for a second arrangement using a Cauchy distribution;

FIG. 20 shows a tabular representation of a mapping between grey levels and the masks shown in FIG. 19;

FIG. 21 is a schematic block diagram of a general purpose computer upon which arrangements described herein can be practiced; and

FIG. 22 shows a block diagram of the processing per-pixel for error diffusion;

FIG. 23 shows a block diagram of the processing per-pixel for error diffusion in terms of impulse response functions;

FIG. 24 shows a 1-dimensional view of error diffusion;

FIG. 25 shows weights used in the Floyd-Steinberg Error Diffusion Method;

FIG. 26 shows an influence function for Floyd-Steinberg Error Diffusion;

FIG. 27 shows weights used in error diffusion according to Shiau and Fan;

FIG. 28 shows error diffusion outputs for a region of grey-level 253, for the three error diffusion methods indicated;

FIG. 29 shows a wide error diffusion mask, for which the next scanline error impulse response approximates a Cauchy distribution;

FIG. 30 shows mask weights for the various mask positions in the mask of FIG. 29;

FIGS. 31 to 33 show next scanline error impulse response functions for Floyd-Steinberg, Shiau and Fan, and Cauchy methods;

FIG. 34 shows the Cauchy distribution in terms of a vector field;

FIG. 35 shows error diffusion masks for a range of widths; and

FIG. 36 shows mappings between grey levels and masks of FIG. 35.

DETAILED DESCRIPTION INCLUDING BEST MODE

Where reference is made in any one or more of the accompanying drawings to steps and/or features, which have the same reference numerals, those steps and/or features have for the purposes of this description the same function(s) or operation(s), unless the contrary intention appears. Further descriptive material is to be found in Appendix A.

Some portions of the description which follows are explicitly or implicitly presented in terms of algorithms and symbolic representations of operations on data within a computer memory. These algorithmic descriptions and representations are the means used by those skilled in the data processing arts to most effectively convey the substance of their work to others skilled in the art. An algorithm is here, and generally, conceived to be a self-consistent sequence of steps leading to a desired result. The steps are those requiring physical manipulations of physical quantities. Usually, though not necessarily, these quantities take the form of electrical or magnetic signals capable of being stored, transferred, combined, compared, and otherwise manipulated. It has proven convenient at times, principally for reasons of common usage, to refer to these signals as bits, values, elements, symbols, characters, terms, numbers, or the like.

It should be borne in mind, however, that the above and similar terms are to be associated with the appropriate physical quantities and are merely convenient labels applied to these quantities. Unless specifically stated otherwise, and as apparent from the following, it will be appreciated that throughout the present specification, discussions utilizing terms such as "scanning", "calculating", "determining", "replacing", "generating" "initializing", "outputting", or the like, refer to the action and processes of a computer system, or similar electronic device, that manipulates and transforms data represented as physical (electronic) quantities within the registers and memories of the computer system into other data similarly represented as physical quantities within the computer system memories or registers or other such information storage, transmission or display devices.

The present specification also discloses apparatus for performing the operations of the methods. Such apparatus may be specially constructed for the required purposes, or may comprise a general purpose computer or other device selectively activated or reconfigured by a computer program stored in the computer. The algorithms and displays presented herein are not inherently related to any particular computer or other apparatus. Various general purpose machines may be used with programs in accordance with the teachings herein. Alternatively, the construction of more specialized apparatus to perform the required method steps may be appropriate. The structure of a conventional general purpose computer will appear from the description below.

In addition, the present specification also discloses a computer readable medium comprising a computer program for performing the operations of the methods. The computer readable medium is taken herein to include any transmission medium for communicating the computer program between a source and a designation. The transmission medium may include storage devices such as magnetic or optical disks, memory chips, or other storage devices suitable for interfacing with a general purpose computer. The transmission medium may also include a hard-wired medium such as exemplified in the Internet system, or wireless medium such as exemplified in the GSM mobile telephone system. The computer program is not intended to be limited to any particular programming language and implementation thereof It will be appreciated that a variety of programming languages and coding thereof may be used to implement the teachings of the disclosure contained herein.

Modifications to error diffusion are now described, which remove worm artifacts in highlight and shadow regions, by design of the error diffusion mask.

FIGS. 3 and 4 show an example of an error diffusion mask, designed as described in this document, which generates bi-level halftone output for 8 bit per pixel source images which is substantially free of worn artifacts; that is, all sparse halftone patterns are well-spread. FIG. 3 shows an error diffusion mask 300 in which error for a current pixel 306 is distributed to neighboring pixels on a current scanline 314, as well as pixels on a "next" scanline 316. Previously processed pixels are shown in full shade above a bold line 318, and it is noted that a current scanline 314 and a next scanline 316 contain pixels to which the error for the current pixel 306 is distributed. Current scanline pixels which receive error distribution from the current pixel 306 are represented by a group 312, and next line pixels are correspondingly represented by a group 310. FIG. 4 shows a tabular representation of the error distribution weight values for the error diffusion mask, and it is noted that the table 400 is made up of four columns 402 to 408. Columns 402 and 406 represent mask positions for the next and current scanlines respectively, and columns 404 and 408 represent the proportions in which the error from the current pixel are distributed.

The first arrangement is described for the case of halftoning a monochrome 8 bit per pixel input image to a bi-level output image.

A monochrome input image with pixel values g.sub.i,j being integers in the range 0 to 255 is used to generate a bi-level halftone output image with pixel values r.sub.i,j being the integers 0 and 255.

The halftone output value for each pixel is obtained by error diffusion, using an error diffusion mask which has been specially designed so that the next scanline error impulse response function, corresponding to the mask, approximates a Cauchy distribution which has been sampled and normalised.

An example of a suitable error diffusion mask for the first arrangement is the 12-13 mask described in FIGS. 3 and 4. This mask has weights for 12 pixel positions on the current scanline and 13 pixel positions on the next scanline and was prepared as described above. Use of such a specially designed error diffusion mask generates halftone output for which all sparse halftone patterns are well spread and substantially worm-free.

FIG. 7 shows halftone output using this mask for a source image of constant grey level 253. FIG. 7 shows an image 700 which is substantially free from worm artifacts, as exemplified by dots 702 and 704, which are well spaced from their neighbours. This description includes: a definition of the term "next scanline error impulse response" function; arguments supporting the proposition that in order for error diffusion with mask positions on the current and next scanlines to be worn-free, it is desirable that the next scanline error impulse response function should spread in proportion to the degree of self-convolution, or stated alternatively, should approximate a Cauchy distribution; a method for generating error diffusion masks for which the next scanline error impulse response function is optimised to approximate a function which spreads in proportion to the degree of self-convolution, ie. is optimised to approximate a Cauchy distribution.

It will also be shown that the requirement that the next scanline error impulse response function should spread in proportion to the degree of self-convolution is closely related to the requirement that it should approximate a Cauchy distribution.

Influence of a Pixel Decision on Subsequent Pixel Decisions

With standard error diffusion, if the modified input value of a pixel is lower than the threshold, then the halftone result is set low and the error distributed to neighbouring pixels acts to increase the likelihood that neighbouring pixels are set high. Conversely if the modified input value of a pixel is higher than the threshold, then the halftone result is set high and the error distributed to neighbouring pixels acts to increase the likelihood that neighbouring pixels are set low.

The proportion of the (non-zero) error of an arbitrary reference pixel which contributes to the neighbourhood error of a subsequently processed pixel of interest, is a measure of a disincentive to assign the pixel of interest the same halftone output result as the reference pixel.

Due to the typically sequential processing of pixels, and because the processing of each pixel includes the distribution (according to the error diffusion mask) of that pixel's error, being the sum of that pixel's neighbourhood error (the error distributed to that pixel) and that pixel's pixel-only error, a pixel contributes a proportion of its error to the neighbourhood error of pixels which are beyond those to which it directly distributes error.

Error Diffusion Implementable with a Single Error Line Store

Error diffusion is now described, where: (a) pixels are processed one at a time across a scanline or row, either left to right or right to left, and scanlines are processed one after another from the top to the bottom of the image; and (b) the error diffusion mask includes only pixel positions in the current and succeeding scanline.

FIG. 8 is a diagram indicating, for this class of error diffusion, the pixels to which error is distributed. FIG. 8 a representation 800 in which a current pixel 802 is shown on a current scanline 812, where scanline processing is from left to right as depicted by an arrow 806, and where previously processed pixels eg. 804 are full shaded. Current scanline mask positions eg. 808 denote mask values for pixel positions on the current scanline, and are designated mask.sub.curr[i](i>0). Next scanline mask positions eg. 810 denote mask values for pixel positions on the next scanline, and are designated mask.sub.next[i]. Mask positions on the current and next scanlines are identified by a horizontal pixel offset "i". Horizontal pixel offsets are shown in FIG. 8 by circled numbers 816.

Error Diffusion Processing per Pixel

FIG. 9 shows error diffusion processing per pixel, for an arbitrary pixel of column i and scanline j. FIG. 9 shows a block diagram representation 900 where an input image grey level at pixel (i,j) ie. 902 is provided to an addition process 904 which outputs, on a line 906, the sum of the input image grey level (g.sub.i,j), a total error distributed directly to pixel (i,j) from pixels of the current scanline (e_curr_line.sub.i,j), and a total error distributed directly to the pixel (i,j) from pixels of a previous scanline (e_prev_line.sub.i,j).

The output signal on the line 906 is provided, on a line segment 908, to a threshold process 912 where it is compared against a threshold to obtain a halftone result for the pixel on a line 914, and subsequently on a line segment 916, the halftone result being designated r.sub.i,j. The modified input value on the line 906 is also provided on a line segment 910 to an adder process 920 which receives a negative value of the halftone result for the pixel on a line segment 918. An output from the addition process 920 is an error for distribution (designated e_combined.sub.i,j) on a line 922. This error for distribution is provided on a line 924 to a current scanline error distribution unit (designated mask.sub.curr) 934 which distributes the combined pixel error e_combined.sub.i,j, as shown by an exemplary arrow 932, to unprocessed pixels of the current scanline in a current line error buffer 930. An output from the current line error buffer 930 is provided on a line 928 (the signal being designated as e_curr_line.sub.i,j) and is delivered to an adder process 948. The combined pixel error e_combined.sub.i,j is also provided on a line 926 to a next scanline error distribution unit (designated as mask.sub.next) 936, which outputs, as exemplified by an arrow 938, corresponding values to pixels of the next scanline which are stored in a line store error buffer 940. The buffer 940 provides an output on a line 942 to an error line store 944. On a line 946, a value is retrieved from the error line store, the value being the total error distributed directly to a pixel (i,j) from pixels of the previous scanline, ie. e_prev_line.sub.i,j.

Operation of the process of FIG. 9 is described by the following 4 steps.

Step 1. Derive a modified input value for the pixel as: g.sub.ij+e_curr_line.sub.ij+e_prev_line.sub.ij (30) where: g.sub.ij is the input image grey level at pixel (i,j), e_curr_line.sub.ij is the total error distributed directly to pixel (i,j) from pixels of the current scanline, and e_prev_line.sub.ij is the total error distributed directly to pixel (i,j) from pixels of the previous scanline;

Step 2. Compare the modified input value against a threshold to obtain the halftone result for the pixel, denoted as r.sub.ij

Step 3. Calculate an error for distribution as: e_combined.sub.ij=e.sub.ij+e_curr_line.sub.ij+e_prev_line.sub.ij (1) where: e.sub.ij is the pixel-only error equal to g.sub.ij-r.sub.ij

Step 4. Distribute the combined pixel error, e_combined.sub.ij according to the error diffusion mask to unprocessed pixels of the current scanline and pixels of the next scanline.

In step 1, the total error distributed to a pixel (i,j) from previously processed pixels is referred to as the "neighbourhood error" at pixel (i,j). The neighbourhood error, e_nbr.sub.ij, modifies the pixel input value prior to thresholding and is given by: e.sub.--nbr.sub.ij=e_curr_line.sub.ij+e_prev_line.sub.ij (2)

In step 4 error values which are portions of the combined pixel error, e_combined.sub.ij are used to update error sum values in a current line error buffer and in a line store error buffer.

Each error sum value in the current line error buffer is associated with a pixel position on the current scanline ahead of the current pixel--a "future pixel" of the current scanline; that error sum value is the sum of error values distributed directly to that future pixel from processed pixels of the current scanline.

Similarly, each error sum value in the line store error buffer is associated with a pixel position on the next scanline--a "next scanline pixel"; that error sum value is the sum of error values distributed directly to that next scanline pixel from processed pixels of the current scanline.

The number of error sum values in the current line error buffer and in the line store error buffer need only be as large as the number of error diffusion mask positions on the current scanline and next scanline respectively.

In step 4, once the error sum values in the line store error buffer have been updated, one value in the line store error buffer is complete, in that it will receive no fiber contributions, and it is transferred to the error line store.

The number of error sum values in the error line store needs to be (and need only be) as large as the number of pixels on a scanline--hence the name "line store".

The error sum values in the error line store generated by processing one scanline are used as input in the processing of the next scanline. When each pixel is processed: one error line store value is read (and the memory location from which it is read becomes available to store another error line store value) error sum values in the line store error buffer are updated, and one error line store value is written.

FIG. 10 shows an alternative implementation 1000 of the error diffusion processing per pixel. The input image grey level at pixel (i,j), ie g.sub.i,j is provided to an adder process 1004 on a line 1002. The adder process 1004 outputs, on a line 1006, the sum of the input image grey level (g.sub.i,j), the total error distributed directly to pixel (i,j) from pixels of the current scanline (ie. e_curr_line.sub.i,j), and the total error distributed directly to the pixel (i,j) from pixels of the previous scanline (ie. e_prev_line.sub.i,j). This value on the line 1006 is provided, by a line segment 1008, to a threshold process 1012 for comparison against a threshold, which consequently produces, on a line 1014, the output result for the pixel (ie. r.sub.i,j) on a line 1016.

An inverse of the halftone result (ie. negative r.sub.i,j) is provided on a line 1018 to an addition process 1020, along with the modified input value (ie. g.sub.i,j+e_curr_line.sub.i,j+e_prev_line.sub.i,j) on a line 1010. An output from the addition process 1020 is provided on a line 1022, this being the error for distribution e_combined.sub.i,j. This error for distribution is provided on a line 1024 to the current scanline error distribution unit (designated as mask.sub.curr) 1028, which outputs, as exemplified by an arrow 1030, error distributions to unprocessed pixels of the current scanline in a current line error buffer 1032. The buffer 1032 consequently outputs the total error distributed directly to pixel (i,j) from pixels of the current scanline (ie e_curr_line.sub.i,j) on a line 1034 to an addition process 1036. The error for distribution on the line 1022 is also distributed, on a line 1026, to an error line store 1038. From the error line store a weighted sum of error values is retrieved on a line 1040 to a next scanline error distribution unit (designated as mask.sub.next) 1042, which distributes the weighted sum, as exemplified by an arrow 1044, to a line store error buffer 1046. The buffer 1046 provides, on a line 1048, the total error distributed directly to the pixel (i,j) from pixels of the previous scanline (ie. e_prev_line.sub.i,j) to the addition process 1036.

The difference between the 2 implementations, is that in the alternative implementation: (a) the combined error at a pixel is written to a location in the error line store; (b) the contribution to neighbourhood error by direct distribution from pixels of a previous scanline is determined as a weighted sum of error values retrieved from the error line store. That is, in the alternative implementation, distribution of error to pixels of the next scanline is achieved by gathering error values from the line store, rather than distributing error amongst line store locations.

An analysis is presented below concerning self-convolution of a next scanline error impulse response function. That analysis is described referring to FIG. 9; however the same analysis also applies to the alternative implementation of FIG. 10.

Next Scanline Error Impulse Response Function for Error Diffusion Implementable with a Single Error Line Store

Error diffusion is now considered for the case where 100% of the combined pixel error is distributed to as yet unprocessed pixels (step 4 above), and the fraction of error distributed to the next scanline is considered to be positive and non-zero.

Further, error diffusion is considered for the case where the error diffusion mask weights do not change from pixel to pixel. That is, it is assumed that the processing per pixel is spatially invariant.

The distribution of the combined pixel error of an arbitrary reference pixel (but which is not near the left and right edges of the image) is now considered according to the error diffusion mask. Part of that combined pixel error is distributed to pixels of the next scanline, and the remainder of the combined pixel error is distributed to pixels of the current scanline. This remainder error remains subject to error distribution according to the error diffusion mask as part of the processing of the current scanline. With the complete processing of the current scanline, effectively all of the combined error of the reference pixel is distributed to pixels of the next scanline.

The distribution of combined pixel error of an arbitrary reference pixel of the current scanline to pixels of the next scanline, as a result of the complete processing of the scanline, defines a "next scanline error impulse response" function which is denoted as h.sub.next. To be precise, h.sub.next is defined as a function which maps integers to real values; where h.sub.next[i] is that fraction of the error at a reference pixel which, following the complete processing of the scanline of the reference pixel, is distributed to the pixel on the next scanline horizontally offset i from the reference pixel. This is shown illustratively with reference to FIG. 13.

Self-Convolutions of the Next Scanline Error Impulse Response Function

As the domain of the function h.sub.next is the set of integers, it can also be considered as a (two-sided) sequence.

The set of input image grey levels, g.sub.ij, is considered for a scanline j as a sequence, and the sequence is denoted as g.sub.j.

Similarly: the sequence of error sum values, e_prev_line.sub.ij, being sums of errors distributed directly to pixels of scanline j from scanline j-1, is denoted as e_prev_line.sub.j; the sequence of halftone output image values for scanline j is denoted as r.sub.j; the sequence of pixel-only errors for scanline j is denoted as e.sub.j.

For the class of error diffusion considered, the processing performed for each scanline, j, can be considered to take as input the following: e_prev_line.sub.j, g.sub.j (31)

and produces as output the following: r.sub.j, e.sub.j, e_prev_line.sub.j+1 (32)

For the implementation of FIG. 9, as part of the processing of scanline j, the sequence of values e_prev_line.sub.j are read from the error line store and the sequence of values e_prev_line.sub.j+1 are written to the error line store.

From the definition of the next scanline error impulse response function, the following can be written: e_prev_line.sub.j+1=(e.sub.j+e_prev_line.sub.j)*h.sub.next (3)

That is, the sequence of sums of error values distributed directly to pixels of scanline j+1 from scanline j can be represented as the sum of the error sequence for scanline j and the sequence of sums of error values distributed directly to pixels of scanline j from scanline j-1 convolved with the next scanline error impulse response function.

Here the convolution of 2 sequences is denoted by '*' and the sequence formed by the convolution of 2 sequences, f and g is defined as: (f*g)[i]=.SIGMA..sub.k.epsilon.Zf[i-k]g[k] (33) where Z is the set of all integers.

Assuming that the next scanline error impulse response function is the same for each scanline, (3) can be applied recursively, and the sequence of sums of error values distributed directly to pixels of a scanline from the previous scanline can be written as a weighted sum of pixel only errors of pixels of preceding scanlines.

That is,

.times..times..times..times..times..times..times..times..times..times..tim- es..times. ##EQU00001## and so on, giving e_prev_line.sub.j=.SIGMA..sub.1<je.sub.1*h.sub.next*.sup.(j-1) (4) where h.sub.next*.sup.n denotes the sequence formed as the convolution of the sequence h.sub.next with itself 'n-1' times. So that h.sub.next*.sup.1=h.sub.next (35) h.sub.next*.sup.2=h.sub.next*h.sub.next and so on. (36) The Current Scanline Error Impulse Response Function in Terms of the Error Diffusion Mask

The error diffusion mask can be represented using 2 functions which map the integers into real values, mask.sub.curr and mask.sub.next, where:

mask.sub.curr[i] is the error diffusion mask weight for that pixel on the current scanline horizontally offset by 'i' from the reference pixel being processed; and

mask.sub.next[i] is the error diffusion mask weight for that pixel on the next scanline horizontally offset by 'i' from the reference pixel being processed.

FIG. 8 shows horizontal pixel offsets 816 from a reference pixel, together with mask positions 808 and 810 on the current and next scanline respectively.

Due to the sequential processing of pixels of the current scanline, mask.sub.curr[i]=0 for i<=0. (37)

As a consequence of the error diffusion processing per pixel and from considering FIG. 9 it is seen that: e_curr_line.sub.i,j=.SIGMA..sub.k.epsilon.Ze_combined.sub.i-k,jmask.sub.c- urr[k] (38)

That is, the corresponding sequences are related by the convolution operation: e_curr_line.sub.j=e_combined.sub.j*mask.sub.curr (5)

The sequence e_combined.sub.j is the same as (e.sub.j+e_curr_line.sub.j+e_prev_line.sub.j), and so: e_curr_line.sub.j=(e.sub.j+e_curr_line.sub.j+e_prev_line.sub.j)*mask.sub.- curr (6)

By repeatedly replacing e_curr_line.sub.j in the right hand side of (6) with the entire right hand side of (6), the following relationship results: e_curr_line.sub.j=(e.sub.j+e_prev_line.sub.j)*(mask.sub.curr+mas- k.sub.curr*mask.sub.curr+ . . . ) (39)

That is, e_curr_line.sub.j=(e.sub.j+e_prev_line.sub.j)*h.sub.curr (7) where h.sub.curr is the function (sequence) given by: h.sub.curr=mask.sub.curr+mask.sub.curr*.sup.2+mask.sub.curr*.sup.3+ (8)

h.sub.curr is equivalently defined by the recursive definition: h.sub.curr=(.delta.+h.sub.curr)*mask.sub.curr (9) where .delta. is the delta function (sequence) given by: .delta.[k]=1 for k=0 (40) .delta.[k]=0 for k.noteq.0 (41)

h.sub.curr is referred to as the current scanline error impulse response function.

The Next Scanline Error Impulse Response Function in Terms of the Error Diffusion Mask

As is the case for the current scanline error impulse response function, the next scanline error impulse response function is determined by the error diffusion mask.

As a consequence of the error diffusion processing per pixel and from considering FIG. 9 the following relationship can be expressed: e_prev_line.sub.i,j+1=.SIGMA..sub.k.epsilon.Ze_combined.sub.i-k,jmask.sub- .next[k] (42)

That is, the corresponding sequences are related by the convolution operation: e_prev_line.sub.j+1=e_combined.sub.j*mask.sub.next (10)

As above, using the fact that the sequence e_combined.sub.j is the same as (e.sub.j+e_curr_line.sub.j+e_prev_line.sub.j), the following is seen: e_prev_line.sub.j+1=(e.sub.j+e_curr_line.sub.j+e_prev_line.sub.j)*mask.su- b.next (11)

By replacing e_curr_line.sub.j in the right hand side of (11) with the right hand side of (7), the following is seen: e_prev_line.sub.j+1=(e.sub.j+e_prev_line.sub.j+(e.sub.j+e_prev_line.sub.j- )*h.sub.curr)*mask.sub.next (43) which can be re-written as e_prev_line.sub.j+1=(e.sub.j+e_prev_line.sub.j)*((.delta.+h.sub.curr)*mas- k.sub.next) (44)

Comparing this with (3), it is seen that that the next scanline error impulse response function is given by: h.sub.next=(.delta.+h.sub.curr)*mask.sub.next (12)

By substituting the expansion of h.sub.curr of (8) into (12) it is seen that h.sub.next=mask.sub.next*(.delta.+mask.sub.curr+mask.sub.curr*.sup.2- +mask.sub.curr*.sup.3+ . . . ) (13) Current and Next Scanline Error Impulse Response Functions for Standard Error Diffusion

To assist an understanding of the above definitions of the current and next scanline error impulse response functions, the current and next scanline error impulse response for standard (Floyd Steinberg) error diffusion are now described.

For Floyd Steinberg error diffusion, the error diffusion mask is defined by the following mask functions:

.function..times..times..times..times..noteq..function..times..times..time- s..function..times..times..times..times.<.times..times..times..times.&g- t;.function..function..function. ##EQU00002##

For Floyd Steinberg error diffusion, the current scanline error impulse response function is given by:

.function..times..times..times..times.<.function..times..times..times..- times.> ##EQU00003## which is consistent with (8) and (9).

For Floyd Steinberg error diffusion, the next scanline error impulse response function is given by:

.function..times..times..times..times.<.function..function..function..t- imes..times..times..times.>.times. ##EQU00004## which is consistent with (12).

Description of Error Diffusion Processing in Terms of the Current and Next Scanline Error Impulse Response Functions

This description provides, firstly, further clarification of the current and next scanline error impulse response functions, and secondly, it is the basis for later discussion concerning desirable characteristics of the current and next scanline error impulse response functions.

FIG. 11 shows error diffusion processing per pixel in terms of the current and next scanline error impulse response functions, h.sub.curr and h.sub.next. The input image grey level at pixel (i,j), ie. g.sub.i,j, is provided, as depicted by an arrow 1102, to an addition process 1104. The addition process 1104 provides, as depicted by a line segment 1106, the sum of the input image grey level (g.sub.i,j), and the total error distributed directly to the pixel (i,j) from pixels of the previous scanline (ie. e_prev_line.sub.i,j) on a line 1108, to an addition process 1112, and also, on a line 1110, to an addition process 1124. The addition process 1112 provides an output on a line 1114 to a threshold process 1116, which compares the value against a threshold, consequently outputting the halftone result for the pixel r.sub.i,j on a line 1118. An inverted value of the halftone result (ie. -r.sub.i,j) is provided on a line 1122 to the addition process 1124.

The addition process 1124 outputs, on a line 1126, and on a line segment 1128, an aggregate value to a current scanline error impulse response distribution unit 1134 (designated h.sub.curr) which provides, as exemplified by an arrow 1134, values distributed to pixels of the current scanline in a buffer 1136. From a buffer 1136 on a line 1138, a value labelled as e_curr_line.sub.i,j is provided to the addition process 1112. In a similar manner, the signal on the line 1126 is provided, on a line segment 1130, to a next scanline error impulse response distribution unit (designated h.sub.next) 1140 which, as exemplified by an arrow 1142, distributes a value in accordance with the next scanline error impulse response h.sub.next to pixels of the next scanline in a line store error buffer 1144. The buffer 1144 consequently outputs, on a line 1146, a value to the error line store 1148. From the error line store, a value labelled as e_prev_line.sub.i,j is retrieved and provided to the addition process 1104.

Now the labels, e_curr_line.sub.i,j and e_prev_line.sub.i,j in FIG. 11 are consistent with the previous definitions of these terms. This is because 1. the sequence resulting from applying the current scanline error impulse response to the sequence e.sub.j+e_prev_line.sub.j is the same as the sequence resulting from applying the current scanline mask coefficients to the sequence e_combined.sub.j, which can be seen from (5) and (7) follows: e_curr_line.sub.j=e_combined.sub.j*mask.sub.curr=(e.sub.j+e_prev_line.sub- .j)*h.sub.curr (49) 2. the sequence resulting from applying the next scanline error impulse response to the sequence e.sub.j+e_prev_line.sub.j is the same as the sequence resulting from applying the next scanline mask coefficients to the sequence e_combined.sub.j, which can be seen from (3) and (10) as follows: e_prev_line.sub.j+1=e_combined.sub.j*mask.sub.next=(e.sub.j+e_prev_line.s- ub.j)*h.sub.next (50)

That is, if h.sub.curr and h.sub.next are defined in terms of mask.sub.curr and mask.sub.next according to (8) or (9) and (12) or (13), then the processing described in relation to FIG. 11 is equivalent to the processing described in relation to FIGS. 9 and 10 in that they produce the same output. In each case, for each pixel, the same quantity, g.sub.i,j+e_curr_line.sub.i,j+e_prev_line.sub.i,j is applied to the threshold operation.

In general, for implementations of error diffusion, the processing models of FIG. 9 or 10 are preferred over the processing model of FIG. 11. This is because error diffusion masks with non-zero coefficients at a small number of pixel offset positions, correspond to current and next scanline error impulse response functions which typically have an unbounded number of non-zero function values.

However, the current and next scanline error impulse response functions and the processing model of FIG. 11 are useful for describing desirable features of error diffusion processing, and also for performing experiments to establish desirable features of error diffusion processing.

The neighbourhood error at a current pixel, is the total error distributed directly from previously processed pixels to the current pixel, and is used to modify the current pixel's input grey value prior to thresholding. Considering the sequence of neighbourhood errors for a scanline, the following is seen:

.times..times..times..times..times..times. ##EQU00005## giving, e.sub.--nbr.sub.j=E.sub.j*h.sub.curr+E.sub.j-1*h.sub.next (14)

The above equation (14) neatly isolates the contribution to neighbourhood error from pixels of the current scanline and pixels of the previous scanline in terms of a common error value per pixel. That common error value per pixel warrants a special name. The (previous scanlines) "modified pixel error" for a pixel (i,j) E.sub.i,j is defined as: E.sub.ij=e.sub.ij+e_prev_line.sub.ij (52)

Equation 14 provides assistance in inferring some conclusions regarding desirable characteristics of error diffusion.

Desirable Attributes of the Next Scanline Error Impulse Response Function: Requirement of Unity Sum

As noted earlier, in order that the average halftone image output matches the average image input, it is a requirement that the sum of the error diffusion coefficients should be 1. That is, .SIGMA..sub.i mask.sub.curr[i]+.SIGMA..sub.i mask.sub.next[i]=1 (15)

It follows from equations 13 and 15, assuming that the absolute value of the sum of error diffusion mask coefficients on the current scanline is less than 1, that the sum of coefficients of the next scanline error impulse response function is 1: .SIGMA..sub.i h.sub.next[i]=1 (16)

In summary, for the processing model of FIGS. 9 and 10, involving the 2 functions mask.sub.curr and mask.sub.next; the requirement that average halftone image output matches average image input is summarised by (15), whereas for the processing model of FIG. 11, the same requirement is sumnmarised by equation 16, involving only one function h.sub.next.

That is, in the processing model of FIG. 11, the current scanline error impulse response function can be varied independently, without compromising the requirement for average halftone output to match average image input.

Desirable Attributes of the Next Scanline Error Impulse Response Function: Requirement of Left-Right Symmetry

The next scanline error impulse response function as defined by equation 3, and as depicted in FIG. 11, does not show any dependence on whether current scanline processing is left to right or right to left.

If it is assumed that current scanline processing does a very good job of setting halftone output values for the scanline, and consequently generating pixel only error values for the scanline, then it is reasonable to assume that subsequent processing of the next scanline could be left to right or right to left and does not need to compensate for any left-right bias in the pixel only errors of the current scanline. It seems clear then that the next scanline error impulse response function should not be biased to left or right but be left-right symmetric.

A requirement is thus defined that the next scanline error impulse response function should be left-right symmetric.

In fact, some signal shifting or phase distortion due to the current scanline error impulse response function is inevitable because it is a causal filter. However, the signal shifting and phase distortion can be made small. So, it is reasonable to ignore compensation for left-right bias by use of the next scanline error impulse response function, at least for discussion of appropriate spreading of the next scanline error impulse response function.

Desirable Attributes of the Current and Next Scanline Error Impulse Response Functions: Requirement of being Monotonic Decreasing with Increasing Horizontal Pixel Offset

The current scanline error impulse response function measures the degree to which the halftone error at a current pixel on the current scanline should be taken account of in the halftone decision of a subsequently processed pixel on the current scanline.

Also, having concluded, at least to a first approximations that the next scanline error impulse response function should be left-right symmetric, there is no preference in whether a scanline is processed in the same direction as the preceding scanline. The next scanline error impulse response function contributes to the amount to which the halftone error at a current pixel on the current scanline is taken account of in the halftone decision of a pixel on the next scanline.

It is further suggested that both the current and next scanline impulse response functions should decrease monotonically with increasing horizontal pixel separation.

Desirable Attributes of the Next Scanline Error Impulse Response Function: Requirement of Similar Shape of Current and Next Scanline Error Impulse Response Functions

Having concluded, at least to a first approximation, that the next scanline error impulse response function should be left-right symmetric, it can be seen using (52) and (4) that each of the modified pixel error values, E.sub.ij, is a weighted sum of pixel-only errors and is obtained by convolution of pixel-only scanline sequences (e.sub.j), with left-right symmetric function h.sub.next*(i-1).

Thus, (2) and (14) isolate the asymmetric and symmetric influence of pixel only error of previously processed pixels on the halftone decision at a current pixel.

That is, the term e_curr_line.sub.ij=(E.sub.j*h.sub.curr)[i] (53)

is an asymmetric contribution to the neighbourhood error of pixel (i,j), being the error distributed to the pixel directly from pixels of the current scanline; whereas the term e_prev_line.sub.ij=(E.sub.j-1*h.sub.next)[i] (54)

is a symmetric contribution, being the error distributed to the pixel directly from pixels of the previous scanline.

In a similar argument to that for inferring monotonicity and left-right symmetry, it is suggested that the contribution to the neighbourhood error of the current pixel, from the modified error of previously processed pixels of the current scanline, should reduce with increasing horizontal separation in a singular fashion to the contribution from the modified error of previously processed pixels of the previous scanline. In his way no particular horizontal separation is favoured on either the current or previous scanline.

Desirable Attributes of the Next Scanline Error Impulse Response Function: Requirement of Appropriate Spreading

Experiments have been performed, observing halftone output when the next scanline error impulse response function has various shapes. In each case, the current scanline response function has the same shape as the next scanline response function, being determined from the next scanline response function by multiplication by a step function Note that in these simulations the number of non-zero values used for the current and next scanline response functions was set high to avoid misleading results due to truncation of the functions.

Experiment 1

In this case the next scanline error impulse response function is a sampling of the 2-sided exponential distribution.

.function..times..times..times..times.>.function. ##EQU00006## where a is a positive constant and w is a constant with 0<w<1

Note that with a=1, the above current and next scanline error impulse response functions correspond to the following mask functions

.function..times..times..times..times..function..times..times..times..time- s..noteq..function..times..times..times..times..times.<.times..times..t- imes..times..function..times..times..times..times.> ##EQU00007##

With a=1 and w=1/2, the above mask functions and functions h.sub.curr and h.sub.next provide an extension to U.S. Pat. No. 5,353,127 (Shiau & Fan) where the extended distribution set of the error diffusion mask is left extended without limit.

Observations for Experiment 1

When a=1 and w=1/2, halftone output at very low or very high grey levels suffers from worm type artifacts where the horizontal separation of minority pixels is too small These artifacts can be reduced by increasing either of the parameters a or w. However modifying these parameters so that minority pixels at very low or very high grey levels are better separated, introduces other unpleasant artifacts, including artifacts where for other grey levels the vertical separation between pixels becomes too small.

Experiment 2

In this case the next scanline error impulse response function is a sampling of the gaussian distribution.

.function..function..pi..times..times..times..times.>.function..functio- n..pi. ##EQU00008## where a, b, c are positive constants, with c chosen so that .SIGMA..sub.i h.sub.next[i]=1

The parameter b defines the width of the gaussian distribution.

Observations for Experiment 2

When a=1/2 and b=4, halftone output at low or high grey levels suffers from worm type artifacts where the horizontal separation of minority pixels is too small. These artifacts can be reduced by increasing a or b. However, again, modifying these parameters so that minority pixels at low or high grey levels are better separated, introduces other unpleasant artifacts, including artifacts where for other grey levels the vertical separation between pixels becomes too small.

Experiment 3

In this case the next scanline error impulse response function is a sampling of the Cauchy distribution (also known as the Lorentz distribution),

.function..times..times..times..times.>.function. ##EQU00009## where a, b, c arc positive constants, with c chosen so that .SIGMA..sub.i h.sub.next[i]=1

The parameter b controls the spread of the distribution.

Observations for Experiment 3

When a=1 and b=1, the halftone patterns for all grey levels with sparse halftone patterns are well spread. Also the general quality of the halftone output is high across all grey levels.

With 8 bit monochrome halftoning, the extreme sparse halftone patterns correspond to grey levels 1 and 254. By allowing fractional grey levels less than 1 the behaviour of error diffusion can be observed for halftone patterns which are much more sparse than the halftone patterns for grey level 1.

It is noted that the very sparse halftone patterns for sub-unity fractional grey values are also well spread when the Cauchy distribution is used for the current and next scanline response functions. That is, error diffusion processing using the Cauchy distribution appears capable of generating well spread halftone patters no matter how sparse the patterns.

When b is increased well above 1 the vertical separation of minority pixels in sparse halftone patterns is too small; when b is decreased well below 1 the horizontal separation of minority pixels in sparse halftone patterns is too small.

Experiment 4

In this case the next scanline error impulse response function is a generalisation of the Cauchy or Lorentz distribution.

.function..times..times..times..times.>.function. ##EQU00010## where a, b, c, p are positive constants, with c chosen so that .SIGMA..sub.i h.sub.next[i]=1 Observations for Experiment 4

With p set to be greater than 1, the observations are similar in character to those for experiments 1 and 2.

With p set to be less than 1 (but necessarily greater than 1/2), the halftone patterns for low or very high grey values are well spread horizontally, but the horizontal separation for intermediate grey values is too small.

Conclusion from the Experiments

As noted, the Cauchy distribution of experiment 3 generates well spread halftone patterns across the entire range of grey values with sparse patterns, while the other distributions fail to do so. It is believed the reason for the constrasting behaviours lies in the 'spread' of the distributions and in the spread of the self-convolutions of the distributions.

Expressing neighbourhood error in terms of the current and next scanline error impulse response functions and pixel only errors, from (2), (4), and (7) it is seen that: e.sub.--nbr.sub.j=e_curr_line.sub.j+e_prev_line.sub.j (59)* =(e.sub.j+e_prev_line.sub.j)*h.sub.curr+e_prev_line.sub.j (60) =(e.sub.j+.SIGMA..sub.1<je.sub.1*h.sub.next*.sup.(j-1))*h.sub.curr+.SI- GMA..sub.1<je.sub.1*h.sub.next*.sup.(j-1) (61)

Accordingly, if the strength of the next scanline error impulse response function and its self convolutions is weak beyond some width, then insufficient account is taken of pixel only error at pixels horizontally separated by that width or more. Hence the disincentive to place minority pixel results at that width is insufficient, leading to sparse patterns which are not spread enough horizontally.

Self-Convolution of the Cauchy Distribution

The Cauchy distribution is given by f(x)=(1/.pi.)(b/(b.sup.2+x.sup.2)) (17) where x is a real number and b is a real positive constant.

By change of variable from x to .theta., where tan .theta.=b/x, it can be shown that,

.intg..infin..infin..times..pi..times..times.d ##EQU00011##

The Cauchy distribution satisfies the following self-convolution equations: (1/.pi.)(b/(b.sup.2+x.sup.2))*(1/.pi.)(b/(b.sup.2+x.sup.2))=(1/.pi.)(2b/(- 2b).sup.2+x.sup.2)) (63) and for n=1, 2, 3 . . . (1/.pi.)(b/(b.sup.2+x.sup.2))*.sup.n=(1/.pi.)(nb/((nb).sup.2+x.sup.2)) (18)

These results can be established from Fourier Transform theory. The following definitions and notation for the Continuous Space Fourier Transform are used: Analysis equation/forward transform: F(w)=.intg..sup..infin..sub.-.infin.f(x)e.sup.-jwxdx (64) Synthesis equation/reverse transform f(x)=(1/2.pi.).intg..sup..infin..sub.-.infin.F(w)e.sup.jwxdw (65) Fourier Transform pair: f(x)F(w) (66)

The Fourier Transform pair corresponding to the double exponential distribution, with 'a' being a positive real constant, can be shown to be e.sup.-a|x|2a/(a.sup.2+w.sup.2) (67)

By the symmetry/duality property of the Fourier Transform (1/.pi.)a/(a.sup.2+x.sup.2)e.sup.-a|w| (68)

By the convolution property of the Fourier Transform, with b=a, ((1/.pi.)b/(b.sup.2+x.sup.2))*.sup.ne.sup.-nb|w| (69)

From this, (18) can be deduced. It can be stated that the Cauchy distribution is determined by its Continuous Space Fourier Transform which is a two-sided exponential function.

Discrete Convolution

Related equations exist for discrete convolution,

For k.epsilon.Z, let h[k]=(b/.pi.)((1+(-1).sup.k-1e.sup.-b.pi.)/(b.sup.2+k.sup.2)) (19) then for n=1, 2, 3 . . . h[k]*.sup.n=(nb/.pi.)((1+(-1).sup.k-1e.sup.-nb.pi.)/((nb).sup.2+k.sup.2)) (20) and .SIGMA..sub.k.epsilon.Z h[k]=1 (21)

The above equations can be established using Fourier Transform theory, either using Fourier Series or using the Discrete Space Fourier Transform. The following notation is used for the Discrete Space Fourier Transform:

Synthesis equation: h[k]=(1/2.pi.).intg..sub.2.pi.H(e.sup.jw)e.sup.jwkdw (70)

Analysis equation: H(e.sup.jw)=.SIGMA..sub.k.epsilon.Z h[k]e.sup.-jwk (71) the use of the argument, e.sup.jw, rather than w, indicates that the function, H, is periodic in w, with period 2.pi., so that: H(e.sup.j(w+2.pi.))=H(e.sup.jw) for all w. (72)

The sequence (or discrete signal or discrete space function), h[k] of (19), has the Discrete Space Fourier Transform given by: H(e.sup.jw)=e.sup.-b|w| for -.pi..ltoreq.w.ltoreq..pi.. (73)

It can be stated that the discrete space function of (19) is determined by its Discrete Space Fourier Transform which is a replicated two-sided exponential function.

Equation (20) follows by considering the self-convolution of the function of equation 19 and from the convolution property for the Discrete Space Fourier Transform. (That is, the convolution of 2 discrete time functions is the product of their Fourier Transforms.)

Equation (21) follows by considering the value of H at w=0.

The sequence, or discrete space function, h[k]=(sin h(b.pi.)b/.pi.)(-1).sup.k/(b.sup.2+k.sup.2) (74) has the Discrete Space Fourier Transform given by H(e.sup.jw)=cos h(bw)=(e.sup.bw+e.sup.-bw)/2 for -.pi..ltoreq.w.ltoreq..pi. (75)

Considering the value of H at w=.pi. gives .SIGMA..sub.k.epsilon.Z(b/.pi.)(1/(b.sup.2+k.sup.2))=cot h(b.pi.) (22)

Considering equations (19) and (22) with b=1, it is seen that e.sup.-.pi. is much less than 1, being approximately 0.0432 and tan h(.pi.)=1/cot h(.pi.) is close to 1, being approximately 0.9963.

So, defining h[k] according to the following equation: h[k]=(tan h(.pi.)/.pi.)(1/(1+k.sup.2)) (23) it is deduced by setting b=1 in (22) that: .SIGMA..sub.k.epsilon.Zh[k]=1 (76) Further, h[k] according to (23) satisfies the following approximation: h[k].apprxeq.(1/.pi.)(1/(1+k.sup.2)) (77) and h[k]*.sup.n.apprxeq.{(1/.pi.)(1+(-1).sup.k-1e.sup.-.pi.)/(1+k.sup.2)}*.su- p.n=(n/.pi.)(1+(-1).sup.k-1e.sup.-n.pi.)/(n.sup.2+k.sup.2) (78) .apprxeq.(n/.pi.)(1/(n.sup.2+k.sup.2)) for n=1, 2, 3 (79)

The function of equation (23) can be considered a discrete approximation to the (continuous) Cauchy distribution with 'b' parameter equal to 1; it is derived from that Cauchy distribution by sampling and by normalising so that the sum of the function values is 1.

The Cauchy Distribution Spreads in Proportion to the Degree of Self-Convolution

Considering (18), it is seen that the Cauchy distribution has the remarkable property that repeated self-convolution preserves the form of the distribution. The self convolution of degree n of the Cauchy distribution is a scaled copy of the original distribution on a scaled axis: f(x)*.sup.n=(1/.pi.)(nb/((nb).sup.2+x.sup.2))=(1/n)(1/.pi.)(b/(b.su- p.2+(x/n).sup.2)) (80) So that f(x)*.sup.n=(1/n)f(x/n) (24)

The variance of the Cauchy distribution is not finite. An alternative measure of the width of the distribution is provided by the "equivalent width" as described in "The Fourier Transform and its Applications" by R. N. Bracewell (page 148) as follows.

The equivalent width of a function is the width of the rectangle whose height is equal to the central ordinate and whose area is the same as that of the function:

.intg..infin..infin..times..function..times.d.function. ##EQU00012##

From (17) and (18), or from (24) it can be seen that the central ordinate of the self-convolution of degree n of the Cauchy distribution is 1/n times the central ordinate, f(0), of the Cauchy distribution. The area under f(x) is 1; and as a consequence the area under f(x)*.sup.n is also 1. So the equivalent width of the Cauchy distribution increases in proportion to the degree of self-convolution.

The Flux Density of a Point Source, Conservative Vector Field through a Straight Line is Described by the Cauchy Distribution

The manner in which the Cauchy distribution spreads in proportion to the degree of self-convolution can also be shown graphically.

FIG. 12 shows a vector field, A, with vector magnitude given by 1/r where r is the distance from a source point, O (ie. 1216), and vector direction pointing away from O. This vector field is conservative in that the flux out of any simple closed curve, not enclosing the source point, is zero. The magnitude of the vector field can be considered as a signal which spreads uniformly in 2 dimensions out from O, preserving its strength that is, reducing in proportion to the length of its circular wavefront.

Considering the flux across a horizontal line, L (ie. 1202), which has P (ie. 1214), its nearest point to O (ie. 1216), at a distance b (ie. 1210) from O (ie. 1216), the flux density function, f(x), is defused as a function of the offset, x, along the line from P, such that

.intg..delta..times..function..times.d ##EQU00013## is the flux of the vector field through a segment [s,t] of line L.

Let the angle which a point at offset x along the line L, makes with the line from O to P be .theta. (ie. 1220), then f(x) is given by f(x)=c(1/r)cos .theta. (83) with c being a constant

Choosing c to be 1/.pi. so that the total flux through the line L is 1, we have f(x)=(1/.pi.)(1/r)(b/r)(1/.pi.)b/(b.sup.2+x.sup.2), (84) which is the Cauchy distribution.

The offset, x, and angle, .theta., are related by: x=b tan .theta. (25) dx/d.theta.=b(1+tan.sup.2.theta.) (85) d.theta./dx=b/(b.sup.2+x.sup.2) (26)

Using (25) and (26), confirms that the flux through a segment [s,t] (ie. 1218) is proportional to the angle, .theta..sub.st (ie. 1224), subtended at O as shown in the following:

.intg..times..times..times..times..theta..times..times..function..theta..t- heta..times..pi..times..times.d.pi..times..intg..times..theta..theta..thet- a..times.d.theta..theta..pi. ##EQU00014##

Considering another line, L' (ie. 1204), with nearest point at a distance nb (ie. 1206) from O and which is parallel to L. Segment [ns, nt] (ie. 1222) is the projection of segment [s,t] (ie. 1218) onto the line L' (ie. 1204), and subtends the same angle .theta..sub.st (ie. 1224) at O (ie. 1216).

The flux through segment [ns, nt] (ie. 1222) is also equal to .theta..sub.st/.pi. and is associated with a flux density function for line L' equal to the self-convolution of f(x) of degree n as follows:

.intg..times..times..times..times..times..function..times.d.intg..times..t- imes..times..times..times..times..function..times.d.intg..times..times..ti- mes..times..times..pi..times..times..times..times..times..times.d.intg..ti- mes..times..times..pi..times..times..times.d.theta..pi. ##EQU00015##

So It is seen that flux density functions given by the Cauchy distribution and its self convolutions correspond to a signal radiating from a point source which preserves its strength within any wedge formed by 2 rays emanating from the signal source point.

Desirability of the Next Scanline Error Impulse Response Function Spreading in Proportion to the Degree of Self-Convolution and Approximating a Cauchy Distribution

It has been shown that the spread of the next scanline error impulse response function and its self convolutions relates to the horizontal separation between minority pixels in sparse halftone patterns.

It has been shown by experiment that when the next scanline error impulse response function samples a Cauchy distribution with the a and b parameters close to 1, sparse halftone patterns are well spread and worm-free. As well, when the next scanline error impulse response function is derived from equation 19, sparse halftone patterns are again well spread and worm-free.

It has also been shown that self convolutions of the Cauchy distribution spread in proportion to the degree of self-convolution and maintain a radially uniform distribution of signal strength--neither shifting signal strength to the centre nor shifting it towards the extremities.

A Real, Symmetric Distribution which Spreads in Proportion to the Degree of Self-Convolution Must be a Cauchy Distribution

It can be shown that a real, symmetric continuous impulse response function which preserves the magnitude of the impulse, spreads in proportion to the degree of self-convolution and which acts as a smooth (continuous) low pass filter, dampening all non-zero frequencies must be a Cauchy distribution.

Consider a positive real valued impulse response function f(x).

The condition that f(x) spreads in proportion to the degree of self-convolution can be written as follows: f(x)*.sup.n=a f(x/n) for some constant a (88)

Let F(w) be the Fourier Transform of f(x). The condition that f(x) preserves the magnitude of the impulse can be written as follows: F(0)=.intg..sup..infin..sub.-.infin.f(x)dx=1 (89)

By reference to the Fourier convolution theorem, the condition that the magnitude of the impulse is preserved by self-convolution can be written as follows: .intg..sup..infin..sub.-.infin.f(x)*.sup.ndx=[F(0)].sup.n=1 (90)

Also, the integral of f(x/n) over all real values is n. So it can be deduced that a=1/n (91)

So f(x) satisfies (24) as follows: f(x)*.sup.n=(1/n)f(x/n) (92)

Taking the Fourier Transform of each side of (24) gives the following: (F(w)).sup.n=F(nw) for n=1, 2, 3 (93)

Differentiating the above equation with respect to w gives the following: n(F(w)).sup.n-1F'(w)=nF'(nw) (94)

By dividing (93) by (94), the following results: F(w)/F'(w)=F(nw)/F'(nw) for n=1, 2, 3 (95)

By the condition that F is continuous (smoothly dampening all non-zero frequencies) it can be deduced that: for w>=0, F(nw)/F'(nw)=c.sub.1, a constant (96)

Solving this differential equation gives the following: F(w)=c.sub.2e.sup.B,w for w>0 for constants c.sub.2 and B (97)

Because f(x) is real-valued and symmetric, F(w) must be also; so that c.sub.2 and B are both real For F(0)=1, c.sub.2=1. For f(x) to act as a low pass filter, B must be negative. From the above, it can be deduced that: F(w)=e.sup.-b|w| for a positive constant b. (98)

Using the inverse Fourier Transform gives the following: f(x)=(1/.pi.)b/(b.sup.2+x.sup.2) as claimed. (99) Cauchy Error Diffusion

The (continuous) Cauchy distribution spreads in proportion to the degree of self-convolution. It is believed that this spreading property is desirable for the (discrete) next scanline error impulse response function Moreover, it is envisaged that this spreading property is desirable for error diffusion irrespective of the number of scanlines with mask positions, and is desirable for other neighbourhood halftoning techniques. Similarly, it is believed that it is desirable that, in some sense, the (discrete) next scanline error impulse response function should approximate a (continuous) Cauchy distribution.

The name "Cauchy error diffusion" is defined to be error diffusion where the next scanline error impulse response function is designed so that it spreads approximately in proportion to the degree of self convolution or where the next scanline error impulse response function is designed to approximate a Cauchy distribution.

Diagram of Repeated Convolution of a Next Scanline Error Impulse Response Function Approximating a Cauchy Distribution

The next scanline error impulse response function describes the contribution of pixel-only errors of pixels of a scanline to the neighbourhood errors of pixels of the next scanline just prior to processing the next scanline.

Similarly, the n.sup.th next scanline error impulse response function can be defined as the contribution of pixel-only errors of pixels of a scanline to the neighbourhood errors of pixels of the n.sup.th next scanline just prior to processing the n.sup.th next scanline.

FIG. 13 shows the n.sup.th next scanline error impulse response function where the next scanline error impulse response function approximates a Cauchy distribution. It shows the contribution of the pixel-only error of a reference pixel to the neighbourhood error of a pixel of interest, n scanlines below the reference pixel just prior to processing the scanline containing the pixel of interest. FIG. 13 shows a reference pixel 1308 and a pixel of interest 1316 separated from the reference pixel 1308 by a distance "k" depicted by an arrow 1310, in a horizontal direction, and by a distance "n" depicted by an arrow 1312 in a vertical direction.

It is noted that the next scanline 1318 is the scanline immediately following the scanline in which the reference pixel 1308 is located. The unction 1302 is the approximate next scanline impulse response function which determines distribution of error from the reference pixel 1308 to the next scanline 1318. The function 1304 is the approximate second next scanline impulse response function representing distribution of error from the reference pixel 1308 to scanline 1320. The function 1306 is the approximate n.sup.th next scanline impulse response function representing distribution of error from the reference pixel to scanline 1322. A bold arrow 1314 represents a radial separation between the reference pixel 1308 and the pixel of interest 1316, noting that the radial separation is provided by the relationship r=(n.sup.2+k.sup.2).sup.1/2, and the approximate impulse response is represented by (1/.pi.)n/r.sup.2.

In this diagram, and hereafter, the Cauchy distribution is referred to with a spread parameter, b, equal to 1. Spread parameters close to 1 produce well spread sparse halftone patterns; whereas spread parameters further removed from 1 generate poor quality halftone patterns.

In the diagram, the identical fan of arrows on each scanline is intended to portray that the same next scanline impulse response function applies for the processing of each pixel of each scanline.

As has been seen, for the next scanline error impulse response function, h.sub.next, given by (23): h.sub.next[k]*.sup.n.apprxeq.(n/.pi.)1/(n.sup.2+k.sup.2)=(n/.pi.)1/r.sup.- 2 (100)

So, the cumulative effective of distributing error according to a next scanline function approximating (1/.pi.)1/(1+k.sup.2) is that the impulse response of error at the reference pixel on the pixel of interest, prior to processing the scanline of the pixel of interest, is approximately (n/.pi.)(1/(n.sup.2+k.sup.2)=(n/.pi.)1/r.sup.2. Here r is the distance between the reference pixel and the pixel of interest.

That is, the pixel-only error at a reference pixel contributes to the neighbourhood errors of pixels of any succeeding scanline, just prior to processing that scanline, approximately in mutual proportions of 1/r.sup.2. The factor (n/.pi.) simply scales all the contributions of the pixels of the particular succeeding scanline.

It is interesting to note that the impulse response function, c/r.sup.2, with c a constant, is the only radially symmetric function in 2 dimensions for which the impulse response on a region is independent of scale.

To see this, the impulse response on an infinitesimal region, dA, can be described as (dAc/r.sup.2). With change of scale by a factor, .alpha., so that horizontal and vertical separations x and y instead measure .alpha.x and .alpha.y, the area of the same infinitesimal region now measures .alpha..sup.2dA, and the impulse response on the infinitesimal region is given by: .alpha..sup.2dAc/(.alpha.r).sup.2=dAc/r.sup.2 (101) which is unchanged. Graphs of Self Convolutions of the Next Scanline Error Impulse Response Function

FIGS. 14, 15, 16 show graphs of self convolutions of the next scanline error impulse response function for:

1. Floyd Steinberg error diffusion;

2. the error diffusion of U.S. Pat. No. 5,353,127 (Shiau & Fan); and

3. where the function is a scaled sampling of a Cauchy distribution.

Each of these graphs are discussed in relation to the halftone patterns generated by corresponding error diffusion algorithms performing monochrome bi-level halftoning of 8 bit per pixel image data.

FIG. 14 shows a graph 1400 of self convolutions of the next scanline error impulse response function for Floyd Steinberg error diffusion. The graph in FIG. 14 is plotted in regard to an abscissa 1404 which is defined in terms of "horizontal pixel offset" from a pixel of interest, and an ordinate 1402 measured in terms of impulse response amplitude. A legend 1406 is provided in regard to "next scanline response" (ie. self-convolution of degree 1) 1408, "self convolution" (ie. self-convolution of degree 2) 1410, "self convolution order 3" 1412, "self convolution order 4" 1414, and "self convolution order 5" 1416. In FIG. 14, the self-convolutions are not left-right symmetric and spread less rapidly than in FIG. 16 where they spread in proportion to the degree of convolution. The sparse halftone patterns of Floyd Steinberg error diffusion exhibit severe worm artifacts and strong left-right asymmetry

FIG. 15 shows a graph 500 of self convolutions of the next scanline error impulse response function for the patent of Shiau and Fan. The graph in FIG. 15 is plotted in regard to the abscissa 504 measured in terms of "horizontal pixel offset" from a pixel of interest, and an ordinate 502 measured in terms of impulse response amplitude. A legend 506 is provided in regard to "next scanline response" 508, "self convolution" 510, "self convolution order 3" 512, "self convolution order 4" 514, and "self convolution order 5" 516. In FIG. 15, the self-convolutions are nearly left-right symmetric, but spread less rapidly than in FIG. 16 where they spread in proportion to the degree of convolution. For the error diffusion of U.S. Pat. No. 5,353,127, worm artifacts are only apparent for very sparse halftone patterns. As the halftone patterns become very sparse, the artifacts become severe. The worm artifacts show little left-right asymmetry.

FIG. 16 shows a graph 600 of self convolutions of the next scanline error impulse response function for error diffusion as described in relation to FIG. 13. The graph in FIG. 16 is plotted in regard to the abscissa 604 measured in terms of "horizontal pixel offset" from a pixel of interest, and an ordinate 602 measured in terms of impulse response amplitude. A legend 606 is provided in regard to "next scanline response" 608, "self convolution" 610, "self convolution order 3" 612, "self convolution order 4" 614, and "self convolution order 5" 616. In FIG. 16, the self-convolutions are left-right symmetric and spread in proportion to the degree of convolution. In particular, it can be seen that the central peak value decreases as 1/n. For error diffusion as described for experiment 3 where the next scanline error impulse response function, h.sub.next, is a sampling of the Cauchy distribution (1/.pi.)(1/(1+x.sup.2)), normalised so that .SIGMA..sub.ih.sub.next[i]=1, and all scanlines are processed left to right, there are no worm artifacts. The minority pixels in all sparse halftone patterns are well spread. Also, the sparse halftone patterns show very little left-right asymmetry. The occasional slight left-right asymmetry can be removed by varying the scanline processing direction.

As previously stated, it is believed that it is desirable that the next scanline error impulse response function be left-right symmetric and that it should spread in proportion to the degree of self-convolution. These graphs provide a picture of how existing error diffusion methods fall short in this regard.

A Method for Generating Error Diffusion Masks for which the Next Scanline Error Impulse Response Function Approximates a Cauchy Distribution

In implementing error diffusion, it is desirable to minimise the processing per pixel.

As stated previously, the processing model of FIG. 11, where error diffusion processing per pixel is described in terms of the current and next scanline error impulse response functions, is useful for understanding desirable characteristics of error diffusion. However, for implementing error diffusion where the next scanline error impulse response function approximates a Cauchy distribution, the processing model of FIG. 11 is not very suitable.

This is because the Cauchy distribution reduces slowly away from the peak value, so that a large number of non-zero values of the next scanline error impulse response function are required to provide a good approximation, with consequently a large amount of processing per pixel.

By contrast, the processing models of FIGS. 9 and 10 are better suited to implementing Cauchy error diffusion, because a desired next scanline error impulse response function can be well approximated using a comparatively small number of mask positions.

A method is now described for