Method for acquiring document images with a paper feed scanner

A method for acquiring document images with a paper feed scanner. The paper feed scanner includes a scanning module for scanning a document at a scanning position, a motor for driving the document, and a memory for storing image data. The method includes turning the motor to feed the document toward a scanning position; the scanning module starting scanning before the document reaches the scanning position; and detecting an edge of the document according to an image generated by the scanning module, and starting or stopping storing image data generated by the scanning module into the memory when detecting the edge of the document.

BACKGROUND OF INVENTION

1. Field of the Invention

The present invention relates to a paper feed scanner, and more specifically, to a method of using a paper feed scanner to capture correct document images and ignore black areas surrounding the document images.

2. Description of the Prior Art

Paper feed scanners are popular for scanning large quantities of documents at one time. One main advantage that paper feed scanners have over flatbed scanners is that a stack of paper can be scanned all at once with little effort expended by a user.

In this specification, paper feed scanners include scanners which has automatic feeders for feeding documents page by page. Therefore flatbed scanners with automatic feeders are included in the “paper feed scanners” as described in the specification.

Please refer toFIG. 1.FIG. 1is a paper feed scanner10according to the prior art. The paper feed scanner10comprises a housing12, a paper tray14, a step motor16, a roller18, a processor26and a scanning module20. The paper tray14is connected to the housing12for holding a stack of documents17. The step motor16is installed inside the housing12for driving the roller18so as to feed the documents15into the scanner10. The processor26is used to control operations of the scanner10. The scanning module20is installed inside the scanner10for scanning the documents15so as to generate document images. The scanner10has a scanning position positioned above the scanning module20. When a document15, one of the document stack17, driven by the roller18reaches the scanning position, the scanning module20will start to scan the document15, and the generated document image will be stored into a memory22of the scanner10.

The scanner10further comprises a light sensor24for detecting the document15. The distance between the light sensor24and the scanning position is a fixed value. The fixed value is converted to the corresponding number of steps rotated by the step motor16to deliver the document15from the light sensor24to the scanning position. This number of steps is recorded in the memory22. When a front edge of the document15is detected by the light sensor24, the step motor16will turn the predetermined number of steps before the scanning module20begins to scan. Similarly, when a rear edge of the document15is detected by the light sensor24, the step motor16will turn the predetermined number of steps before the scanning module20stops to scan because the document15should have completely left the scanning position

Unfortunately, if the light sensor24is not accurately installed inside the scanner10, an error will exist in the distance between the light sensor24and the scanning position. However, the number of steps recorded in the memory22is predetermined, it does not change with the error. Thus, documents15fed into the scanner10will not be properly scanned because the documents15may be moved too far or too little by the step motor16before the scanning module20begins scanning the documents15.

For an illustration of this problem, please refer toFIG. 2andFIG. 3.FIG. 2illustrates a prior art scanning process in which the scanning module20starts scanning a document15too early.FIG. 3illustrates a prior art scanning process in which the scanning module20starts scanning a document15too late.

InFIG. 2, the position error of the light sensor24lengthens the distance between the light sensor24and the scanning position. Before the front edge of the document15is dragged to the scanning position, the scanning module20begins scanning at line28a. Because even though the document15has not reached the scanning position, the step motor16has rotated the predetermined number of steps. The scanning module20thus erroneously assumes the document15has reached the scanning position. Because the scanning module20starts to scan the document15too early, the scanning module20will scan a background section first, and then followed by a portion of the document15. If the background color is black, then the scanning module20will acquire a document image containing a black area and part of the document15. When the light sensor24detects a rear edge of the document15, the scanning module20stops scanning the document15after the step motor16rotates the predetermined number of steps. This will cause the scanning module20stops scanning the document15at line28b. That is, scanning is stopped before the rear edge of the document15is completely moved across the scanning position because the scanning module20erroneously determines the rear edge of the document15has reached the scanning position. Therefore, the acquired document image fails to contain a complete image of the document15.

On the other hand, inFIG. 3, the position error of the light sensor24shortens the distance between the light sensor24and the scanning position. Therefore, after the front edge of the document15has already been dragged across the scanning position, the scanning module20begins scanning at line30a. The document15is then moved completely across the scanning module20, and the scanning module20stops scanning at line30b. Therefore, a document image is acquired that contains part of the document15and a black area. And a very beginning portion of the document15was not scanned.

When installing the light sensor24into the scanner10, the position error of the light sensor24is inevitable. As precision requirements become more and more strict, the error can no longer be tolerated. Although microswitches have been used to replace the light sensor24, they cannot overcome the problems because they require very similar installation processes.

SUMMARY OF INVENTION

It is therefore a primary objective of the claimed invention to provide a method for acquiring document images with a paper feed scanner in order to solve the above-mentioned problems.

According to the claimed invention, a method for acquiring document images with a paper feed scanner is disclosed. The paper feed scanner includes a scanning module for scanning a document at a scanning position, a motor for driving the document, and a memory for storing image data. The method includes turning the motor to feed the document toward a scanning position; the scanning module starting scanning before the document reaches the scanning position; and detecting an edge of the document according to an image generated by the scanning module, and starting or stopping storing image data generated by the scanning module into the memory when detecting the edge of the document.

It is an advantage of the claimed invention that the method is able to capture an image of the entire document being scanned. Moreover, any blank areas that are generated in the document image are removed, leaving only an image of the original document being scanned.

DETAILED DESCRIPTION

The present invention provides a method of acquiring document images with a paper feed scanner. In this method, a scanning module starts scanning before a document reaches a scanning position, and the scanning module continues scanning after the document has left the scanning position. The method uses image processing means to detect blank areas on edges of the document image and remove the detected blank areas from the document image. Details of the method are described below.

Please refer toFIG. 4.FIG. 4is a diagram of a paper feed scanner40according to the present invention. The paper feed scanner40comprises a housing42, a paper tray44, a paper detector46, a step motor48, a roller50, a processor52and a scanning module54. The paper tray44is connected to the housing42for placing a stack of documents47. The paper detector46is installed at a front end of a stack of documents47for detecting a document45which is going to be scanned. It can be a microswitch or a light sensor. The step motor48is installed inside the housing42for driving the roller50so as to deliver the documents45into the scanner40. The processor52is used to control operations of the scanner40. The scanning module54is installed inside the scanner40for scanning the stack of documents47so as to generate document images. The scanning module54starts to scan the document45before the roller50drives the document45to a scanning position located above the scanning module54.

The scanning module54comprises a plurality of photo sensors56arranged as a linear array. When the scanning module54scans a line of each of the documents47, the light received by the photo sensors56is used for further identification. The scanner40further comprises an A/D converter58, a buffer60, an identification circuit62and a memory64. The A/D converter58is connected to the plurality of photo sensors56for converting analog signals transferred from the photo sensors56into digital signals. The buffer60is connected to the A/D converter58for storing digital signals transferred from the A/D converter58. The identification circuit62is connected to the buffer60. The identification circuit62compares an average of digital signals transmitted from the buffer60with a threshold to determine if the digital signals stored in the buffer60should be stored into the memory64.

When the scanner40receives a scanning instruction, the scanner40will instruct the step motor48to rotate the roller50so as to drive the document45forward. When the document45moves forward and triggers the paper detector46, the processor52will initiate the scanning module54to start scanning after the step motor48rotates another predetermined number of extra steps. This predetermined number of extra steps is not sufficient to drive the document45to the scanning position. Therefore, the processor52initiates the scanning module54to start scanning before the document45reaches the scanning position. Further, the predetermined number of extra steps can be 0. In this case, the processor52initiates the scanning module54to start scanning as soon as the document45triggers the paper detector46. When the scanning module54starts scanning, the photo sensors56of the scanning module54will detect intensities of the received light, and transfer the intensities to the A/D converter58. Then the A/D converter58will convert the intensities into digital signals and transfer the digital signals to the buffer60. The buffer60will pass the digital signals to the identification circuit62. The identification circuit62will calculate the average of the digital signals and compares the average with a threshold stored in the identification circuit62.

In this embodiment, it is assumed that the area scanned by the scanning module54is black when no document is present at the scanning position. Therefore, the light intensities detected by the photo sensors56will be very low. However, the light intensities detected by the photo sensors56will be very high when the scanning module54scans a blank document. Accordingly a threshold can be defined such that when the average of the light intensities is lower than the threshold, the scanning module54is scanning areas outside the document45. And when the average of the light intensities is higher than the threshold, the scanning module54is scanning the document45.

The processor52initiates the scanning module54to start scanning before a front edge of the document45reaches the scanning position, thus the photo sensors56of the scanning module54only detects minimal amount of light initially. This will cause the identification circuit62to determine that the average of the light intensities is lower than the threshold, and the identification circuit62will determine that the image is collected from areas outside of the document45. Thus the image stored in the buffer60will not be transferred to the memory64. The process repeats until the average of the light intensities is greater than the threshold. Until this time the identification circuit62will determine that the scanning module54is scanning the front edge of the document45, and the buffer60will start to store the image collected from the document45into the memory64.

After a rear edge of the document45passes the paper detector46thus no longer triggers the paper detector46, and the step motor48rotates another number of extra steps, the processor52will start to determine when to stop the buffer60from transferring data to the memory64. The process repeats until the average of the light intensities detected by the photo sensors56drops below the threshold again. At this time, the identification circuit62will determine that the scanning module54has scanned the rear portion of the document45. The buffer60will not transfer the data stored therein to the memory64. And the processor52will stop the scanning module54from performing further scanning. In this way, the images contained in the document45are fully stored into the memory64. And no image outside the document45will be stored into the memory64.

Please refer toFIG. 5.FIG. 5compares the size of an area actually scanned by the scanning module54with the size of an image stored in the memory64. The area within a frame66corresponds to the area actually scanned by the scanning module54. The area bounded by dotted lines68a,68b,68c,68dcorresponds to the size of an image stored in the memory64. And the image stored in the memory64corresponds to the image of the document45. Because the area before the front edge of the document45(the area at the left side of the dotted line68a) and the area after the rear edge of the document45(the area at the right side of the dotted line68b) do not belong to the document45, the scanner40has removed these areas by not storing images of these areas to the memory64. On the other hand, the areas above the dotted line68cand below the dotted line68dare removed after the scanning module54completes the scanning process. Thus, the image stored in the memory64is consistent with the image of the document45. Every portion of the document45will be scanned, and portions outside of the document45will be neglected.

Please refer toFIG. 6.FIG. 6is a flowchart according to the present invention. It comprises the following steps:Step100: position the document45onto the paper tray44and instruct the scanner40to perform scanning;Step110: the step motor48rotates the roller50to drive the document45forward;Step120: when the document45triggers the paper detector46, the scanning module54starts scanning immediately or after the step motor48moves a predetermined number of extra steps;Step130: use the photo sensors56of the scanning module54to detect intensities of light transmitted from each row of data, and transmit the intensities to the A/D converter58;Step140: the A/D converter58converts the intensities to digital signals and passes the digital signals to the buffer60;Step150: the buffer60transmits the digital signals to the identification circuit62;Step160: the identification circuit62compares an average of the digital signals with a threshold; if the average is greater than the threshold, perform step170; if the average is not greater than the threshold, perform step180;Step170: the scanning module54has detected the front edge of the document45;Step175: start to store image data collected by the scanning module54to the memory64, go to step190;Step180: the scanning module54has not detected the front edge of the document45, go to step130;Step190: when the rear edge of the document45passes the paper detector46so that the document45no longer triggers the paper detector46, the processor52will use the identification circuit62to detect the rear edge of the document45immediately or after the step motor48moves a predetermined number of extra steps;Step200: use the photo sensors56of the scanning module54to detect intensities of light transmitted from each row of data, and transmit the intensities to the A/D converter58;Step210: the A/D converter58converts the intensities to digital signals and passes the digital signals to the buffer60;Step220: the buffer60transmits the digital signals to the identification circuit62;Step230: the identification circuit62compares an average of the digital signals with a threshold; if the average is greater than the threshold, perform step240; if the average is not greater than the threshold, perform step250;Step240: the scanning module54has not detected the rear edge of the document45, continue to store image data in the buffer60to the memory64, go to step200;Step250: the scanning module54has detected the rear edge of the document45;Step255: stop storing image data in the buffer60to the memory64;Step260: complete scanning the document45.

The aforementioned paper detector46can be implemented by a microswitch or other detectors. Further, the above identification circuit62compares the average of light intensities with the threshold. However, the identification circuit62can first compares each intensity in a row of image data with the threshold, and then calculate the number of intensities in the row which are greater than the threshold. If the number is greater than a predetermined value, then the identification circuit62can identify that the scanning module54is scanning the document45. If the number is not greater than the predetermined value, then the identification circuit62can identify that the scanning module54is not scanning the document45. This method provides an alternative to achieve the goal of the present invention.

Compared to the prior art, the scanning module54begins scanning before the front edge of the document45crosses the scanning position and continues to scan until after the rear edge of the document45crosses the scanning position. The photo sensors56of the scanning module54are then used to detect the front and rear edges of the document45so that the image data beyond the front and rear edges of the document45will not be stored into the memory64. At last, the processor52is used to process the image data stored in the memory64so as to remove image data beyond right and left edges of the document45. In this way, the entire document45being scanned is captured in the document image, and extraneous blank areas are eliminated.