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:
FIG 1. is a diagrammatic depiction of an imaging system embodying the present invention.
Corresponding reference characters indicate corresponding parts throughout the several views. The exemplifications set out herein illustrate exemplar 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 may be, for example, an ink jet printer and/or copier, an electrophotographic printer and/or copier, a thermal transfer printer and/or copier, or an all-in-one (AIO) unit that includes a print engine, a scanner unit, and possibly a fax unit that incorporate multiple functions such as scanning, copying, and printing capabilities in one device. An AIO unit is also known in the art as a multifunction machine. For example, as shown in
Controller 18 includes a processor unit and associated memory buffer 28, and may be formed as one or more Application Specific Integrated Circuits (ASIC). Memory buffer 28 is communicatively coupled to controller 18, and may be, or example, random access memory (RAM), and/or non-volatile RAM (NVRAM). Alternatively, memory buffer 28 may be in the form of a separate electronic memory that is communicatively coupled to controller 18. Controller 18 may be a printer controller, a scanner controller, or may be a combined printer and scanner controller. In the present embodiment, controller 18 communicates with print engine 20 via a communication link 30. Controller 18 communicates with scanner unit 24 via a communication link 32. User interface 26 is communicatively coupled to controller 18 via a communication link 34. Controller 18 serves to process print data and to operate print engine 20 during printing, as well as to operate scanner unit 24 and process image data obtained via scanner unit 24.
In the context of the examples for imaging apparatus 12 given above, print engine 20 may be, for example, an ink jet print engine, an electrophotographic print engine or a thermal transfer engine, configured for forming an image on a sheet of print media 36, such as a sheet of pater transparency of fabric. As an ink jet print engine, for example, print engine 20 operates printing cartridge 22 to eject ink droplets onto the sheet of print media 36 in order to reproduce text and/or images. As an electrophotographic print engine, for example, print engine 20 causes printing cartridge 22 to deposit toner onto the sheet of print media 36, which is then fused to the sheet of print media 36 be a fuser (not shown), in order to reproduce text and/or images.
Host 14, which may be optional, may be, for example, a person computer including memory 40, such as RAM, ROM, and/or NVRAM, an input device 42, such as a keyboard, and a display monitor 44. Host 14 further includes a processor, input/output (I/O) interfaces, and at least one mass data storage device, such as a hard drive, a CD-ROM and/or a DVD unit.
Host 14 includes in its memory a software program including program instructions that function as an imaging driver 46, e.g., printer/scanner driver software, for imaging apparatus 12. Imaging driver 46 is in communication with controller 18 of imaging apparatus 12 via communications link 16. Imaging drive 46 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, to print an image.
In some circumstances, it may be desirable to operate imaging apparatus 12 in a standalone mode. In the standalone mode, imaging apparatus 12 is capable of functioning without host 14. Accordingly, all or a portion of imaging driver 46, or a similar driver, may be located in controller 18 of imaging apparatus 12 so as to accommodate printing during a copying or facsimile job being handled by imaging apparatus 12 when operating in the standalone mode.
Scanner unit 24 may be of a conventional scanner type, such as for example, a sheet feed or flat bed scanner, for scanning a document. In the context of the present invention, either scanner type may be used. As is known in the art, a sheet feed scanner transports a document to the scanned past a stationary sensor device, e.g., a stationary scan bar, and a flat bed scanner scans a stationary document with a movable scan bar.
at step S100, the image data of an image target is divided into a plurality of bands. The image target may be, for example, a scanned document that was scanned by scanner unit 24, or may be the output of an application running on host 14.
As an example, before image target 50 is even scanned, the dimensions of image target 50 are already known in terms of pixels. Both the vertical resolution of the image and number of lines in a band can be used to determine the number of bans needed to process the entire page. One exemplary algorithm for calculating the number of data bands is given as:
wherein Input Pixel Size Y is the number of pixels in a direction perpendicular to the extent of a line, e.g., the page height in pixels.
At step S102, the average band memory size in the memory buffer, e.g., memory buffer 28, for each data band is calculated, based upon the memory capacity of the memory, e.g., memory buffer 28, to be used in storing the compressed image data and the number of data bands, e.g., 201 bands in the example of
The following is an exemplary algorithm for calculating average band memory size
Average Bytes Per Band=Memory Buffer Size/Number Of Bands On Page.
At step S104, the current band is compressed at a compression quality level. For example, if the current band is BAND 1, as the first band to undergo compression the compression quality level is a predetermined level, such as an initial compression quality level of 90 on a scale from 1 to 100. As used herein, the term “current band” refers to the particular date band of the plurality of data bands that is being subject to compression. In the present embodiment, for example, only one data band will be subject to compression at a time, and that data band will be designated as the “current data band”. As explained in more detail below, the compression quality level will undergo dynamic adjustment for subsequent data bands.
At step S106, the process determines the deviation of the compressed memory size of the current data band from the average band memory size, determined in step S102. The following is an exemplary algorithm for calculating the deviation:
Deviation From Average=Abs. Val. (CMS−ABPB)/(ABPB)×100 percent
wherein: Abs. Val. is an absolute value operation;
In the exemplary equation above for calculating deviation, the result is a value in percent. Those skilled in the art will recognize that the deviation may be calculated in other ways, such as way of a simple subtraction operation, and may be in forms other than a percentage.
At step S108, it is determined whether the deviation calculated in step S106 exceeds a recompress threshold. The recompress threshold may be, for example, a tolerance range. For example, the tolerance range may be based on the average data band memory size, or on a particular operating configuration of the imaging apparatus, such as imaging apparatus 12. Also, for example, the tolerance range may be determined empirically, arbitrarily chosen, or calculated based on predetermined factors of concern.
If the result of the determination at step S108 is YES, then the amount of deviation is determined to be outside acceptable limits of the recompress threshold, and the process proceeds to step S110. For example, if the deviation exceeds the limits of a tolerance range that is based on the average band memory size, the current compression quality level is not appropriate for the target content. Thus, the compression quality level will be adjusted accordingly and the current data band will be compressed again.
At step S110, the compression quality level for the current data band is adjusted to compensate for the amount of deviation determined at step S106. The process returns to step S104, where the current band is recompressed at the adjusted compression quality level. In cases where the compressed memory size of the current data band was too large, recompression ensures that the deviation from the average is kept within a certain tolerance. In cases where the compressed memory size of the current data band was too small, recompression ensured that compression artifacts to the image are kept to a minimum.
Table 1, below, illustrates how the compression quality level may be adjusted based on the amount of deviation.
In the present embodiment, the process will remain in the loop of steps S104, S106, S108 and S110 until the determination of step S108 is NO. However, those skilled in the art will recognize that the number of loops may be limited as a practical matter, either through the selection of the adjusted compression quality level, or through the use of a limit placed on the number of times the loop will be executed.
If the determination at step S108 is NO, then the process proceeds to step S112.
At step S112, the compressed current date band is stored in memory buffer 28.
At step S114, the compression quality level for the next data band is adjusted to compensate for the amount of deviation determined at step S106. For example, the compression quality level is decreased or increased as needed based on how well the target data compresses. Sometimes the image data compressed well and the compression quality level can be increased, other times image data does not compress will and the compression quality level is decreased to ensure that the entire page fits into the compressed buffer space of the memory buffer, e.g., memory buffer 28. Also, the average memory per band can be maintained by adjusting the compression quality level of the next data band based on the deviation of the compressed memory size of the current data band from the average band memory size. Sometimes a less-than-average amount of memory is used, sometimes more.
At step S116, the next data band, e.g., BAND 2, etc., is set as the new current data band, and the process returns to step S104, where the new current band is compressed at the current compression quality level.
Steps S104 through S116 are repeated, as necessary, until the last data band, e.g., BAND 201 in the example of
As illustrated in
In order to take full advantage of variations in memory usage per data band, one variation of the method depicted in
While this invention has been described with respect to embodiments of the invention, the present inventions may be further modified within the spirit and scope of this disclosure. This application is therefore intended to cover any variations, uses, or adaptations of the invention using its general principles. Further, this application is intended to cover such departures from the present disclosure as come within known or customary practice in the art to which this invention pertains and which fall within the limits of the appended claims.