Imaging inspection method and imaging inspection apparatus
The image inspection system addresses discrepancies in image matching by calculating and comparing luminance and coordinate values of a pattern array, ensuring accurate identification of individual articles by correcting imaging device position and brightness.
Patent Information
- Application Number
- JP2024060041
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2024-04-03
- Publication Date
- 2025-07-15
- Estimated Expiration
- 2040-04-06
AI Technical Summary
Existing image inspection methods fail to accurately identify individual articles due to discrepancies caused by variations in shooting conditions, such as position and inclination of the imaging device, leading to incorrect matching of reference and comparison images.
An image inspection system that calculates and compares luminance values and coordinate positions of a pattern array within images to detect discrepancies, using a computer device connected to an imaging device, and applies threshold values to identify mismatches.
The system effectively detects and corrects discrepancies in imaging conditions, ensuring accurate identification of individual articles by aligning the imaging device's position and brightness, thereby improving the reliability of image matching.
Smart Images

Figure 0007708463000001 
Figure 0007708463000002 
Figure 0007708463000003
Abstract
Description
Technical Field
[0001] The present disclosure relates to an image inspection method and an image inspection apparatus. In particular, the present disclosure relates to an image inspection method and an image inspection apparatus for detecting a discrepancy resulting from a difference in shooting conditions when comparing two images.
Background Art
[0002] Conventionally, in order to safely provide consumers with articles such as food and drugs, it is necessary to manage individual articles in their manufacturing processes. In order to manage individual articles, it is necessary to individually identify articles in the manufacturing process. Usually, in order to identify an article, an identification number is attached to the article or its packaging container. However, even if an identification number is attached to a container in which articles are packaged in a certain quantity unit, the individual articles may not be attached with an identification number.
[0003] For example, depending on the method of use, drugs that can be harmful to humans may need to be strictly managed in units of individual tablets so as not to be taken out. Commercially available drugs are often sold in a form in which a plurality of tablets are stored in a packaging container. Each of the plurality of tablets stored in the packaging container is packaged using a PTP (press through pack) with the same design label, and the identification number is not necessarily attached to each packaging label.
[0004] In recent years, in order to identify individual articles, technologies have been developed to identify articles by accurately distinguishing minute color shades on the surface of the article and / or on the packaging label (for example, printing unevenness or blurring of the packaging label). The above-described identification technology can identify individual articles by grasping differences in specific regions that cannot be distinguished by the human eye even for packaging labels with the same design.
[0005] In the actual manufacturing process, in order to individually identify articles (tablets of the above-mentioned drug), it is necessary to pre-generate a reference image obtained by individually photographing the tablets using an imaging device such as a camera. When individually identifying the tablets, a comparison image obtained by individually photographing the tablets is generated, the comparison image is compared with the reference image, and the individual tablets are identified by determining whether the two match.
Prior Art Documents
Patent Documents
[0006]
Patent Document 1
Summary of the Invention
Problems to be Solved by the Invention
[0007] In the above-described identification technique, the luminance values are calculated in terms of pixels for both the reference image and the comparison image, and it is determined that the two match by determining whether the calculated luminance values are within a certain range. In the case where each of a plurality of tablets is packaged with the same design of packaging label, the luminance value is calculated from the shade of the color of the packaging label (which cannot be distinguished by the human eye). Therefore, when photographing the tablets to generate the comparison image and when photographing the tablets to generate the reference image, if the position and / or inclination of the imaging device do not match, the calculated luminance values will also be different, and as a result, even the same tablet may be determined not to match.
[0008] Patent Document 1 discloses a technique of acquiring an image obtained by imaging an object, extracting the edges of the image, and calculating the amount of blurring of the edges based on the luminance difference of the pixels within a predetermined region including the extracted edges. According to the technique disclosed in Patent Document 1, it is possible to detect that the inclination of the imaging device has occurred when photographing the tablets to generate the comparison image as compared with when photographing the tablets to generate the reference image.
[0009] However, in the technology disclosed in Patent Document 1, although it is possible to detect blurring in the edge portions of the generated image, it does not detect blurring in other portions.
Means for Solving the Problems
[0010] A computer device according to an embodiment is a computer device connected to an imaging device, which receives a first image including at least a pattern array from the imaging device. The first image is generated by photographing a subject. From the first image, a set of first luminance values for the pattern array is calculated. The computer device receives a second image including at least the pattern array from the imaging device. The second image is generated by photographing the same subject as the first image. From the second image, a set of second luminance values for the pattern array is calculated. A set of difference values between the set of first luminance values and the set of second luminance values is calculated, and by comparing the set of difference values with a predetermined threshold value, a discrepancy between the first image and the second image is detected.
[0011] Also, a method executed by a computer device according to another embodiment is a computer device connected to an imaging device, which receives a first image including at least a pattern array from the imaging device. The first image is generated by photographing a subject. From the first image, a first coordinate position for the pattern array is calculated. The computer device receives a second image including at least the pattern array from the imaging device. The second image is generated by photographing the same subject as the first image. From the first image, a second coordinate position for the pattern array is calculated. A difference value between the first coordinate position and the second coordinate position is calculated, and by comparing the difference value with a predetermined threshold value, a discrepancy between the first image and the second image is detected.
Advantages of the Invention
[0012] According to the image inspection system according to the embodiment, a discrepancy between two images can be detected, and thus a discrepancy caused by a difference in photographing conditions can be detected.
Brief Description of the Drawings
[0013]
Figure 1
Figure 2
Figure 3
Figure 4
Figure 5
Figure 6
Figure 7
Figure 8
Figure 9
Figure 10
Figure 11
Figure 12
Embodiments for Carrying Out the Invention
[0014] Hereinafter, with reference to the attached drawings, an image inspection system according to an embodiment will be described in detail. The image inspection system detects a discrepancy between two images resulting from differences in shooting conditions, for example, in the process of identifying an object based on two images generated by photographing the object. Hereinafter, in the present embodiment, any object to be photographed will be referred to as a "photographing target".
[0015] For example, in the manufacturing process of pharmaceutical tablets, in order to individually identify the tablets, a pre-generated image of each tablet (reference image (first image)) and an image generated in the actual manufacturing process (comparison image (second image)) are compared. In order for two images generated by photographing the same photographing target (tablet) to match, the imaging device needs to photograph regions at the same relative position within the photographing target when generating the two images.
[0016] Also, the imaging device needs to photograph the photographing target at the same position and inclination when generating the two images. If the above-mentioned conditions are not satisfied, the two images generated by photographing the same photographing target may not match. Furthermore, even if photographing is performed satisfying the above-mentioned conditions, due to differences in the brightness of the location where the two images are taken, etc., the two images generated by photographing the same photographing target may still not match.
[0017] The image inspection system detects the above-mentioned discrepancy, for example, at a stage prior to the pharmaceutical manufacturing process, and thereby detects differences in shooting conditions. The discrepancy within the two images is detected based on, for example, the luminance values in the pattern array within the images.
[0018] Differences in shooting conditions are factors that cause two images generated by photographing the same photographing target to be different. As described above, differences in shooting conditions include differences in the position of the shooting region, differences in the position and / or inclination of the imaging device, etc., when photographing the photographing target when generating the two images (reference image and comparison image), as well as differences in the brightness of the location where the photographing is performed.
[0019] First, referring to FIG. 1, the configuration of the image inspection system 100 will be described. The image inspection system 100 shown in FIG. 1 includes a computer device 1, an imaging device 2, an input device 3, and an output device 4. The computer device 1 is connected to the imaging device 2, the input device 3, and the output device 4 respectively.
[0020] The computer device 1 is an information processing device including at least a processor, a memory, a storage device, and an input / output device. The computer device 1 may be a general-purpose computer such as a personal computer. The processor reads the program stored in the storage device into the memory and executes the program. The program is a computer program including computer-readable instructions implementing the image inspection method according to the present embodiment. The input / output device inputs and outputs data between the imaging device 2, the input device 3, and the output device 4 described later.
[0021] The imaging device 2 is a camera for photographing a photographing object, including one or more CCD image sensors or CMOS image sensors, etc. The imaging device 2 is coupled to the computer device 1 and transmits the image generated by photographing the photographing object to the computer device 1. In order to generate a high-pixel image, it is desirable that more image sensors be arranged. Further, the imaging device 2 includes an array of LEDs (not shown). The array of LEDs irradiates light on the object. By providing the imaging device 2 with an array in which more LEDs are evenly arranged, the entire object can be irradiated with light and a clearer image can be generated.
[0022] The input device 3 assists the user in inputting information when the user interacts with the computer device 1. The input device 3 is implemented by a mouse, a keyboard, etc. Similarly, the output device 4 assists in outputting information to the user when the user interacts with the computer device 1. The output device 4 is implemented by a display screen, etc.
[0023] In this embodiment, an example where the computer device 1 and the imaging device 2 are directly coupled is shown, but the example is not limited thereto. The computer device 1 and the imaging device 2 may be connected through a network.
[0024] Although not shown, the image inspection system 100 may include a support member (holder) for supporting the imaging device 2. The support member supports the imaging device 2 so that the focus of the imaging device 2 matches the imaging target. Further, the image inspection system 100 may include a jig for fixing the imaging target. The jig fixes the imaging target so that the focus of the imaging device 2 matches a specific area within the imaging target.
[0025] Also, the imaging device 2 may include an acceleration sensor and a gyro sensor. The acceleration sensor and the gyro sensor detect the angular velocity when the imaging device 2 is tilted and transmit it to the computer device 1 as an angular velocity signal.
[0026] Furthermore, the image inspection system 100 may include a brightness sensor. The brightness sensor is installed at an arbitrary position in the environment where the imaging device 2 captures the imaging target. The brightness sensor detects the brightness in the environment and transmits it to the computer device 1 as a brightness signal.
[0027] Next, an example of the pattern sheet PS will be described with reference to FIG. 2. The pattern sheet PS is captured by the imaging device 2 in order to detect a mismatch between two images. The pattern sheet PS includes a pattern array PA. The pattern array PA includes a set of dots formed at equal intervals. The dots in the pattern array PA are preferably arranged densely in order to improve the accuracy of detecting differences in imaging conditions. In this embodiment, it is assumed that the dots are arranged at equal intervals in units of 1 mm.
[0028] In this embodiment, the pattern array PA corresponds to a set of dots, but it may be a set of patterns of any shape other than dots. For example, the pattern array PA may be a set of patterns having any shape such as a square, a triangle, or a rhombus.
[0029] The imaging device 2 generates a reference image and a comparison image by photographing the pattern sheet PS. For example, when the image inspection system 100 is applied to the manufacturing process of an article (to identify individual articles), the image inspection system 100 generates a reference image in advance by photographing the pattern sheet PS. Then, the image inspection system 100 generates a comparison image by photographing the same pattern sheet PS as when the reference image was generated at a stage prior to the actual manufacturing process. By comparing luminance values and the like for the two images generated by photographing the same pattern sheet PS, a discrepancy between the two images is detected. Details will be described later.
[0030] Next, with reference to the flowchart shown in FIG. 3, an example of the reference image analysis process executed by the image inspection system 100 will be described. In the reference image analysis process, the imaging device 2 generates a reference image by photographing a specific region of the pattern sheet PS. The specific region of the pattern sheet PS corresponds to a region including at least the pattern array PA. Hereinafter, this specific region will be referred to as the imaging region IA. Also, the pattern sheet PS corresponds to the object O to be photographed.
[0031] First, the imaging device 2 photographs the imaging region IA of the object O (pattern sheet PS) (step 301). In the present embodiment, the entire region of the pattern array PA shown in FIG. 2 corresponds to the imaging region IA.
[0032] Next, the imaging device 2 generates an image corresponding to the imaging region IA (step 302). This image serves as a reference image RI that is compared with a comparison image described later. When the reference image RI is generated, the imaging device 2 transmits the reference image RI to the computer device 1, and the control device of the computer device 1 receives the reference image RI via the input / output device.
[0033] Next, the control device of the computer device 1 stores the reference image RI in the storage device (step 303). Next, the control device reads out the reference image RI and identifies each dot in the pattern array PA (step 304). The dots may be identified, for example, by binarizing the reference image RI and labeling the binarized image. By this process, the circular portions of all the dots in the pattern array PA are recognized. That is, a set of coordinate positions of pixels corresponding to the outer frame portion of the dot is calculated.
[0034] Next, the control device calculates the center coordinates of each of the identified dots (step S75). The center coordinates are derived, for example, by calculating the diameter of the dot from the coordinate positions of the outer frame portion of the dot identified in step 304 and calculating the center coordinates of that diameter.
[0035] Next, the control device calculates a region within a predetermined range within the dot from the center coordinates calculated in step 305 (step 306). In the present embodiment, this region corresponds to a square region having a predetermined size centered on the center coordinates. This region is referred to as the "region within the dot (region within the pattern) DA" intra ". By this process, a set of coordinate positions of pixels corresponding to the dot inner region DA intra is calculated.
[0036] FIG. 4 shows an example of the dot inner region DA intra . As shown in FIG. 4, the dot inner region DA intra corresponds to a square region having a predetermined size centered on the center coordinates (dot inner center coordinates (pattern inner center coordinates) CC intra ) in the dot D. In the present embodiment, the dot inner region DA intra corresponds to a square, but may have any shape other than a square.
[0037] Next, the control device is the dot inner region DA intraCalculate the luminance values for all the pixels inside, and calculate the average thereof (the average luminance value within the dot (the average luminance value within the pattern)) (step 307). The luminance value is calculated by weighted-averaging each pixel RGB value according to Equation (1). The coefficients used in Equation (1) (0.298912 for R, 0.586611 for G, and 0.114478 for B) are derived from the rule of thumb that the human eye sees it that way. Luminance value = 0.298912 × R + 0.586611 × G + 0.114478 × B (1)
[0038] Next, the control device calculates an area within a predetermined range between adjacent dots from the coordinates identified in step 304 and the center coordinates calculated in step 305 (step 308). In the present embodiment, this area corresponds to a square area having a predetermined size centered on the dot-to-dot center coordinate (the center coordinate between patterns) between the center coordinates of each of two adjacent dots. This area is referred to as the "area between dots (area between patterns) DA" inter ". By this process, a set of the coordinate positions of the pixels corresponding to the area between dots DA inter is calculated.
[0039] FIG. 5 shows an example of the area between dots DA inter . As shown in FIG. 5, the area between dots DA inter corresponds to a square area having a predetermined size centered on the dot-to-dot center coordinate (the dot-to-dot center coordinate CC intra1 and the dot-to-dot center coordinate CC intra2 ) between the dot-internal center coordinates (the dot-internal center coordinate CC inter ) of adjacent dots (dot D1 and dot D2). In the present embodiment, the area between dots DA inter corresponds to a square, but may have any shape other than a square.
[0040] Next, the control device is the area between dots DA interCalculate the luminance values for all the pixels inside, and calculate the average thereof (the average luminance value between dots (the average luminance value between patterns)) (step 309). The luminance values are calculated according to the above-described formula (1).
[0041] Next, the control device repeats the processes of steps 305 to 307 for all the dots in the pattern array PA in the reference image RI recognized in step 304 (step 310). By this process, a set of the average luminance values within dots for all the dots in the pattern array PA is calculated. The calculated average luminance values within dots are respectively stored in the storage device in association with values indicating each of the dots in the pattern array PA (for example, dot identification numbers (pattern identification numbers)).
[0042] Also, the control device repeats the processes of steps 308 and 309 for all the adjacent dots in the pattern array PA in the reference image RI recognized in step 304 (step 311). By this process, a set of the average luminance values between dots for all the adjacent dots in the pattern array PA is calculated. The calculated average luminance values between dots are respectively stored in the storage device in association with values indicating each set between the dots in the pattern array PA (for example, dot - set identification numbers (pattern - set identification numbers)).
[0043] Furthermore, the control device identifies a set of dots (dot row (pattern row)) at the X coordinate in the pattern array PA, and calculates an approximate straight line connecting the center coordinates of each dot in the dot row (step 312). FIG. 6 shows an example of the approximate straight line for a specific dot row.
[0044] As described above, in the pattern array PA, the dots are evenly arranged. Therefore, as shown in FIG. 6, in the dot rows in the pattern array PA, the dots are arranged so as to draw a straight line in the direction of arrow X. This straight line corresponds to the approximate straight line.
[0045] This process is repeated for all rows in the pattern array PA. By this process, a set of approximate straight lines for all dot rows in the pattern array PA is calculated. The calculated approximate straight lines are stored in the storage device in association with values indicating each dot row in the pattern array PA (for example, dot row identification numbers (pattern row identification numbers)).
[0046] Similarly, the control device identifies a set of dots (dot column (pattern column)) at the Y coordinate in the pattern array PA, and calculates an approximate straight line connecting the center coordinates of each dot in the dot row (step 313). FIG. 6 shows an example of an approximate straight line for a specific dot column.
[0047] As described above, in the pattern array PA, the dots are evenly arranged. Therefore, as shown in FIG. 6, in the dot columns in the pattern array PA, the dots are arranged so as to draw a straight line in the direction of arrow Y. This straight line corresponds to the approximate straight line.
[0048] This process is repeated for all columns in the pattern array PA. By this process, a set of approximate straight lines for all dot columns in the pattern array PA is calculated. The calculated approximate straight lines are stored in the storage device in association with values indicating each dot column in the pattern array PA (for example, dot column identification numbers (pattern column identification numbers)).
[0049] By the reference image analysis process described above, the average luminance value within dots, the average luminance value between dots, and the approximate straight lines for all dots in the pattern array PA in the reference image RI are stored in the storage device of the computer device 1. In the comparison image analysis process described later, similarly for the comparison image, the average luminance value within dots, the average luminance value between dots, and the approximate straight lines for all dots in the array PA are calculated. Then, the average luminance value within dots, the average luminance value between dots, and the approximate straight lines for the comparison image are compared with the average luminance value within dots, the average luminance value between dots, and the approximate straight lines for the reference image.
[0050] In the reference image analysis process, an example was shown in which the imaging device 2 captures the pattern sheet PS as the imaging target O, but it is not limited to such an example. For example, the pattern sheet PS may exist separately from the imaging target O (such as a pharmaceutical tablet) and may be captured overlapping the imaging target O. The same applies to the comparative image analysis process described later. In this case, the pattern sheet PS is composed of a transparent sheet.
[0051] FIG. 7 shows an example of a state in which the imaging target O is captured using the pattern sheet PS. As shown in FIG. 7, the pattern sheet PS is disposed between the imaging device 2 and the imaging target O. The light L irradiated from the imaging device 2 passes through the pattern sheet PS and reaches the imaging target O. The images (reference image and comparative image) generated by capturing the imaging target O in this way will include, for example, the pattern array PA and the packaging label when the imaging target O is a pharmaceutical tablet (packaging label).
[0052] Alternatively, instead of using the pattern sheet PS, a pattern array may be formed in advance on the imaging target O. In this case, when the imaging target O is a pharmaceutical tablet (packaging label), the pattern array will be formed on the packaging sheet.
[0053] Next, with reference to the flowchart shown in FIG. 8, the comparative image analysis process executed by the image inspection system 100 will be described. The comparative image analysis process is executed, for example, at a stage prior to the pharmaceutical manufacturing process. In the comparative image analysis process, the imaging device 2 generates a comparative image by capturing the imaging area IA of the same pattern sheet PS as the reference image RI.
[0054] In principle, the comparative image generated by capturing the same pattern sheet PS as the pattern sheet PS from which the reference image RI is derived will match the reference image RI. However, due to differences in the imaging conditions between when the pattern sheet PS is captured to generate the reference image RI (hereinafter, the first capture) and when the pattern sheet PS is captured to generate the comparative image (hereinafter, the second capture), the two images may not match.
[0055] In the process shown in FIG. 8, by comparing luminance values and the like of the comparison image and the reference image, a difference between the two is detected. By executing this process at a previous stage of the manufacturing process of the drug, differences in shooting conditions can be detected. By detecting differences in shooting conditions at a previous stage of the manufacturing process, measures such as correcting the imaging device 2 to an appropriate position can be taken.
[0056] First, the imaging device 2 photographs the imaging area IA of the imaging object O (pattern sheet PS) (step 801). The imaging area IA corresponds to the same area as the imaging area IA in the reference image RI described with reference to FIG. 3.
[0057] Next, the imaging device 2 generates an image corresponding to the imaging area IA (step 802). This image corresponds to the comparison image CI that will be compared with the reference image RI. When the comparison image CI is generated, the imaging device 2 transmits the comparison image CI to the computer device 1, and the control device of the computer device 1 receives the reference image RI via the input / output device.
[0058] Next, in the computer device 1, the processes of steps 803 to 813 are executed on the comparison image CI. Since these processes are the same as the processes of steps 303 to 313 described with reference to FIG. 3, the description thereof is omitted. That is, the control device of the computer device 1 calculates the in-dot average luminance value, the inter-dot average luminance value, and the approximate straight line for all the dots of the pattern array PA in the comparison image CI.
[0059] Next, the control device compares the approximate straight line for a specific dot row calculated in step 812 with the approximate straight line for the corresponding dot row calculated for the reference image, and calculates the difference value between the two. Also, it is determined whether this difference value is within a predetermined threshold (step 814). The difference values of the approximate straight lines for the two images (reference image RI and comparison image CI) are calculated for all the dot rows, and it is determined whether they are within the threshold.
[0060] Similarly, the control device compares the approximate straight line for the specific dot sequence calculated in step 810 with the approximate straight line for the corresponding dot sequence calculated for the reference image, and calculates the difference value between the two. Further, it is determined whether this difference value is within a predetermined threshold (step 815). The difference values of the approximate straight lines for the two images are calculated for all dot sequences, and it is determined whether they are within the threshold.
[0061] With reference to FIGS. 9 and 10, an example of the difference in the approximate straight line between the dot rows in the reference image RI and the dot rows in the comparison image CI will be described.
[0062] FIG. 9(a) shows an example of the state in the first shooting and the pattern array PA in the generated reference image RI. The arrow of the pattern array PA indicates the approximate straight line for a specific dot sequence. As shown in FIG. 9(a), when performing the first shooting, the imaging device 2 shoots the pattern sheet PS which is the shooting object directly facing it. As a result, in the generated reference image RI, the pattern array PA is located almost in the center within the reference image RI.
[0063] FIG. 9(b) shows an example of the state in the first shooting and the pattern array PA in the generated comparison image CI. The arrow of the pattern array PA indicates the approximate straight line for a specific dot sequence. This approximate straight line corresponds to the approximate straight line shown in FIG. 9(a). As shown in FIG. 9(b), when performing the first shooting, the imaging device 2 shoots the pattern sheet PS which is the shooting object while being tilted. As a result, in the generated comparison image CI, the pattern array PA is shifted horizontally within the comparison image CI compared to the pattern array in the comparison image RI.
[0064] FIG. 10 shows an example of a state in which an approximate straight line (reference image approximate straight line RA) for a specific dot sequence calculated for a reference image RI and an approximate straight line (comparison image approximate straight line CA) for a corresponding dot sequence calculated for a comparison image CI are compared. In FIG. 10, in order to clearly show that the comparison image approximate straight line CA is shifted horizontally, the reference image approximate straight line RA and the comparison image approximate straight line CA are shown in a state where they are in the same plane. Note that, in order to distinguish between the two, the dot sequence in the reference image RI is shown in black, and the dot sequence in the comparison image CI is shown in hatched.
[0065] As shown in FIG. 10, when the reference image approximate straight line RA and the comparison image approximate straight line CA are compared, the two are separated by a difference Di. Since the reference image approximate straight line RA is the reference, the difference Di means that the comparison image approximate straight line CA is shifted horizontally by Di. The difference value indicating this difference is calculated for all dot rows and dot columns in steps 814 and 815.
[0066] Note that, in this embodiment, the approximate straight lines for the dot rows and dot columns in the pattern array are compared, but the present invention is not limited to such an example. For example, for both the reference image RI and the comparison image CI, an approximate straight line (for example, a straight line inclined at approximately 45 degrees) connecting any two points in the pattern array PA may be calculated and the two may be compared.
[0067] Further, for example, the center coordinates of each dot in the reference image RI and the center coordinates of each dot in the comparison image CI may be compared. In this case, although the calculation load increases, it is possible to detect that a mismatch occurs only in a specific region within the image. That is, in the processes of steps 814 and 815, the coordinate positions between the dots in the reference image RI and the dots in the comparison image CI are compared.
[0068] By the processes of step 814 and step 815, the image mismatch between the reference image RI and the comparison image CI can be detected. As described above, this mismatch is due to the imaging device 2 being tilted with respect to the pattern sheet PS in the second imaging as compared to the time of the first imaging. Therefore, by detecting the mismatch between the images, the differences in the imaging conditions can be determined.
[0069] Returning to the description of FIG. 8, the control device compares the dot-to-dot average luminance value and the dot-to-dot average luminance value for a specific dot calculated in step 808 with the dot-to-dot average luminance value and the dot-to-dot average luminance value for the corresponding dot calculated with respect to the reference image, and calculates the difference value between the two. Also, it is determined whether this difference value is within a predetermined threshold (step 816). The difference values of the dot-to-dot average luminance value and the dot-to-dot average luminance value for the two images (reference image RI and comparison image CI) are calculated for all the dots, and it is determined whether they are within the threshold.
[0070] With reference to FIGS. 11 and 12, an example of the difference in the dot-internal average luminance value and the dot-to-dot average luminance value between the dots in the pattern array PA in the reference image RI and the dots in the pattern array PA in the comparison image CI will be described. Note that the examples shown in FIGS. 11 and 12 are different examples from the examples shown in FIGS. 9 and 10.
[0071] FIG. 11(a) shows an example of the pattern array PA in the reference image RI. As shown in FIG. 11(a), each dot in the pattern array PA has substantially the same size.
[0072] FIG. 11(b) shows an example of the pattern array PA in the comparison image CI. As shown in FIG. 11(b), each dot in the pattern array PA has a larger dot size in the portion surrounded by the broken line as compared to the dots in the reference image RI. This is due to, for example, the distance between the imaging device 2 and the pattern sheet PS at the time of the first imaging being different from that distance at the location of the second imaging.
[0073] FIG. 12(a) shows an example of an inter-dot region DA between adjacent dots in the reference image RI. RDinter FIG. 12(b) shows an example of an inter-dot region DA between adjacent dots in the comparison image CI. CDinter
[0074] As shown in FIG. 12, the inter-dot region DA between reference image dots RDinter does not overlap with either of the two dots (reference image dots RD1 and RD2) in the reference image RI. That is, in the inter-dot region DA between reference image dots RDinter there is no black portion.
[0075] On the other hand, the inter-dot region DA between comparison image dots CDinter partially overlaps with both of the two dots (comparison image dots CD1 and CD2) in the comparison image CI. That is, in the inter-dot region DA between comparison image dots CDinter there is a black portion.
[0076] Therefore, the average luminance value between dots for the inter-dot region DA between reference image dots RDinter differs from the average luminance value between dots for the inter-dot region DA between comparison image dots CDinter by a certain difference value. By setting a threshold value within the range of this difference value, the difference between the two will exceed the threshold value.
[0077] By setting the threshold value as described above, since the center coordinates of both the reference image dot RD1 and the comparison image dot CD1 are substantially the same, the difference value of the average luminance value within the dot for the dot region DA within both intra does not exceed the threshold value. The same applies to the reference image dot RD2 and the comparison image dot CD2.
[0078] On the other hand, when comparing the inter-dot region DA between comparison image dots CDinter with the inter-dot region DA between reference image dots RDinter the average luminance values of the two will have a difference value that exceeds the threshold value. As a result, a discrepancy between the reference image and the comparison image will be detected.
[0079] By the process of step 816, as described above, even when the center coordinates of the dots of the two images are substantially the same and the sizes of the dots on both sides are different, it is possible to detect the image mismatch between the reference image RI and the comparison image CI. As described above, this mismatch is caused by the difference in the distance between the imaging device 2 and the pattern sheet PS at the time of the first shooting and the second shooting. Therefore, by detecting the mismatch between the images, it is possible to determine the difference in the shooting conditions.
[0080] Note that in the present embodiment, the average luminance value within the dot and the average luminance value between the dots are compared for all the dots in the pattern array PA for the reference image RI and the comparison image CI, but it is not always necessary to perform the comparison for all the dots. For example, the comparison may be performed only for the dots within a predetermined region in both the reference image RI and the comparison image CI.
[0081] Also, in the present embodiment, the approximate straight lines, the average luminance value within the dot, and the average luminance value between the dots for the dot rows and dot columns for the reference image RI and the comparison image CI are compared, but it is not necessary to compare all of them. Any one or more of the approximate straight lines for the dot rows and dot columns, the average luminance value within the dot, and the average luminance value between the dots may be compared.
[0082] As described above, the image inspection system according to the embodiment has been described. According to the present embodiment, it is possible to detect the mismatch occurring in any region within the two images.
[0083] Note that the difference values for the approximate straight line, the average luminance value within the dot, and the average luminance value between the dots described above may be output to the output device 4 coupled to the computer device 1. By outputting the difference map, the user can, for example, grasp how much the imaging device 2 is tilted, and considering that, the second shooting can be performed again.
[0084] Also, when performing the first shooting or the second shooting, the inclination of the imaging device 2 and / or the brightness of the shooting location may be detected and associated with the difference values for the approximate straight line, the average luminance value within the dot, and the average luminance value between dots, and stored in the storage device of the computer device 1. By doing so, the inclination of the imaging device 2 corresponding to the difference value can be output to the output device 4 to provide feedback to the user.
[0085] It should be noted that the hardware components described in the above embodiments are merely exemplary, and other configurations are also possible. Also, the order of the processes described in the above embodiments does not necessarily need to be executed in the described order, and may be executed in any order. Furthermore, additional steps may be newly added without departing from the basic concept of the present invention.
[0086] Also, the image inspection system 100 according to an embodiment of the present invention is implemented by a computer program executed by the computer device 1, and the computer program may be stored in a non-transitory storage medium. Examples of non-transitory storage media include magnetic media such as read-only memory (ROM), random access memory (RAM), registers, cache memories, semiconductor memory devices, built-in hard disks, and removable disk devices, magneto-optical media, and optical media such as CD-ROM disks and digital versatile disks (DVDs).
Claims
1. A computer device connected to an imaging device, receiving a first image including a pattern array that is a set of patterns having arbitrary shapes from the imaging device, the first image being generated by photographing a subject, calculating a first coordinate position that is the center coordinate of each pattern in the pattern array from the first image, receiving a second image including at least the pattern array from the imaging device, the second image being generated by photographing the same subject as the subject, calculating a second coordinate position that is the center coordinate of each pattern in the pattern array from the second image, calculating a difference value between the first coordinate position and the second coordinate position, detecting a discrepancy between the first image and the second image by comparing the difference value with a predetermined threshold value, A computer device characterized by the above.
2. A computer device connected to an imaging device, receiving a first image including a pattern array that is a set of patterns having arbitrary shapes from the imaging device, the first image being generated by photographing a subject, calculating a first approximate straight line connecting a plurality of patterns in the pattern array based on a first coordinate that is the center coordinate of each pattern in the pattern array from the first image, receiving a second image including at least the pattern array from the imaging device, the second image being generated by photographing the same subject as the subject, calculating a second approximate straight line connecting a plurality of patterns in the pattern array based on a second coordinate that is the center coordinate of each pattern in the pattern array from the second image, detecting a discrepancy between the first image and the second image by comparing the first approximate straight line and the second approximate straight line, A computer device characterized by the above.
3. A method executed by a computer device connected to an imaging device, receiving a first image including a pattern array that is a set of patterns having arbitrary shapes from the imaging device, the first image being generated by photographing a subject, and the step, Calculating a first coordinate position, which is the center coordinate of each pattern in the pattern array, from the first image; Receiving, from the imaging device, a second image including at least the pattern array, the second image being generated by photographing the same subject as the photographed subject; Calculating a second coordinate position, which is the center coordinate of each pattern in the pattern array, from the second image; Calculating a difference value between the first coordinate position and the second coordinate position; Detecting a mismatch between the first image and the second image by comparing the difference value with a predetermined threshold; A method characterized by comprising the steps of.
4. A method executed by a computer device connected to an imaging device, Receiving, from the imaging device, a first image including a pattern array that is a set of patterns having an arbitrary shape, the first image being generated by photographing a subject; Calculating a first approximate straight line connecting a plurality of patterns in the pattern array based on a first coordinate that is the center coordinate of each pattern in the pattern array from the first image; Receiving, from the imaging device, a second image including at least the pattern array, the second image being generated by photographing the same subject as the photographed subject; Calculating a second approximate straight line connecting a plurality of patterns in the pattern array based on a second coordinate that is the center coordinate of each pattern in the pattern array from the second image; Detecting a mismatch between the first image and the second image by comparing the first approximate straight line and the second approximate straight line; A method characterized by comprising the steps of.
5. A computer program including computer-executable instructions, wherein when the computer-executable instructions are executed by a computer device, the computer device is caused to execute the method according to claim 3 or 4.
Citation Information
Patent Citations
Device and method for dot analysis and storage medium with analysis program stored therein
JP2001291107A
Method for associating marker coordinate, method and system for acquiring camera parameter and calibration pattern
JP2003078811A
Lens misregistration detection method and lens misregistration detecting device
JP2005114683A
Solid-state imaging device and test chart
JP2011205288A
Shape measurement apparatus
JP2014035196A