1.04k likes | 1.46k Views
Digital Halftoning. What is Digital halftoning History Goals of halftoning Methods of halftoning. 1.1 What is digital halftoning?.
E N D
Digital Halftoning • What is Digital halftoning • History • Goals of halftoning • Methods of halftoning
1.1 What is digital halftoning? • Digital halftoning is the process of rendering a continuous-tone image with a device that is capable of generating only two or a few levels of gray at each point on the device output surface. • The perception of additional levels of gray depends on a local average of the binary or multilevel texture. • Detail is rendered by local modulation of the texture. Different dot patterns for different levels of gray.
Halftone is the reprographic technique that simulates continuous tone imagery through the use of dots, varying either in size or in spacing. 'Halftone' can also be used to refer specifically to the image that is produced by this process. • Where continuous tone imagery (film photography, for example) contains an infinite range of colors or greys, the halftone process reduces visual reproductions to a binary image that is printed with only one color of ink. This binary reproduction relies on a basic optical illusion—that these tiny halftone dots are blended into smooth tones by the human eye. • (At a microscopic level, developed black and white photographic film also consists of only two colors, and not an infinite range of continuous tones. For details, see film grain . Next slide) • Just as color photography evolved with the addition of filters and film layers, color printing is made possible by repeating the halftone process for each subtractive color—most commonly using what is called the 'CMYK color model.' The semi-opaque property of ink allows halftone dots of different colors to create another optical effect—full-color imagery.
Left: Halftone dots. Right: How the human eye would see this sort of arrangement from a sufficient distance.
History • Fundamental concepts have been used for centuries in weaving (by varying the no. of black threads) and engraving (thickness/frequency of the engraved lines)
History (cont.) • Photomechanical halftoning process was introduced by Talbot in 1852.
History (cont.) • In 1882 the German patented a halftone process in England. His invention was based on the previous ideas of Berchtold and Swan. He used single lined screens which were turned during exposure to produce cross-lined effects. He was the first to achieve any commercial success with relief halftones. • Shortly afterwards, Ives, this time in collaboration with Louis and Max Levy, improved the process further with the invention and commercial production of quality cross-lined screens. • The relief halftone process proved almost immediately to be a success. The use of halftone blocks in popular journals became regular during the early 1890s http://en.wikipedia.org/wiki/Halftone
Three examples of color halftoning with CMYK separations. From left to right: The cyan separation, the magenta separation, the yellow separation, the black separation, the combined halftone pattern and finally how the human eye would observe the combined halftone pattern from a sufficient distance.
History (cont.) • Digital halftoning algorithms first appeared in the early 70s as computer graphics displays and hardcopy devices became more widely available. Bayer - 1972 Floyd-Steinberg - 1976
The mathematics of Halftoning - paper The problem of halftoning in digital printing has provided a splendid new example of a mathematical opportunity in modern technology. Digital halftoning is the technique used to display an image with a few immiscible colors discretely applied to paper. At any point on the paper there is only one color dot ( no mixing/superimposition of colors). This problem involves various fields of science such as the physics of light, the biology of the human visual system, and the mathematics of analog to digital conversion. Digital halftoning can be considered as a huge optimization problem, but we shall see that by sacrificing optimality one can construct efficient algorithms which achieve very satisfactory results. Halftoning is above all an art, yet mathematics, particularly the theory of dynamical systems, helps to improve this art, while the art suggests a rich collection of mathematical problems and insights. • Specifically, we address the question of how full-color images should be imitated by printers which print at positions on a lattice with colors limited to a few available choices.
Purists use the term pixels for screens and instead use pels for printing, but we shall stick to pixels. Pixel colors are for the colors of inks or toners. In some printers the choice of pixel colors can be augmented by superposition of these substances, but this is not allowed in highlight printers. The two images of Brian Wu (see Figure 1) illustrate halftoning for gray scale: Figure 1(b) is a coarse-grain halftone image of the fine-grain image in Figure 1(a), which is approximately a full gray-scale image.
(a) Gray-scale image. (b) halftone image (using clustered dither mask). Fig 1
Color Half toning • In color half toning one uses R,G,B pens which print /produce dots of full color (255) of each or leave blank ( i.e. r =g=b=0). These dots are equally spaced with varying sizes. • Halftoning is for approximate reproducing a given color patch/area and not for a color point.
In color half toning, one uses R,G,B pens which print /produce dots of full color (255) of each or leave blank ( i.e. r =g=b=0). These dots are equally spaced with varying sizes. Halftoning is for approximate reproducing a given color patch/area and not for a color point. The human eye perceives diffusion as a mixture of the colors within it. Reducing the color depth of an image can often have significant visual side-effects. If the original image is a photograph, it is likely to have thousands, or even millions of distinct colors. The process of constraining the available colors to a specific color palette effectively throws away a certain amount of color information. An illustration of dithering. Red and blue are the only colors used, but as the pixels become smaller, the patch appears violet (R+B).
Colors and gamuts • Perception of color is modelled as a vector addition in color space. Standard ink and toner colors are cyan (C), magenta (M), yellow (Y), and black (K). The letters in parentheses represent color vectors. Added to this set is white (W), taken for the color of paper. The primary colors for light are red (R), green (G), and blue (B). In color space we have the following relations: W = R +G +B M =W -G =R +B C = W -R =G +B Y = W -B =R +G Since inks and toners act as light absorbers, only blue light is reflected from a combination of magenta and cyan on white paper. Similarly, only red light is reflected from magenta and yellow, and green from cyan and yellow. The eye averages received light over areas consisting of many pixels. B = M + C
When all eight colors C, M, Y, R, G, B, K, and W are available to a printer and arranged in the cube, as in Figure 2, the Cartesian product structure of the cube allows for significant mathematical simplification in printing, as follows: • Each component of a color vector along the C, M, Y axes is treated separately with W in the same way one would deal with a black and white image. The page is overprinted three times, one for each pixel color, and possibly a fourth time in order to print as much K as possible (black ink or toner is cheaper, and K, W render better grays than C, M, Y, W). • When overprinting the sheet multiple times, one must take care of interference (Moire´) patterns due to misalignment in the superposition of colors, a phenomenon which is now well understood. Actually, the eight color vectors form the vertices of a six-sided figure which is far from cubic in any perceptual color space such as the one given by the CIE colorimetric system. Furthermore, constraints such as the impossibility of superimposing inks to get R, G, or B, or the addition of other shades to augment printer gamuts, such as “light magenta” and “light cyan,” also lead to significant departures from the cube.
For example, an original image (Figure 1) may be reduced to the 216-color color palette. • If the original pixel colors are simply translated into the closest available color from the palette, no halftoning occurs (Figure 2). • Typically, this approach results in flat areas and a loss of detail, and may produce patches of color that are significantly different from the original. Shaded or gradient areas may appear as color bands, which may be distracting. Figure 1 Figure 2
The application of halftoning can help to minimize such visual artifacts, and usually results in a better representation of the original (Figure 3). Halftoning helps to reduce color banding and flatness. Figure 3
Need for Digital Image Halftoning • Examples of reduced grayscale/color resolution • Laser and inkjet printers • Facsimile machines • Low-cost liquid crystal displays • Halftoning is wordlength reduction for images • Grayscale: 8-bit to 1-bit (binary) • Color displays: 24-bit RGB to 8-bit RGB • Color printers: 24-bit RGB to CMY (each color binarized) • Halftoning tries to reproduce full range of gray/ color while preserving quality & spatial resolution • Screening methods are pixel-parallel, fast, and simple • Error diffusion gives better results on some media
Applications • Display hardware, including early computer video adapters and many modern LCDs used in mobile phones and inexpensive digital cameras, are only capable of showing a smaller color range than more advanced displays. One common application of dithering is to more accurately display graphics containing a greater range of colors than the hardware is capable of showing. • For example, dithering might be used in order to display a photographic image containing millions of colors on video hardware that is only capable of showing 256 colors at a time. The 256 available colors would be used to generate a dithered approximation of the original image. Without dithering, the colors in the original image might be simply be "rounded off" to the closest available color, resulting in a new image that is a poor representation of the original. Dithering takes advantage of the human eye's tendency to "mix" two colors in close proximity to one another. ex: light colors can be created by adding white dots in between the colors.
But even when the total number of available colors in the display hardware is high enough when rendering full color digital photographs, as those 15- and 16-bit RGB Hicolor 32,768/65,536 color modes, banding can be evident to the eye, especially in large areas of smooth shade transitions (although the original image file has no banding at all). Dithering the 32 or 64 RGB levels will result in a pretty good "pseudo truecolor" display approximation, which the eye cannot resolve as grainy. • Another useful application of dithering is for situations in which the graphic file format is the limiting factor. In particular, the commonly-used GIF format is restricted to the use of 256 or fewer colors in many graphics editing software. Images in other file formats, such as PNG, may also have such a restriction imposed on them for the sake of a reduction in file size. Images such as these have a fixed color palette defining all the colors that the image may use. For such situations, graphical editing software may be responsible for dithering images prior to saving them in such restrictive formats.
Traditional screeningModulation Strategies • The most common method of creating screens—amplitude modulation—produces a regular grid of dots that vary in size. • The other method of creating screens—frequencymodulation—is used in a process named “Stochastic screening”. • Amplitude modulation - dot size varies, dot spacing is fixed. • Frequency modulation - dot spacing varies, dot size is fixed.
Conventional AM halftoning • Indigo’s “Sequin” halftoning • Dot frequency is fixed • Dot size varies to represent tone • Disadvantages • Rosette patterns : different magnitudes in different directions • Tone jumps • Detail rendition suffers • Scan quality suffers Rosette pattern When preparing color separations for printing, the screen angles are rotated for each process color ink. A symmetrical (but non-objectionable) "rosette" dot pattern can result, which the eye can merge into smooth color gradations. However, incorrect screening angles or the shifting of the paper during printing can result in objectionable patterns; see "moiré' patterns".
FM halftoning ( “blue-noise”) • Photo printers • Dot size is fixed • Dot frequency varies • Advantages • Does not cause Moiré • Rosette patterns eliminated • Tone jumps not abrupt • Better detail rendition • Better quality at consumer grade scan resolutions • Disadvantages • Depends heavily on fidelity of isolated dot reproduction dot dropout and banding in highlights clumping in the midtones results in grain
AM-FM halftoning ( “green-noise”) • AM-FM • Dot size and dot frequency varies • Advantages • Promise of the “best of both worlds” • Disadvantages • Design depends on particular dot formation characteristics • Difficult design problem highlights midtones
FM AM-FM AM FM AM
AM & FM Halftone AM FM (looks better)
Multiple screens and color halftoning • When different screens are combined, a number of distracting visual effects can occur, including the edges being overly emphasized, as well as a moiré pattern. This problem can be reduced by rotating the screens in relation to each other. This screen angle is another common measurement used in printing, measured in degrees clockwise from a line running to the left (9 o'clock is zero degrees). • Halftoning is also commonly used for printing color pictures. The general idea is the same, by varying the density of the four primary printing colors, cyan, magenta, yellow and black (abbreviation CMYK), any particular shade can be reproduced. In this case there is an additional problem that can occur. In the simple case, one could create a halftone using the same techniques used for printing shades of grey, but in this case the different printing colors have to remain physically close to each other to fool the eye into thinking they are a single color. To do this the industry has standardized on a set of known angles, which result in the dots forming into small circles or rosettes. • The dots cannot easily be seen by the naked eye, but can be discerned through a microscope or a magnifying glass
Three secondary colors And Black COLOR PRINT • RED (R,MY) • GREEN (G, CY) • BLUE (B, CM) • BLACK (K, CMY)
Resolution of halftone screens • The resolution of a halftone screen is measured in lines per inch (lpi). This is the number of lines of dots in one inch, measured parallel with the screen's angle. Known as the screen ruling, the resolution of a screen is written either with the suffix lpi or a hash mark. E.g. 150lpi or 150#. • The higher the pixel resolution of a source file, the greater the detail that can be reproduced. However, such increase also requires a corresponding increase in screen ruling or the output will suffer from posterization. Therefore file resolution is matched to the output resolution.
Posterization • Posterization of an image occurs when a region of an image with a continuous gradation of tone is replaced with several regions of fewer tones, resulting in an abrupt change from one tone to another. This creates an effect somewhat similar to that of a simple usual graphic poster.
ConventionalColorHalftoningSame raster angle Error in position can cause color shift (translation error)
ConventionalColorHalftoningSame raster angle Error in raster angle can cause Moiré ( rotation error)
AM HALFTONEdifferent angles for C, M, Y and K15, 75, 0 and 45 degrees
ConventionalColorHalftoningDifferent raster angle, 0, 15, 75 and 45 degrees AM different angles Rosette patterns FM
FM (Stochastic) Halftone, 4-color print “Moiré pattern” and “Rosette pattern” disappear
COLOR PRINT Original
COLOR PRINT AM
COLOR PRINT FM
Architectures for halftoning algorithms • There are three basic architectures for halftoning algorithms. • Dithering – point-to-point operation. • Error diffusion – neighborhood processing. • Search-based methods – usually are iterative. • Ex: Direct Binary Search (DBS)
The Two Fundamental Goalsof Digital Halftoning • Representation of Tone • smooth, homogeneous texture. • free from visible structure or contouring. Diamond dot screen Bayer screen Error diffusion Direct Binary Search (DBS)
The Two Fundamental Goalsof Digital Halftoning (cont.) • Representation of Detail • sharp, distinct, and good contrast in rendering of fine structure in image. • good rendering of lines, edges, and type characters. • freedom from Moire due to interference between halftone algorithm and image content Diamond dot screen Error diffusion DBS
Basic Structure of Dithering Algorithm The threshold matrix is periodically tiled over the entire continuous-tone image. If threshold is satisfied, put a dot (black) . 2x2 threshold matrix (i.e. four thresholds) renders five levels of gray, which is shown below. The locations of the dots correspond to the respective locations of the threshold matrix values.