Method and system for image conversion utilizing dynamic error diffusion

Abstract: A method and system implements a dynamic error diffusion process. A grey level value representing a pixel is received. An image segmentation circuit (15) determines an image characteristic of the pixel being processed. A threshold circuit (10; Fig.3) thresholds the grey level value (pixel) and generates an error value as a result of the threshold process. A portion of the error value is diffused by error diffusion circuit(5)to adjacent pixels on a next scanline. The distribution of this error value is dynamic in that different sets of weighting coefficients, stored in memory(4), are used based the image characteristic of the processed pixel. One set of coefficients are utilized in processing a pixel having a first image characteristic, and a second set of coefficients are utilized in processing a pixel having a second image characteristic.

Description: The present invention is directed to the reduction of the number of levels of a multilevel grey scale pixel value representing an image to a number of levels renderable by an output device utilizing dynamic error diffusion. More specifically, the present invention is directed to a dynamic error diffusion process wherein the error diffusion weighting coefficients are dynamically established based on a physical characteristic of the image data being processed. Image information, be it color or black and white, is derived by scanning, initially at least, in a grey level format containing a large number of levels; e.g., 256 levels of black and white and more than 16 million levels or color, thus, grey level image data may be presented as a large multi-level value. The large multi-level value is usually unprintable by standard printers since standard printers print a limited number of levels, either a spot or no spot in a binary printer, or a limited number of levels associated with the spot, for example, four in the quaternary case. Accordingly, it is necessary to reduce the multi-level grey image data to a limited number of levels so that it is printable. There are many methods of rendering multi-level input grey images on a low level output device. One standard method of converting grey level pixel image data to binary level pixel image data is through the use of dithering or halftoning processes. In such arrangements, over a given area, each grey level pixel within the area is compared to one of a set of preselected thresholds. The effect of such an arrangement is that, for an area where the image is grey, some of the thresholds will be exceeded, while others are not. In the binary case, the pixels in the area in which the threshold is exceeded are printed as black, while the remaining pixels are allowed to remain white. The effect of the distribution of black and white over the the given is integrated by the human eye as grey. Dithering presents problems, however, in that the amount of grey within an original image is not maintained over an area, i.e., the error arising from the difference between the threshold value and the actual grey level value at any particular cellpixel is simply thrown away. This results in loss of image information. Algorithms that convert grey images to binary or other number of level images while attempting to preserve the local density exists include among them error diffusion. Error diffusion can render complex images that contain a mixture of text and picture data reasonably well. The utilization of error diffusion can eliminate the need to have image segmentation which identifies which image data, pixel, corresponds to text and which image data, pixel, corresponds to a picture. Normally, this identification process is necessary so that the picture aspect of the document can be screened and the text aspect of the document can be threshold. An example of a typical error diffusion process with modifications to the error calculation and weight allocation are fully described in US-A 4,924,322, US-A 4,339,774, and US-A 4,955,065. Error diffusion attempts to maintain grey by making the conversion from grey pixels to binary or other level pixels on a pixel-by-pixel basis. The procedure examines each pixel with respect to a threshold, and the difference between the grey level pixel value and the threshold is then forwarded to a selected group of neighboring pixels, in accordance with a weighting scheme. Figure 1 illustrates a typical error diffusion circuit. As illustrated in Figure 1, image data is fed into a threshold circuit 1 along with a threshold value. The threshold circuit 1 compares the image data with the threshold value to determine whether the image data is equal to or greater than the threshold value. In a binarization case, if the image data is greater than or equal to the threshold value, the threshold circuit 1 outputs image data equal to a logical 1 value. On the other hand, if the image data is less than the threshold value, the threshold circuit 1 outputs a logical 0 value. In this thresholding process, an error value is generated by the threshold circuit 1. This error value is fed into an error distribution circuit 3 wherein the error term is multiplied by a plurality of weighting coefficients, wherein each weighting coefficient is associated with a certain pixel that is to receive a portion of the error value. In other words, the error distribution circuit 3 distributes the error generated by the threshold circuit 1 to pixels which are adjacent to the pixel being presently processed according to a set of weighting coefficients. As noted above, typically when utilizing error diffusion, there is not a need to utilize image segmentation. This is due to the fact that typical error diffusion can render an image of acceptable quality not withstanding the characteristics of the image data being processed. This is due in part to the fact that the error from the threshold process is distributed to adjacent or downstream pixels. However, an important aspect of the error diffusion process is the weighting of this distribution of the error to neighboring pixels to ensure the rendering of an acceptable quality image. Figures 7-9 show known distribution and weighting schemes. The distinction between the weighting and distribution schemes shown is in the size of the error distribution matrix or number of neighboring pixels over which error is distributed, which also requires somewhat different weighting schemes. In these Figures, as well as in other Figures showing error diffusion matrices, each cell shows the weighting value. In conventional image rendering devices utilizing error diffusion, the set of weighting coefficients for the error diffusion process is selected in the design stage wherein the same weighting coefficients are used in processing all image types. A problem noted with the selection of a single set of error diffusion weighting coefficients for a standard error diffusion algorithm is production of different artifacts in regions of differing image types or image processing operations. These artifacts can affect the appearance quality of the image being rendered because the selection of the set of weighing coefficients results from the balancing of desired image quality for a particular image type and the actual image quality generated by the image rendering device. In other words, one set of weighing coefficients may produce a high quality image for halftone images, but render an image of lower quality for text data; whereas another set of weighing coefficients may render a high quality image for continuous tone image data, but render an image of lower quality for halftone image data. Thus, it is desirable to utilize an error diffusion process which is capable of optimizing the image quality for all different types of image characteristics and image types. The IEEE Global Telecommunications Conference, Globecom' 91, conference record, volume 1, pages 104 to 109 describe a system which uses error diffusion techniques when quantizing images. The system scales the error which is diffused to adjacent pixels depending on the image segmentation variable of the pixel from which the error is derived. One aspect of the present invention is a method for diffusing an error generated from thresholding a grey level value representing a pixel. The method determines an image characteristic of an area of the image containing the pixel and thresholds the pixel. An error value is generated as a result of the threshold process. A set of weighting coefficients is selected from a plurality of possible weighting coefficient sets based on the image characteristic of the pixel and the error value is diffused to adjacent pixels based on the selected set of weighting coefficients. A second aspect of the present invention is a system for diffusing an error generated from thresholding a grey level value representing a pixel. The system includes image segmentation means for determining an image characteristic of an area of the image containing the pixel and threshold means for thresholding the pixel and for generating an error value as a result of the thresholding process. Coefficient means, operatively connected to the image segmentation means, generates a set of weighting coefficients from a plurality of possible weighting coefficients based on the image characteristic of the pixel. Diffusing means, operatively connected to the threshold means and coefficient means, diffuses the error value to adjust pixels based on the generated set of weighting coefficients. A third aspect of the present invention is a method of binarizing a multi-level pixel. The method identifies areas of an image to be processed by a set of first image processing operations and areas of the image to be processed by a set of second image processing operations. The multi-level pixel is processed with the set of first image processing operations when the multi-level pixel is in an area identified as to be processed by the set of first image processing operations and an error and binary value are generated therefrom. The multi-level pixel is processed with the set of second image processing operations when the multi-level pixel is in an area identified as to be processed by the set of second image processing operations and an error and binary value are generated therefrom. A weighted portion of the error is diffused to unprocessed pixels based on a first set of weighting coefficients when the multi-level pixel is processed by the set of first image processing operations. A weighted portion of the error is diffused to unprocessed pixels based on a second set of weighting coefficients when the multi-level pixel is processed by the set of second image processing operations. A fourth aspect of the present invention is a printing system for rendering marks on a receiving medium. The system includes receiving means for receiving a pixel having a first resolution and first image processing means for screening the pixel with a predetermined screen. Second image processing means converts the pixel to a second resolution higher than the first resolution and third image processing means binarizes the pixel so as to output a binary signal and an error, the error having a resolution equal to the first resolution. Image segmentation means, operatively connected to the receiving means, the first image processing means, the second image processing means, and the third image processing means, determines an image characteristic of an area of the image containing the pixel and controls the operations of the first, second and third image processing means. Coefficients means, operatively connected to the image segmentation means, generates a first set of weighting coefficients when the first, second and third image processing means are operated in sequence and generates a second set of weighting coefficients when the second and third image processing means are operated in sequence and the first image processing means is rendered nonoperational by the image segmentation means. Diffusing means, operatively connected to the coefficients means, diffuses the error to adjacent pixels based on the set of weighting coefficients generated by the coefficients means, and rendering means converts the binary signal into a mark on the receiving medium. Further objects and advantages of the present invention will become apparent from the following descriptions of the various embodiments, in conjunction with the drawings, wherein: Figure 1 shows a block diagram illustrating a typical error diffusion circuit; Figure 2 shows a block diagram illustrating an image processing subsystem's architecture of the preferred embodiment of the present invention; Figure 3 shows a block diagram illustrating a dynamic error diffusion circuit for one embodiment of the present invention; Figure 4 shows a block diagram illustrating a dynamic error diffusion circuit for another embodiment of the present invention; and Figures 5-9 illustrate various sets of weighting coefficients that can be utilized in the present invention. In describing the present invention, it is assumed that the video signal has a value and a range between 0 and 255. However, any range for the video signal can be utilized in conjunction with the present invention. Moreover, in the following description, the term grey level will be used to described both black and white and color applications. Also, in describing the present invention, the terms pixel and subpixel will be utilized. These terms may refer to an electrical (or optical, if fiber optics are used) signal which represents the physically measurable optical properties at a physically definable area on a receiving medium. The receiving medium can be any tangible document, photoreceptor, or marking material transfer medium. Moreover, the terms pixel and subpixel may refer to an electrical (or optical, if fiber optics are used) signal which represents the physically measurable optical properties at a physically definable area on a display medium. A plurality of the physically definable areas for both situations represent the physically measurable optical properties of an entire physical image to be rendered by either a material marking device, electrical or magnetic marking device, or optical display device. Lastly, the term pixel may refer to an electrical (or optical, if fiber optics are used) signal which represents physical optical property data generated from a single photosensor cell when scanning a physical image so as to convert the physical optical properties of the physical image to an electronic or electrical representation. In other words, in this situation, a pixel is an electrical (or optical) representation of the physical optical properties of a physical image measured at a physically definable area on an optical sensor. As discussed above, in typical error diffusion methods, the printing of the pixel is determined by comparing a modified input video signal with a threshold value. The modified input video signal is a sum of an input video signal plus an accumulated error term determined from the processing of previous pixels. If the modified input video of the pixel is greater than or equal to the threshold, the output is a logical 1 value and an error term of input video signal plus the accumulated error term minus highest possible video signal value is propagated to the downstream pixels. If the modified input video signal is less than the threshold value, the logical output is 0 and an error term of the input video signal plus the accumulated error term is propagated to downstream pixels. To extend the typical static error diffusion process to be a dynamic error diffusion process, the error diffusion process must be responsive to information indicating the characteristics of the image data being presently processed and be able to modify or change the distribution of the error to be propagated to downstream pixels based on this information. An example of such a dynamic error diffusion circuit is illustrated in Figure 2. It is noted that the present invention will be described for a binary system. However, the concepts of the present invention are readily applicable to any level system. A segmentation circuit 15 receives image data from a scanner or other image data producing device. The segmentation circuit 15 analyzes the image data to determine the characteristic of the image data or image type. At the same time, the image data is also temporarily stored in a buffer 16. Upon determining the image type, the segmentation circuit 15 generates an effect dataword which contains the characteristic and image type data for the particular pixel being processed. A more detailed description of image segmentation and the associated circuits are set forth in US-A- 4,760,463, US-A-4,780,709, US-A-4,887,163, US-A-4,897,803, US-A-4,951,231, and US-A-5,307,180. The effect dataword is fed into a first decoder 13 corresponding to an image processing module 14. Image processing module 14 receives the temporarily stored image data from buffer 16. After receiving the temporarily stored image data, the first image processing module 14 performs the appropriate image processing operations in response to the decoding of the effect dataword by decoder 13. After completion of the operations, the effect dataword is passed on to a second decoder 11 and the (non)processed image data is passed on to a second image processing module 12. The second decoder and second image processing module operate in essentially the same manner as the first decoder and first image processing module; except, the image processing operations of the second image processing module 12 are different from that of the first image processing module 14. Thereafter, the effect dataword and (non)processed image data are propagated through a variety of decoders and associated image processing modules until all the appropriate image processing operations are being carried out. It is noted that an image processing module may be rendered nonoperational by its associated decoder as a result of the decoding of the effect dataword. In this situation, the image data passes through the image processing module without processing, thereby outputting nonprocessed image data. After being (non)processed by the last image processing module, the (non)processed image data is fed into an error diffusion circuit 5. At the same time, the associated effect dataword is fed into an error diffusion decoder 7. The error diffusion circuit 5 includes a thresholding circuit and an error distribution circuit for distributing the error associated with the thresholding process. Also associated with the error diffusion decoder 7 and error diffusion circuit 5 is a distribution coefficient memory 4. The distribution coefficient memory 4 stores various sets of weighting coefficients to be utilized in the error diffusion process. The actual set of weighting coefficients to be utilized by the error diffusion process is determined according to information received from the error diffusion decoder 7. More specifically, the set of weighting coefficients to be utilized in the error diffusion process is selected based upon the image type or image characteristic of the pixel being processed. In response to the information received from the error diffusion decoder 7, the distribution coefficient memory 4 loads the properly selected set of weighting coefficients into the error diffusion circuit 5 so that the proper error terms can be propagated to downstream pixels. Moreover, the error diffusion circuit 5 outputs image data which is capable of being rendered on an output device. Figure 3 illustrates a more detailed block diagram of the error distribution circuit 5 of Figure 2. As illustrated in Figure 3, a threshold circuit 10 receives (non)processed image data and a threshold value. As a result of the threshold process, the threshold circuit 10 outputs image data which is capable of being rendered by an output device and error data. The error data is fed into an error distribution circuit 30 which distributes the error to downstream pixels according to a set of weighting coefficients. The actual set of weighting coefficients utilized by the error distribution circuit 30 is provided by a distribution coefficients memory 40. The distribution coefficient memory 40 stores various sets of weighting coefficients wherein each set of weighting coefficients is associated with a certain image type or image characteristic. The selection of the proper set of weighting coefficients is realized by receiving an address from address generator 20. The address generator 20 generates an address for selecting the proper set of weighting coefficients in the distribution coefficient memory 40 based on received image characteristic data. Thus, if the pixel being processed has been labeled as a halftone image, one set of weighting coefficients are selected to be utilized in the error distribution circuit 30; whereas if the pixel being processed has been identified as continuous tone data, another set of weighting coefficients are provided to the error distribution circuit 30 for proper propagation of the error terms to downstream pixels. Figure 4 illustrates another embodiment of the dynamic error diffusion process of the present invention. As illustrated in Figure 4, a threshold circuit 100 receives image data and threshold data. As in Figure 3, the threshold circuit produces image data which is capable of being rendered by an output device and character data. The error data is fed into an error distribution circuit 300 which has pre-loaded therein all possible sets of weighting coefficients. Thus, the error distribution circuit 300 produces, in parallel, all possible sets of error terms that are to be propagated to downstream pixels. This is shown by the illustration of the sets of error terms Err 1 , Err 2 ,... Err n . All the possible sets of error terms generated by the error distribution circuit are fed into a multiplexer 600 which selects the proper set of error terms to be propagated to downstream pixels. The selection by the multiplexer of the proper set of error terms is governed by a decoder 500. Decoder 500 operates in essentially the same way as the error diffusion decoder 7 of Figure 2 in that is receives the effect dataword and decodes the effect dataword to determine which set of error terms associated with a particular set of weighting coefficients are to be selected by the multiplexer to be propagated to downstream pixels. An actual example of the utilization of the concepts of the present invention will be briefly described below in conjunction with Figures 5 and 6. An image segmentation module (segmentation circuit 15 of Figure 2) is utilized to detect the type of image being presently processed. As a result of the detection, an effect dataword or pointer tag is produced for the particular image pixel value. This effect dataword or pointer tag is utilized in the image processing system to activate or deactivate various image processing modules (14, 12,... 9 of Figure 2). The effect dataword or pointer tag also includes information as to what individual image processes are to be performed by an activated image processing module. After completing the image processing, the image data is binarized for rendering by an output device. This binarization process produces an error which is to be propagated downstream. As noted before, the propagation of the error depends on the weighting coefficients of the error diffusion process. In this example, there are a variety of possible sets of coefficients which are selected based upon the determination of the image type. If the image segmentation process determines that the pixel being processed is line text, the coefficients illustrated in Figure 5 are chosen when error diffusion is performed. On the other hand, the set of coefficients illustrated in Figure 6 are chosen when the decoding of the effect dataword or pointer tag informs the processing module that the pixel is continuous tone data. Moreover, the selection of the weighting coefficients can be selected based merely on the image processing operations previously performed on the pixel. For example, if a high addressability error diffusion process is performed on the pixel, the weighting coefficients illustrated in Figure 5 would be chosen in the preferred embodiment of the present invention. A full description of a high addressability error diffusion process is disclosed in EP-A-696132 corresponding to U.S. Patent Application, Serial No. 08/285,326, filed concurrently herewith. On the other hand, if a screening/high addressability error diffusion process is performed on the pixel, the weighting coefficients illustrated in Figure 6 would be chosen in the preferred embodiment of the present invention. A full description of the screening/high addressability error diffusion process is disclosed in EP-A-696131 corresponding to U.S. Patent Application, Serial No. 08/285,328, filed concurrently herewith. Lastly, if a high addressability error diffusion process with redistribution is performed on the pixel, the weighting coefficients illustrated in Figure 5 would be chosen in the preferred embodiment of the present invention. A full description of the high addressability error diffusion process with redistribution is disclosed in EP-A-696133 corresponding to U.S. Patent Application, Serial No. 08/285,265, filed concurrently herewith. Another application of the concepts of the present invention is the utilization of two different error diffusion matrices, in a single image, for portions of the image which are determined to have relatively low or relatively high intensity regions, a relatively large diffusion matrix like that shown in Figure 9 can be used for the binarization process. For portions of the image which are determined to have mid-level grey values, the error diffusion matrix of Figure 8 can be used. Although the present invention has been described in detail above, various modifications can be implemented. For example, the preferred embodiment of the present invention has been described with respect to a printing system; however, this dynamic error diffusion method is readily implemented in a display system. Moreover, the high addressability error diffusion method of the present invention can be readily implemented on an ASIC, thereby enabling the placement of this process in a scanner, electronic subsystem, printer, or display device. Moreover, the present invention has been described with respect to a video range of 0 to 255. However, it is contemplated by the present invention that the video range can be any suitable range to describe the grey level of the pixel being processed. Furthermore, the present invention is readily applicable to any rendering system, not necessarily a binary output device. It is contemplated that the concepts of the present invention are readily applicable to a four-level output terminal or higher. Furthermore, the present invention has been described as having the set of weighting coefficients prestored in a memory device, such as a ROM or EPROM, but the present invention also contemplates the utilization of a processor which performs a predetermined algorithm to generate the set of weighting coefficients, and thus the utilization of a large look-up table can be avoided. Lastly, the present invention has been described with respect to a monochrome or black/white environment. However, the concepts of the present invention are readily applicable to a color environment. Namely, the dynamic error diffusion process of the present invention can be applied to each color space value representing the color pixel.

Claims: A method of diffusing an error generated from thresholding a grey level value representing a pixel, comprising the steps of: a. determining an image characteristic of an area of the image containing the pixel; b. thresholding the pixel; c. generating an error value as a result of the threshold process in said step b.; d. selecting a set of weighting coefficients from a plurality of possible weighting coefficient sets based on the image characteristic of the pixel; and e. diffusing the error value to adjacent pixels based on the selected set of weighting coefficients. The method as claimed in claim 1, wherein the image characteristic is (1) an image type, or (2) image density information. A system for diffusing an error generated from thresholding a grey level value representing a pixel, comprising: image segmentation means (15) for determining an image characteristic of an area of the image containing the pixel; threshold means (10) for thresholding the pixel and for generating an error value as a result of the thresholding process; coefficient means (20,40), operatively connected to said image segmentation means, for generating a set of weighting coefficients from a plurality of possible weighting coefficient sets based on the image characteristic of the pixel; and diffusing means (30), operatively connected to said threshold means and coefficient means, for diffusing the error value to adjacent pixels based on the generated set of weighting coefficients. The system as claimed in claim 3, wherein said image segmentation means (15) determines (1) whether the pixel within the image is text, continuous tone or halftone such that the image characteristic reflects a determined image type, or (2) an image density of the pixel within the image such that the image characteristic reflects a determined density. A method of binarizing a multi-level pixel, comprising the steps of: a. identifying areas of an image to be processed by a set of first image processing operations and areas of the image to be processed by a set of second image processing operations; b. processing the multi-level pixel with the set of first image processing operations when the multi-level pixel is in an area identified as to be processed by the set of first image processing operations and generating an error and binary value therefrom; c. processing the multi-level pixel with the set of second image processing operations when the multi-level pixel is in an area identified as to be processed by the set of second image processing operations and generating an error and binary value therefrom; d. distributing a weighted portion of the error to unprocessed pixels based on a first set of weighting coefficients when the multi-level pixel is processed by said step (b); and e. distributing a weighted portion of the error to unprocessed pixels based on a second set of weighting coefficients when the multi-level pixel is processed by said step (c). A printing system for rendering marks on a receiving medium, comprising: receiving means for receiving a pixel having a first resolution; first image processing means (14) for screening the pixel with a predetermined screen; second image processing means (12) for converting the pixel to a second resolution higher than the first resolution; third image processing means (9) for binarizing the pixel so as to output a binary signal and an error, the error having a resolution equal to the first resolution; image segmentation means (15), operatively connected to said receiving means, said first image processing means, said second image processing means, and said third image processing means, for determining an image characteristic of an area of the image containing the pixel and for controlling operations of said first, second and third image processing means; coefficients means (20,40), operatively connected to said image segmentation means, for generating a first set of weighting coefficients when said first, second and third image processing means are operated in sequence and for generating a second set of weighting coefficients when said second and third image processing means are operated in sequence and said first image processing means is rendered nonoperational by said image segmentation means; diffusing means (30), operatively connected to said coefficients means, for diffusing the error to adjacent pixels based on the set of weighting coefficients generated by said coefficients means; and rendering means for converting the binary signal into a mark on the receiving medium.

Inventors: METCALFE DAVID J, SHIAU JENG-NAN, WILLIAMS LEON C, METCALFE, DAVID J., SHIAU, JENG-NAN, WILLIAMS, LEON C.
Applicants: XEROX CORP, XEROX CORPORATION
Application year: 1995
Main classification: H04N1
IPC codes: H04N1, G06T5