Background of the Invention
1. Field of the Invention
This invention relates to a method for making high efficiency multi-image scans, especially to a method of scanning multiple document images with automatic image detection and scanning field adjustment in one single scanning operation.
2. Description of the Prior Art
Image scanner is widely used in offices and by individuals for document processing in the modern society. The performance of a scanner strongly affects the work efficiency of the user. The design of the operation mode of the scanner is of vital importance for its performance.
The operation mode used today in a generic image scanner is to scan one image per operation. The user would have to repeat this operation if he (she) ever wants to scan more than one image document.
This is time-consuming process and lowers the scanning efficiency. Moreover, if the original page is mispositioned or shifted, the quality of the scanning result will be affected severely.
Summary of the Invention
The main purpose of this invention is to provide a method for making highly efficient, multi-image scannings. The method disclosed in the present invention is to define a window region and insert a number of rectangular fields inside for placing multiple images. The scanning of multiple images can be completed in a single scan operation, and the computer program recognizes the existence and orientation of images in each field. The scanner will also adjust the position the scanning field if there is deviation of the image from the desired area. Furthermore, the method disclosed in the present invention involves the use of a plurality of fiducial marks outside the rectangular fields that can be recognized by the computer to facilitate searching of the image position, so as to provide a convenient document processing by the user.
Brief Description of the Drawings
FIG. 1 shows an illustrative drawing of the window which is put on the scanner.
FIG. 2 shows an illustrative drawing of the images which is put on the window of this invention.
FIG. 3 is the window region according to a preferred embodiment of this invention.
FIG. 4 shows the fiducial marks according to a preferred embodiment of this invention.
FIG. 5 is the flow chart of the fiducial mark recognition program according to a preferred embodiment of this invention.
FIG. 6 shows the recognition of the existence of the image according to a preferred embodiment of this invention.
FIG. 7 shows the recognition oft he orientation oft he image according to a preferred embodiment of this invention.
FIG. 8 is the flow chart of the image orientation recognition program according to a preferred embodiment of this invention.
FIG. 9 is the flow chart of the scan field adjustment program according to a preferred embodiment of this invention.
FIG. 10 is the flow chart of the whole operation in the embodiment of this invention.
Detailed Description
FIG. 1 shows an illustrative drawing of the window (18) which is put on the conventional scanner (1).
FIG. 2 shows an illustrative drawing of the image (2) which is put on the window (18) of this invention.
FIG. 3 shows the window region according to a preferred embodiment of this invention. Its design is to set multiple rectangular fields (26), (28), (30) and (32) in a window (18). Fiducial marks (10), (12), (14) and (16) are located outside the upper left corner of each rectangular box. For this to be useful even after a 180 degree rotation, another set of fiducial marks (19), (20), (22) and (24) are located outside the lower right corner of the rectangular boxes (26), (28), (30) and (32), symmetrically. Computer program recognizes those fiducial marks automatically. Only one pair of fiducial marks is needed if the rectangular fields are set with equal distance between each other. The position of the other rectangular fields can be found be shifting the scan field with given distance.
As shown in FIG. 4, the design of the fiducial marks in this embodiment is a small square hole. During scanning operation, a black signal is received when there is obstruction to the light transmission, and a white signal is got when the light passes through the hole. In FIG. 4, an "X" indicates a black point and an "O" indicates a white point. The pattern in the figure is an example showing the signal after scanning a small round white hole on a black background, this example is shown in a square matrix to simplify the operation of the scanner.
FIG. 5 illustrates the flow chart of the fiducial marks recognizing program, i.e. the algorithm used to find the fiducial marks. The main function is to select a small area of the image and compare with the pattern of the white hole in black background (see FIG. 4), starting at the upper left corner of the image. If the patterns match each other, the coordinates of this position are recorded then terminate the job. If not, move the selection area right in one step, and repeat the comparison until the right edge of the image is encountered. Then the selection area is moved down in one step and repeat the moving and comparing until a matched pattern is found or the lower edge of the image is encountered.
As shown in FIG. 6, the recognition of the existence of the document image is achieved by detecting the point in the upper left corner of the image field. The gray level of the detecting point is compared with a given gray level, called threshold value. If the gray level of the detection point is greater than the threshold value, there is no document; otherwise, if the gray level of the detection point is less than the threshold value, a document is present.
As shown in FIG. 7, the detection of the orientation of the image is achieved by comparing the average gray level of the left and right edges, with average gray level of the upper and lower edges. If the average gray level is high, this further means that an image is present in this area.
The complete operation is shown FIG. 8, the flow chart of the program detection of the orientation of the image. It starts by calculating the average gray level of the left and right edges, then calculating the average gray level of the upper and lower edges, then compare these two averages. The document is determined to be in the portrait orientation if the average gray level of the left and right edges is less than that of the upper and lower edges. Otherwise, the document is in a landscape orientation, if the average gray level of the left and right edge is higher than that of the upper and lower edges.
As shown in FIG. 9, the flow chart of the program for adjusting the scan field consists of four steps. The main function is to select certain area around the image to detect the gray level there and use these to adjust the scan field to avoid the shifting of the scanned image. The first step is to detect the gray level of the upper edge of the selected field and compare it with a given threshold value. In second step, compare the gray level of the lower edge with the threshold value. If the upper edge gray level is less than the threshold value while that of the lower edge is greater than threshold value, move the field downward and go to the third step. If the upper edge gray level is greater than the threshold value while that of the lower edge is less than threshold value, move the field upward and go to the third step. Otherwise, do nothing and proceed to the third step. In the third step, compare the gray level of the left edge of the field with the threshold value. In the forth step, compare the right edge gray level with the threshold value. If the left edge gray level is less than threshold value while that of the fight edge is greater than threshold value, move the field to the fight and terminate the program. If the left edge gray level is greater than the threshold value while that of the fight edge is less than threshold value, move the field to the left and terminate the program. Otherwise, do nothing and end the program.
As shown in FIG. 10, the flow chart of the whole scanning operation starts by placing the rectangular fields in the scan window of the scanner. Then scan the area and search for the fiducial marks, if it fails to find the fiducial marks, display an error message and terminate the scan process. Otherwise, move to the first scan field and detect the presence of the document image. If there is no image found, then proceed to the nest scan field. Otherwise, determine the orientation of the document and adjust the scan field to compensate the shifting of the scanned image. Then move to the next scan field and repeat these procedures until the last field is complete. Finally, display the scan fields on the screen and start the scanning operation. The foregoing description of the preferred embodiments of this invention has been presented for purposes of illustration and description. Obvious modifications or variations are possible in light of the above teaching. The embodiments were chosen and described to provide the best illustration of the principles of this invention and its practical application to thereby enable those skilled in the art to utilize the invention in various embodiments and with various modifications as are suited to the particular use contemplated. All such modifications and variations are within the scope of the present invention as determined by the appended claims when interpreted in accordance with the breadth to which they are fairly, legally, and equitably entitled.