None.
None.
None.
1. Field of the Invention
The present invention relates to an imaging apparatus, and, more particularly, to scanning and processing a document with an imaging apparatus.
2. Description of the Related Art
Imaging apparatuses, such as printers and copiers, are employed by both home and commercial users for document creation and reproduction. Some imaging apparatuses, referred to as all-in-one (AIO) units, are capable of scanning, copying and faxing original documents such as text documents and photographs using built-in scanners. Other imaging apparatuses, e.g., in the form of stand alone scanners, are also capable of scanning documents. In any case, these machines often include an auto document feeder (ADF) for scanning multiple page documents. The resulting scanned images may then be printed using an integrated print engine, displayed on a monitor, and/or stored as a file.
A typical ADF scan operation involves picking the original document, feeding the document around a paper path, scanning the document and ejecting it into an exit area. One problem with the typical ADF scan operation is that the leading edge of the document must be determined, which often requires the use of specialized sensors, switches, and associated wiring. Also, the document may become skewed as it is fed through the ADF, resulting in a skewed image output.
What is needed in the art is an improved method for scanning and processing a document with an imaging apparatus.
The invention, in one form thereof, is directed to a method for scanning and processing a document with an imaging apparatus having a scanner with a scan bar. The method includes operating the scanner to obtain preliminary image data; performing at least one of translating the document across the scan bar and translating the scan bar across the document while operating the scanner; detecting an edge of the document based on a change in the preliminary image data; scanning the document to generate document image data based on the detecting the edge; and processing the document image data based on detecting the edge to generate a scanned image.
The invention, in another form thereof, is directed to a method for scanning and processing a document with an imaging apparatus having a scanner and a press plate for directing the document against the scanner. The method includes obtaining reference image data for the imaging apparatus; obtaining document image data by scanning the document with the scanner; detecting an edge of the document based on a difference between the reference image data and the document image data; and processing the document image data to generate a scanned image based on detecting the edge.
The invention, in yet another form thereof, is directed to an imaging apparatus configured for scanning and processing a document. The imaging apparatus includes a scanner having a scan bar, and a controller. The controller is configured to execute program instructions for operating the scanner to obtain preliminary image data; performing at least one of translating the document across the scan bar and translating the scan bar across document while operating the scanner; detecting an edge of the document based on a change in the preliminary image data; scanning the document to generate document image data based on detecting the edge; and processing the document image data to generate a scanned image.
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:
Referring now to the drawings and particularly to
Imaging apparatus 20 includes a body 22 housing a scanner 24, a print engine 26, a print media system 28 for supplying print media to print engine 26 and supporting the print media that has been printed, a fax unit 30, an automatic document feeder (ADF) 32 located adjacent to scanner 24, a user interface 34 having a display 36 and control buttons 38 for operating imaging apparatus 20, and a controller 40 for controlling scanner 24, print engine 26, print media system 28, fax unit 30, and ADF 32.
Controller 40 includes a processor unit and associated memory 42, and may be formed as an Application Specific Integrated Circuit (ASIC). Controller 40 is communicatively coupled to scanner 24, print engine 26, print media system 28, fax unit 30, and ADF 32 via communication links 44, 46, 48, 50 and 52, respectively.
Scanner 24 may be, for example, a bed type scanner with a movable scan bar, a scanner having a stationary scan bar, wherein a document is scanned by moving the document past the activated scan bar, or, as in a present embodiment, a combination of both.
Referring now to
ADF 32 includes a pick unit 60, delivery rollers 62, a down guide 64 having a spring loaded press plate 66, index rollers 68, and exit rollers 70. ADF 32 is configured to feed a document 72 across scan glass 54 for scanning by scan bar 58 to generate a scanned image of document 72. Once a desired function of imaging apparatus 20 is selected and initiated, i.e., either scanning, copying, and/or faxing, pick unit 60 retrieves the topmost sheet, e.g., document 72, and supplies document 72 to delivery rollers 62, which transport document 72 to index rollers 68. Index rollers 68 provide controlled movement of document 72 past scan glass 54, e.g., scan line by scan line. Down guide 64 and press plate 66 direct document 72 against scanner 24, in particular, against scan glass 54, where document 72 is scanned by scan bar 58. Once scanning is complete, document 72 is discharged from ADF 32 using exit rollers 70.
In the present embodiment, scan bar 58 may be positioned such that in the absence of a document, pixel intensity data pertaining to press plate 66 is generated by scan bar 58, whereas in the presence of document 72 on scan glass 54, a substantial portion of press plate 66 is obscured by document 72, and hence, the pixel intensity data generated by scan bar 58 will include press plate 66 pixel intensity data and document 72 pixel intensity data. Scan bar 58 generates pixel intensity data for scan lines, wherein each scan line is represented as a plurality of pixels detected by scan bar 58, e.g., approximately 2500 pixels per scan line in the illustrated embodiment. Scan bar 58 generates pixel intensity data for each pixel location of a scan line. Each scan line is generated by scan bar 58 taking a “snapshot” of whatever falls into its viewing range and focal length. When scanning a document, multiple “snapshots” are taken on a periodic basis as the document is translated past scan bar 58, and hence, a scan line may represent a physical location on the document, for example, having a height corresponding to the timing of the “snapshots” and the feed rate of the document. In the present embodiment, the height of a scan line corresponds to one pixel height having a known value. Based on this known value, the length of a document may be measured in terms of a number of scan lines or pixels. When a document is not being translated past scan bar 58, a scan line may represent a time slice in which a “snapshot” is taken, which yields a scan line of pixel intensity data for whatever is viewed by scan bar 58. In such a case, even though the same physical structure may be “seen” by scan bar 58 in a series of “snapshots,” the pixel intensity data may vary as between those “snapshots” somewhat, because of electrical/electronic noise.
Although embodiments described herein make reference to image data pertaining to press plate 66, it will be understood that, whereas press plate 66 is a background component visible to scan bar 58, other background components of an imaging apparatus that are visible to the scan bar may be employed in obtaining reference data pertaining to a background against which document 72 may be compared for detecting the edge of document 72, without departing from the scope of the present invention. For example, the scan lid or press pad of a flat bed scanner that is used to place pressure on and direct a document toward the scan glass, e.g., scan glass 56, may be employed, and hence, would be a press plate within the context of the present invention. In addition, other components, such as paper path components, may function as such a background component.
Referring now to
At step S100, scanner 24 is operated to obtain preliminary image data. In the present embodiment, the preliminary image data is in the form of pixel intensity data, for example, from one or more of the three RGB channels outputted by scan bar 58.
At step S102, scanner 24 and ADF 32 are controlled to perform at least one of translating document 72 across scan bar 58 and translating scan bar 58 across document 72 while operating scanner 24 to obtain preliminary image data. In the present embodiment, step S102 is performed a short period of time subsequent to the initiation of step S100, which allows scan bar 58 to generate preliminary image data in the absence of document 72.
At step S104, an edge of document 72 is detected based on a change in the preliminary image data that occurs when document 72 enters the viewing range and focal length of scan bar 58. In the various embodiments described herein, the leading edge, trailing edge, and side edges of a document may be detected at step S 104. For example, in one embodiment, the leading edge 78A of document 72 is detected based on the change in preliminary image data, and subsequently, the trailing edge 78B of document 72 is detected based on a reversal of the change in the preliminary data. Side edges are similarly detected by embodiments of the present invention. As depicted in
In some embodiments of the present invention, step S104 pertains to detecting a change in contrast, for example, where press plate 66 includes a high contrast portion exposed to scan bar 58 that is at least partially obscured by the passage of document 72. At least one such embodiment is described below with respect to FIGS. 4 and 5A-7D and steps S1041-1 to S1041-7.
In other embodiments, step S104 pertains to detecting a change in pixel variation data as between subsequent scan lines, for example, as described below with respect to
In still other embodiments, step S104 pertains to detecting a change in pixel variation data as between a scan line and reference pixel data, for example, as described below with respect to
In yet still other embodiments, step S104 pertains to detecting a change in pixel variation data along a scan line, for example, as described below with respect to
In any case, the edge detected at step S104 may be any or all of the edges of document 72, including leading edge 78A, trailing edge 78B, and side edges 78C. Based on the embodiments described herein, it will be apparent to one skilled in the art that by virtue of the methods described herein, the various edges of a document may be detected without regard to the shape of the document, such as where the shape of the document is triangular, trapezoidal, octagonal, or otherwise.
By detecting the edge based on a change in preliminary image data, the top of the form, i.e., the leading edge of document 72, may be more accurately determined than previous methods. In addition, because the edge detection of the present invention is performed using scan bar 58, additional hardware requirements, such as a scan detection sensor and associated wiring and flag, may be avoided.
At step S106, document 72 is scanned to generate document image data based on detecting the edge. For example, a start-of-scan flag may set once the edge is detected, which indicates to controller 40 that the incoming data from scan bar 58 now includes document image data.
At step S108, the document image data is processed based on detecting the edge to generate a scanned image of document 72.
For example, it is possible that document 72 may be skewed as it is fed through ADF 32. By detecting a skew angle of document 72 using the methodology described herein, for example, the embodiment of step S108 described below with respect to
Also, by detecting all the edges of document 72, processing the document image data based on detecting the edge includes detecting a size of document 72 in other embodiments of the present invention. For example, because the locations of the pixels that make up each scan line are known to controller 40, when the side edges 78C of document 72 are detected, the locations of those side edges 78C are also detected. In addition, controller 40 keeps track of how many scan lines are counted between the leading edge and the trailing edge of document 72, and based on the height of each scan line, e.g., the distance document 72 is indexed for each scan line, the distance between leading edge 78A and trailing edge 78B may be determined by controller 40. Thus, in some embodiments, the size of document 72 is determined at step S108 based on detecting the edges of document 72.
In addition, in various embodiments of the present invention, processing the document image data to generate the scanned image includes performing automatic scaling of the scanned image based on the size. For example, the image processing of step S108 may include automatic scaling of document 72, such as by generating an 8 inch by 10 inch scanned image from a 4 inch by 5 inch document 72 size.
Further, the image processing of step S108 may include setting an auto-crop boundary for automatically cropping the scanned image based the methodology set forth herein for detecting an edge based on a change in the preliminary image data. In such an embodiment, a preview scan may be performed to determine image content to automatically configure scanner settings. The crop boundary would then be displayed, e.g., on display 36 of user interface 34, and the user may then employ buttons 38 to adjust the crop boundary if desired.
Referring now to FIGS. 4 and 5A-7D, an embodiment of steps S100-S104 of
In the present embodiment, in order to increase the contrast between document 72 and press plate 66, a high contrast portion 74 of press plate 66 is employed, which is depicted in
At step S1041-1, scan bar 58 is positioned opposite high contrast portion 74, for example, as depicted in
At step S1041-3, document 72 is fed by ADF 32 at a feed rate Vf across scan bar 58, as depicted in
At step S1041-5, the leading edge of document 72 is detected based on the change in pixel intensity data generated by scan bar 58, at which point a start-of-scan flag is set, thus indicating to controller 40 that data received from scan bar 58 now includes document image data.
In embodiment of
In embodiment of
At step S1041-7, with the start-of-scan flag set, document 72 is transported across scan bar 58 at scan speed Vsc, which is dependent upon the scan resolution, and document 72 is scanned to yield document image data, as depicted in
Referring now to
The method described with respect to
The inventors determined that differences in surface finish and texture in the press plate and document may be used to detect the edges of the document. For example, since paper has a texture, marks, and other irregularities, the pixel variation from scan line to scan line is higher than the variation line to line when the scan bar is imaging the press plate only. This variation was confirmed experimentally by collecting images of plain paper fed through the ADF, as well as images of the press plate with no paper being fed through the ADF.
An exemplary algorithm was developed to calculate the scan line to scan line variation down the document as follows:
Store pixel values for x number of pixels for a scan line.
Next scan line, obtain new pixel values for X number of pixels.
Take absolute difference between pixel values for these subsequent scan lines and then sum for all of the X pixels.
Continue for all scan lines.
For example, the following calculations may be performed:
If looking at 2 pixels (X=2),
First scan line, read values: pixel #200=137 and pixel #2000=145
Next scan line, read values: pixel #200=141 and pixel #2000=142
Calculate abs (137-141)+abs (145-142)=7
Continue
The inventors determined that there is a threshold of absolute differences that may be used to distinguish between a document passing through the ADF and no document (press plate only). To ensure a clear threshold, a minimum number of pixels should be examined on each scan line. Initial experiments using the red channel with gamma off indicated that a minimum of 30 pixels per scan line yields a clear threshold. The processing power of the ASIC controller was confirmed to ensure that each scan line could be calculated. The test was conducted with plain paper. The inventors determined that the pixel to pixel variation alone is enough to detect the top of page, i.e., the leading edge of the document, as well as bottom of the page, i.e., the trailing edge of the document.
Although relatively few pixels per scan line, e.g., 40 to 50, may be evaluated to detect an edge, more pixels, e.g., 80 pixels per scan line, will help to ensure that the edge overlap with current levels of image acquisition noise is minimized. Positive results were obtained at different scan resolutions, including 75 and 300 dpi.
Referring now to
Referring now to
Thus, based on the data of
At step S1042-1, first pixel data from selected pixel locations of the plurality of pixel locations on a first scan line is obtained with scan bar 58 being positioned opposite press plate 66. The first pixel data is pixel intensity data generated by scan bar 58. Initially, that is, prior to feeding document 72 across scan glass 54, the first pixel data will be press plate 66 pixel intensity data. Once document 72 is transported over scan glass 54 to within the focal range of scan bar 58, the first pixel data will also include pixel intensity data pertaining to document 72. The selected pixel locations pertain to those pixel positions along the scan line for which intensity data is sought. In the present embodiment, data from the same pixel locations are obtained for each scan line. In some embodiments, all pixels on each scan line may be selected pixel locations.
At step S1042-3, second pixel data from the selected pixel locations on a second scan line adjacent to the first scan line is obtained.
At step S1042-5, for each pixel location of the selected pixel locations, a difference between the first pixel data and the second pixel data is determined.
At step S1042-7, the magnitude, i.e., the absolute value, of the difference between the first pixel data and the second pixel data at each pixel location is summed to yield a difference sum.
At step S1042-9, the difference sum is compared to a threshold to thereby detect the edge. In the present embodiment, the threshold is determined based on image data obtained in the absence of document 72, for example, such as threshold 86 of
Because the embodiment of steps S1042-1 to S1042-9 employ an existing unmodified press plate 66, no additional cost is imposed on press plate 66 in order to implement the present embodiment. In addition, only a single scan bar position is required to detect the edges. Also, bottom of page detection, i.e., the detection of trailing edge 78B, may be performed more accurately than previous edge detection methods.
Referring now to
The embodiment of
The sample size was selected to ensure statistical significance; fewer samples may be required for functional implementation. The mean or average “calibrated” value of the samples is stored in memory 42. Then the absolute difference between the current scan line value and the mean of the calibrated values is examined scan line by scan line in a manner similar to that of the embodiment of
For example, with reference to
Referring now to
Thus, based on the data of
Referring now to
At step S1043-3, reference pixel data is obtained. In the present embodiment, the reference pixel data is generated by imaging apparatus 20 based on preliminary image data before translating document 72 across scan bar 58 or translating scan bar 58 across document 72, which yields pixel intensity data for press plate 66. The reference pixel data may be stored in memory 42 for subsequent use at step S1043-5. In other embodiments, the reference pixel data is stored in a memory of imaging apparatus 20 during the manufacturing imaging apparatus 20, such as memory 42, in which case the reference pixel data is obtained by retrieving it from memory.
At step S1043-5, for each pixel location of the selected pixel locations, a difference between the test pixel data and the reference pixel data is determined.
At step S1043-7, the magnitude, i.e., the absolute value, of the difference between the test pixel data and the reference pixel data at each pixel location is summed to yield a difference sum.
At step S1043-9, the difference sum is compared to a threshold to thereby detect the edge. In the present embodiment, the threshold is determined based on image data obtained in the absence of document 72, for example, such as threshold 96 of
Because the embodiment of steps S1043-1 to S1043-9 employ an existing unmodified press plate 66, no additional cost is imposed on press plate 66 in order to implement the present embodiment. In addition, only a single scan bar position is required to detect the edges. Also, bottom of page detection, i.e., the detection of trailing edge 78B, may be performed more accurately than previous edge detection methods.
In addition because the embodiment of S1043-1 to S1043-9 yields a greater difference between press plate distribution 92 and document distribution 94, the number of pixels examined in order to detect an edge may be reduced.
For example, with reference to
Referring now to
Referring now to
By detecting the left and right edge of document 72, e.g., side edges 78C, the size of document 72 for scan/copy may be determined. Since the scan occurs as a single scan line (one pixel high), detecting the true edge of the media edge may be difficult, particularly where mechanical variation in the ADF occurs as the scan is performed down the length of the page. However, by comparing groups of pixels, an edge transition may be reliably detected. The group status is compared with the calibration value (press plate reference pixel data). Based on the state of the grouping, a look-up table may be created to determine the closest predefined media size. For making a copy, the controller 40 may then automatically map the size of the input target, e.g., document 72, to the output size of the print media. For example if a 4 inch×6 inch photo is scanned, and the media size detected in the print engine 26 is letter, automatic scaling may be performed to enlarge the photo to fill the letter size of the media. In other embodiments, the default may be to simply replicate the original without scaling.
One possible algorithm for detecting the left and right edges, e.g., side edges 78C, of document 72 is as follows: Before scanning document 72, 32 samples of press plate 66 are taken and the mean of each individual pixel is stored in memory 42. This serves as reference pixel data against which all scan lines will be compared. When scanning document 72, the absolute value of the differences between test pixel data and the reference pixel data in the form of pixel intensity data are determined.
For example, referring now to
Referring now to
In view of
For example, referring now to
At step S1044-3, reference pixel data is obtained. In the present embodiment, the reference pixel data is pixel intensity data, and is generated based on preliminary image data obtained before translating document 72 across scan bar 58 or translating scan bar 58 across document 72. Thus, in the present embodiment, the reference pixel data pertains to image data of press plate 66. The reference pixel data may be stored in memory 42 for subsequent use at step S1044-7. In other embodiments, the reference pixel data may be test pixel data for a previously processed scan line. In still other embodiments, the reference pixel data may be stored in memory 42 during the manufacturing of imaging apparatus 20, and may be obtained by retrieving the reference pixel data from memory 42.
At step S1044-5, the selected pixel locations are subdivided into a plurality of pixel blocks. In the present embodiment, the pixel blocks are adjacent to each other, extending from one end of the scan line to the other. The individual pixel values of the test pixel data are grouped into blocks of N pixels, e.g., 32 pixels, and the mean is determined for each pixel block.
At step S1044-7, a difference between the test pixel data and the reference pixel data is determined for each pixel location. In the present embodiment, a mean difference is determined for each pixel block relative to the reference pixel data, based on the difference determined for each pixel location in the pixel block.
At step S1044-9, side edges 78C of document 72 are detected based on a magnitude of the mean difference along the scan line. In the present embodiment, the mean difference for each pixel block is compared to a threshold, and each side edge 78C is determined based on a pair of adjacent pixel blocks, wherein one pixel block of the pair exceeds the threshold and the other pixel block of the pair does not exceed the threshold.
For example, a search is conducted for transitions within the pixel block mean difference values. A transition is defined a pixel block pair in which one block value is below a set threshold and the other above the same threshold value.
For example, referring now to
In
In
In some embodiments, step S1044-9 may be repeated in order to assure a consistent edge determination, and hence a consistent media width determination for document 72. For example, an approximate width of document 72 may be calculated by taking a difference between the positions of the transitions along the scan line, which yields a distance between transitions. The approximate width may then be compared to a table of known media widths (letter, A4, 4 inch×6 inch, etc.).
In addition, after the known media format is determined, this information may be sent to a cropping function block within controller 40 to perform cropping of the scanned image.
In another embodiment of the present invention edge detection method, an auto-crop boundary may be determined. For example, using the edge detection method based on pixel variation, an auto cropping boundary may be determined in controller 40 and incorporated as part of a flatbed smart copy, where a preview scan is performed to determine content to automatically configure scanner 24 settings. This may enable stand alone user selectable scan area by using user interface 34.
Referring now to
Based on the edge detection methods described herein, a skew angle may be determined, and automatic skew compensation or correction may be performed. Auto skew correction may be implemented in a variety of ways. For example, one method is to use the leading edge to calculate a slope and then use the calculation to automatically adjust the pixel values down the page. By leveraging the ability to detect leading edge 78A using a series of detection regions, a skew estimate may be obtained without the need for extensive image processing. This may allow imaging apparatus 20 to correct skew using controller 40, rather than via a host computer connected to imaging apparatus 20, which may improve the quality of standalone copying.
In the present embodiment, skew detection begins upon feeding document 72 across scan bar 58. As document 72 appears at each of the detection regions, a better estimate for paper skew is determined.
For example, referring now to
Referring now to
At step S1081-3, reference pixel data is obtained. In the present embodiment, the reference pixel data is pixel intensity data, and is generated based on preliminary image data obtained before translating document 72 across scan bar 58 or translating scan bar 58 across document 72. Thus, in the present embodiment, the reference pixel data pertains to image data of press plate 66. The reference pixel data may be stored in memory 42 for subsequent use at step S1081-7. In other embodiments, the reference pixel data may be test pixel data for a previously processed scan line. In still other embodiments, the reference pixel data may be stored in memory 42 during the manufacturing of imaging apparatus 20, and may be obtained by retrieving the reference pixel data from memory 42.
At step S1081-5, the selected pixel locations are subdivided into a plurality of pixel blocks, which are illustrated as pixel block A, pixel block B and pixel block C in the depiction of
At step S1081-7, a difference between the test pixel data and the reference pixel data is determined for each pixel location. In the present embodiment, a mean difference is determined for each pixel block relative to the reference pixel data, based on the difference determined for each pixel location in the pixel block.
At step S1081-9, skew angle S of document 72 is detected based on a magnitude of the difference. In the present embodiment, the mean difference for each pixel block is compared to a threshold, and skew angle S is determined based on the number of scan lines between when the mean difference for a first pixel block exceeds the threshold, e.g., pixel block A, and when the mean difference for a second or subsequent pixel block exceeds the threshold, e.g., pixel block C.
Having thus determined the skew angle of document 72, image processing may be performed to compensate for the skew to that the resulting scanned image is not skewed.
In addition to detecting skew based on leading edge 78A, skew detection may also be performed based on detecting the side edges 78C of document 72, for example, as set forth above with respect to
For example, if side edge 78C is determined to be at a first pixel location when leading edge 78A is first detected, and is then determined to be at a second pixel location some distance away from the first pixel location when trailing edge 78B is detected, the skew angle may be determined based on the difference between the first and second pixel locations, and the number of scan lines between leading edge 78A and trailing edge 78B. This approach has the benefit of increased resolution for skew calculation, and may also be useful for detecting or correcting for more severe end of page skew, possibly due to exit roll behavior. Such an approach may be used alone or in conjunction with the methodology 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.