The present invention relates to a method and apparatus for processing a gray-scale image or a color image to generate pseudo-tone patterns with improved regularity.
Pseudo-tone pattern generation is method of representing input gray levels or colors that cannot be directly expressed by an output device. Pseudo-tone pattern generation is basically a type of quantization process, and is carried out by comparing the image data with one or more threshold values. Loss of colors or gray levels can be avoided by diffusing the quantization error of each picture element or pixel to some of the neighboring pixels. A more detailed description of this error-diffusion process will be given later. For a gray-scale image, the result of error diffusion is that an intermediate gray level is simulated by a pseudo-tone pattern of dots quantized to levels above and below the intermediate level. The general term for this type of simulated gray-level expression is dithering. Dithering can also be performed directly, by replacing a single threshold with a matrix of differing thresholds.
A typical use of error diffusion and dithering is to enable a printer that can print only black and white dots to express gray levels as patterns with appropriate densities of black dots. A problem is that the dot patterns tend to exhibit random clumping and other random effects, generally referred to as dot noise, that do not look well when printed. In many cases, a more regular dot pattern is desirable. For example, a pseudo-tone pattern expressing a fifty-percent gray level is preferably a checkerboard pattern of black and white dots, rather than a random pattern.
Error diffusion and dithering are also employed in color printing. Here a further problem is that the random placement of the dots frustrates control over the way in which different color planes are overlaid.
It is accordingly an object of the present invention to increase the regularity of the pseudo-tone patterns in a quantized image.
Another object of the invention is to provide control over the relative positions of dot patterns in different color planes in a quantized color image.
The invented method of processing image data comprises the steps of:
(a) modifying at least one predetermined threshold according to at least two periodic functions with different periods;
(b) comparing the image data with the modified threshold; and
(c) generating output image data from the comparison results, the output image data being limited to a certain number of pixel levels.
The invention also provides image-processing apparatus for carrying out steps (a), (b), and (c).
The periodic modifications of the threshold cause dots to appear preferentially in predetermined positions, which have a regular, periodic pattern. Dot noise is thereby reduced.
When a color image is processed, the alignment of the regular patterns in different color planes can be controlled so that the dot patterns are overlaid on one another in desirable ways when, for example, the output image is printed.