None.
None.
None.
1. Field of the Invention
The present invention relates to imaging, and, more particularly, to a method for performing error diffusion halftoning of an image.
2. Description of the Related Art
Printers have been developed for home and business use, and are often used to reproduce continuous tone images displayed on other devices, such as computer monitors. The continuous tone images may include scanned images, photos downloaded from the internet or from a digital camera, as well as images created or modified by a user with various application software products that are available to businesses and consumers alike. The images are referred to as continuous tone images, or contone images, because the output value for each pixel may vary in an allowable range of intensity, for example, from 0-255 for 8-bit color. On the other hand, with a printer, for example, the output is discrete. That is, for a printer, a given pixel is either printed or not printed, with no variation in between. In order to reproduce continuous tone images on a printer, a process of halftoning must be performed on the image data before the image may be printed. Various halftoning methods are available, including dithering, masking, and error diffusion. These methods are used in digital printing to convert the multi-level i.e., gray level, input values from the continuous tone image to bi-level output values to be printed.
With the error diffusion method of halftoning, each input value associated with a pixel location in an image is compared with a threshold. If the input value along with any accumulated error is greater than the threshold, the pixel is turned on, i.e., printed, and an error, which is the difference between the input value and the maximum-input value of 255 (for 8-bit color), is spread over to certain neighbors of the pixel, contributing to the accumulated error of those pixel neighbors. If the input is smaller than the threshold, the pixel is not turned on, and the input value plus any accumulated error is spread over to certain neighbors of the pixel as error, contributing to the accumulated error of those pixel neighbors.
Error diffusion halftoning is computationally intensive, particularly where large, high resolution images are involved. Although multi-processor computers and printers are increasingly available in the home and business markets, prior art error diffusion methods do not efficiently employ the multiple processors of such machines to perform parallel processing, resulting in error diffusion processing that takes longer than otherwise necessary.
What is needed in the art is an improved method for performing error diffusion halftoning.
The present invention provides a method for performing error diffusion halftoning of an image.
The present invention, in one form thereof, relates to a method for performing error diffusion halftoning of an image. The method includes subdividing the image into a plurality of tiles, the plurality of tiles including a first tile and a second tile adjacent to the first tile; performing error diffusion processing of the first tile; and performing the error diffusion processing of the second tile based on an output phase of the first tile.
The present invention, in another form thereof, relates to a method for performing error diffusion halftoning of an image. The method includes subdividing the image into a plurality of tiles, the plurality of tiles including a first tile and a second tile adjacent to the first tile; defining an overlap region at a boundary of the first tile and the second tile; and performing error diffusion processing of the first tile using the first tile and the overlap region.
The present invention, in still another form thereof, relates to a method for performing error diffusion halftoning of an image, wherein the image is formed of a plurality of raster lines. The method includes subdividing the image into a plurality of tiles, the plurality of tiles including a first tile and a second tile adjacent to the first tile, wherein at least a subset of at least one raster line of the plurality of raster lines extends through both the first tile and the second tile; performing error diffusion processing of the first tile for each raster line of the subset of raster lines; storing at least one error value based on the error diffusion processing of the first tile; retrieving the at least one error value; and performing the error diffusion processing of the second tile based at least in part on the at least one error value
The above-mentioned and other features and advantages of this invention, and the manner of attaining them, will become more apparent and the invention will be better understood by reference to the following description of embodiments of the invention taken in conjunction with the accompanying drawings, wherein:
Corresponding reference characters indicate corresponding parts throughout the several views. The exemplifications set out herein illustrate embodiments of the invention, and such exemplifications are not to be construed as limiting the scope of the invention in any manner.
Referring now to the drawings, and particularly to
Imaging apparatus 12 is an imaging device that produces a printed or scanned output of a patent or latent image. As used herein, an image is a rendering such as may be obtained via a digital camera or scanner, or which may be created or manipulated on a computer, such as host 14, and which may be printed or displayed for viewing by the human eye. Imaging apparatus 12 may be, for example, an ink jet printer and/or copier, or an electrophotographic (EP) printer and/or copier. Imaging apparatus 12 includes a controller 18, a print engine 20 and a user interface 22. In other embodiments of the present invention, imaging apparatus 12 may alternatively be a display, such as a computer monitor, wherein it may be desired to reduce the resolution of an original image for display purposes.
In the context of the examples for imaging apparatus 12 given above, print engine 20 can be, for example, an ink jet print engine or an EP print engine, configured for forming a patent image on a print medium 28, such as a sheet of paper, transparency, or fabric, from a latent image.
Controller 18 includes a processor unit and associated memory, and may be formed as an Application Specific Integrated Circuit (ASIC). In other embodiments, processor unit of controller 18 may include a multiprocessor core having two or more microprocessor units. Controller 18 communicates with print engine 20 via a communications link 24. Controller 18 communicates with user interface 22 via a communications link 26.
Host 14 may be, for example, a personal computer including an input/output (I/O) device 30, such as keyboard and display monitor. Host 14 further includes a multiprocessor core 32 including more than one processing unit, such as two microprocessor units 32A and 32B, input/output (I/O) interfaces, memory 34, such as RAM, ROM, and/or NVRAM, including a vertical error buffer 36 and a horizontal error buffer 38, and a mass data storage device, such as a hard drive, CD-ROM and/or DVD units. During operation, host 14 includes in its memory a software program including program instructions that function as an imaging driver 40, e.g., printer driver software, for imaging apparatus 12. Imaging driver 40 is in communication with controller 18 of imaging apparatus 12 via communications link 16. Imaging driver 40 facilitates communication between imaging apparatus 12 and host 14, and may provide formatted print data to imaging apparatus 12, and more particularly, to print engine 20. Alternatively, however, all or a portion of imaging driver 40 may be located in controller 18 of imaging apparatus 12.
Communications link 16 may be established by a direct cable connection, wireless connection or by a network connection such as for example an Ethernet local area network (LAN). Communications links 24 and 26 may be established, for example, by using standard electrical cabling or bus structures, or by wireless connection.
Referring now to
A continuous tone image, i.e., an image having continuous tone data, such as, for example, data in a gray value range of 0-255 for 8-bit color representation, is received by halftone functional unit 42. Halftone functional unit 42 processes the continuous tone data using computer executable steps to convert the continuous tone data into binary data for printing by print engine 20. In performing halftoning, halftone functional unit 42 utilizes multiple weight error diffusion. Halftone functional unit 42 is automatically initiated when continuous tone image data is supplied thereto.
In performing error diffusion, the intensity value, i.e., gray values of pixels of the original continuous tone image, are used as input values, and are processed in order to determine output values for each corresponding output pixel in the output image. In the present embodiment, the input values have a dynamic range of, for example, 0 to 255. Output values provided by halftone functional unit 42 are binarized output values of 0 or 1. A pixel having an output value of 0 will not be turned on, i.e., no pixel will be printed at the respective location on print medium 28, whereas a pixel having a binary output value of 1 will be printed by print engine 20 at the respective location on print medium 28.
In other words, when printing an image using an output device, such as imaging apparatus 12, that places discrete units of colorants (ink drops, toner, etc.) on print medium 28, the range of the image data should be reduced to match the reproduction capabilities of the device. That is, to reduce the bit resolution of the image. This is done by a halftone transformation. One common halftone transformation is known as error diffusion. Error diffusion works by spreading the inaccuracy, i.e., error, of the halftone decision at one pixel position in the output image among adjacent or near pixel positions, creating a visually pleasing transformation.
Referring now to
Referring now to
Because error values are spread to the next pixel, using conventional Floyd-Steinberg methodology, processing of the next pixel cannot begin until processing of the current pixel is complete. In addition, because error values are also spread to the next line and each line is processed in the opposite direction of the previous line, using conventional Floyd-Steinberg methodology, processing of the next line cannot begin until processing of the current line is complete. Thus, Floyd-Steinberg based error diffusion techniques are not appropriate for working on different sections of the same image, independently and in parallel.
In multi-processor computing systems, such as host 14, it may be desirable to error diffuse the image in tiles, where multiple tiles may be processed in parallel by multiple processors in order to optimize error diffusion performance. However, simply performing error diffusion on the image in independent tiles and stitching the tiles together to form the output image results in severe artifacts at the tile boundaries.
For example, referring now to
By subdividing the image into tiles, the time required to halftone the image may be reduced by employing each processor of a multi-processor core to perform error diffusion on a different tile. However, by doing so using conventional Floyd-Steinberg based error diffusion, artifacts are generated at the boundaries where the tiles are stitched, i.e., aligned, together.
The present invention provides a method for performing error diffusion of an image on a tile-by-tile basis that may reduce or eliminate the visible stitching artifacts, yielding an image that may appear visually equivalent to an image that was halftoned using conventional Floyd-Steinberg based error diffusion. However, because the error diffusion is performed tile-by-tile, the halftoning process time may be reduced by performing parallel processing of tiles using the multiple processors of a multiprocessor core.
Referring now to
At step S100, image 49 is subdivided into a plurality of tiles 50, plurality of tiles 50 including a tile 52, a tile 54 adjacent to tile 52, a tile 56 adjacent to tile 52 and adjacent to tile 54, and a tile 58 adjacent to tiles 52, 54, and 56. In the present embodiment, each tile is depicted as being the same shape and size. However, it will be understood that tiles of different shapes and sizes may be employed without departing from the scope of the present invention. Nonetheless, image 49 is formed of a plurality of raster lines 60, at least a subset, e.g., raster lines 60A-60E, comprised of at least one raster line of the plurality raster lines of which extend through both tile 52 and tile 54. Raster lines 60F-60J extend through both tile 56 and tile 58.
In the present description, reference is made to a first tile, and a second tile. Although such references may be used herein to describe tiles 52 and 54, respectively, it will be understood that the terms “first tile” and “second tile” pertain to a general order of processing as between two adjacent tiles in accordance with embodiments of the present invention, as will be made apparent by the following description.
At step S102, error diffusion processing of a first tile, such as tile 52, is performed. Step S102 is explained in greater detail below with respect to
At step S104, error diffusion processing of a second tile, such as tile 54, is performed based on an output phase of the first tile, e.g., tile 52. The output phase is a phase of the dots that will be printed based on the error diffusion, e.g., the phase of the dots on each raster line. Step S104 is explained in greater detail below with respect to
At step S106, error diffusion processing of each remaining tile of plurality of tiles 50, e.g., tile 56 and tile 58, is performed based on the results of error diffusion processing previously performed on at least one adjacent tile of plurality of tiles 50, which will be made apparent in the below detailed discussion of steps S102 and S104. For example, error diffusion processing for tile 56 is performed based on the results of the error diffusion processing of tile 52 and tile 54, and the error diffusion processing of tile 58 is performed based at least on the results of the error diffusion processing of tile 54 and tile 56. On the other hand, if image 49 had another tile beside tile 54, the error diffusion processing of such a tile would be performed based on the results of the error diffusion processing of tile 54.
In addition to performing error diffusion processing of each tile based on the error diffusion processing previously performed on a horizontally adjacent tile, the error diffusion processing for each tile is based on the previously performed error diffusion processing for a vertically adjacent tile, which is described in greater detail below with respect to
In the present embodiment, error diffusion halftoning is performed using a microprocessor unit 32A and microprocessor unit 32B, wherein at least one tile is processed using microprocessor unit 32A in parallel to at least another tile being processed using microprocessor unit 32B. However, it will be understood that any number of processors may be employed for parallel error diffusion processing in accordance with embodiments of the present invention.
At step S108, plurality of tiles 50 are stitched together, i.e., aligned together, thus re-forming image 49 as a halftoned image.
Referring now to
At step S102-1, an overlap region is defined at a boundary of the first tile and the second tile.
For example, referring now to
At step S102-3, error diffusion processing of the first raster line 60A in tile 52, including overlap region 62, is performed.
At step S102-5, a first error value from raster line 60A in tile 52 is stored in vertical error buffer 36 (see
For example, raster line 60A is processed from left-to-right. If the forward error spread value (e.g., corresponding generally to the 7/16 value shown in
Accordingly, at step S102-5, the forward error value at the end of the forward going raster line in tile 52 is stored to a memory and read in by the adjacent tile to accurately compute its first running error value. Additionally, the down-back error (e.g., corresponding generally to the 3/16 value shown in
Referring now to
After raster line 60A in tile 52 is processed and its forward error value is stored into vertical error buffer 36, the second line in tile 52, raster line 60B, is then processed in reverse from right to left. However, tile 54 has not been processed yet, and thus, the forward spread from the previous pixel for the start of line 2 (raster line 60B) in tile 52 is unknown. Therefore, the first running error calculation for the second line will be incorrect, unless other measures are taken. The start of every reverse going line is missing both the previous forward error and the previous down-back error. This inaccuracy is the source of artifacts in tiled error diffusion, which is addressed, at least in part, by step S102-7.
Referring again to
In the present embodiment, the estimated error values are determined by performing error diffusion processing on overlap region 62, which may be explained as follows.
If the previous forward error and previous down-back error were known for the start of the reverse going lines, then the tiled error diffusion system would be similar in its output to a traditional error diffusion system. The term, “previous” in this context is used to indicate that the previous forward and previous down-back errors pertain to the errors to be diffused from previously processed pixel positions, as opposed to error to be diffused from the current pixel position being processed. These values must be approximated by some means. The closer the approximated values are to the actual values, the closer the tiled error diffusion output in accordance with the present invention will be to the traditional system. Accordingly, with the present invention, the previous forward error and previous down-back error for reverse lines are approximated by processing a region of overlap (overlap region 62) in the horizontally adjacent tile. When processing the overlap region for a given tile, there is no error diffused output for that region. This region is simply used to allow error diffusion to run and calculate the running errors for those overlap pixels in order to better approximate the previous forward and down-back errors for reverse going lines.
In
If overlap region 62 for tile 52 was as wide as the rest of the image, then the approximated starting forward and down-back errors for reverse lines would be exact, and there would be no difference in the output of the tiled error diffusion system of the present invention and traditional error diffusion (if a vertical error buffer is used between tiles). Obviously, processing the rest of the image as the overlap defeats a purpose of tiled error diffusion, that being to allow parallel processing of the image using multiple processors, such as microprocessor unit 32A and microprocessor unit 32B. However, the wider the overlap region is, the more accurate the approximation of the forward and down-back errors will be, and fewer stitching artifacts will be visible.
At step S102-9, error diffusion processing for raster line 60B is initiated and performed in tile 52 using the estimated error values.
At step S102-11, an error value from the reverse going raster line 60B is stored in vertical error buffer 36 while performing error diffusion processing of tile 52. This error value is a down-back error value designated for diffusion on raster line 60C, as illustrated in
At step S102-13, error diffusion processing is performed and completed for tile 52, using both tile 52 and overlap region 62, for example, by repeating steps S102-3 to S102-11 until all raster lines have been processed.
Thus, with steps S102-1 to S102-13, error diffusion processing for each raster line of tile 52 is performed, and in addition, error values based on the error diffusion processing of tile 52 are stored in vertical error buffer 36 for use performing error diffusion processing on tile 54.
Referring now to
At step S104-1, the error values stored in vertical error buffer 36 are retrieved for use in performing error diffusion processing on tile 54.
By performing error diffusion processing of a second tile based on the error values stored in vertical error buffer 36 from the processing of a first tile, the phase of the output pattern (output phase) of the second tile will be in greater agreement as with respect to the first tile than had the stored error values not be used in processing the second tile.
The use of vertical error buffer 36 and the processed overlap region 62 eliminate a substantial amount of stitching artifacts in tiled error diffusion. However, the system may still exhibit some stitching artifacts. This is due to the fact that although each tile is creating an output pattern of dots, often with the same frequency, the output pattern from each tile may not be entirely in phase with one another even after using the stored error for processing the second tile. Placing two out-of-phase output patterns beside one another will create dot holes 66 and dot pairs 68 at the boundary of the patterns, artifacts that are undesirable and unacceptable. This phenomenon is shown in
Referring now to
If the output patterns of tile 52 and tile 54 are in phase with one another at stitch boundary 64, artifacts resulting from dot holes 66 and dot pairs 68 may be eliminated. Thus, in order to place the output patterns in phase, the phase information for the first tile (e.g., tile 52) is captured. Then, this information is used to set the phase of the horizontally adjacent tile (e.g., tile 54). Using the overlap technique shown in
For example, if a dot would have been placed at line 1 (e.g., raster line 60A), column five (Col5) in
Accordingly, referring again to
At step S104-5, the second tile (e.g., tile 54) output phase is influenced based on the first tile output phase.
Referring now to
In the example of
Once the output pattern is in phase with the previously processed overlap region, then nudge curve 70 can change to a phase locked nudge curve. A phase locked nudge curve will assert maximum influence at each position where dots are or are not to be placed without any gradual reduction in influence. The phase can be detected to be locked if n number of dots are placed at the exact same locations as stored by the processed overlap output. If a previous line was not detected to be phase locked, then the threshold amount may be increased dynamically. The end result would be that the output patterns between tiles are in phase with one another, eliminating stitching artifacts when combined with the other described techniques herein.
At step S104-7, error diffusion processing of tile 54 is performed. The error diffusion processing of tile 54 is performed similar to the error diffusion processing of tile 52, except that the error diffusion processing of tile 54 is based on the error values stored in vertical error buffer 36. For example, the error diffusion processing of tile 54 for raster lines 60A, 60C, and 60E is initiated based on the error values stored in vertical error buffer 36 from the error diffusion processing of tile 54. In addition, the error diffusion processing for the second tile is based on the influencing of the second tile output phase using the threshold modification data from step S104-5. The error diffusion processing of tile 54 includes performing the error diffusion processing on overlap region 62.
Referring now to
Aspects of the present embodiment discussed in steps S102 and S104 pertain generally to techniques of performing error diffusion of horizontally adjacent tiles that may be stitched together without rendering visible artifacts. In order to effectively stitch together vertically adjacent tiles, the errors stored from processing the output pixels of previously processed vertically adjacent tiles are used in the calculation of the running errors for the current tiles.
Referring now to
The dependencies on data from adjacent tiles means there is an order of operations when performing error diffusion processing in accordance with the present invention. This is significant for multiprocessing systems, which may allow processing of tiles in parallel, e.g., with one processor performing error diffusion on one tile while another processor performs error diffusion processing on another tile. A tile cannot be processed until its previous horizontally adjacent tile (the tile to the left of the current tile) has been at least partially processed, as data from this tile will be stored in vertical error buffer 36 and used by the current tile. In the present embodiment, the error diffusion processing of the second tile is performed after completion of the error diffusion processing performed on the first tile. A tile also is not processed until its previous vertically adjacent tile (the tile directly above the current tile) has been processed, as data from this tile will be stored in horizontal error buffer 38 and used by the current tile. The tile above and to the right of the current tile should also have been processed, as data from this tile will also be stored in horizontal error buffer 38 and used in the current tile's overlap region, e.g., corresponding to overlap region 62.
Referring now to
At step S106-1, error values are stored in horizontal error buffer 38 from tile 52 and tile 54 during error diffusion processing of tile 52 and tile 54.
At step S106-3, the error values are retrieved from horizontal error buffer 38.
At step S106-5, error diffusion processing of the third tile, e.g., tile 56, is performed based on error values retrieved from horizontal error buffer 38, which includes the error diffusion processing of the third tile being performed based least in part on overlap region with tile 58 (see
At step S106-7, error diffusion processing of the fourth tile, e.g., tile 58, is performed based on error values retrieved from horizontal error buffer 38, and also based on the results of error diffusion processing of tile 56, for example, using the processed described above with respect to steps S102 and S104.
Although the present embodiment is described with respect to an image subdivided into four tiles, it will be apparent to those skilled in the art that the methodology described herein is fully applicable to an image subdivided into any number of tiles, wherein error diffusion processing for each subsequently processed tile is based on the error diffusion processing of at least one previously processed tile.
For example, referring now to
The present invention may allow an image to be error diffused in tiles with substantially no visible artifacts when stitching all of the tiles together to form the halftoned output image. Information is used from adjacent tiles to prevent stitching artifacts. The present invention may have significant implications for multiprocessing systems, as multiple processors may work in parallel to error diffuse an image, e.g., as set forth above with respect to
The foregoing description of several methods and embodiments of the invention have been presented for purposes of illustration. It is not intended to be exhaustive or to limit the invention to the precise steps and/or forms disclosed, and obviously many modifications and variations are possible in light of the above teaching. It is intended that the scope of the invention be defined by the claims appended hereto.