The invention relates in general to a method for determining restored position, and more particular, to a restoration method to avoid missing line and image repetition.
Due to advancing and fast-developing electronic techniques, the electronic industry has become one of the most important industries in modern society. Many high performance calculating systems are consequently being produced, and more and more electronic products are being used in daily life. In recent years, the growing processing speed and data storage capacity of the processor has greatly enhanced the performance of image processing, while the image processor such as the optical scanner or digital camera have become widely applied.
In the current operating process of the scanner, the graphic data generating speed is far faster than the data transmission speed between the scanner and the host, and therefore the graphic data scanned by the scanner requires a place for temporary storage. Such place for temporary storage is called a buffer, which ranges between about 32 Kbytes to about 512 Kbytes.
The faster the graphic data is generated; the more graphic data is stored in the buffer. When the buffer is full of the graphic data, the scanner has to stop scanning. If the scan continues under such circumstances, the graphic data will be lost, or operation problems may occur.
When the scanner head is performing scanning, the scanning process has to be stopped if the buffer is filled with the graphic data. Generally speaking, the stopped position is called the restored position. To allow each area of the document to have the same exposure time, the scanner head has a constant speed during scanning. Thus, the scanner head has to move backward with a certain distance. When the is completely emptied, the scanner head proceeds to the previously stopped position, that is, the restored position, to continue scanning. The scanning speed has to reach the previous scanning speed to result in a stable performance.
The procedure from filling the buffer with the graphic data, stopping scanning, the scanner head moving backward and restoring to the restored position and starting scanning is called smearing.
The smearing procedure is normally determined by the low transmission speed of interface connected to the host, such as the SCSI, USB and EPP. Alternatively, it also occurs when the computer host is too busy with other operation processes to read data from the interface. As a result, the graphic data is accumulated in the buffer until it is completely filled to cause smearing.
In the above smearing procedure, while returning to the restored position after moving backward, the scanner head may not return to the exact restored position due to the inertia effect or mechanic error of the scanner; therefore missing line and repetition of graphic data may occur.
The present invention provides a method for determining the restored position to avoid missing line and image repetition.
The method for determining the restored position provided by the present invention includes the following steps. In the first step, a scanner head moves along a first direction to scan a document. In the second step, the scanner head stops moving, and the position where the scanner head stops is defined as a restored position. Meanwhile, the data of the document located at the restored position is scanned by the scanner head, while the scanned data is defined as the restored graphic data. In the third step, the scanner head moves to a second direction opposing to the first direction with a first distance. In the fourth step, the scanner head moves along the first direction with a second distance to reach an initial scanning position, where the second distance is smaller than the first distance. In the fifth step, after moving along the second direction with the second distance, the scanner head proceeds in a stepping manner to scan a plurality of corresponding graphic data. In the sixth step, being compared to the restored graphic data, the scanned graphic data closest is selected and defined as the connecting graphic data. In the seventh step, the graphic data subsequent to the connecting graphic data is connected to the restored data.
According to one embodiment of the present invention, an additional step for erasing the scanned graphic data prior to the connecting graphic data is required, while the connecting graphic data can be used to replace the restored graphic data. In addition, while performing the third step, the first distance includes 36 steps. That is, the scanner head moves 36 steps along the second direction. While performing the fourth step, the scanner head moves 34 steps along the first direction.
In one embodiment of the present invention, the restored graphic data comprises a plurality of standard pixels, and each scanned graphic data comprises a plurality of pixels. While performing the sixth step, a part of the standard pixels is used as the comparison reference to compare with a part of the pixels of each graphic data in the corresponding positions. Alternatively, while performing the sixth step, all the standard pixels can be used as the comparison reference to compare to the pixels of each of the graphic data in the corresponding position.
Accordingly, the present invention compares the scanned graphic data with the restored graphic data to select the graphic data closest to the restored graphic data. The selected graphic data scanned subsequently can thus be connected with the restored graphic data correctly.
These, as well as other features of the present invention, will become more apparent upon reference to the drawings wherein:
Referring to
The scanner head then moves with a first distance along a second direction to reach an initial position 130. For example, in a stepping manner, the scanner head moves 36 steps to reach the initial position 130. The second direction 190 is an opposite direction to the first direction 180 in this embodiment.
Referring to
After the scanner head moves with the second distance 140 along-the first direction 180, the scanner head continues moving along the first direction 180 and scans the document 110 until he buffer is again short of capacity. The scanner head proceeds in a stepping manner. A graphic data is scanned for each step that the scanner head steps forward. In one embodiment, the scanner head steps many steps to various positions such as the first to eighth positions 152, 154, 156, 158, 160, 162, 164 and 166. Corresponding to the first to eighth positions 152 to 166, first to eighth graphic data are scanned, respectively.
After the scanner head starts scanning, a comparison step is performed. That is, the scanned graphic data such as the first to the eighth graphic data are compared to the restored graphic data, respectively, among which the one closest to the restored graphic data, for example, the second graphic data, is selected as the connecting graphic data.
After realizing that the second graphic data is the one closest to the restored graphic data, the third graphic data is connected to the restored graphic data. The initial graphic data, the first graphic data and the second graphic data are removed. Therefore, the subsequently scanned graphic data can be correctly connected to the previously scanned graphic data without the problems of missing line and image repetition. Alternatively, the restored graphic data can also be replaced by the second graphic data.
Referring to
According to the above, the present invention selects a closest graphic data of a restored graphic data by comparing the scanned graphic data with the restored graphic data, such that the subsequently scanned graphic data can be correctly connected to avoid the missing line and data repetition.
Other embodiments of the invention will appear to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. It is intended that the specification and examples are to be considered as exemplary only, with a true scope and spirit of the invention being indicated by the following claims.
This is a Continuation Patent Application of U.S. patent application Ser. No. 10/064,907, filed Aug. 28, 2002.
Number | Date | Country | |
---|---|---|---|
Parent | 10064907 | Aug 2002 | US |
Child | 11507086 | Aug 2006 | US |