| Previous | Table of Contents | Next |
Digital halftoning is a process that provides a continuous intensity illusion for output rendered using a few intensity levels, usually two. There are three general digital halftoning approaches and variations of each. This chapter discusses these methods and the PRINTPCX.C program provides implementations that allow you to print images on the IBM Proprinter dot matrix printer and most Hewlett-Packard DeskJet printers.
Devices having only two intensity levels are bilevel devices. An example of a bilevel monitor is an IBM Monochrome display driven by a Hercules compatible display controller or a VGA display which is programmed with only two intensity levels (maximum or zero) for every display position. Good examples of bilevel printers are regular facsimile machines and ink jet printers. At every image position, bilevel devices either set the native intensity level of the output medium to a maximum value or leave it unchanged. With subtractive color output, marked areas subtract (remove or darken) reflected light wavelengths.
Color printers use multiple bilevel mechanisms. For example, the Hewlett-Packard DeskJet 550C printer provides four bilevel mechanisms, one each for the cyan, magenta, yellow, and black ink flows. To print a full-color image first requires separating the image into individual color channels and individually printing them so that the various renderings do not interfere with one another by causing moiré patterns or other distortions.
Conceptually understanding digital halftoning is easy. Consider screen painting where artists dip a toothbrush into watercolors and drag the wet bristles over common window screen. As the bristles snap across the screens mesh surface, a colored mist appears and gently drifts down. The mist eventually lands on a surface which the mist colors. Spray painting produces a similar aerosol effect, much to the detriment of many city buildings.
The described aerosol consists of colorant drops which can vary in size, deposit at any surface location, and may overlay or otherwise overlap one another. Digital halftoning also uses an aerosol but differs in the following ways:
Increasing the number of landing points per inch, the resolution, requires a finer aerosol but produces a finer rendering. Increasing the number of aerosol drops per area increases the effect until the surface is completely covered. For example, black and white photographs that seemingly produce continuous gray intensities between white and black contain minute, various-size metallic silver clumps that individually reflect or absorb light. So ordinary photographs use a process similar to digital halftoning but on a microscopic scale.
In a nutshell then, digital halftoning algorithms carefully craft and deposit aerosol drops. The result triggers human eye-brain spatial integration and pattern matching capabilities to produce sensations of continuous intensity variations consisting of black, white, and grays. But it is just an illusion, as masters usually discover when showing pictures of themselves to their dogthe canines usually fail to produce heart-warming Rorschach tail wags to their masters ink blot paper.
All halftone approaches share the same principleevery image input pixel produces a corresponding output pixel that has either the maximum or minimum intensity value for the output medium. The various algorithms only differ in their output value assignment methodology and fall into one of two classifications: ordered and random dithers.
With ordered dithers, the input image is tiled with (divided into) small, non-overlapping, usually uniform-sized areas called cells that each contain multiple input points. To simplify the operation, usually the areas are NxN squares with N2 points but sometimes the areas are hexagonal or other rectangular shapes. The output value for any input pixel within a given area:
For example, suppose an image is divided into 4x4 pixel square areas, each containing 16 pixels, and we wish to display it on a monitor as a digital halftone image using the assigned eight-bit values of zero and 255. With ordered dithers, the algorithm first decides at every pixel position within any square area when to assign the 255 intensity value or zero value. Within every square, we specify pixel (row, column) coordinates as follows:
| (0, 0) | (0, 1) | (0, 2) | (0, 3) |
| (1, 0) | (1, 1) | (1, 2) | (1, 3) |
| (2, 0) | (2, 1) | (2, 2) | (2, 3) |
| (3, 0) | (3, 1) | (3, 2) | (3, 3) |
| Previous | Table of Contents | Next |