A method for enhancing printing quality to process the picture and textual data in an image properly such that both the picture and textual data can be clearly printed. The inventive method can treat the image data to be printed in a real time fashion and while the entire image data is not required. In the inventive method, the difference of gray level is reallocated by error diffusion method to render the edge more smooth and clear.
|
5. A method for enhancing printing quality of gray level and color images, comprising steps as follows:
A) performing a cmky halftone process wherein a document to be printed is converted to a cmky image and a halftone process is carried out for each cmky color to determine a color of a pixel in an image to be printed; B) performing a cmy conversion wherein the document to be printed is converted to a cmy image to detect an edge in each cmy color simultaneously; C) performing an edge detection by determining a presence of an edge feature by a gray level difference in the document to be printed, no process being carried out if no edge feature is detected, an edge feature being recorded if the edge feature is detected; D) allocating a feature record of an edge pixel according to a change in a printing mode to determine whether each edge pixel is printed; and E) performing a conversion of cmy edge pixels to cmky edge pixels, wherein said step of allocating includes the step of processing a white pixel feature first and a black pixel feature secondly by one of an OR operation or an AND operation to process and addition of a pixel feature under the printing mode, the direction feature of each white pixel being in correspondence to a white pixel in the printing mode, the direction feature of each black pixel being in correspondence to a black pixel in the printing mode.
6. A method of real-time enhancing printing quality of gray level and color images, comprising steps as follows:
A.) performing a cmky halftone process wherein a document to be printed is converted to a cmky image and a halftone process is carried out for each cmky color to determine a color of a pixel in an image to be printed; B.) performing a cmy conversion wherein document to be printed is converted to a cmy image to detect an edge in each cmy color simultaneously; C.) performing an edge detection by determining a presence of an edge feature by a gray level difference in the document to be printed, no process being carried out if no edge feature is detected, an edge feature being recorded if the edge feature is detected, the edge feature being detected by a process including calculating image data covered by an m by n window, an edge threshold being modified by the edge feature of an edge gray level difference by an edge operator, and the recording of the edge feature of an edge pixel being found by an edge directive from the edge operator, an edge feature value in a row larger than an initial edge threshold is weighted and averaged to modify the edge threshold and provide the edge threshold of a next row of image to be printed; D.) allocating a feature record of an edge pixel according to a change in a printing mode to determine whether each edge pixel is printed; and, E.) performing a conversion of cmy edge pixels to cmky edge pixels.
1. A method for enhancing printing quality of gray level and color images, comprising the following steps:
A) performing a cmky halftone process wherein a document to be printed is converted to a cmky image and a halftone process is carried out for each cmky color to determine a color of a pixel in an image to be printed; B) performing a cmy conversion wherein the document to be printed is converted to a cmy image to detect an edge in each cmy color simultaneously; C) performing an edge detection by determining a presence of an edge feature by a gray level difference in the document to be printed, no process being carried out if no edge feature is detected, an edge feature being recorded if the edge feature is detected; D) allocating a feature record of an edge pixel according to a change in a printing mode to determine whether each edge pixel is printed; and E) performing a conversion of cmy edge pixels to cmky edge pixels; wherein said edge detection step includes the steps of: determining an initial value of the edge feature; calculating image data covered by an m by n window wherein m and n are integers between 2 and 5, an edge threshold is modified by edge feature of an edge gray level difference by an edge operator, and the feature record of an edge pixel is found by an edge directive from the edge operator; modifying the edge threshold responsive to an edge feature value in a row being larger than an initial edge threshold, the edge threshold being modified by being weighted and provides the edge threshold of next row of the image data; recording the edge feature of a pixel using two bytes of data, the data including a location of a black pixel, and edge modification coefficient, and the direction of the black pixel and a white pixel; responding to an existence of an edge within the image data of the m by n window, where the edge is established by the edge feature value being larger than the initial edge threshold, the edge feature being recorded in a preferred pixel by an interpolation and error diffusion method; and, modifying the edge feature value using two rows of data with a direction feature responsive to two diagonally adjacent data represent black pixels and the same edge directive, one of the two diagonally adjacent being modified such that the edge direction of the two diagonally adjacent data are near a center of an adjacent point. 2. The method as in
3. The method as in
4. The method as in
|
The requirement for printing quality becomes more demanding as the uses of printer and scanner become frequent. The printing operation is required to be both fast and clearly. The most frequently used halftone methods for conventional printer are as below.
1. Ordered Dither
The image in a specific region is encoded in dot format to simulate gray level visually, that is, increasing gray level at the expense of reducing resolution.
2. Error Diffusion
By using gray level error of pixels along a specific direction, the next pixel is determined to be black or white by accumulation of error of specific ratio.
However, the above-mentioned methods do not provide satisfactory printing quality for text even thought they are quite good for picture. To overcome this problem, much effort has been devoted to this study, for examples, U.S. Pat. Nos. 4,411,015, 4,503,556, 4,504,972, 4,513,442, 5,091,964, 5,280,367, 5,335,290, 5,375,197, and 5,381,241. In above patents, the division of textual and picture block is executed by combining and separating pixel according to the similarity or connection of gray level. The divided block is further judged to be text or picture by histogram or shape thereof. However, considerable data such as data of the whole page is required for correct division, thus being not suitable for FAX machine or copier which require real-time printing.
Moreover, the above problem can be overcome by setting the edge threshold according to the forepassed statistical data and forcing the division of edge, however, the printing result has blurred or discontinuous edge.
It is an object of the invention to provide a method for enhancing the printing quality or gray-level text or RGB color text while the printing quality of picture is not influenced.
It is another object of the invention to provide a method for enhancing printing quality with adaptive edge threshold, wherein the edge feature of the row of pixels being processed is used to modify the edge threshold of the next row of pixels, thus providing real time printing.
It is another object of the invention to provide an algorithm to choose a most preferred edge feature among several edge feature to remove direction difference from the operation of edge operator and edge roughness from error diffusion.
The various objects and advantages of the present invention will be more readily understood from the following detailed description when read in conjunction with the appended drawing, in which:
The present invention is intended to provide a method for enhancing the real-time printing of text while the printing quality of picture is not influenced such that the method can be advantageously used for printing, FAX, copying and image processing.
As shown in
The general document can be classified into two categories. The first kind of document has obvious edge such as text, line, symbol, which has abrupt color and gray level. The second kind of document has no obvious edge such as picture or picture data which has plentiful variation of color and gray level.
According to the above-mentioned difference between two kinds of documents, the text document can be separated from the picture document by the existence of an edge.
A. CMY Transform:
The RGB image from block 10 is subjected to a CMY transform in block 12, to convert the RGB image to the CMY image of block 14, before printing. In fact, the printing operation adopts a CMKY mode, however, the K color utilizes part of the other three colors (CMY). This makes the edge detection difficult. In the present invention, the procedure begins with a simple CMY transform in block 121 of
B. Edge Threshold:
In general, an edge threshold is required to judge the existence of an edge, wherein the set up of the edge threshold depends on past experience or the statistical value of the whole page of a document. This makes real-time printing difficult. In the present invention, the edge feature of the row of pixels being processed in the edge detection step of block 16 is used to modify the edge threshold for the next row of pixels, thus providing real time printing.
Firstly, with reference to
C. Edge Detection and Distribution:
In the present invention, a 3 by 3 edge operator is used to detect edge characteristics. More particularly, the present invention uses the directive feature of the edge for edge distribution in block 166. The present invention uses two bytes of data to record a feature for a pixel including the location of a black pixel, edge modification coefficient, and direction feature of black and white pixels.
Referring additionally to
D. Distribution of Direction Characteristic:
For a general image, the gray level is increased when a dark pixel is at the left and a light pixel is at the right. For a realistic image, several edge pixels with an edge feature value larger than the edge threshold might be obtained after the edge operation. How the black and the white pixels are located at the correction position is important to printing quality. The present invention proposes an algorithm to choose a most preferred edge feature out of several edge feature values to remove the direction difference caused by the operation order of the operator and the edge roughness.
The proposed algorithm uses the directive of each pixel for AND(&) or OR(|) operations in block 1666 subsequent to the interpolation and error diffusion steps of blocks 1664 and 1665, described in following paragraphs. For example, for an edge in an image, when the darker pixel is on the left side and the lighter pixel is on the right side, and after the edge operation from the top down and from left to right, if the edge feature is on the left side, the inventive procedure checks whether the left pixel of the edge operator has the feature of a white pixel on the left side. If true, it means that the left pixel is set to be a white pixel. Because the pixel in the direction is set to be a white pixel, the following center pixel is set to have feature of a white pixel on the left side.
If the above answer is false, the feature of a black pixel on the left side is written into the left pixel or the center pixel of the edge operator by the interpolation, block 1664, and error diffusion, block 1665, methods.
When the feature of a black pixel on the left side is to be written into the center pixel, the feature of a black pixel on the left side for the left pixel should be cleared to prevent the repeating of the feature of the black pixel on the left. Moreover, the feature of a white pixel on the left for the center pixel should also be cleared. Afterward, the feature of the black pixel on the left is written into the center pixel, and the feature of a white pixel on the left side is written into the right pixel in block 1667.
If the feature of a black pixel on the left side is to be written into the left pixel of the edge operator, the left pixel is unchanged if it already has the feature of a black pixel on the left side. Otherwise, the feature of a black pixel on the left side is written into the left pixel and the feature of a white pixel on the left side is written into the center pixel.
If a new edge feature appears and the directive is not left, the feature distribution is the same, nevertheless, the process is different.
E. Interpolation and Error Diffusion:
The data obtained through scanning is generally at a 300 dpi resolution, and the normal printing resolution is 600 dpi. The 300 dpi image is converted to a 600 dpi CMKY image before printing. However, the conversion process is time consuming and requires lots of memory. Most importantly, the edge feature is lost. In the present invention, an interpolation scheme is used to linearly interpolate the pixel of the 3 by 3 edge operator into 6 b 6 pixel in block 1664. Moreover, an error diffusion method in block 1665 is used to determine whether the feature of a black pixel in the r direction is to be written to the r-direction pixel or the center pixel of the edge operator, and determine the position distribution of the black pixel. In the error diffusion scheme, the gray level after interpolation is either printing (gray level=0) or non-printing (gray level=255), the error value is equal to the value of printing subtracting the gray level after interpolation and the error value is propagated to the pixel of the next interpolation point by a propagation coefficient (t), when the gray level error is accumulated from a value not larger than 127 to a value larger than 127 or vice versa, an edge exists in the interpolating pixel. By using this scheme, the feature of a black pixel in the r direction can be determined to write into the r-direction pixel or the center pixel of the edge operator.
As to the location distribution of the black pixel, the position of the black pixel for the redirection pixel or the center pixel is determined whether it matches with the directive thereof by the error diffusion principle. In general, the position of the black pixel is matched with the directive thereof, the modification of the black pixel position should be performed even when the accumulation of gray level is not enough, thus preventing edge shift. Therefore, the pixel position can be more realistically matched with the gray level of the real image.
F. Edge Modification:
Because of the resolution difference of the original image compared with the printing image, the edge along the same direction may have one pixel difference for a low-resolution image, but for a high-resolution image may have two or more pixel differences, therefore the edge of image appears discontinuous. The present invention uses two rows of data with a direction feature to solve this problem in block 1668 to define the edge of the CMY image (block 18). The data diagonally adjacent are checked whether they have the same black pixel directive. If true, the edge pixel is not continuous and one of the diagonally adjacent data is to be modified to present a continuous edge.
G. Conversion of Printing Mode:
If the printing mode is changed, the directive feature of the edge pixel should be relocated to enhance printing quality in block 20. The 300 dpi RGB image should be subjected to proper conversion to obtain a 600 dpi printing effect. Therefore, the direction of the edge pixel should be converted to present a 600 dpi effect. In general, each pixel has 8 adjacent pixels, in other words, 8 directions. In the normal printing mode, a pixel of the original image generates 4 positions. Therefore, the information of 8 adjacent pixels should be distributed to those four printing positions. The present invention uses a byte to encode the possible position allocation under the normal printing mode, including allocation of black and white pixels, and allocation of black and white pixels for edge modification.
In other words, with reference to
H. CMKY Conversion:
The result in the above steps results in the edge pixel distribution of the CMY printing mode in block 22. However, the real printing mode is the CMKY mode (block 26). Therefore, it is necessary to convert, in block 24, the edge pixel distribution of the CMY mode to reduce the color ink consumption of a color printer, and prevent the overlapping error of CMY color in the CMYK halftone image in block 28. Referring to
A preferred embodiment is described below with reference to
In first step, it is known that the edge feature value of operator 1 is larger than the edge threshold, the pixel distribution coding obtained from the largest edge feature value is recorded in pixel C and then performing interpolation to the edge operator 1. If the gray level b' after interpolation is not to be printed (gray level 255), the error (255-b') multiplied by the error coefficient 0.5 is diffused to gray level c. As shown in this figure, the accumulation of gray level error in gray level c is larger than 127, showing a white-like color; if the gray level of c is not to be printed (gray level 255), the error (255-c') multiplied by the error coefficient 0.5 is diffused to gray level d. It is found that the gray level d is smaller than 127 (black-like). In other word, the gray level becomes black from white, as moving from pixel C to pixel D. Therefore, an edge exists. A record of white pixel on right side is stored in pixel C, and a record of black pixel on right side is stored in pixel D.
Moreover, the error diffusion method is used to determine whether the edge direction of the pixel D requires modification. That is the gray level c' is assumed to be not printed. The error (255-c') multiplied by the error coefficient 0.5 is diffused to gray level d, it is found that the accumulation of gray level error in gray level d is smaller than 127 (black-like), the black pixel of edge is allocated in direction of gray level d, rather than direction of gray level d'.
In second step, the operator 2 is performed after the operation of the edge operator 1. It is found that the edge feature of the operator 2 is larger than the edge threshold, meaning an edge exist. Firstly, the pixel allocation coding obtained with reference to the max edge feature value is recorded in pixel D, then performing interpolation on edge operator 2 with error diffusion principle. The result is that gray level turns from white to black as moving from pixel C to pixel D. Nevertheless, pixel C and D have record of edge feature, the record thereof require modification with logic operation, that is, increasing new direction feature and preserving the same feature. Finally, the error diffusion method is again used to determine whether the edge allocation direction requires modification, the result is the same as that in first step.
The third edge operator 3 is performed after the end of the second edge operator 2. It is found that the edge feature of the operator 3 is larger than the edge threshold, meaning an edge exist. Firstly, the pixel allocation coding obtained with reference to the max edge feature value is recorded in pixel E. The pixel of white edge direction (pixel D) is examined. If the pixel has record of black pixel on right side, which shows the existence of an edge, no modification is required.
Combining above steps, the pixel C records the data of white pixel on right side and pixel D records black pixel on right side, and the direction is modified toward left. Provided that the above 300 dpi edge image has gray level distribution as shown in
Although the present invention has been described with reference to the preferred embodiment thereof, it will be understood that the invention is not limited to the details thereof. Various substitutions and modifications have suggested in the foregoing description, and other will occur to those of ordinary skill in the art. Therefore, all such substitutions and modifications are intended to be embraced within the scope of the invention as defined in the appended claims.
Patent | Priority | Assignee | Title |
10303989, | Mar 30 2017 | SCODIX LTD. | System and method for preventing printed material spreading |
7466869, | Apr 21 2003 | Intellectual Ventures I LLC | Modulation transfer function of an image |
7519234, | Nov 17 2004 | Seiko Epson Corporation | Apparatuses and methods for incorporating a border region within an image region |
7649649, | Nov 17 2005 | Xerox Corporation | Determining the color match between image data and graphics objects |
7660481, | Nov 17 2005 | Canon Medical Systems Corporation | Image enhancement using anisotropic noise filtering |
7813005, | Jun 17 2004 | Ricoh Company, LTD | Method and apparatus for processing image data |
8259357, | Mar 09 2007 | Sharp Kabushiki Kaisha | Image processing apparatus, image forming apparatus, image processing method, and computer readable recording medium |
Patent | Priority | Assignee | Title |
5134667, | Aug 11 1989 | FUJI XEROX CO , LTD , A CORP OF JAPAN | Area discriminating system for an image processing system |
6094508, | Dec 08 1997 | Intel Corporation | Perceptual thresholding for gradient-based local edge detection |
6281875, | Apr 29 1998 | Canon Kabushiki Kaisha | Gradient-based pixel interpolation |
6408109, | Oct 07 1996 | Cognex Corporation | Apparatus and method for detecting and sub-pixel location of edges in a digital image |
Executed on | Assignor | Assignee | Conveyance | Frame | Reel | Doc |
Aug 23 1999 | CHEN, CHENG-CHONG | Silitek Corporation | ASSIGNMENT OF ASSIGNORS INTEREST SEE DOCUMENT FOR DETAILS | 010218 | 0640 | |
Aug 31 1999 | Lite-On Technology Corporation | (assignment on the face of the patent) | ||||
Nov 13 2002 | SILITEK CORP | Lite-On Technology Corporation | MERGER SEE DOCUMENT FOR DETAILS | 013887 | 0400 | |
Nov 24 2008 | LITE-ON TECHNOLOGY CORP | Muller Capital, LLC | ASSIGNMENT OF ASSIGNORS INTEREST SEE DOCUMENT FOR DETAILS | 022034 | 0334 |
Date | Maintenance Fee Events |
Dec 03 2007 | M1551: Payment of Maintenance Fee, 4th Year, Large Entity. |
Dec 10 2007 | REM: Maintenance Fee Reminder Mailed. |
Sep 23 2011 | M1552: Payment of Maintenance Fee, 8th Year, Large Entity. |
Nov 24 2015 | M1553: Payment of Maintenance Fee, 12th Year, Large Entity. |
Date | Maintenance Schedule |
Jun 01 2007 | 4 years fee payment window open |
Dec 01 2007 | 6 months grace period start (w surcharge) |
Jun 01 2008 | patent expiry (for year 4) |
Jun 01 2010 | 2 years to revive unintentionally abandoned end. (for year 4) |
Jun 01 2011 | 8 years fee payment window open |
Dec 01 2011 | 6 months grace period start (w surcharge) |
Jun 01 2012 | patent expiry (for year 8) |
Jun 01 2014 | 2 years to revive unintentionally abandoned end. (for year 8) |
Jun 01 2015 | 12 years fee payment window open |
Dec 01 2015 | 6 months grace period start (w surcharge) |
Jun 01 2016 | patent expiry (for year 12) |
Jun 01 2018 | 2 years to revive unintentionally abandoned end. (for year 12) |