Correlating cyan and magenta planes for error diffusion halftoning

Abstract: The present invention performs error diffusion halftoning while taking into account multiple color planes, such as cyan and magenta, when determining the placement of a dot in any of the color planes. Using this technique, printed dots (4, 6) of two or more colors are dispersed so as to avoid noticeable clumping of dots of two or more colors. This technique can be used to augment any existing error diffusion method.

Description: FIELD OF THE INVENTION The present invention relates to a technique for color image processing and, more particularly, to an error diffusion technique which correlates dots printed from different color planes to create a more visually pleasing combination of different color dots. BACKGROUND Images, such as charts, drawings, and pictures, may be represented as a two-dimensional matrix of picture elements (pixels). The spatial resolution and intensity level for each pixel are chosen to correspond to the particular output device used. For example, typical computer monitors display images at 75 dots per inch (DPI) and have 256 levels of intensity for each color. Such monitors use the additive primary colors, red, green, and blue (RGB), which can be combined to produce millions of colors and also black. Typical hardcopy output devices, such as inkjet printers, are binary devices, meaning that for each pixel or possible dot location on the printed medium they can only print at two levels: on or off. Therefore, some means must be provided to convert the monitor-based version of the image (256 intensity levels per color), or another version of the color image, to the binary version (2 levels per color). These conversion methods are commonly referred to as halftoning. Halftoning methods are described in the book Digital Halftoning, by Robert Ulichney, The MIT Press, 1987, incorporated herein by reference. One major approach to halftoning is error diffusion. The decision about whether or not to print a dot is based not only on the "ideal!' intensity (i.e., one of the 256 possible intensities) for that pixel, but on what has happened before for previously processed pixels. The present invention is directed to an error diffusion technique. It is assumed in the following explanation that the pixel intensity may range between 0 and 255. In error diffusion, at each point where a dot may be printed, the original image pixel intensity between 0-255, plus accumulated error, is compared to a previously chosen threshold value. If the image pixel intensity is greater than the threshold value, a dot (255 intensity) is assigned to that pixel. If not, no dot (0 intensity) is assigned. In either case, the intensity difference between the actual dot value assigned (0 or 255) and the ideal image pixel intensity plus accumulated error for that point is derived, and this difference becomes an error term that is "diffused" to other subsequently processed pixels. In other words, the diffused error term is added to the image pixel intensity plus the accumulated error of the subsequently processed pixels, and this total resultant image pixel intensity is then compared against the error diffusion threshold to determine whether a dot should be printed. A typical threshold value is 50% of the maximum theoretical image pixel intensity. For example, if there are 256 intensity levels (0 to 255) per pixel, a level of 128 may be chosen as the threshold value. In other error diffusion techniques, the threshold varies to avoid noticeable dot patterns being printed. A well known error diffusion technique is described by R. Floyd and L. Steinberg in the paper Adaptive Algorithm for Spatial Grey Scale, SID Int'l. Sym. Digest of Tech. Papers, pp. 36-37 (1975). The Floyd and Steinberg error diffusion technique diffuses the error into a set of four surrounding pixels. Error diffusion with higher than four terms can also be used. U.S. Patent 5,313,287 to David Barton, assigned to the present assignee discloses another error diffusion technique. When printing a color image, dots for three primary colors, cyan, magenta, and yellow, must be printed in various combinations to achieve the desired color tones to reproduce the original color image. Many known error diffusion methods operate on one color plane (e.g., cyan, magenta, or yellow) at a time. These types of error diffusion methods strive to generate a visually pleasing pattern of dots (i.e., dispersed dots) for each separate color, independent of the pattern of dots for the remaining colors. Due to random change, these overlapping color dot patterns inevitably result in two or more dots of different colors overlapping or being adjacent to one another, as shown in Fig. 1, which is perceived by the human eye as a clumping of dots. Fig. 1 illustrates an example of a prior art multicolored dot pattern using magenta dots 4 and cyan dots 6. The overall tone is light blue. When the cyan and magenta planes overlap, non-pleasing dot patterns due to adjacent cyan and magenta dots (such as at location 7) can be formed due to random chance. SUMMARY The present invention performs error diffusion halftoning while taking into account multiple color planes when determining the placement of a dot in any of the color planes for a partial fill; solid fills are treated differently. In particular, the present invention provides a halftoning method as claimed in claim 1. This technique can be used to augment most existing error diffusion methods. In the preferred method, only correlation between the magenta and cyan dots is performed, and no correlation with the yellow dots is performed. This is because the cyan and magenta dots are darker than the yellow dots, and adjacent cyan and magenta dots are much more noticeable than a cyan or magenta dot adjacent to a yellow dot. However, correlation with three or more color planes may be performed using the techniques described herein. BRIEF DESCRIPTION OF THE DRAWINGS Fig. 1 illustrates a prior art dot pattern representing an arrangement of cyan and magenta dots. Fig. 2 illustrates a color inkjet printer which includes processing circuitry for performing all or part of the preferred error diffusion method. Fig. 3 illustrates a computer connected to an inkjet printer, where the computer or the printer or both carry out the inventive error diffusion method. Fig. 4 illustrates the general method performed by the computer and printer of Fig. 3. Fig. 5 illustrates a 3x3 block of pixels and their tone values to be reproduced by halftoning. Fig. 6 illustrates the 3x3 block of pixels in Fig. 5 but identifying the intensities of the cyan component of the tone values. Fig. 7 illustrates the 3x3 block of pixels in Fig. 5 but identifying the intensities of the magenta component of the tone values. Fig. 8 is a flow chart which describes in more detail the halftoning method performed by the computer or the printer or a combination of both. Fig. 9 illustrates dot positions and the portions of error diffused to two adjacent dot positions. Fig. 10 is an example of a dot pattern of cyan and magenta dots printed using the error diffusion method of the present invention to be contrasted with the dot pattern in Fig. 1 for generating the same light blue tone value. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS Fig. 2 illustrates one type of color inkjet printer 10 which includes processing circuitry for performing all or part of the error diffusion method described herein. The color inkjet printer includes a cover 11, a paper tray 12 for holding virgin paper 14, an output tray 15 for receiving the printed pages, color print cartridges 16, and a scanning carriage 18 for sliding along a slide bar 20 while dots are being printed on the paper. The color print cartridges 16 may include cyan (C), magenta (M), yellow (Y), and black (K) ink print cartridges. Fig. 3 is a schematic diagram of a printing system which includes a host computer 22, a monitor 23 (e.g., a CRT), and a printer 24. Printer 24 is a type of color inkjet printer which uses a tri-color (CMY) inkjet print cartridge 25 along with a black inkjet print cartridge 26 in a scanning carriage. Printer 10 in Fig. 2 may instead be connected to computer 22. Printer 24 includes a printer controller 28 for controlling the printing of dots by print cartridges 25 and 26. The print cartridges may print at 300 dots-per-inch (DPI), 600 DPI, or any other resolution. Fig. 4 illustrates the standard flow of image information from computer 22 to printer 24. An image is first created or introduced into the memory of computer 22. In order to be displayed on the computer monitor 23, this image is represented in additive RGB color space. Each pixel location on the screen can be illuminated in red, green, and blue at any one of 256 (0 to 255) levels of intensity. It takes 8 bits to represent 256 levels (2 8 = 256). Each of the three primary colors require 8 bits; therefore, RGB color monitors are commonly referred to as producing 24-bit color (3 X 8 = 24). This image is represented at the spatial resolution of the particular monitor. Typical monitors have 75 pixels per linear inch (75 DPI) in the vertical and horizontal directions. At step 30, the 24-bit RGB color image is held in the memory of computer 22 so that it can be displayed on monitor 23. At step 32, the image in memory is converted to a 24-bit RGB image at the resolution of the printer. Typical inkjet printers have a resolution of 300, 600 or 1200 dots per inch. Although the printer typically prints in CMY or CMYK subtractive colors, it is nevertheless convenient for image processing purposes at step 32 to consider the printer to be an RGB device. This is because later translating the color monitor RGB values directly to CMYK will usually produce a colorimetric match. However, not all of the matching values will produce the same image quality. Some choices will contain more visual noise than others, while other choices may lead to undesirable discontinuities in the halftone transitions of an image. At step 34, the printer RGB color image is converted into CMYK color space using a lookup table or other conventional means of conversion. In step 36, the CMYK image is halftoned to convert the image from 4-plane (CMYK), 8-bits per color to 4-plane binary color (on or off dots) at the DPI resolution of the printer. In other words, the color and intensity (0-255) at each pixel location is converted into a pattern of on or off C, M, Y, or K dots (0 or 255 intensity) to be printed. This halftoned image (which may be a portion of the total image) is stored in a memory. Step 36 is described in greater detail later. At step 38, the halftone image is transmitted to the printer, typically using efficient communication techniques such as using escape sequences like those identified in Hewlett-Packard Company's Printer Control Language (PCL). The image produced at step 36 includes all of the information about how many dots of each color are to be printed at each pixel location on the page and the locations of the dots. The printer controller 28 (Fig. 3) decides when these dots should be printed (i.e., in a single pass or in multiple passes). Because of the nature of inkjet printing, it is often beneficial to lay down dots in more than a single pass and to print individual passes in some kind of checkerboard or other sparse pattern. It is also beneficial to overlap passes with these interstitial patterns to hide artifacts that may occur between swaths. These procedures for determining in what pass and in what pattern the dots will be laid down are referred to as "print modes." The halftoning step 36 is now described in detail with reference to the remaining figures. It will be understood that, depending on the printer, the functions discussed in relation to Fig. 4 can be performed by the host computer (programmed to carry out the processing functions) or by the printer. For example, in a "smart" printer, steps 32 through 38 could all be performed in the printer. On the other hand, to save memory costs in the printer, all or part of the functions 32 through 38 could be performed in the host computer. Prior to the halftoning step, it is assumed that a separate image representation for the full color image is stored in a plane for each of the primary colors (C, M, Y, or K) to be printed. This is described with respect to Figs. 5-7. Fig. 5 illustrates a 3x3 block of pixels 40 in a full color image at the resolution of the computer monitor. Each of the pixels has a color intensity perceived as light blue (LB). The following assumes a range of intensities per pixel from 0-255 to convey the full range of color intensities. Figs. 6 and 7 illustrate the same 3x3 pixel block in Fig. 5 but show the cyan intensity (Fig. 6) as 44 (out of 255) in each pixel region and the magenta intensity (Fig. 7) as 33 in each pixel region needed to create an overall light blue tone. The combination of the cyan and magenta intensities in the two planes will produce the final desired color tone. The cyan and magenta intensities are proportional to the number of dots in an area, where the intensity 255 is a complete fill of that area with cyan or magenta dots. The actual number of dots per original pixel location depends on the resolution (pixel density) of the original image and the resolution (dots per inch) of the printer. Thus, it is assumed that step 34 of Fig. 4 has been completed, and the step of halftoning must now be performed. Error diffusion attempts to recognize that for each point representing a potential dot position, there is usually a difference between what the hardcopy output device will print (e.g., a 0 or 255 intensity cyan dot) and the actual image pixel intensity (e.g., a 44 intensity cyan dot). The only time there is no such error is if the image pixel intensity is exactly 255 (a dot should be printed) or 0 (no dot should be printed). However, such circumstances are rare. Therefore, there is usually an error. If a dot is printed and the intensity level is less than 255, the error is positive (i.e., more tone level has been printed than was actually called for by the image pixel). If no dot is printed and the image pixel is greater than zero, the error is negative (i.e., less tone level has been printed than was called for by the image pixel). Error diffusion attempts to spread this error to neighboring pixels. The below example assumes that the light blue tone of Fig. 5 to be reproduced requires a combination of cyan and magenta dots, with the cyan and magenta intensities shown in Figs. 6 and 7. A different tone may also require the use of yellow dots or black dots in combination with the cyan and magenta dots. Instead of a standard error diffusion technique evaluating whether to print a cyan dot based upon the accumulated error from printing previous cyan dots, the preferred error diffusion technique selects whether a cyan or magenta dot should be printed based upon the combined error of the previous cyan and magenta dots. Fig. 8 is a flowchart illustrating the basic steps in the preferred error diffusion process for each dot position. In step 48, a threshold is selected. The threshold may be pseudo-randomly selected to avoid dot patterns being noticeable, as described in the application EP-A-0 863 661 entitled Fast Error Diffusion Algorithm, by Yidong Chen and Steven Miller, HP Docket No. 10960589-1, filed March 6, 1997. The thresholds may be selected from a table or may be fixed throughout the halftoning process. In steps 50, 51, and 52, the cyan intensity, magenta intensity, and yellow intensity for the particular pixel being processed are determined. Steps 50-52 may be performed in parallel using conventional techniques. For example, the 8-bit RGB intensities for that particular pixel may be cross-referenced to the 0-255 intensities for the CMY color planes using a lookup table or other conventional means. The steps for determining the CMY intensities may be performed as part of step 34 in Fig. 4. In step 54, which may also be performed in parallel with steps 50-52, the combined cyan and magenta intensity is determined. This c+m intensity is obtained by adding the individual c and m intensities, so the range of c+m intensities is 0-510. In step 56, it is determined whether the c + m intensity for a pixel position is less than a 100% fill (255 intensity) of the pixel area. If the c+m intensity is 255 or greater, then adjacent dots are required, and a conventional error diffusion technique (or the error diffusion technique described in the application by Y. Chen et al.) may be used to print the cyan and magenta dots. More particularly, if c+m is 255 or greater, then step 58 determines whether the cyan intensity plus the accumulated cyan error exceeds a threshold. If so, a cyan dot is printed (step 59); if not, no cyan dot is printed (step 60). Step 62 determines whether the magenta intensity plus the accumulated magenta error exceeds a threshold. If so, a magenta dot is printed (step 63); if not, no magenta dot is printed (step 64). If c+m is less than 255, then the present invention is implemented. Step 68 determines the sum of the accumulated error for the cyan and magenta dots, where the error (c e ) for the cyan component is the diffused cyan error for the dot position, and the error (m e ) for the magenta component is the diffused magenta error for the dot position. In the preferred embodiment, the present invention modifies the error diffusion technique described in the application by Y. Chen et al., previously incorporated by reference. In this preferred error diffusion technique, illustrated in Fig. 9, a two-term error diffusion is used. Any error derived from the pixel (i.e., dot position) being processed (e.g., pixel 70) is diffused to the subsequent horizontal pixel 71 and to the adjacent vertical pixel 72. The proportion of the error diffused is 1/2 (50%) to each of these adjacent pixels. The determination whether or not to print a dot at that subsequent dot position 71 or 72 will then be based on whether the desired intensity plus the error exceeds a threshold. Assuming the c+m intensity is less than 255 (i.e., less than a 100% fill of c+m), step 74 in Fig. 8 adds the cyan intensity (c), the cyan error (c e ), the magenta intensity (m), and the magenta error (m e ). Step 76 determines if c + c e + m + m e is greater than a threshold level. In the preferred method, the threshold levels are chosen to be relatively low, and the threshold levels are modulated with linear blue noise. The low-level thresholds reduce start-up delays, and the modulated thresholds additionally break up any worm-like patterns. The threshold modulation is a 256 element linear array or series of random threshold values ranging from 5 to 68. The average intensity level for these thresholds is 36.5, which is about 14% of the maximum allowed level of 256. If the outcome of step 76 is yes, step 78 determines whether the cyan intensity (c) plus the accumulated cyan error (c e ) for the dot position is greater than the magenta intensity (m) plus the accumulated magenta error (m e ) for the dot position. If so, a cyan dot is printed (step 80); otherwise, a magenta dot is printed (step 82). If the outcome of step 76 is no, step 84 prints no cyan or magenta dot. For each of the printing or non-printing actions, the resulting error is diffused to other dot positions. In the preferred embodiment, after each row of the image is processed, the direction of processing is reversed such that the error diffusion technique uses a serpentine processing system. A non-serpentine path may also be used. If the tone to be created only uses either cyan or magenta, then the cyan or magenta intensity, as appropriate, would be zero, and the cyan or magenta error, as appropriate, would be zero. In either case, the preferred process described above still accurately prints the desired density of cyan dots and magenta dots, since either c + c e will be greater than m + m e , causing a cyan dot to be printed, or m + m e will be greater than c + c e , causing a magenta dot to be printed. Alternatively, if either cyan or magenta is not needed to reproduce a color, a conventional error technique may be used. The determination for printing a yellow dot may be performed in parallel with the steps for printing the cyan and magenta dots. The determination for printing a yellow dot, in the preferred embodiment, uses the error diffusion technique described with respect to Fig. 9 and includes the steps shown in Fig. 8 as steps 86, 87, 88, and 89. By using the above process to determines whether to print a cyan or magenta dot based upon the combination of the cyan and magenta intensities and their combined errors, the dispersion of cyan and magenta dots within the dot pattern is well formed. In pseudo-code, the algorithm is as follows: In an alternate embodiment, even the yellow plane can be correlated with the cyan and magenta planes in a manner similar to that described above in which a color dot (C, M, or Y) having the highest priority based upon the tone value and the accumulated error gets printed. This would disperse the C, M, and Y dots. Further, the tone to be reproduced may be created by a combination of additional planes such as light cyan, light magenta, dark cyan, and dark magenta, in addition to medium cyan and medium magenta. Black may be included as an additional plane. Some printers use the color planes cyan, magenta, yellow, orange, green, and black. The invention may be applied to a combination of all of these planes to reduce the likelihood that adjacent dots within a group of colors are printed. Also there can be a prioritization of inks to be printed when correlating multiple planes. One example of such a prioritization method for cyan, magenta, and black inks is shown below in pseudo-code (yellow is not addressed for simplicity). Fig. 10 is an example of a light blue tone printed using a combination of cyan dots 6 and magenta dots 4 having the intensities shown in Figs. 6 and 7. As seen, there are no adjacent or overlapping cyan and magenta dots, creating a dot pattern which is more visually pleasing than the prior art dot pattern shown in Fig. 1. This proven method is as fast as other error diffusion techniques for halftoning.

Claims: A halftoning method comprising: determining whether a dot of a first color ink (6) or a dot of a second color ink (4) is necessarily to be printed; if the determination is negative, performing a first error diffusion process that combines intensities and error values of said first color and said second color to determine whether a dot of said first color ink (6) or a dot of said second color ink (4) is to be printed and, if so, which; if the determination is positive, performing a second error diffusion process that does not combine intensities and error values of said first color and said second color to determine which of said dot of said first color ink (6) or said dot of said second color ink (4) is or are to be printed; and printing said dot or dots of ink (4, 6) accordingly, thereby correlating printing of dots of said first color ink (6) with dots of said second color ink (4) to reduce the likelihood that printed dots of said first color ink (6) will be directly adjacent printed dots of said second color ink (4). The method of Claim 1, wherein said steps of performing error diffusion and printing of dots are also performed for at least a third color ink, said method comprising prioritizing said first color ink, said second color ink, and said third color ink when determining a color ink dot to print. The method of Claim 1 or Claim 2, wherein said first error diffusion process comprises: (a) determining (34) a tone to be reproduced using at least said first color and said second color; (b) setting (48) a threshold value; (c) identifying (50) a desired intensity of said first color component in said tone to be reproduced; (d) identifying (51) a desired intensity of said second color in said tone to be reproduced; (e) accumulating (68) a first error value signifying an error in intensity between printed dots of said first color (6) and a desired intensity of said first color; (f) accumulating (68) a second error value signifying an error in intensity between printed dots of said second color (4) and a desired intensity of said second color; (g) summing (74) said desired intensity of said first color, said first error value, said desired intensity of said second color, and said second error value to generate a sum value; and (h) determining whether said sum value in step g is greater than said threshold value, and: (i) if not, printing neither said dot of said first color nor said dot of said second color; and otherwise: (ii) determining (78) whether said desired intensity of said first color plus said first error value is greater than said desired intensity of said second color plus said second error value and, if so, printing (82) said dot of said first color or, if not, printing (80) said dot of said second color. The method of Claim 3 wherein said first color is cyan (6) and said second color is magenta (4). The method of Claim 3 or Claim 4 wherein said second error diffusion process is performed when it is determined in step h that said sum value is equal to or greater than said solid fill of dots. The method of any one of Claims 3-5 further comprising the step of printing dots of said first color (6) and said second color (4) between steps d and e. A printing system including a printer (10, 24) and a computer (22), said printing system adapted to perform a halftone method according to any preceding claim.

Inventors: GONDEK JAY S, GONDEK, JAY S.
Applicants: HEWLETT PACKARD CO, HEWLETT-PACKARD COMPANY
Application year: 1998
Main classification: H04N1
IPC codes: B41J2, H04N1