IMAGING METHOD, POSITIONAL DISPLACEMENT AMOUNT CALCULATION METHOD, PROGRAM, RECORDING MEDIUM, AND IMAGING APPARATUS
By dividing images into overlapping fields and calculating positional shifts on-the-fly, the method addresses memory resource constraints and maintains real-time performance in positional deviation calculations.
Patent Information
- Application Number
- JP2021038058
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2021-03-10
- Publication Date
- 2024-10-30
- Estimated Expiration
- 2041-03-10
AI Technical Summary
Existing methods for calculating positional deviation between images require significant memory resources and can impair real-time performance due to large image sizes and the need for data transfer between memory and storage.
An imaging method that divides an object into multiple fields of view, acquires overlapping images, and calculates positional shifts on-the-fly, releasing memory when the required number of calculations is met, thereby reducing memory usage without affecting real-time processing.
This approach allows for accurate positional deviation calculation with limited memory resources, maintaining real-time performance by releasing unnecessary image data from memory, thus optimizing memory usage.
Smart Images

Figure 0007575972000001 
Figure 0007575972000002 
Figure 0007575972000003
Abstract
Description
[Technical field]
[0001] The present invention relates to an imaging technique for dividing an object to be imaged into a plurality of imaging fields of view and imaging the object. [Background technology]
[0002] When an image with a wider range than the imaging field of view of the imaging means is required, a composite image may be created from original images captured by dividing the object into multiple imaging fields of view. In such cases, adjacent imaging fields of view are partially overlapped when imaging, and the original images are synthesized while correcting the positional deviation between the images based on the image contents of the overlapping parts. For example, the technology described in Patent Document 1 calculates the amount of positional deviation between multiple images captured so that they partially overlap each other, and synthesizes the multiple images based on the result to obtain a single wide-angle image.
[0003] Furthermore, when an object to be imaged is divided into a plurality of imaging fields of view in this way, a method of dynamically determining the arrangement of images depending on the shape and physical properties of the object to be imaged in particular is described in, for example, Patent Document 2. [Prior art documents] [Patent documents]
[0004] [Patent Document 1] International Publication No. 2019 / 053839 [Patent Document 2] JP 2018-040569 A Summary of the Invention [Problem to be solved by the invention]
[0005] When performing positional deviation correction based on image contents using a processing unit such as a computer device, it is necessary to store the image data to be corrected in memory, but if the image size is large, a large amount of memory resources are required. Methods for avoiding the resulting memory resource shortage include, for example, compressing the image to reduce the amount of data, or saving the image data to a large-capacity storage device such as a hard disk drive.
[0006] However, in the case of misalignment correction based on a compressed image, the accuracy of calculating the amount of misalignment may be reduced. Also, in the case of a method of storing image data in a storage, when calculating the amount of misalignment, it is necessary to perform calculations while transferring the image data from the storage to a memory, which may result in a problem that the time required for calculation processing becomes long and real-time performance is impaired.
[0007] The present invention has been made in consideration of the above-mentioned problems, and aims to provide a technology in which an object to be imaged is divided into a plurality of imaging fields of view and imaged, which is capable of calculating the amount of positional deviation between images without impairing real-time performance even with limited memory resources. [Means for solving the problem]
[0008] One aspect of the present invention is an imaging method for dividing an object to be imaged into a plurality of imaging fields of view, and in order to achieve the above-mentioned object, the method includes the steps of: imaging the object to be imaged while making the imaging fields of view different from one another and while causing adjacent imaging fields of view to partially overlap, thereby obtaining a plurality of original images; storing, each time one of the original images is obtained, image data corresponding to that original image in a memory; and calculating the amount of positional deviation between the plurality of original images.
[0009] In addition, in order to achieve the above-mentioned object, another aspect of the present invention includes an image acquisition unit that acquires a plurality of original images by imaging an object with different imaging fields of view and with adjacent imaging fields of view partially overlapping, a memory that temporarily stores image data corresponding to the original images, and a positional deviation calculation unit that calculates the amount of positional deviation between the plurality of original images.
[0010] For each of the original images, a number of target images indicating the number of calculation target images which are other original images whose imaging field of view overlaps with the original image and are to be used to calculate the amount of positional deviation is set in advance based on the positional relationship between the imaging fields of view at the time of imaging. When a new original image is acquired, the amount of positional deviation between the original image and the acquired calculation target image whose image data is stored in the memory is calculated based on the image content of the overlapping portion. When the number of calculation target images for which the amount of positional deviation between the original image and the original image has been calculated reaches the number of target images, the image data corresponding to the original image is released from the memory.
[0011] In these inventions, for each of the original images, a target image number indicating the number of calculation target images which are other original images whose imaging field of view overlaps with the original image and are to be used to calculate the positional deviation amount is set in advance based on the positional relationship between the imaging fields of view at the time of imaging, and when a new original image is acquired, the positional deviation amount between the original image and the acquired calculation target image whose image data is stored in the memory is calculated based on the image content of the overlapping portion, and when the number of calculation target images for which the positional deviation amount has been calculated between the original image and the original image among the original images whose image data is stored in the memory reaches the target image number, the image data corresponding to the original image is released from the memory.
[0012] In the invention thus configured, when an image capturing target is divided into original images of a plurality of imaging fields and captured, for each original image, the number of other original images that are to be used for calculating the amount of positional deviation between the original image and the original image is preset as the "number of target images" based on the positional relationship between the imaging fields at the time of capturing the image. Then, the amount of positional deviation is calculated between each original image and a calculation target image that is to be used for calculating the amount of positional deviation between the original image and the original image.
[0013] In other words, this "number of target images" corresponds to the number of times each original image is applied to the positional deviation calculation process with another original image. Among the multiple original images acquired by imaging, when the number of calculation target images for which the positional deviation amount between the original image and the calculation target image reaches the "number of target images", it will not be used as a "calculation target image" in the calculation of the positional deviation amount thereafter. Therefore, it is not necessary to store the image data of the original image in memory. If such image data is released from the memory, that is, if other data is allowed to be written to the memory area on the memory occupied by the image data, it is possible to prevent unnecessary image data from putting a strain on the memory storage resources. For example, it is possible to delete the image data and store newly acquired image data.
[0014] In this way, in the present invention, for each original image obtained by dividing an object to be imaged by changing the imaging field of view, the number of other original images used to calculate the amount of positional deviation between the original image and the corresponding original image is obtained in advance as the number of target images. Then, when the number of other original images used to calculate the amount of positional deviation between the original image and the corresponding original image reaches the number of target images, the image data is released from the memory.
[0015] Therefore, it is not necessary to store all the original images in memory, and the memory capacity required for processing can be reduced. On the other hand, for images to be used in subsequent calculation processes, the image data is maintained in the memory, so that the real-time nature of the calculation process is not impaired.
[0016] Another aspect of the present invention is a position shift calculation method for dividing an object to be imaged into a plurality of imaging fields of view and calculating the amount of position shift between a plurality of original images imaged by partially overlapping adjacent imaging fields of view, and in order to achieve the above-mentioned object, the method includes a step of acquiring image data corresponding to the original images and storing it in a memory, and a step of calculating the amount of position shift between the plurality of original images.
[0017] Here, for each of the original images, a target image number indicating the number of calculation target images which are other original images whose imaging field of view overlaps with the original image and are to be subject to calculation of the positional deviation amount is set in advance based on the positional relationship between the imaging fields of view at the time of imaging, and the positional deviation amount between one of the original images and the acquired calculation target image whose image data is stored in the memory is calculated based on the image content of the overlapping portion, and when the number of calculation target images for which the positional deviation amount has been calculated between the original image and one of the original images whose image data is stored in the memory has reached the target image number, the image data corresponding to that original image is released from the memory.
[0018] Another aspect of the present invention is a program for causing a computer to execute each step of the above-described positional deviation calculation method, and a recording medium on which this program is non-temporarily recorded.
[0019] In the invention configured in this manner, like the above-mentioned invention, it is possible to delete unnecessary image data while retaining image data that should be stored in memory for calculating the amount of positional deviation, thereby reducing memory usage without impairing the real-time nature of the processing. Effect of the Invention
[0020] As described above, according to the present invention, for each of a plurality of original images, the number of other original images (number of target images) used to calculate the positional deviation between the original image and the original image is calculated in advance. Then, when the number of other original images that have been the subject of the calculation process reaches the number of target images, the image data of the original image is released from memory. In this way, it becomes possible to calculate the amount of positional deviation between images without impairing real-time performance even with limited memory resources. [Brief description of the drawings]
[0021] [Figure 1] 1 is a diagram showing a schematic configuration of a first embodiment of an imaging device according to the present invention. [Diagram 2] FIG. 13 is a diagram showing an example of allocation of imaging divided into a plurality of imaging fields of view. [Diagram 3] FIG. 2 is a diagram showing an example of an original image used as an example of the present embodiment. [Figure 4] 11 is a diagram showing the relationship between the order in which original images are captured and the original images that can be calculated; FIG. [Diagram 5] 4 is a timing chart showing the principle of the imaging process of the present embodiment. [Figure 6] 6 is a flowchart embodying the imaging process of FIG. 5. [Figure 7] 13 is a flowchart showing a modified example of the imaging process. [Figure 8] 13 is a flowchart showing two examples of a process for determining whether or not imaging retry is required. [Figure 9] 10 is a timing chart showing state changes of each part in the modified example. [Figure 10] FIG. 1 is a diagram showing an example of the configuration of an imaging device in which an imaging unit and an image processing unit are configured separately. [Figure 11] 4 is a flowchart showing the operation of the imaging unit. [Figure 12] 4 is a flowchart showing the operation of the image processing unit. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0022] First Embodiment Fig. 1 is a diagram showing a schematic configuration of a first embodiment of an imaging device according to the present invention. This imaging device 1 is a device for imaging a living sample such as cells held in a flat sample container 10 called a dish, which has an open top. A predetermined amount of liquid as a culture medium M is poured into the sample container 10, and cells cultured in this liquid under predetermined culture conditions become the subject of imaging by this imaging device 1. The culture medium may be one to which an appropriate reagent has been added, or may be one that gels after being poured in liquid form into the sample container 10.
[0023] In this embodiment, the imaging subject is a living specimen, but the imaging subject of the present invention is not limited to this. For example, the imaging subject may be a tissue slice or a pathological specimen supported on an appropriate carrier. In addition, the sample container may be a so-called well plate having a plurality of depressions called wells, and the imaging subject may be a living specimen supported in each well.
[0024] The present invention can also be applied to imaging industrial products, such as printed circuit boards, semiconductor chips or wafers, and display panels, on which regular patterns are formed, for the purpose of quality inspection and process evaluation.
[0025] The imaging device 1 includes a holder 11 for holding a sample container 10, an illumination section 12 arranged above the holder 11, an imaging section 13 arranged below the holder 11, and a control section 14 having a CPU 141 for controlling the operation of each of these sections. The holder 11 abuts against the peripheral portion of the lower surface of the sample container 10 to hold the sample container 10 in a substantially horizontal position.
[0026] The illumination unit 12 emits illumination light toward the sample container 10 held by the holder 11. A white LED (Light Emitting Diode), for example, can be used as a light source of the illumination light. A combination of the light source and an appropriate illumination optical system is used as the illumination unit 12. The illumination unit 12 illuminates the object to be imaged in the sample container 10 from above.
[0027] An imaging section 13 is provided below the sample container 10 held by the holder 11. In the imaging section 13, an imaging optical system is disposed directly below the sample container 10, and the optical axis of the imaging optical system is oriented vertically. Fig. 1 is a side view, and the up-down direction of the figure represents the vertical direction.
[0028] The imaging unit 13 captures an image of the imaging target in the sample container 10. Specifically, light emitted from the illumination unit 12 and incident on the liquid from above the sample container 10 illuminates the imaging target, and light transmitted downward from the bottom surface of the sample container 10 is incident on the light receiving surface of the imaging element 132 via an imaging optical system including an objective lens 131 of the imaging unit 13. An image of the imaging target formed on the light receiving surface of the imaging element 132 by the imaging optical system is captured by the imaging element 132. The imaging element 132 is an area image sensor having a two-dimensional light receiving surface, and for example, a CCD sensor or a CMOS sensor can be used.
[0029] The imaging unit 13 can be moved in the horizontal and vertical directions by a mechanical control unit 146 provided in the control unit 14. Specifically, the mechanical control unit 146 operates the drive mechanism 15 based on a control command from the CPU 141 to move the imaging unit 13 in the horizontal direction, whereby the imaging unit 13 moves in the horizontal direction relative to the sample container 10. In addition, focus adjustment is performed by moving in the vertical direction.
[0030] When moving the imaging unit 13 in the horizontal direction, the driving mechanism 15 moves the illumination unit 12 integrally with the imaging unit 13 as shown by the dotted arrow in the figure. That is, the illumination unit 12 is disposed so that its optical center substantially coincides with the optical axis of the imaging unit 13, and moves in conjunction with the imaging unit 13 when the imaging unit 13 moves in the horizontal direction. As a result, even when the imaging unit 13 moves relative to the sample container 10, the optical center of the illumination unit 12 is always positioned on the optical axis of the imaging unit 13, and the illumination conditions for the imaging object are kept constant at any position, making it possible to maintain good imaging conditions.
[0031] The image signal output from the imaging element 132 of the imaging unit 13 is sent to the control unit 14. That is, the image signal is input to an AD converter (A / D) 143 provided in the control unit 14 and converted into digital image data. The CPU 141 executes appropriate image processing based on the received image data.
[0032] The control unit 14 further has a memory 144 for temporarily storing image data and data being calculated, and a storage 145 for storing and saving programs to be executed by the CPU 141 and data generated by the CPU 141. The memory 144 can be accessed at high speed by the CPU 144, but has a smaller storage capacity than the storage 145. The storage 145 is, for example, a hard disk drive (HDD), and has a large storage capacity but a slower access speed than the memory 144. These are used according to the purpose. The CPU 141 calls and executes the control programs stored in the storage 145 to perform various calculation processes described later.
[0033] Additionally, the control unit 14 is provided with an interface (IF) unit 142. The interface unit 142 has a user interface function of receiving operation input from the user and presenting information such as processing results to the user, as well as a function of exchanging data with an external device connected via a communication line. To realize the user interface function, the interface unit 142 is connected to an input receiving unit 147 that receives operation input from the user and a display unit 148 that displays and outputs messages to the user, processing results, and the like.
[0034] The imaging field of view of the imaging unit 13 changes depending on the imaging magnification, but particularly in high-magnification imaging, the imaging field of view may be smaller than the bottom surface of the sample container 10. In order to image the entire sample container 10 in such a case, the range to be imaged is divided into a plurality of imaging fields of view and then imaged, and the plurality of original images thus obtained are synthesized by image processing to create a large-sized image.
[0035] Fig. 2 shows an example of the layout when a sample container is divided into a plurality of imaging fields. Fig. 2(a) shows an example of the image arrangement when a sample container 10 is divided into a plurality of imaging fields, and Fig. 2(b) shows the scanning movement path of the imaging unit 13 for imaging the sample container, more specifically, the trajectory of the optical axis of the imaging unit 13. For the following explanation, the coordinate axes are set so that the horizontal direction of the figure is the X direction and the vertical direction is the Y direction. The sample container 10 is held so that the bottom surface is horizontal, so the XY plane is a horizontal plane.
[0036] When the imaging field of view FV of the imaging unit 13 cannot cover the entire sample container 10, the sample container 10 is divided into a plurality of original images Im1 to Im16 and imaged as shown in Fig. 2(a). These original images Im1 to Im16 are stitched together by image processing after imaging to create a composite image It including the entire sample container 10. In order to enable smooth stitching between the original images and correction of mutual positional deviations, the original images are allocated so that adjacent original images have partial overlapping regions.
[0037] These original images are obtained by relatively scanning the imaging unit 13 along the bottom surface of the sample container 10 and capturing images multiple times during that time. Specifically, as shown by the arrows in FIG. 2(b), the imaging unit 13 is scanned along the bottom surface of the sample container 10 by combining the movement of the imaging unit 13 in the X direction and the Y direction, and the original images can be obtained by capturing images multiple times during that process. Black dots P1 to P16 in FIG. 2(b) indicate that imaging is performed when the optical axis of the imaging unit 13 is at the position of the black dot. Hereinafter, the position of the imaging unit 13 when imaging is performed in this manner is referred to as the "imaging position".
[0038] Specifically, the imaging unit 13 is moved in the (+X) direction to scan the sample container 10, and images are captured repeatedly at a predetermined timing. For example, an original image Im1 is captured at imaging position P1, and an original image Im2 is captured at imaging position P2. Similarly, an original image Im3 is captured at imaging position P3, and an original image Im4 is captured at imaging position P4, after which the imaging unit 13 is moved a predetermined pitch in the (+Y) direction.
[0039] Then, the imaging unit 13 moves in the (-X) direction, and captures images at imaging positions P8, P7, P6, and P5, respectively, to obtain original images Im8, Im7, Im6, and Im5, respectively. After the imaging unit 13 further moves in the (+Y) direction, it again moves in the (+X) direction to capture original images Im9, Im10, Im11, and Im12, and finally moves in the (-X) direction to capture original images Im16, Im15, Im14, and Im13. In this way, the arrangement of the original images does not necessarily match the imaging order.
[0040] By appropriately setting an imaging schedule that specifies the combination of imaging timing during scanning movement of the imaging unit 13 in the (+X) or (-X) direction and the feed pitch in the Y direction, it is possible to perform imaging according to the allocation of a given original image. Hereinafter, scanning movement in the X direction may be referred to as "main scanning movement," and scanning movement in the Y direction may be referred to as "sub-scanning movement."
[0041] In this example, the sample container 10 is divided into 16 imaging fields of view FV for imaging, but the allocation of imaging fields to the object to be imaged is not limited to this and can be arbitrary. If the relationship between the size of the object to be imaged and the imaging fields of view FV of the imaging unit 13 is known in advance, various arrangements of original images that cover the entire object to be imaged and that partially overlap each other can be considered.
[0042] The imaging process of this embodiment is described below for dividing an object to be imaged into a plurality of imaging fields of view, imaging the plurality of original images thus obtained, and finally synthesizing them into one to create an entire image. When synthesizing the images, correction is made for positional deviations between the original images that may occur during imaging. Specifically, the amount of relative positional deviation between two overlapping original images is calculated based on a comparison of the image contents of the overlapping parts, and the original images are joined together after correcting the positional deviation based on the calculation result. In this way, it is possible to obtain an entire image without unnatural seams.
[0043] As a method for calculating the amount of positional deviation, various known techniques can be applied, and the present embodiment is not particularly limited. For example, a pattern matching method can be applied in which an image of one overlapping part between overlapping original images is used as a template to search for a corresponding area in the other original image. In addition, a method using an optical flow estimation method may also be used.
[0044] In the above description, an example was taken in which a sample container 10 having a circular bottom surface is divided into a plurality of imaging fields of view FV, each of which is substantially square, and 16 original images Im1 to Im16 are acquired. In the following, the following example of original images will be used as a more general case.
[0045] Fig. 3 is a diagram showing an example of an original image used as an example of this embodiment. In the following, a total of 12 original images Im(1) to Im(12) will be used, each of which is rectangular and is captured by dividing it into four images in the X direction and three images in the Y direction as shown in Fig. 3(a). The positional relationship of these original images Im(i) (i = 1, 2, ..., 12) can be considered to correspond to the original images Im1 to Im12 shown in Fig. 2(a).
[0046] As described above, adjacent original images are captured so that they overlap each other, and the amount of misalignment between the original images is calculated based on the image contents of the overlapping parts. The arrows in FIG. 3(a) indicate the combination of original images that are the objects of calculation of the amount of misalignment. For example, for the image Im(1) in the upper left, the original image Im(2) adjacent to the right and the original image Im(5) adjacent to the bottom are the objects of calculation. In this way, the other original images that are the objects of calculation of the amount of misalignment for one original image are hereinafter referred to as "images to be calculated". For example, for the original image Im(6), the four original images Im(2), Im(5), Im(7), and Im(10) adjacent in the vertical and horizontal directions are the images to be calculated.
[0047] There is also partial overlap between diagonally adjacent original images, for example, original image Im(1) and original image Im(6). However, the area of the overlap is small and sufficient calculation accuracy cannot be obtained, so the positional deviation between original images in this positional relationship is not evaluated.
[0048] FIG. 3(b) is a diagram summarizing the relationship between each original image Im(i) and the corresponding calculation target image. In this way, for each original image Im(i), a calculation target image can be specified according to its arrangement, and the number of calculation target images is not uniform. The right column of FIG. 3(b) shows the number M(i) of calculation target images corresponding to each original image Im(i). Hereinafter, this number will be referred to as the "number of target images." For example, the calculation target images for original image Im(1) are original images Im(2) and Im(5), and the number of target images M(1) is 2. Also, for example, the calculation target images for original image Im(3) are original images Im(2), Im(4), and Im(7), and the number of target images M(3) is 3.
[0049] For any original image allocation, the number of target images can be set in the same manner as above. Specifically, the area occupied by each original image can be arranged on a two-dimensional coordinate plane according to the allocation at the time of image capture, thereby identifying the overlapping portion between the original images. Then, for one original image, other original images whose overlapping area with the original image is within a predetermined range suitable for positional deviation calculation processing are set as calculation target original images, and the number of such images is counted. Note that evaluation may be performed not only based on the area of the overlapping portion, but also based on the width of the portion, for example.
[0050] Fig. 4 is a diagram showing the relationship between the imaging order of the original images and the original images that can be calculated. As shown in Fig. 2(b), in an imaging mode in which the imaging unit 13 repeats scanning movement in the (+X) direction and scanning movement in the (-X) direction, the original images Im(1), Im(2), Im(3), and Im(4) are captured in this order by the first scanning in the (+X) direction. Then, the original images Im(8), Im(7), Im(6), and Im(5) are captured in this order by the next scanning in the (-X) direction. Then, the original images Im(9), Im(10), Im(11), and Im(12) are captured in this order by the second scanning in the (+X) direction.
[0051] Here, we consider the relationship between the original image obtained by sequentially capturing images in the above order and other original images (hereinafter referred to as "existing images") whose image data has already been captured in an earlier capture. More specifically, when a new original image is captured, we consider how much of the calculation target image is included in the existing image.
[0052] Immediately after the first original image Im(1) is captured, there is no existing image. On the other hand, after the second original image Im(2) is captured, the image data of the existing image Im(1) has already been saved, and these original images are each the calculation target image of the other. Therefore, it is possible to start calculating the amount of positional deviation between original image Im(1) and original image Im(2) at this point, without waiting for the acquisition of the other original image.
[0053] In this way, when a new original image is acquired, if other original images that are in a relationship with the original image as the calculation target image are included in the existing images, it is possible to calculate the positional deviation amount between those original images while taking the next image. In this way, since the positional deviation amount between each image has already been found when the imaging of all images has been completed, it is possible to quickly combine the original images after imaging, and it is possible to improve the real-time imaging performance.
[0054] The arrows (⇔) in Fig. 4(a) indicate that the previous and next images are in a relationship of being calculation target images. For example, after the original image Im(3) is captured, the original image Im(2) among the existing images is the calculation target image, so that the positional deviation amount can be calculated between the original images Im(2) and Im(3). The same can be considered for each of the following original images.
[0055] As an example, Figure 4(b) shows the state at the time when original image Im(6) was acquired. In the figure, original image Im(6), which was newly acquired by the immediately preceding image capture, is shown in a double solid line frame. On the other hand, original images Im(1) to Im(4), Im(7), and Im(8) shown in single solid line frames are existing images. Original images Im(5), Im(9) to Im(12) shown in dotted line frames are images that have not yet been acquired at this point.
[0056] The hatched arrows represent the combination of original images for which the amount of positional deviation can be calculated by acquiring a new original image Im(6). When the original image Im(6) is acquired, it becomes possible to calculate the amount of positional deviation between the original image Im(6) and the calculation target images Im(2) and Im(7) included in the existing images.
[0057] In the figure, the black arrows indicate combinations for which it is possible to calculate the amount of misalignment between existing images captured up to that point, while the dotted arrows indicate combinations for which it is not possible to start calculating the amount of misalignment at this point because at least one of the two original images that are the mutually-relevant images to be calculated has not yet been acquired.
[0058] Here, when focusing on original images Im(3) and Im(4), it is shown that all calculation target images for the original images have already been acquired. For example, calculation target images Im(2), Im(4), and Im(7) for original image Im(3) have already been acquired, and if the calculation process had started immediately when it became possible to calculate the amount of misalignment, the process would have been expected to have already ended. The same is true for original image Im(4). Therefore, the image data of original images Im(3) and Im(4) will not be used in the subsequent misalignment calculation process.
[0059] Furthermore, since original image Im(6) has been newly acquired, it becomes possible to newly calculate the amount of misalignment between original image Im(2). Once this calculation process is completed, the image data of original image Im(2) will no longer be used in the subsequent misalignment calculation process. In this way, it is not necessarily necessary to store image data for existing images for which calculation of the amount of misalignment between all calculation target images has been completed.
[0060] In order to ensure high speed processing in calculating the amount of misalignment, it is desirable to store image data of the two original images to be calculated in memory 144 that can be accessed at high speed. Since high-definition image data in particular has a large amount of data, it is common to store and save it in storage 145 with a large storage capacity. However, if data required for calculating the amount of misalignment is read from storage 145 each time, the processing time will be long.
[0061] On the other hand, although the memory 144 allows high-speed access, its storage capacity is smaller than that of the storage 145, and it may not be possible to store image data of all of the original images in the memory 144. It is also possible to store reduced image data of the original images in the memory 144, but in that case, there is a risk of a decrease in the accuracy of calculation of the amount of positional deviation.
[0062] In the imaging process of this embodiment, as described above, as the calculation process of the amount of positional deviation proceeds, image data that does not need to be stored is generated, and this is utilized to reduce the amount of image data to be stored in the memory 144. That is, the calculation process of the amount of positional deviation between an existing image, which has become possible by acquiring an original image, is executed in parallel with other imaging, and image data that will not be used in the calculation process thereafter is released from memory to reduce the amount of data. This makes it possible to accept image data generated by new imaging even with limited memory resources.
[0063] More specifically, a counter C(i) is introduced for counting the number of calculation target images for which the calculation of the positional deviation between each original image Im(i) and the original image has been completed. The initial value of the counter C(i) is 0, and when the calculation process of the positional deviation between one original image Im(i) and another original image Im(j) (j=1, 2, ..., 12, where i ≠ j) is completed, the values of the counters C(i) and C(j) are incremented by one each.
[0064] For each original image C(i), the number of target images M(i) is determined in advance. As described above, the number of target images M(i) represents the number of times that original image Im(i) is applied to the positional deviation calculation process between other original images. Therefore, when the value of counter C(i) reaches the number of target images M(i), it can be said that the calculation process between all calculation target images is completed, and the image data of original image Im(i) will not be used in the subsequent positional deviation calculation process. In other words, the image data can be released from the memory.
[0065] Here, the phrase "releasing image data from memory" means that the memory is substantially freed from the need to store the image data as valid data. Therefore, for example, the image data may be deleted from the memory, or, even if no data erasure is performed, the memory area allocated for the image data may be allowed to be overwritten with other data.
[0066] 5 is a timing chart showing the principle of the imaging process of this embodiment. This diagram shows the relationship between the imaging timing of each original image Im(i) (top), the period during which the acquired image data is stored in memory (middle), and the change in the count value of the counter C(i) (bottom). As described above, for each original image Im(i), the number of target images M(i) is predetermined according to the allocation at the time of imaging, and the initial value of the counter C(i) is 0.
[0067] In order to avoid complicating the explanation and to facilitate understanding, the subscripts of the times T1 to T12, which indicate the timing of capturing images, correspond to the numbers of the captured original images. Therefore, it should be noted that the order of the subscripts does not necessarily match the order of the times.
[0068] At time T1 when the imaging unit 13 scans in the (+X) direction and reaches imaging position P1 (FIG. 2(b)), an original image Im(1) is captured, and image data of a predetermined size corresponding to this is written to memory 144. The image data is held in memory 144 until a release timing, which will be described later, arrives, and occupies a predetermined area in the memory space. The same applies to other image data acquired in subsequent imaging.
[0069] At time T2 when the imaging unit 13 reaches the imaging position P2, the original image Im(2) is captured, and image data of a predetermined size corresponding to the captured image is written to the memory 144. At this point, it becomes possible to perform a positional deviation calculation process between the original images Im(1) and Im(2). As a result of the positional deviation calculation process being performed between these images, the counters C(1) and C(2) are incremented from 0 to 1, respectively.
[0070] When original image Im(3) is acquired at time T3, the corresponding image data is written to memory 144. At this point in time, it becomes possible to perform positional shift calculation processing between original images Im(2) and Im(3), and as a result of the positional shift calculation processing being performed, counter C(2) is incremented from 1 to 2, and counter C(3) is incremented from 0 to 1.
[0071] Similarly, when original image Im(4) is acquired at time T4, its corresponding image data is written to memory 144, making it possible to perform positional deviation calculation processing between original images Im(3) and Im(4). By performing positional deviation calculation processing, counter C(3) is incremented from 1 to 2, and counter C(4) is incremented from 0 to 1.
[0072] After the imaging unit 13 is stepped in the (+Y) direction, it starts scanning in the (-X) direction and reaches the imaging position P8 at time T8, at which point the original image Im(8) is acquired and the image data is written to the memory 144. At this time, a positional deviation calculation process is executed between the original images Im(4) and Im(8). This causes the counter C(8) to be incremented from 0 to 1.
[0073] The counter C(4) is also incremented from 1 to 2, and this count value 2 is equal to the number of target images M(4) determined for the original image Im(4). In the figure, a circle attached to a number indicates that the count value C(i) is equal to the number of target images m(i). At this time, the original image Im(4) is in a state where the positional deviation calculation process has been completed with respect to both of the original images Im(3) and Im(8), which are the calculation target images. Therefore, the image data of the original image Im(4) can be released from the memory 144, that is, it can be made to be in a state where it does not substantially exist in the memory 144. In particular, if the memory is released before the time T7 at which the next original image Im(7) is captured, it becomes possible to store the image data of the original image Im(7) in the area where the image data of the original image Im(4) was stored.
[0074] When the original image Im(7) is acquired at time T7, a positional deviation calculation process is executed between the original image Im(3) and the original image Im(8). As a result, the counters C(3) and C(8) are incremented by one each, and the count value 3 of the counter C(3) is equal to the number of target images M(3) of the original image Im(3). Therefore, the image data of the original image Im(3) can be released from the memory 144. In addition, since the positional deviation calculation process is executed between the original image Im(7) and the two calculation target images, the count value of the counter C(7) increases from 0 to 2. This may be considered as the counter C(7) being incremented by one each in the calculation process between the original image Im(3) and the calculation process between the original image Im(8).
[0075] Similarly, at time T6, the image data for original image Im(2), at time T5, the image data for original image Im(1), at time T9, the image data for original image Im(5), at time T10, the image data for original images Im(6) and Im(9), and at time T11, the image data for original images Im(7) and Im(10) can be released from memory 144. Then, after time T12 when all imaging is completed, the mutual positional deviation calculation process is performed for the remaining original images Im(8), Im(11), and Im(12), and finally all image data can be released from memory 144.
[0076] In this way, 12 original images Im(1) to Im(12) are captured in sequence, and the image data is written to memory 144. After capturing one image, positional deviation calculation processing is performed for all possible combinations, and image data that is no longer needed is released from memory 144. Therefore, as is clear from the figure, the amount of image data that simultaneously exists in memory 144 is a maximum of five images.
[0077] From this, it can be said that the memory resources required for performing positional deviation calculation processing for 12 original images in real time can be reduced to the amount required for 5 images according to this embodiment. Therefore, it is not necessary to prepare a capacity in memory 144 for storing all the original images, and processing can be performed faster than when image data is read from storage 145.
[0078] FIG. 6 is a flowchart that embodies the imaging process of FIG. 5. This process is realized by the CPU 141 causing each unit of the device to perform a predetermined operation based on a control program created in advance. First, the layout of the original image at the time of imaging is determined (step S101). If the object to be imaged is known in advance, the layout can also be determined in advance. Furthermore, the layout may be dynamically determined based on the relationship between the size of the object to be imaged and the imaging field of view. As a specific method for this, for example, the technology described in Patent Document 2 can be applied.
[0079] For each of the original images Im(i) whose allocation has been determined in this manner, the number of target images M(i) is determined (step S102), and a counter C(i) is initialized to an initial value of 0 (step S103). Here, the variable i is a natural number whose upper limit is the number of original images determined by allocation.
[0080] Then, scanning movement of the imaging unit 13 is started based on an imaging schedule that specifies the direction of main scanning movement, the movement speed, the pitch of sub-scanning movement, imaging timing, etc., which are determined according to the allocation of the original image (step S104). Every time the imaging unit 13 reaches an imaging position (step S105), imaging is performed by the imaging unit 13, and the acquired image data is saved (step S106).
[0081] In this imaging process, a process of calculating the amount of positional deviation between original images is executed based on the image data stored in memory 144 as described above. However, in this process, the amount of relative positional deviation between the original images is calculated, but no correction of positional deviation between the original images is performed based on the calculation result. After all original images are acquired and the amount of positional deviation between them is calculated, a process of synthesizing the images is performed. For this synthesis process, it is necessary to store image data of all original images.
[0082] Therefore, the acquired image data is written to both the memory 144 and the storage 145. The image data temporarily stored in the memory 144 is used for the positional deviation amount calculation process, and is deleted when it is no longer necessary. On the other hand, in terms of the purpose of imaging, it is considered natural that the acquired image data should be stored for a longer period of time. Therefore, the image data is also stored and saved in the storage 145. The image data stored in the storage 145 is used for image synthesis using the positional deviation amount calculation result.
[0083] When one original image is acquired in this way, a calculation target image is searched for among existing images whose image data are stored in memory 144, and if a match is found, a positional deviation calculation process is executed (step S107). As the positional deviation calculation process, various known techniques capable of identifying areas correlated between two images, such as the above-mentioned pattern matching process and optical flow method, can be used.
[0084] The count value of counter C(i) is incremented for the original image used in the positional deviation calculation process (step S108). Then, counter C(i) is compared with the corresponding number of target images M(i) (step S109), and if the two are equal, the image data of the corresponding original image Im(i) is released from memory 144 (step S110). The process returns to step S105 and is repeated until imaging of all original images is completed (step S111).
[0085] When all the images have been captured, the original images are combined to create an entire image It (FIG. 2(a)) (step S112). At this time, correction based on the calculated amount of positional deviation is applied to align the original images. This makes it possible to obtain a smooth image without unnatural seams. It is not essential to combine all the original images into one entire image, and it is also possible to create an image by combining only adjacent parts of a plurality of original images, for example.
[0086] The image processing at this time is a process of stitching together a plurality of original images while adjusting the positions by an amount corresponding to the already obtained positional deviation amount, and is performed based on the image data of all the original images stored in the storage 145. It is also possible to execute such an image synthesis process while the imaging device 1 is imaging a different object to be imaged or a different area of the same object to be imaged.
[0087] However, in scanning imaging in which imaging is performed while scanning and moving the imaging unit and the object to be imaged relative to one another, it is possible that the image acquisition or storage may fail for some reason. In such cases, the main scanning movement that was performed when the image acquisition failed may be repeated to attempt imaging. This is referred to below as "retry imaging."
[0088] In the above embodiment, the positional deviation calculation process is performed each time an original image is captured, and unnecessary image data is released from memory based on the counter C(i) and the number of target images M(i). Therefore, a situation may occur where the necessary image data does not remain in memory when retrying imaging becomes necessary. The modified example described below can also handle such a case where retrying imaging is expected.
[0089] Many of the processing steps in the modified image capture process described below are common to the image capture process described above (FIG. 6). Therefore, the same numbers are used for the processing steps common to FIG. 6, and detailed explanations are omitted. Also, to avoid cluttering the diagram, descriptions of steps S101 to S103 are omitted.
[0090] Fig. 7 is a flow chart showing a modified example of the imaging process. In the process of this modified example, the process contents up to step S108 are the same as those shown in Fig. 6. However, after that, when the main scanning movement of one line is completed (step S121), it is determined whether or not retrying imaging is necessary (step S122). If the original image is acquired without any loss and retrying imaging is not necessary (NO in step S122), the process from step S109 onwards is executed, and as a result, the operation is the same as the process in Fig. 6.
[0091] Here, "one line" is a concept that refers to a series of continuous main scanning movements in the (+X) direction or (-X) direction of the imaging unit 13. For example, in the example shown in Fig. 2(b), the scanning movement in the (+X) direction that passes through the imaging positions P1 to P4 in order, and the scanning movement in the (-X) direction that passes through the imaging positions P8 to P5 in order, each correspond to a scanning movement of "one line."
[0092] Fig. 8 is a flow chart showing two examples of the process of determining whether or not a retry of imaging is required. In the first example shown in Fig. 8(a), when a main scanning movement of one line is completed, the number of images acquired in the scanning movement is evaluated (step S201), and if the number does not match the number planned in advance (NO in step S202), it is determined that a retry of imaging is required (step S203). On the other hand, if the number of acquired images matches the planned number (YES in step S202), it is determined that a retry of imaging is not required (step S204). It is preferable that this determination of necessity is made before the sub-scanning movement of the imaging unit 13 is performed.
[0093] In the second example shown in Fig. 8(b), the necessity of retrying imaging is judged not by the number of images for one line to be acquired, but by whether the amount of data of the acquired images has reached the required amount (steps S211, S212). Apart from this difference in the judgment criteria, the processing content is the same as in the first example.
[0094] 7, if it is determined that imaging retry is necessary (YES in step S121), the image data acquired during the main scanning movement and the calculation result of the positional deviation amount using the image data are discarded (step S122), and the counter C(i) updated during this time is corrected to the original value (step S123). Then, the imaging schedule is corrected to perform imaging retry (step S124), and the process returns to step S105. As a result, imaging is resumed based on the corrected imaging schedule.
[0095] In the retry imaging, the imaging unit 13 is moved in the main scanning direction to perform imaging again without moving in the sub-scanning direction. The imaging schedule at this time can be, for example, a mode in which the main scanning movement of the line where the acquisition of the original image failed is repeated again. In this case, a major rearrangement of the imaging schedule is not necessary, but the imaging unit 13 needs to be moved to return to the position at the start of the main scanning movement. On the other hand, if the direction of the main scanning movement is reversed, for example, when imaging fails with scanning movement in the (+X) direction, retry imaging is performed with scanning movement in the (-X) direction, no unnecessary movement occurs, but the imaging schedule will change significantly, for example, the imaging order of the next line and after will need to be changed. In either mode, retry imaging is possible.
[0096] In this modified example, the necessity of retry imaging is determined when scanning imaging for one line is completed. Then, when it is determined that retry imaging is necessary, the process based on the erroneous data is reset and then retry imaging is performed. Then, the release of unnecessary image data from the memory is performed after it is determined that retry imaging is not necessary. Therefore, even if retry imaging is necessary, the image data necessary for the positional deviation amount calculation process at that time remains in the memory. More specifically, each part is returned to the state before scanning imaging of the line that requires retry imaging is started, and the state is the same as if scanning imaging of the line had not been performed. Therefore, when it becomes possible to calculate the positional deviation amount based on the image data newly acquired by retry imaging, the calculation process can be performed immediately.
[0097] Fig. 9 is a timing chart showing the state changes of each part in this modified example. As can be seen by comparing with Fig. 5, in this modified example, even when the count value of counter C(i) reaches the number of target images M(i), the image data is not immediately released from the memory, but is released from the memory when scanning and imaging of one line is completed and it is determined that imaging retry is not necessary.
[0098] For this reason, although the amount of image data that should be stored in memory 144 at the same time increases to a maximum of eight original images, even if a retry of image capture is required, it is possible to execute the positional deviation calculation process using the image data newly acquired in the retry of image capture and the image data of the existing images stored in memory 144.
[0099] In the above modification, a process (steps S121 and S122) for determining whether or not retry imaging is required after scanning imaging for one line is completed is added between steps S108 and S109. Therefore, regardless of whether retry imaging is required, the counter C(i) is updated, and if retry imaging is required, the counter C(i) needs to be corrected. Instead, if steps S121 and S122 are provided between steps S107 and S108, the update of the counter C(i) itself will not be performed if retry imaging is required. In this case, it is possible to omit the counter correction process in step S124 while obtaining the same effect as the above modification.
[0100] It is also possible to arrange the determination of whether or not retry imaging is necessary between steps S106 and S107. However, in this case, the positional deviation amount calculation process cannot be started until scanning and imaging of one line is completed, which is not effective in terms of ensuring real-time imaging.
[0101] <Second embodiment> The imaging device 1 of the first embodiment described above has an imaging function and an image processing function by itself. However, as in the second embodiment described next, this type of imaging device may be realized by combining an imaging unit having an imaging function and a minimum control function for operating the imaging function with an image processing unit that does not have an imaging function but has a high-level arithmetic processing function.
[0102] 10 is a diagram showing an example of the configuration of an imaging device in which an imaging unit and an image processing unit are separately configured. In this embodiment, the same components as those in the first embodiment (FIG. 1) are denoted by the same reference numerals, and detailed explanations are omitted.
[0103] In the imaging device 2 of this embodiment, the main body of image processing that requires advanced calculation functions is the image processing unit 22, which is separate from the imaging unit 21. The image processing unit 22 may be a dedicated device equipped with dedicated hardware, or may be a general-purpose processing device such as a personal computer or a workstation with a control program for realizing the image processing function. In other words, a general-purpose computer device can be used as the image processing unit 22 of this imaging device 2. When a general-purpose processing device is used, it is sufficient for the imaging unit 21 to have the minimum control function required to operate each part such as the imaging section 13, and an image memory for storing image data for one original image.
[0104] The imaging unit 21 includes a controller 211 for controlling the operation of each part of the imaging unit 21, an AD converter 213 for converting an image signal output from the imaging section 13 into digital image data, an image memory 214 for temporarily storing image data, a mechanical control section 216 for controlling the driving mechanism 15, and an interface section 218. The image memory 214 only needs to have a storage capacity for at least one original image. The interface section 218 has a function for communicating various types of information with the image processing unit 22. The function of the mechanical control section 216 is equivalent to that of the mechanical control section 146 provided in the first embodiment.
[0105] The image processing unit 22 has a CPU 221 that executes various control programs, a memory 224 for temporarily storing image data and data being calculated, and a storage 225 for storing and saving the programs to be executed by the CPU 221 and data generated by the CPU 221. The functions of the memory 224 and the storage 225 are equivalent to the functions of the memory 144 and the storage 145 in the first embodiment. In addition, it is preferable that the image processing unit 22 is provided with an image processing unit 223 as a processor specialized for various image processing calculations, but the CPU 221 may also have this function.
[0106] Furthermore, the image processing unit 22 is provided with an interface section 222 that performs various communications with the imaging unit 21. The interface section 222 is connected to an input receiving section 227 that receives operation input from the user, and a display section 228 that displays and outputs messages to the user, processing results, and the like, and these functions are equivalent to the corresponding configurations in the first embodiment.
[0107] In the imaging device 2 configured in this manner, imaging processing is realized by cooperation between the imaging unit 21 and the image processing unit 22. Specifically, the CPU 221 provided in the image processing unit 22 executes a control program prepared in advance to control each part of the imaging unit 21 and the image processing unit 22 to perform a predetermined operation.
[0108] The imaging unit 21 operates according to an imaging schedule given by the image processing unit 22 to capture an image of an object to be imaged. Image data generated by imaging is stored in the image memory 214, and when image data corresponding to one original image is acquired, the image data is transferred to the image processing unit 22. In other words, the imaging unit 21 does not perform image processing, and only has a function of capturing an image of an object to be imaged and outputting image data corresponding to the original image thus obtained.
[0109] 11 is a flowchart showing the operation of the imaging unit. The imaging unit 21 receives an imaging schedule transmitted from the image processing unit 22 (step S301), and executes scanning movement of the imaging section 13 in response to the imaging schedule (step S302). Then, the imaging section 13 captures an image when it reaches an imaging position specified in the imaging schedule, and transmits the obtained image data to the image processing unit 22 (steps S303 and S304).
[0110] When scanning imaging for one line is completed (step S305), it is determined whether or not an imaging retry instruction has been sent from the image processing unit 22 (step S306). If there is no imaging retry instruction (NO in step S306), the process returns to step S303 and repeats the above process until all imaging specified by the imaging schedule is completed (step S307).
[0111] On the other hand, if a retry imaging instruction has been issued (YES in step S306), the process returns to step S301, and imaging is continued by receiving a new imaging schedule provided by the image processing unit 22. In this manner, the imaging unit 21 operates subordinately in response to the control command provided by the image processing unit 22, and captures an image of the imaging target.
[0112] Fig. 12 is a flowchart showing the operation of the image processing unit. In the image processing unit 22, similarly to the imaging process (Fig. 6) in the first embodiment, allocation of original images at the time of imaging (step S401), determination of the number of target images M(i) (step S402), and initialization of counter C(i) (step S403) are performed. Then, an imaging schedule formulated according to the allocation result is transmitted to the imaging unit 21 (step S404).
[0113] When image data for one original image transmitted from the imaging unit 22 in accordance with the transmitted imaging schedule is received (step S405), the image data is stored in the memory 224 and the storage 225 (step S406), as in the first embodiment. Then, a calculation target image is searched for among the existing images stored in the memory 224, and if a corresponding existing image is found, a calculation process for the amount of positional deviation is executed. As in the first embodiment, for the original image Im(i) used in the calculation process, the count value of the corresponding counter C(i) is incremented (step S408).
[0114] Then, as in the modified example of the first embodiment, when scanning imaging for one line is completed (step S409), it is determined whether or not retry imaging is required (step S410). The criteria for this determination are the same as those in the first embodiment. If retry imaging is not required (NO in step S410), the value of the counter C(i) corresponding to each original image Im(i) is compared with the number of target images M(i), and if they match, the image data is released from the memory 224 (steps S411 to S412). The process from step S405 is repeated until the process is completed for all original images (step S413). When all image data is received and the positional deviation amount calculation process is completed, image synthesis is performed based on the result and the image data of each original image stored in the storage 225 (step S414).
[0115] On the other hand, if it is determined that imaging retry is necessary (YES in step S410), similarly to the modified example of the first embodiment, the image data acquired by scanning the line and the calculation result of the amount of positional deviation based on the image data are discarded (step S421), and the counter C(i) is corrected (step S422). Furthermore, the imaging schedule is corrected to execute imaging retry (step S423), and an imaging retry instruction is sent to the imaging unit 21 (step S424).
[0116] A new imaging schedule is transmitted to the imaging unit 21 that has received the imaging retry instruction (step S404), so that the imaging unit 21 can perform imaging operations according to the corrected imaging schedule. In this way, the imaging unit 21 and the image processing unit 22, which are configured as separate entities, can cooperate to execute imaging processing similar to that of the imaging device 1 of the first embodiment.
[0117] As with the modified example of the first embodiment, the second embodiment assumes that there is a possibility that retry imaging may be required when scanning and imaging for one line is completed. However, as with the first embodiment, it is of course possible to configure the processing flow without making this assumption.
[0118] Also, in this embodiment, the image processing unit 22 transmits an imaging schedule to the imaging unit 21, and the imaging unit 21 executes the imaging schedule. Alternatively, for example, the image processing unit 22 may execute the imaging schedule and give control commands such as scanning movement commands and imaging commands to the imaging unit 21 at the required timing. In this case, the imaging unit 21 only needs to have a function of operating the illumination unit 12 and the imaging unit 13 in response to the control commands from the image processing unit 22.
[0119] The imaging device 2 of this embodiment combines an existing imaging unit 21 that does not have advanced calculation functions with an image processing unit 22, which is a general-purpose computer device with a general hardware configuration, and implements a program according to the present invention in the computer device, thereby providing new functions that are not available in existing devices.
[0120] <Other> As described above, in the imaging device 1 of the first embodiment, the imaging section 13 functions as the "image acquisition section" of the present invention. Also, the CPU 141 provided in the control section 14 functions as the "positional deviation amount calculation section" of the present invention, and the memory 144 functions as the "memory" of the present invention. On the other hand, in the imaging device 2 of the second embodiment, the imaging unit 21 functions as the "image acquisition section" of the present invention. Also, the CPU 221 and the image processing section 223 of the image processing unit 22 function as the "image processing section" of the present invention, and the memory 224 functions as the "memory" of the present invention.
[0121] The present invention is not limited to the above-mentioned embodiment, and various modifications can be made without departing from the spirit of the present invention. For example, among the image capture processes in the above-mentioned embodiment, image processes that are not directly related to image capture can be realized independently as a positional deviation amount calculation process using acquired image data. Such processes do not depend on specific hardware resources, and can be put to practical use as, for example, a program executable by a general-purpose computer device, or as a computer-readable recording medium on which the program is non-temporarily recorded.
[0122] The above-mentioned allocation of original images is merely an example, and should be set appropriately according to the purpose and in accordance with the spirit of the present invention. For example, the present invention can be effectively applied to an embodiment in which the allocation of original images to an object to be imaged is dynamically set, as in the technology described in Patent Document 2.
[0123] In addition, the imaging device of the above embodiment has an area image sensor as an imaging element, and the imaging unit 13 scans and moves relative to the imaging target to capture an original image intermittently. In addition, the present invention is also effective in an imaging device using, for example, a linear image sensor as an imaging element. In this case, scanning and capturing images are performed with the direction intersecting the longitudinal direction of the linear image sensor as the main scanning direction, so that a strip-shaped original image extending long in the main scanning direction can be obtained. Then, capturing images while moving the linear image sensor in the sub-scanning direction can be obtained, so that multiple original images with different imaging fields in the sub-scanning direction can be obtained. The present invention can be applied to the purpose of calculating the positional deviation amount between these original images.
[0124] As described above by way of example of a specific embodiment, in the imaging method according to the present invention, for example, for each original image, the number of calculation targets for which the calculation of the positional deviation amount between the original image and the original image is performed is counted, and the counting result is compared with the number of target images to determine whether or not to release image data from memory. With such a configuration, the number of times that the positional deviation amount is calculated is essentially counted, and it is thereby possible to determine whether or not the original image is to be used in the subsequent positional deviation amount calculation process.
[0125] Also, for example, a step of synthesizing a plurality of original images based on the amount of positional deviation can be further provided. With this configuration, it is possible to create a smooth synthesized image without unnatural seams.
[0126] In addition, for example, multiple original images can be obtained by capturing images multiple times while moving the image capturing unit capturing the original images and the object to be captured relatively. In such capturing images, positional deviation between the original images may occur due to positional fluctuation during the movement or deviation in the image capturing timing, but by applying the present invention, it is possible to calculate and correct the amount of positional deviation.
[0127] In this case, for example, a scanning and imaging operation in which an image is captured a predetermined number of times while moving the imaging unit relative to the image target in a predetermined main scanning direction may be performed multiple times at different positions in a sub-scanning direction intersecting with the main scanning direction, and when the number of original images acquired by one scanning and imaging operation and stored in the memory with the image data matches the predetermined number, the image data may be released from the memory. With this configuration, even if image data is lost for some reason during one scanning and imaging operation, the image data acquired up to that point remains in the memory at this point, so that the image data required for the calculation process is prevented from being erased.
[0128] Furthermore, in this case, if the number of original images acquired by one scanning and imaging operation and stored in memory does not match the predetermined number, the scanning and imaging operation may be performed again at the same position in the sub-scanning direction, allowing the processing to be continued without delay using the newly acquired image data. [Industrial Applicability]
[0129] This invention can be applied to all technologies that divide an object into multiple imaging fields of view and capture the images, and is particularly suitable for applications that require grasping the positional deviation between the original images captured in the divided fields of view. For example, this invention is effective for the purpose of synthesizing multiple original images to create a single final image. [Explanation of symbols]
[0130] 1,2 Imaging device 11 Sample container 13 Imaging unit (image acquisition unit) 21 Imaging unit (image acquisition unit) 22 Image processing unit (image processing section) 141,221 CPU (image processing unit) 144,224 Memory
Claims
1. 1. An imaging method for dividing an imaging object into a plurality of imaging fields of view and imaging the divided objects, acquiring a plurality of original images by imaging the object with the imaging fields of view different from one another and with adjacent imaging fields of view partially overlapping; Each time one of the original images is acquired, image data corresponding to the original image is stored in a memory; calculating a positional deviation amount between the plurality of original images; Equipped with a number of target images indicating the number of calculation target images, which are other original images whose imaging fields of view overlap with the original image and are to be used for calculating the amount of positional deviation, is set in advance based on a positional relationship between the imaging fields of view at the time of imaging, for each of the original images; When the original image is newly acquired, a positional deviation amount between the original image and the acquired calculation target image whose image data is stored in the memory is calculated based on image contents of an overlapping portion between the original image and the calculation target image; an imaging method, in which, for an original image whose image data is stored in the memory, when the number of calculation target images for which the amount of positional deviation between the original image and the calculation target image has been calculated reaches the number of target images, the image data corresponding to the original image is released from the memory.
2. 2. The imaging method according to claim 1, further comprising the steps of: counting the number of calculation target images for which the amount of positional deviation between each of the original images has been calculated and the original image; and comparing the counting result with the number of target images to determine whether or not to release the image data from the memory.
3. The imaging method according to claim 1 , further comprising the step of combining the plurality of original images based on the amount of positional deviation.
4. 4. The imaging method according to claim 1, further comprising the step of capturing an image multiple times while moving an imaging section that captures the original image and the object to be imaged relatively to obtain the multiple original images.
5. a scanning and imaging operation for performing imaging a predetermined number of times while moving the imaging unit relative to the imaging target in a predetermined main scanning direction, the scanning and imaging operation being performed a plurality of times at different positions in a sub-scanning direction intersecting with the main scanning direction; 5. The imaging method according to claim 4, further comprising the step of releasing the image data from the memory when the number of original images acquired by one scanning imaging operation and having the image data stored in the memory matches the predetermined number.
6. 6. The imaging method according to claim 5, further comprising the step of: re-executing the scanning and imaging operation at the same position in the sub-scanning direction when the number of original images acquired by one scanning and imaging operation and having the image data stored in the memory does not match the predetermined number of times.
7. A position shift calculation method for calculating a position shift amount between a plurality of original images captured by dividing an object to be imaged into a plurality of imaging fields of view and allowing adjacent imaging fields of view to partially overlap each other, comprising the steps of: obtaining image data corresponding to the original image and storing it in a memory; calculating a positional deviation amount between the plurality of original images; Equipped with a number of target images indicating the number of calculation target images, which are other original images whose imaging fields of view overlap with the original image and are to be used for calculating the amount of positional deviation, is set in advance based on a positional relationship between the imaging fields of view at the time of imaging, for each of the original images; Calculating a positional deviation amount between one of the original images and the acquired calculation target image, the image data of which is stored in the memory, based on image contents of an overlapping portion between the original image and the acquired calculation target image, the image data of which is stored in the memory, a position shift calculation method in which, for an original image whose image data is stored in the memory, when the number of calculation target images for which the position shift amount between the original image and the calculation target image has been calculated reaches the number of target images, the image data corresponding to the original image is released from the memory.
8. A program for causing a computer to execute each step according to claim 7.
9. A computer-readable recording medium on which the program according to claim 8 is non-transitoryly recorded.
10. an image acquisition unit that acquires a plurality of original images by capturing images of an object to be imaged with different imaging fields of view and with adjacent imaging fields of view partially overlapping each other; a memory for temporarily storing image data corresponding to the original image; a positional deviation amount calculation unit that calculates a positional deviation amount between the plurality of original images; Equipped with The positional deviation calculation unit a number of target images indicating the number of calculation target images, which are other original images whose imaging fields of view overlap with the original image and are to be used for calculating the amount of positional deviation, is set in advance based on a positional relationship between the imaging fields of view at the time of imaging, for each of the original images; When the original image is newly acquired, a positional deviation amount between the original image and the acquired calculation target image whose image data is stored in the memory is calculated based on image contents of an overlapping portion between the original image and the calculation target image; An imaging device that, among the original images whose image data is stored in the memory, when the number of calculation target images for which the amount of positional deviation between the original image and the calculation target image has been calculated reaches the number of target images, releases the image data corresponding to the original image from the memory.
Citation Information
Patent Citations
Image compositing device and its method
JP1999112790A
Device, method, and program for processing information, and recording medium therefor
JP2013068706A
Image creation device and image creation method
JP2017068302A
Picked-up image arrangement determining method, image pick-up method, and image pick-up apparatus
JP2018040569A
Information processing apparatus, information processing method, program, and recording medium
US20130070970A1
