1. Field of the Invention
The present invention relates to an apparatus merging images that are dividedly captured a plurality of times.
2. Description of the Related Art
In recent years, a manual hand-held scanner that is small and easy to carry has been developed and commercialized in addition to a stationary flatbed scanner. Since the body of a handheld scanner is small, a width that can be scanned at one time is narrow. To capture a large image exceeding a scanner width, the image must be dividedly captured a plurality of times, and merged. Or, there may be cases where a user dividedly scans an image a plurality of times although the image does not exceed a scanner width (since how to scan depends on a user, such a situation may occur).
Conventionally, there are several techniques for merging images that are dividedly captured a plurality of times. However, these techniques have a problem that a large memory capacity and a long time are required to merge full-color images. A throughput of a PC (Personal Computer: particularly a notebook computer, or a portable information processing device such as a PDA, a handheld PC, etc.) has been improving. However, also a data amount of an image has been increasing to enhance an image quality. Therefore, it is essential to reduce a memory capacity and a processing time.
A known merging technique for a panoramic photo, etc. reduces a processing time to some extent by limiting a merging plane to the right or the left with respect to an erect image.
However, with a handheld scanner, a user can read an image in any direction toward a paper sheet (FIGS. 1A, 1B, 2A, and 2B). Therefore, an input image is flipped to a mirror image (FIGS. 3A and 3B), and/or rotated depending on a capturing direction of the image. As a result, a long time is required to detect a position at which two images overlap.
Assume that a user performs first scanning with a handheld scanner from the top to the bottom of a drawing as shown in (a) of FIG. 4A, and also performs second scanning from the right to the left of the drawing as shown in (b) of FIG. 4. In this case, two image data (the first and the second images) input to a side of an information processing terminal (the above described PC (particularly, a notebook computer, or a portable information processing device such as a PDA, a handheld PC, etc.), which is connected to the handheld scanner, become those shown in FIG. 4B.
In such a case, the second image is first moved upward, downward, right, and left with respect to the first image as shown in FIG. 5A (as a matter of course, the second image may be inversely moved to upward, downward, right, or left with respect to the first image), and attempts are made to detect an overlapping position. Naturally, however, the attempts result in failure.
Accordingly, as shown in FIG. 5B, the second image is next rotated (90 degrees in this case) and moved upward, downward, right, or left with respect to the first image, and attempts are again made to detect an overlapping position in a similar manner as in the above described case. This time, an overlapping position can be detected when the second image is moved to the right side of the first image (FIG. 5C).
In this example, the overlapping position can be detected when the second image is rotated 90 degrees. However, an overlapping position cannot be detected in some cases unless the image is further rotated (by 180, 270 degrees). Additionally, if an overlapping position cannot be detected (that is, the image is flipped to a mirror image) although the image is rotated at all of rotation angles (0, 90, 180, and 270 degrees), attempts must be again made to detect an overlapping position at the rotation angles of 0, 90, 180, and 270 degrees after the second image is flipped to a mirror image.
As described above, a lot of memory capacity and processing time are required to detect an overlapping position of two images. Namely, since 4 determinations of whether or not an overlapping position is detected at respective rotation angles of an input image (0, 90, 180, and 270 degrees) must be made, and/or 2 determinations of whether or not an image is flipped to a mirror image must be also made. As a result, a lot of memory capacity and processing time are required to detect an overlapping position by making 8 determinations (4 determinations for the rotation angles×2 determinations for the presence/absence of mirror image flipping) (or 32 determinations if detections for upward, downward, right, and left positions shown in FIG. 5A are included).
A conventional solution to such a problem is to detect a move amount and a proceeding direction of a scanner by using dedicated hardware, and to use the detected amount and direction for image merging. With this method, however, the cost, the size, and the weight of a scanner increase due to an addition of the hardware for making such detection.
The same thing can be said also for a merging technique of a panoramic photo, if it is not assumed that a merging plane is limited to the right or the left with respect to an erect image (strictly speaking, this may not be a panoramic photo. However, the present invention targets not only image data read by a handheld scanner, but also image data that a user freely captures without being limited to the right or the left, for example, with a digital camera, a digital video camera, etc.
Furthermore, a joint is conventionally conspicuous in some cases.