Image processing system and method employing adaptive scanning of halftones to provide better printable images

Abstract: An image processing system employs a scanner (14) to generate an image having gray content from an input halftone image (12). The system further includes a programmed computer that determines (46) whether each pixel is a constant area pixel or an edge area pixel. Each constant area pixel is detected (48) to be a white pixel or a black pixel and the white or black value is set (50) with reference to a local black or white reference point. The local reference point is then adjusted (52) as a function of the input value of each constant area pixel. Each edge area pixel is detected (60) to be a local-extremum pixel or a nonextremum pixel. The value of each local-extremum pixel is modified (62) as a function of the current local reference point. The local reference point is also adjusted (64) as a function of the value of each local-extremum or nonextremum pixel after it is detected. The modified constant and edge area pixels are stored (54) as a modified image for output processing.

Description: The present invention relates to image processing systems and methods and more particularly to systems and methods for scanning halftone images to make quality copies or prints. Various kinds of machines or systems employ a scanner to obtain an image of a document for further processing leading to reproduction, copying, or printing of the document. For example, copy machines employ a platen on which a document is placed for scanning, with the scanned electronic image being processed by the machine to produce one or more copies. Similarly, a FAX machine employs a scanner to obtain an image of an inserted document, with the scanned electronic image being processed by the machine to generate a local or remote copy. A printer system may also employ a separate scanner to obtain an electronic image of a document to be printed, and the electronic image may then be processed by a separate computer system to generate an image in a form ready for printing by the system printer. In the prior art, the scanning and subsequent processing of black-and-white and color halftone or binary images, such as those found in newspapers and magazines, has typically resulted in undesirable loss of detail in the output copies or prints. Normally, such loss of image detail has resulted in part from an inability of the total system including the scanner to respond to relatively high spatial gradients across edges contained in the image. Loss of image detail in the prior art has also resulted from an inability of entire systems to compensate for variation in printing density or paper density across the original image, such as faded inks, stains, rubbed areas, etc. With respect to high spatial gradients in images to be reproduced, the conventional scanner typically has a resolution comparable to the resolution with which the image to be reproduced was created. The scanner is thus enabled to read accurately image areas having low and medium spatial gradients, but it is limited in reading areas such as edges having high spatial gradients. For example, edge areas are typically read such that gray pixels result at the borders between black and white areas in a black and white image. Thus, the aperture of the scanner bridges multiple image pixels which are value averaged, and, at the edges, the averaging of black and white pixels results in gray pixels. The end effect is that image detail is lost. A prior art system is disclosed in EP-A-0 424 854. Furthermore, the following prior art may be of interest: 1. U.S. Patent US-A-4,926,267, entitled "Reproduction of Halftone Original With Reduced Moire," dated May 15, 1990, and issued to J. Shu, et al. 2. U.S. Patent US-A-4,977,605, entitled "Binary Quantification of an Image Having Multiple Levels of Greys", dated December 11, 1990, and issued to Fardeau, et al. 3. U.S. Patent US-A-4,468,705, entitled "Data Transition Enhancement", dated August 28, 1984, and issued to Jack D. Burton. 4. U.S. Patent US-A-4,876,610, entitled "Image Processing Apparatus With Binarization-Error Dispersal ", dated October 24, 1989, and issued to H. Ohsawa et al. 5. U.S. Patent US-A-2,892,887, entitled "Apparatus For Producing Screened Printing Forms With Automatic Correction of Tone Values", dated June 30, 1959, and issued to Rudolf Hell. 6. U.S. Patent US-A-4,554,593, entitled " Universal Thresholder/Discriminator", dated November 19, 1985, and issued to Sidney J. Fox, et al. 7. U.S. Patent US-A-4,259,694, entitled "Electronic Rescreen Technique for Halftone Picture", dated March 31, 1981, and issued to Henry H. Liao. 8. U.S. Patent US-A-4,638,369, entitled "Edge Extraction Technique", dated January 20, 1987, and issued to Robert C. Hsieh. 9. U.S. Patent US-A-2,962,550, entitled "Resolution Restore System", dated November 29, 1960, and issued to Robert M. Brink. 10. U.S. Patent US-A-3,249,690, entitled "Video Quantizer Producing Binary Output Signals at Inflection Points of Input Signal", dated May 3, 1966, and issued to Ernest J. Schubert. 11. U.S. Patent US-A-4,633,327, entitled "Enhancement Halftoning", dated December 30, 1986, and issued to Paul G. Roetling. 12. U.S. Patent US-A-4,730,221, entitled "Screening Techniques by Identification of Constant Grey Components", dated March 8, 1988, and issued to Paul G. Roetling. It is an object of the present invention to provide an image processing system that can scan and process input halftone images to produce output halftone images with improved quality. Accordingly, an image processing system for scanning and reproducing halftone images comprises means for scanning an input halftone image to generate an image having gray content and means for detecting whether each pixel of the input image is a constant area pixel or an edge area pixel. Means are provided for estimating a local black/white reference point as a function of reference point values in a predetermined pixel neighborhood. Second means are provided for detecting whether each constant area pixel has an input value that makes it a white pixel or a black pixel relative to the local current black/white reference point for the detected constant area pixel. First means are provided for modifying the input value of each detected constant area pixel to a predetermined white value or a predetermined black value in accordance with the detecting result from the second detecting means. Means are provided for setting the value of the local black/white reference point for each detected constant area pixel to a calculated value for that pixel. Second means are provided for modifying an input value of each detected edge area pixel as a function of the local black/white reference point for the detected edge area pixel. Means are provided for adjusting the local reference points, for each of at least some detected edge area pixels, and means are provided for storing the modified constant and edge area pixels as a modified image for output processing. Means may be provided for halftoning said modified image for output printing or copying. Said halftoning means may provide for error diffusing said modified image for output printing or copying. By way of example only, embodiments of the invention will be described with reference to the accompanying drawings in which: FIGURE 1 shows a block diagram of a reproduction system in which the present invention is embodied; FIGURE 2 shows a functional block diagram for a general process performed in the system of FIGURE 1 in accordance with the invention; and FIGURE 3 shows a flow chart illustrating in greater detail procedures employed in the system and process of FIGURES 1 and 2. In FIGURE 1, a system 10 is provided to reproduce an original binary or halftone image 12 which generally may be a color or a black-and-white image but in this case is a black-and -white binary image. In the text herein, the term black-and-white is used in the sense of a binary image. However, the term white in all cases refers to a white value at a specific location of a scanned original page or paper, and the term black refers to the value of the ink/toner at a specific page location. Black and white are not constant over the page so that only the relation that black at a specific point is darker than white at that specific point holds. The black at one area of the page might actually be lighter than the white at a second totally different area of the page, e.g., the ink/toner at a rubbed area of the page might be lighter than a stained area of the page. However, in such a case, the toner in the first rubbed area is darker than the paper in the same first area and the second stained area is lighter than the toner in the same second area. The system 10 includes a scanner 14 for reading the image 12 and an image processor 16 that processes the image 12 for application to a copy or print system 18. While the illustrated system is structured to process a binary input image, the invention generally can be applied to input images having multiple tone levels, i.e., an n-tone image. The system 10 may, for example, be a copy machine having a platen on which the original document 12 is placed, and wherein the scanner 14, the image processor 16, and a copy system 18 are integral parts of the copy machine. As another example, the system 10 may be a printer system in which the scanner 14 is a separate unit that is coupled to the image processor 16 in the form of a separate computer system, and in turn the processor 16 is linked to a separate printing system 18. The preferred general process performed in the system 10 in accordance with the present invention is illustrated by a flow diagram 20 in FIGURE 2. Thus, data from a halftone image 22 is applied as an input to a process step 24 in which the data is scanned to generate an output image with gray content. Next, an optional step 26 provides an input detection/selection in which a text halftone segmentation can be performed by standard software tools or, selectively, by user interventions. Only the data containing high spatial gradients is transferred to the next block when the optional step 26 is selected. A step 28 adaptively scales the input image values in accordance with the invention and sends the results to storage as indicated by a block 30. Preferably, the stored image is halftoned by an error diffusion procedure 32 and stored by a block 34 as printable output image data 35 for the system 18. Generally, procedures employed in accordance with the present invention are implemented by an algorithm based on the following assumptions: a. Scanning of a binary input results in gray pixels at the borders between black and white regions; b. Constant areas in the scanned data (m x n pixels) are either black or white and allow the estimation of the local black/whitepoint on the page, i.e., the value the scanner sees at that pixel when the input was either a blank page (whitepoint) or solid toner (blackpoint); and c. Local extrema in the scanned data represent single (or small) black or white features that also allow the estimation of local black/whitepoints. In this way, each pixel of the input can be assigned to be black, white, or edge (gray). The edge pixels are then readjusted corresponding to the local black and white points determined from surrounding pixels that are recognized as being black or white. FIGURE 3, shows a flow diagram for an algorithm preferred for implementing a procedure in accordance with the present invention. In accordance with the preferred algorithm, the directional derivatives of the input pixel are compared to a threshold Δd and the pixel is classified as "constant area" or "edge", with the "edge" classification including local extrema. Pixels classified as edge are then checked to determine whether they are a local extremum by being Δe larger (maximum) or smaller (minimum) than the surrounding pixels. To determine each pixel value and the value a white area (whitepoint) or a black area (blackpoint) would yield at the pixel position, the pixels are preferably processed according to their classification as follows: a. Constant area pixels: Pixels that have a directional derivative which does not exceed the threshold Δd have to be either black or white since the input was binary and thus had no extended gray regions. The decision whether the pixel is actually black or white is made by comparing the pixel to a larger neighborhood such as 10x3 pixels. If the actual pixel is above (below) the local average by more than a threshold, then the pixel is set to white (black). Otherwise the pixel is set to white or black depending on (a) the difference from the local black/whitepoint which is generated by using a weighted average of the black/whitepoints of already processed pixels in a pixel neighborhood, such as one that is 3x3 pixels and (b) decisions made as to whether neighboring "constant area" pixels, if any, are black or white. After the decision whether the pixel is actually black or white is made, the pixel is written to the output and its original value is used to readjust the local black/whitepoint. This is done by setting the black/whitepoint to a weighted average of the local black/whitepoint before the pixel was classified and the calculated black/whitepoint. A readjustment is made because the input value is known to be black (white) and therefore the scanner response to black (white) at that pixel is known and the response is assumed to be constant in a neighborhood of m x n pixels such as 5x3. b. Local-extrema pixels: The value of pixels classified as local extrema is readjusted corresponding to the value of the black/whitepoint at that location. Here, the amount by which the pixel differs from its surrounding is used as an additional criterion to determine the actual readjustment. The black/whitepoint of the neighborhood, such as 3x3 pixels, is readjusted by setting the black/whitepoint to a weighted average of the local black/whitepoint before the pixel was classified and the calculated black/whitepoint. c. Gray Pixels: All pixels that are not classified under one of the above groups are considered to be gray. The values of these pixels are readjusted using the local black/whitepoint, where the readjustment can be done by a linear function or more general functions such as power laws. The effect of readjusting the data using a power law is to darken or lighten the image. The local black/whitepoint is constructed by averaging over previous black/whitepoints, including an optional biasing towards black or white (e.g.: white = <white> + bias w , black = <black> - bias b , where bias w is a bias toward white and bias b is a bias toward black). The pixel processing classification described above is preferred, but other classifications can be used. For example, in order to reduce noise due to dirt on a page, an additional classifier that uses a small neighborhood around each pixel, plus the classifications made in the neighborhood, can be included in the decision making process. The result of the pixel processing is a readjusted graytone image that can be used by itself in the system. In printing/copying applications, however, the graytone image is then reduced to binary level (or n-level) using a conventional edge enhanced error diffusion algorithm, which is preferable to using the conventional standard error diffusion since the enhancement leads to a better dot-structure in the reproduction of halftones. PROGRAMMED COMPUTER PROCEDURE FOR CLASSIFYING AND PROCESSING SCANNED HALFTONE IMAGE DATA A procedure 40 shown in FIGURE 3 sequentially processes input pixels, until all pixels have been processed, to determine and thereby restore original black and white areas for the halftone image where those areas have been modified as a result of scanner and/or printer caused errors or page artifacts such as faded inks. At edges, restoration of original black and white pixels sharpens and thus significantly improves the quality of prints or copies made from output images generated by the procedure 40. A pixel classification system is employed in the procedure 40 so that pixels in each classification can be logically processed according to that classification to achieve the described results. Specifically, it is preferred that pixels be classified as constant area or edge area pixels. In turn, edge area pixels are classified as local extremum pixels or local nonextremum pixels. At edges, pixels that should be black or white typically will be gray as a result of scanner averaging as previously described. The concept of an "extremum" pixel is based on the fact that a pixel that was originally black will have a maximum gray value and a pixel that was originally white will have a minimum gray value. Hence, the "extremum" pixels should be logically processed differently from other neighboring "non-extremum" pixels. In a block 42, initialization is performed with estimated black and white reference points being set for use in the execution of the procedure 40. A weighted average of the previously calculated black and white points of neighboring pixels is used in the estimation of the local black and white reference points. A block 44 then obtains data for the first pixel in the input image. A classification test block 46 determines whether the pixel is a constant area pixel or an edge area pixel. The local directional or spatial derivative (gradient) is compared to a predetermined threshold derivative level Δd. If the local gradient is greater than the threshold level Δd, the pixel is classified as an edge area pixel indicating that black/white transition occurs in that area. Otherwise, the pixel is classified as a constant area pixel since it is in an area where only small tone variations exist. A constant area pixel is processed in a block 48 to determine whether it is black or white, by comparison of its input value to the current estimated black and white local reference points from a block 49. A block 50 accordingly sets the pixel to the pixel output value which is the most black or the most white value in the system gray scale. Each pixel has its own estimated white reference point WP and its own estimated black reference point BP. The estimated reference point for the currently processed constant area pixel is set to the input value for the pixel once the black/white determination is made by comparison to the local BP or WP estimate by the block 48. For example, if the input value for a pixel is 24, and the pixel is set to black in the block 50, the black reference for the pixel becomes 24. The estimated local blackpoint (BP) or whitepoint (WP) reference in the block 49 is preferably calculated as follows: Estimated BP = Weighted Local Average of BPs for Processed Pixels + Offset Estimated WP = Weighted Local Average of WPs for Processed Pixels + Offset Generally, the offset is biased toward black for the BP calculation and it is biased toward white for the WP calculation, and is selected to provide reduced sensitivity to noise. After the block 50, the newly set pixel is recorded as an output pixel in a block 54 and a block 52 adjusts the estimated local black/white reference points that had been used in the block 49 to determine whether the current pixel was black or white, and the adjusted values are used in the estimation of subsequent black/white reference points. Preferably, the adjustment of the estimated black or white local reference point value, for use in processing the next pixel, is made in accordance with the above calculation, i.e., it is ultimately an appropriately weighted average of neighborhood pixel reference point values as they become determined in the execution of the procedure 40. The local "neighborhood" can be a set of surrounding pixels, such as a 3 X 3 block of pixels. After a current constant area pixel is processed as described, the following pixel reference point data is set for the pixel: if the pixel was black: BP = pixel input value WP = estimated local WP if the pixel was white: WP = pixel input value BP = estimated local BP A test block 56 checks for more pixels to be processed. If all pixels have not been processed, a return is made to the block 44 where processing for the next pixel is begun. Generally, pixels may be processed by any of various possible pixel sequences, such as the most common one which is row-by-row from left to right. When all pixels have been processed, the procedure 40 is completed and the output image is stored for subsequent halftoning by error diffusion as previously indicated, or by any other suitable density preserving halftoning method. Each edge area pixel is checked in a test block 60 to determine whether it is a local extremum that should be black or white. A local minimum or maximum is detected if the current pixel value is greater than neighboring pixels by a magnitude greater than a predetermined Δe value which serves to distinguish a probable minimum or maximum from noise variations. If a local extremum is detected, a block 62 scales the pixel value toward black or white with a weight α. Even with the use of the noise threshold Δe, noise could occasionally be the cause of an apparent local extremum and the weighting α provides some corrective adjustment in the pixel value while providing some offset against the possibility of noise. As an example, α may be set to a value of 1/2. After scaling in the block 62, a block 64 adjusts the black or white reference point with an appropriate weight β, again to offset the possibility of noise, and the newly valued extremum pixel is recorded as an output pixel in the block 54. The procedure 40 then ends or flows as previously described to process the next pixel. If the edge area pixel is detected to be a local nonextremum by the test block 60, a block 66 classifies the current pixel as a gray pixel. A block 68 then scales the current pixel value toward black or white with a predetermined weight factor in accordance with the current neighboring black/white reference point obtained from a block 70 and the scaled nonextremum pixel is recorded as an output pixel in the block 54. Any additional pixels are then processed as previously described. In effect, the procedure 40 makes "black" pixels blacker and "white" pixels whiter and converts the pixel gray value from the current reference scale to the output reference scale; i.e., pixels that are identified as "black" are set to an output value corresponding to "black output", such as "0", while the value actually scanned at that point was larger than 0. Pixels that are identified as "white" are set to the most white value, such as 255 (in an 8-bit pixel value system which is employed in the preferred embodiment) while the value actually scanned at that point was actually less than the most white value (255). The weighted scaling of the pixel in the block 68 is performed as follows: Output value = (Real White - Real Black) x Input Value WP - BP or, in the preferred embodiment: Output value = 255 x InputValue WP - BP After an edge area pixel is processed, the following reference point data is set for the pixel: if the pixel was non-extremum: WP = estimated local WP BP = estimated local BP using a calculation like that described for the block 52 if the pixel was maximum in the block 64: WP = β(estimated WP) + (1 - β)input value BP = estimated BP if the pixel was minimum in the block 64: BP = β (estimated BP) + (1 - β) input value WP = estimated WP The output image from the block 54 provides an adjusted clear gray data image that is generally not yet suitable for printing or copying. Preferably, the referenced error diffusion processing or any other density preserving halftoning method then generates a printable output image from which copies or prints can be made with significant improvement over the prior art.

Claims: An image processing system for scanning and reproducing halftone images, said system comprising: means (14) for scanning an input halftone image (12) to generate an image having gray content; first means for detecting (46) whether each pixel of the input image is a constant area pixel or an edge area pixel; means for estimating (49) a local black/white reference point as a function of reference point values in a predetermined pixel neighborhood; second means for detecting (48) whether each constant area pixel has an input value that makes it a white pixel or a black pixel relative to the local current black/white reference point for the detected constant area pixel; first means for modifying (50) the input value of each detected constant area pixel to a predetermined white value or a predetermined black value in accordance with the detecting result from said second detecting means; means for setting (52) the value of the local black/white reference point for each detected constant area pixel to a calculated value for that pixel; second means for modifying (62,68) an input value of each detected edge area pixel as a function of the local black/white reference point for the detected edge area pixel; means for adjusting (64) the local reference points, for each of at least some detected edge area pixels; and means for storing (54) the modified constant and edge area pixels as a modified image for output processing. An image processing system as claimed in claim 1, wherein said setting means sets the local black/white reference point to the input value of the pixel determined to be black/white. An image processing system as claimed in claim 1 or claim 2, wherein said adjusting means sets the black/white reference point to a weighted average of the black/white reference points of a predetermined pixel neighborhood including the input value of the currently detected edge area pixel. An image processing system as claimed in any one of the preceding claims, wherein said estimating means estimates the local black/white reference point as a weighted average of the black/white reference points of a predetermined pixel neighborhood. An image processing system as claimed in claim 4, wherein said estimating means for the local black/white reference point biases the weighted average toward black/white. An image processing system as claimed in any one of the preceding claims. wherein said first modifying means sets the white value to the most white value or the black value to the most black value in the gray scale employed in the image processing system. An image processing system as claimed in any one of the preceding claims, wherein said second modifying means includes: third means for detecting (60) whether each edge area pixel is a local extremum or a nonextremum; first means for changing (62) the value of each edge area pixel that is a local-extremum pixel as a function of the current estimated local black/white reference point; second means for changing (68) the value of each edge area pixel that is a nonextremum pixel as a function of the current estimated local black/white reference point; and wherein said adjusting means adjusts (64) the local reference points as a function of the value of each local-extremum pixel after it is detected. An image processing system as claimed in claim 7, wherein said first changing means scales (62) the value of a current extremum edge area pixel toward black or white with a predetermined weighting α. An image processing system as claimed in claim 7 or claim 8, wherein said adjusting means adjusts the local reference points by scaling a value of the current local reference point toward the input value of each current extremum edge area pixel with a predetermined weighting β. An image processing system as claimed in any one of claims 7 to 9, wherein said second changing means scales the value of a current nonextremum edge area pixel toward a value of the current local reference point with a predetermined weighting. An image processing system as claimed in any one of the preceding claims, wherein a pixel is determined to be a constant area pixel if a value of its gradient is less than a predetermined gradient threshold (Δd) or an edge area pixel if its gradient value is more than the predetermined gradient threshold. A method for scanning and reproducing halftone images, the steps of said method comprising: scanning an input halftone image (12) to generate an image having gray content; detecting (46) whether each pixel of the input image is a constant area pixel or an edge area pixel; estimating (49) a local black/white reference point as a function of reference point values in a predetermined pixel neighborhood; detecting (48) whether each constant area pixel has an input value that makes it a white pixel or a black pixel relative to the local current black/white reference point for the detected constant area pixel; modifying (50) the input value of each detected constant area pixel to a predetermined white value or a predetermined black value in accordance with the detecting result from the second detecting step; setting (52) the value of the local black/white reference point for each detected constant area pixel to a calculated value for that pixel; modifying (62,68) an input value of each detected edge area pixel as a function of the local black/white reference point for the detected edge area pixel; adjusting (64) the local reference points, for each of at least some detected edge area pixels; and storing (54) the modified constant and edge area pixels as a modified image for output processing.

Inventors: ESCHBACH REINER, ESCHBACH, REINER
Applicants: XEROX CORP, XEROX CORPORATION
Application year: 1993
Main classification: H04N1
IPC codes: H04N1