Image inspection method and image inspection device
The image inspection system addresses discrepancies in imaging conditions by analyzing pattern arrays within images, ensuring accurate matching through brightness and positional comparisons, enhancing the reliability of image inspection.
Patent Information
- Application Number
- JP2020068346
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2020-04-06
- Publication Date
- 2024-12-10
- Estimated Expiration
- 2040-04-06
AI Technical Summary
Existing image inspection methods fail to accurately detect discrepancies caused by differences in imaging conditions when comparing images of objects with identical packaging labels, leading to false mismatches due to variations in brightness values and device positioning.
An image inspection system that calculates and compares brightness values and positional discrepancies in pattern arrays within images, using a computer device connected to an imaging device to analyze images of a pattern sheet, detecting mismatches by comparing intra- and inter-dot average brightness values and approximate straight lines.
The system effectively identifies mismatches in images resulting from differences in imaging conditions, ensuring accurate matching of images by adjusting device positioning and brightness, thereby improving the reliability of image inspection processes.
Smart Images

Figure 0007597347000001 
Figure 0007597347000002 
Figure 0007597347000003
Abstract
Description
[Technical field]
[0001] The present disclosure relates to an image inspection method and an image inspection device, and more particularly to an image inspection method and an image inspection device that detect inconsistencies resulting from differences in shooting conditions when comparing two images. [Background technology]
[0002] Conventionally, in order to provide products such as food and medicine to consumers safely, it has been necessary to manage each product during the manufacturing process. In order to manage each product, it is necessary to identify each product during the manufacturing process. Usually, in order to identify the product, an identification number is attached to the product or its packaging container. However, even if an identification number is attached to a container in which a certain number of products are packaged, there are cases in which an identification number is not attached to each product.
[0003] For example, drugs that may be harmful to humans depending on how they are used may need to be strictly controlled in individual tablet units to prevent them from being taken out. Drugs on the market are often sold in a format in which multiple tablets are stored in a packaging container. Each of the multiple tablets stored in a packaging container is packaged using a PTP (press through pack) with a label of the same design, and each packaging label does not have an identification number.
[0004] In recent years, technologies have been developed to identify individual items by accurately distinguishing minute color shadings on the surface of the item and / or its packaging label (e.g., uneven printing or fading on the packaging label). The above-mentioned identification technologies can identify individual items by grasping differences in specific areas that cannot be distinguished by the human eye, even if the packaging labels have the same design.
[0005] In order to identify each item (the above-mentioned medicine tablets) in the actual manufacturing process, it is necessary to generate a reference image in advance by photographing each tablet with an imaging device such as a camera. When identifying each tablet, a comparison image is generated by photographing each tablet, and the comparison image is compared with the reference image to determine whether the two match, thereby identifying each tablet. [Prior art documents] [Patent documents]
[0006] [Patent Document 1] JP 2016-018340 A Summary of the Invention [Problem to be solved by the invention]
[0007] In the above-mentioned identification technology, the brightness values of both the reference image and the comparative image are calculated on a pixel-by-pixel basis, and it is determined whether the calculated brightness values are within a certain range to determine whether the two match. In a case where each of a plurality of tablets is packaged with a packaging label of the same design, the brightness value is calculated from the color shading of the packaging label (which cannot be distinguished by the human eye). Therefore, if the position and / or inclination of the imaging device is not the same when photographing the tablet to generate the comparative image and when photographing the tablet to generate the reference image, the calculated brightness values will be different, and as a result, the same tablet may be determined not to match.
[0008] Patent Document 1 discloses a technique for acquiring an image of an object, extracting the edge of the image, and calculating the amount of blur of the edge based on the brightness difference of pixels within a predetermined area including the extracted edge. According to the technique disclosed in Patent Document 1, it is possible to detect the occurrence of tilt of the imaging device when photographing a tablet to generate a comparative image, compared with when photographing the tablet to generate a reference image.
[0009] However, the technique disclosed in Patent Document 1 can detect blurring of edge portions in a generated image, but does not detect blurring of other portions. [Means for solving the problem]
[0010] A computing device in one embodiment is a computing device connected to an imaging device, which receives a first image from the imaging device, the first image including at least a pattern array, the first image being generated by photographing an object to be photographed, calculates a first set of brightness values for the pattern array from the first image, receives a second image from the imaging device, the second image being generated by photographing an object identical to the object to be photographed, calculates a second set of brightness values for the pattern array from the second image, calculates a set of difference values between the first set of brightness values and the second set of brightness values, and detects a mismatch between the first image and the second image by comparing the set of difference values with a predetermined threshold.
[0011] In another embodiment, a method executed by a computing device includes a computing device connected to an imaging device, receiving a first image from the imaging device, the first image including at least a pattern array, the first image being generated by photographing an object to be photographed, calculating a first coordinate position for the pattern array from the first image, receiving a second image from the imaging device, the second image being generated by photographing an object to be photographed identical to the object to be photographed, calculating a second coordinate position for the pattern array from the first image, calculating a difference value between the first coordinate position and the second coordinate position, and detecting a mismatch between the first image and the second image by comparing the difference value with a predetermined threshold. Effect of the Invention
[0012] According to the image inspection system of the embodiment, it is possible to detect a mismatch between two images, and therefore a mismatch caused by a difference in the shooting conditions. [Brief description of the drawings]
[0013] [Figure 1] FIG. 1 is a block diagram showing an example of the configuration of an image inspection system. [Diagram 2] FIG. 13 is a block diagram showing an example of a pattern sheet. [Diagram 3] 13 is a flowchart illustrating an example of a reference image analysis process. [Figure 4] FIG. 13 is a diagram showing an example of an intra-dot region. [Diagram 5] FIG. 13 is a diagram showing an example of an inter-dot region. [Figure 6] 11A and 11B are diagrams illustrating examples of approximation straight lines of dot rows and dot columns. [Figure 7] 11A and 11B are diagrams illustrating an example of a state in which a subject is photographed using a pattern sheet. [Figure 8] 13 is a flowchart illustrating an example of a comparative image analysis process. [Figure 9] FIG. 2A is a diagram showing an example of a pattern arrangement in a reference image, and FIG. 2B is a diagram showing an example of a pattern arrangement in a comparison image. [Figure 10] FIG. 13 is a diagram showing an example of a state in which dot rows are compared. [Figure 11] FIG. 2A is a diagram showing an example of a pattern arrangement in a reference image, and FIG. 2B is a diagram showing an example of a pattern arrangement in a comparison image. [Figure 12] FIG. 1A is a diagram showing an example of an inter-dot region between adjacent dots in a reference image, and FIG. 1B is a diagram showing an example of an inter-dot region between adjacent dots in a comparative image. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0014] Hereinafter, an image inspection system according to an embodiment will be described in detail with reference to the attached drawings. For example, in a process of identifying an object based on two images generated by photographing the object, the image inspection system detects a discrepancy between the two images caused by a difference in photographing conditions. Hereinafter, in this embodiment, any object to be photographed is referred to as a "photographing target."
[0015] For example, in a pharmaceutical tablet manufacturing process, in order to identify each tablet individually, a previously generated image of each tablet (reference image (first image)) is compared with an image generated during the actual manufacturing process (comparison image (second image)). In order for two images generated by photographing the same object (tablet) to match, the imaging device needs to photograph areas in the same relative positions within the object when generating the two images.
[0016] In addition, when generating two images, the imaging device must capture the subject at the same position and angle. If the above conditions are not met, two images generated by capturing the same subject may not match. Furthermore, even if the above conditions are met, the two images generated by capturing the same subject may not match due to differences in brightness at the locations where the images are captured.
[0017] The image inspection system detects the above-mentioned discrepancies at the early stages of the pharmaceutical manufacturing process, and detects the difference in the shooting conditions from the discrepancies. The discrepancies between the two images are detected based on the brightness values of the pattern arrays in the images, etc.
[0018] Differences in shooting conditions are factors that cause differences in two images generated by shooting the same shooting subject. As described above, differences in shooting conditions include differences in the position of the shooting area, differences in the position and / or inclination of the imaging device, and differences in the brightness of the shooting location when shooting the shooting subject to generate two images (reference image and comparative image).
[0019] First, the configuration of an image inspection system 100 will be described with reference to Fig. 1. 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 a program stored in the storage device into the memory and executes the program. The program is a computer program including computer-readable instructions that implement 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, which will be described later.
[0021] The imaging device 2 is a camera for photographing an object, including one or more CCD image sensors or CMOS image sensors. The imaging device 2 is coupled to the computer device 1, and transmits an image generated by photographing the object to the computer device 1. In order to generate an image with high pixel count, it is desirable that the imaging device 2 has more image sensors arranged therein. The imaging device 2 also includes an array of LEDs (not shown). The array of LEDs irradiates light onto an object. By providing the imaging device 2 with an array in which more LEDs are evenly arranged, light is irradiated onto the entire object, 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 may be implemented by a mouse and a keyboard, etc. The output device 4 similarly assists the user in outputting information to the user when the user interacts with the computer device 1. The output device 4 may be implemented by a display screen, etc.
[0023] In this embodiment, the computer device 1 and the imaging device 2 are directly connected to each other, but are not limited to such an example. The computer device 1 and the imaging device 2 may be connected to each other 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 focal point of the imaging device 2 is on the subject to be photographed. The image inspection system 100 may also include a jig for fixing the subject to be photographed. The jig fixes the subject to be photographed so that the focal point of the imaging device 2 is on a specific area within the subject to be photographed.
[0025] The imaging device 2 may also 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 the detected angular velocity to the computing 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 subject. The brightness sensor detects the brightness in the environment and transmits it to the computing device 1 as a brightness signal.
[0027] Next, an example of a pattern sheet PS will be described with reference to FIG. 2. The pattern sheet PS is photographed by an imaging device 2 to detect mismatches 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. It is desirable that the dots in the pattern array PA are densely arranged to increase the accuracy of detecting differences in the photographing conditions. In this embodiment, 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 of any shape, such as a square, a triangle, or a diamond.
[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 a 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, in a stage prior to the actual manufacturing process, the image inspection system 100 generates a comparison image by photographing the same pattern sheet PS as when the reference image was generated. By comparing the brightness values of 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, an example of a reference image analysis process executed by the image inspection system 100 will be described with reference to the flowchart shown in Fig. 3. In the reference image analysis process, the imaging device 2 captures an image of a specific area of the pattern sheet PS to generate a reference image. The specific area of the pattern sheet PS corresponds to an area including at least the pattern array PA. Hereinafter, this specific area is referred to as an imaging area IA. Moreover, the pattern sheet PS corresponds to an object O to be imaged.
[0031] First, the imaging device 2 captures an image of an imaging area IA of an imaging object O (pattern sheet PS) (step 301). In this embodiment, the entire area of the pattern array PA shown in FIG.
[0032] Next, the imaging device 2 generates an image corresponding to the imaging area IA (step 302). This image serves as a reference image RI to be 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 computing device 1 stores the reference image RI in a storage device (step 303). Next, the control device reads out the reference image RI and identifies the individual dots 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. This process recognizes the circular portions of all dots in the pattern array PA. That is, a set of coordinate positions of pixels corresponding to the outer periphery of the dots is calculated.
[0034] Next, the control device calculates the center coordinates of each identified dot (step S75). The center coordinates are derived, for example, by calculating the diameter of the dot from the coordinate position of the outer frame part of the dot identified in step 304, and then calculating the center coordinates of the diameter.
[0035] Next, the control device calculates an area within a predetermined range within the dot from the center coordinates calculated in step 305 (step 306). In this embodiment, this area corresponds to a square area having a predetermined size centered on the center coordinates. This area is called the "intra-dot area (intra-pattern area) DA intra This process is called "intra-dot area DA intra A set of pixel coordinate positions corresponding to is calculated.
[0036] FIG. 4 shows the area within the dot DA intra As shown in FIG. 4, the dot area DA intra is the center coordinate (center coordinate within the dot (center coordinate within the pattern) CC intra In this embodiment, the intra-dot area DA intra corresponds to a square, but may be any shape other than a square.
[0037] Next, the control device calculates the dot area DA intraThe luminance values for all pixels in are calculated, and the average (intra-dot average luminance value (intra-pattern average luminance value)) is calculated (step 307). The luminance value is calculated by taking a weighted average of the RGB values of each pixel according to formula (1). The coefficients used in formula (1) (0.298912 for R, 0.586611 for G, and 0.114478 for B) are derived from empirical rules about how the human eye sees things. Brightness value = 0.298912 x R + 0.586611 x G + 0.114478 x 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 this embodiment, this area corresponds to a square area having a predetermined size centered on the inter-dot center coordinates calculated by calculating the inter-dot center coordinates (inter-pattern center coordinates) between the center coordinates of each of the two adjacent dots. This area is called the "inter-dot area (inter-pattern area) DA inter This process is called "inter-dot area DA inter A set of pixel coordinate positions corresponding to is calculated.
[0039] FIG. 5 shows the inter-dot area DA inter As shown in FIG. 5, the inter-dot area DA inter is the center coordinate of the adjacent dots (dot D1 and dot D2) (the center coordinate CC intra1 and the center coordinate CC intra2 ) (center coordinate between dots CC inter In this embodiment, the inter-dot area DA inter corresponds to a square, but may be any shape other than a square.
[0040] Next, the control device determines the inter-dot area DA interThe luminance values of all pixels in are calculated, and the average (average luminance value between dots (average luminance value between patterns)) is calculated (step 309). The luminance value is calculated according to the above-mentioned formula (1).
[0041] Next, the control device repeats the process of steps 305 to 307 for all dots in the pattern array PA in the reference image RI that were recognized in step 304 (step 310). This process calculates a set of intra-dot average luminance values for all dots in the pattern array PA. Each of the calculated intra-dot average luminance values is stored in the storage device in association with a value (e.g., a dot identification number (pattern identification number)) that indicates each dot in the pattern array PA.
[0042] The control device also repeats the processes of steps 308 and 309 for all adjacent dots in the pattern array PA in the reference image RI that were recognized in step 304 (step 311). This process calculates a set of inter-dot average luminance values for all adjacent dots in the pattern array PA. Each of the calculated inter-dot average luminance values is stored in the storage device in association with a value indicating each inter-dot set in the pattern array PA (for example, an inter-dot set identification number (inter-pattern set identification number)).
[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 approximation line connecting the center coordinates of each dot in the dot row (step 312). Figure 6 shows an example of an approximation line for a specific dot row.
[0044] As described above, the dots are evenly spaced in the pattern array PA. Therefore, as shown in Fig. 6, in the dot rows in the pattern array PA, the dots are arranged to draw a straight line in the direction of the arrow X. This straight line corresponds to the approximation line.
[0045] This process is repeated for all rows in the pattern array PA. This process calculates a set of approximation lines for all dot rows in the pattern array PA. The calculated approximation lines are stored in a storage device in association with values (e.g., dot row identification numbers (pattern row identification numbers)) that indicate each dot row in the pattern array PA.
[0046] Similarly, the control device identifies a set of dots (dot row (pattern row)) in the Y coordinate in the pattern array PA, and calculates an approximation line connecting the center coordinates of each dot in the dot row (step 313). Figure 6 shows an example of an approximation line for a specific dot row.
[0047] As described above, the dots are evenly spaced in the pattern array PA. Therefore, as shown in Fig. 6, in the dot row in the pattern array PA, the dots are arranged to draw a straight line in the direction of the arrow Y. This straight line corresponds to the approximation line.
[0048] This process is repeated for all columns in the pattern array PA. This process calculates a set of approximation lines for all dot columns in the pattern array PA. The calculated approximation lines are stored in the storage device in association with values (e.g., dot column identification numbers (pattern column identification numbers)) that indicate each dot column in the pattern array PA.
[0049] By the reference image analysis process described above, the average intra-dot luminance value, the average inter-dot luminance value, and the approximation line 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, the average intra-dot luminance value, the average inter-dot luminance value, and the approximation line for all dots in the array PA are similarly calculated for the comparison image. Then, the average intra-dot luminance value, the average inter-dot luminance value, and the approximation line for the comparison image are compared with the average intra-dot luminance value, the average inter-dot luminance value, and the approximation line for the reference image.
[0050] In the reference image analysis process, an example has been shown in which the imaging device 2 captures the pattern sheet PS as the subject O, but the present invention is not limited to such an example. For example, the pattern sheet PS may exist separately from the subject O (such as a pharmaceutical tablet) and may be captured overlapping the subject O. The same applies to the comparative image analysis process described below. In this case, the pattern sheet PS is composed of a transparent sheet.
[0051] Fig. 7 shows an example of a state in which a pattern sheet PS is used to capture an image of a subject O. As shown in Fig. 7, the pattern sheet PS is disposed between the imaging device 2 and the subject O. Light L irradiated from the imaging device 2 passes through the pattern sheet PS and reaches the subject O. Images (reference image and comparative image) generated by capturing an image of the subject O in this manner will include the pattern array PA and the packaging label, for example, if the subject O is a pharmaceutical tablet (packaging label).
[0052] Also, instead of using the pattern sheet PS, a pattern arrangement may be formed in advance on the object to be photographed O. In this case, if the object to be photographed O is a medicine tablet (packaging label), the pattern arrangement will be formed on the packaging sheet.
[0053] Next, the comparative image analysis process executed by the image inspection system 100 will be described with reference to the flowchart shown in Fig. 8. The comparative image analysis process is executed, for example, in a preliminary stage of a pharmaceutical manufacturing process. In the comparative image analysis process, the imaging device 2 captures an image of an imaging area IA of the same pattern sheet PS as the reference image RI to generate a comparative image.
[0054] In principle, a comparison image generated by photographing the same pattern sheet PS as the original pattern sheet PS of the reference image RI matches the reference image RI. However, due to differences in the photographing conditions between photographing the pattern sheet PS to generate the reference image RI (hereinafter, the first photographing) and photographing the pattern sheet PS to generate the comparison image (hereinafter, the second photographing), the two images may not match.
[0055] In the process shown in Fig. 8, the brightness values of the comparison image and the reference image are compared to detect mismatches between them. By performing this process prior to the manufacturing process of the drug, differences in the shooting conditions can be detected. By detecting differences in the shooting conditions prior to the manufacturing process, measures such as correcting the imaging device 2 to an appropriate position can be taken.
[0056] First, the imaging device 2 captures an image of an imaging area IA of an imaging target 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.
[0057] Next, the imaging device 2 generates an image corresponding to the imaging area IA (step 802). This image corresponds to a comparison image CI to 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, but since these processes are similar to the processes of steps 303 to 313 described in Fig. 3, their explanations will be omitted. In other words, the control device of the computer device 1 calculates the average intra-dot luminance value, the average inter-dot luminance value, and an approximation line for all dots in the pattern array PA in the comparison image CI.
[0059] Next, the control device compares the approximation line for the specific dot row calculated in step 812 with the approximation line for the corresponding dot row calculated for the reference image, and calculates the difference between the two. It also determines whether this difference is within a predetermined threshold (step 814). The difference between the approximation lines for the two images (reference image RI and comparison image CI) is calculated for all dot rows, and it is determined whether it is within the threshold.
[0060] Similarly, the control device compares the approximation line for the specific dot row calculated in step 810 with the approximation line for the corresponding dot row calculated for the reference image, and calculates the difference between the two. It also determines whether this difference value is within a predetermined threshold value (step 815). The difference value of the approximation line for the two images is calculated for all dot rows, and it is determined whether it is within the threshold value.
[0061] With reference to FIGS. 9 and 10, an example of the difference in the approximation line between a row of dots in the reference image RI and a row of dots in the comparative 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 reference image RI generated as a result. The arrows in the pattern array PA indicate the approximation lines for a specific dot row. As shown in FIG. 9(a), during the first shooting, the imaging device 2 photographs the pattern sheet PS, which is the subject of the shooting, facing directly. As a result, in the generated reference image RI, the pattern array PA is located almost in the center of 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 comparison image CI generated as a result. The arrow of the pattern array PA indicates an approximation line for a specific dot row. This approximation line corresponds to the approximation line shown in FIG. 9(a). As shown in FIG. 9(b), the imaging device 2 captures the image at an angle with respect to the pattern sheet PS to be shot during the first shooting. As a result, in the generated comparison image CI, the pattern array PA is positioned laterally shifted in 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 approximation line for a specific dot row calculated for the reference image RI (reference image approximation line RA) is compared with an approximation line for a corresponding dot row calculated for the comparison image CI (comparison image approximation line CA). In Fig. 10, in order to clearly show that the comparison image approximation line CA is positioned laterally shifted, the reference image approximation line RA and the comparison image approximation line CA are shown on the same plane. Note that, in order to distinguish between the two, the dot row in the reference image RI is shown filled in black, and the dot row in the comparison image CI is shown shaded.
[0065] 10, when the reference image approximation line RA is compared with the comparison image approximation line CA, the two are separated by a difference Di. Since the reference image approximation line RA serves as the reference, the difference Di means that the comparison image approximation line CA is shifted to the side by Di. A difference value indicating this difference is calculated for all dot rows and dot columns in steps 814 and 815.
[0066] 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, an approximate straight line (e.g., a straight line inclined at approximately 45 degrees) that connects any two points in the pattern array PA may be calculated for both the reference image RI and the comparison image CI, and the two may be compared.
[0067] Also, for example, the central coordinates of each dot in the reference image RI may be compared with the central coordinates of each dot in the comparison image CI. In this case, although the calculation load increases, it is possible to detect that a mismatch occurs only in a specific area within the image. In other words, in the processes of steps 814 and 815, the coordinate positions of the dots in the reference image RI and the dots in the comparison image CI are compared.
[0068] By the processing of steps 814 and 815, it is possible to detect an image mismatch between the reference image RI and the comparison image CI. As described above, this mismatch is caused by the imaging device 2 being tilted with respect to the pattern sheet PS in the second shooting compared to the first shooting. Therefore, by detecting the mismatch between the images, it is possible to determine the difference in the shooting conditions.
[0069] Returning to the explanation of Fig. 8, the control device compares the inter-dot average luminance value and the inter-dot average luminance value for a specific dot calculated in step 808 with the inter-dot average luminance value and the inter-dot average luminance value for the corresponding dot calculated for the reference image, and calculates a difference between the two. It also determines whether this difference value is within a predetermined threshold value (step 816). The inter-dot average luminance value and the inter-dot average luminance value difference between the two images (reference image RI and comparison image CI) are calculated for all dots, and it is determined whether they are within the threshold value.
[0070] An example of the difference in the intra-dot average luminance value and the inter-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 with reference to Figures 11 and 12. Note that the examples shown in Figures 11 and 12 are different from the examples shown in Figures 9 and 10.
[0071] Fig. 11(a) shows an example of a pattern array PA in a reference image RI. As shown in Fig. 11(a), each dot in the pattern array PA has approximately 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), the size of each dot in the pattern array PA is larger in the area surrounded by the dashed line than the dot 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 photographing being different from that at the time of the second photographing.
[0073] FIG. 12(a) shows a reference image dot-to-dot area DA between adjacent dots in the reference image RI. RDinter FIG. 12(b) shows an example of a comparative image dot-to-dot area DA between adjacent dots in the comparative image CI. CDinter Here is an example:
[0074] As shown in FIG. 12, the reference image dot-to-dot area DA RDinter does not overlap with either of the two dots (reference image dots RD1 and RD2) in the reference image RI. In other words, the reference image dot-to-dot area DA RDinter So there is no black part.
[0075] On the other hand, the inter-dot area DA of the comparison image CDinter In other words, the area between the dots in the comparative image CI overlaps with both of the dots in the comparative image CI (the comparative image dots CD1 and CD2). CDinter So there's a black part.
[0076] Therefore, the reference image dot area DA RDinter The average inter-dot luminance value for the comparison image inter-dot area DA CDinter The difference between the dot average luminance value and the average luminance value between the dots is a certain difference value. By setting the threshold within this difference value range, the difference between the two will exceed the threshold.
[0077] By setting the threshold value as described above, the reference image dot RD1 and the comparison image dot CD1 have substantially the same center coordinates, so that the area within the dots DA intra The difference value of the average brightness value within the dot for the reference image dot RD2 and the comparison image dot CD2 does not exceed the threshold value.
[0078] On the other hand, the inter-dot area DA of the comparison image CDinter and the reference image dot-to-dot area DA RDinter When the average luminance value of the two images is compared, the difference value exceeds the threshold value, and as a result, a mismatch between the reference image and the comparison image is detected.
[0079] By the process of step 816, as described above, even if the central coordinates of the dots in the two images are substantially the same and the sizes of the dots are different, it is possible to detect the 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 time of the second shooting. Therefore, by detecting the mismatch between the images, it is possible to determine the difference in the shooting conditions.
[0080] In this embodiment, the average intra-dot luminance value and the average inter-dot luminance value are compared for all dots in the pattern array PA for the reference image RI and the comparison image CI, but it is not necessary to compare all dots. For example, the comparison may be performed only for dots within a predetermined area in both the reference image RI and the comparison image CI.
[0081] In this embodiment, the approximate straight lines, the average intra-dot luminance value, and the average inter-dot luminance value for the dot rows and dot columns of the reference image RI and the comparison image CI are compared, but it is not necessary to compare all of them. It is also possible to compare one or more of the approximate straight lines, the average intra-dot luminance value, and the average inter-dot luminance value for the dot rows and dot columns.
[0082] As described above, the image inspection system according to the embodiment has been described. According to this embodiment, it is possible to detect discrepancies occurring in any area between two images.
[0083] The difference values for the above-mentioned approximate straight line, the intra-dot average luminance value, and the inter-dot average luminance value may be output to an output device 4 coupled to the computer device 1. By outputting the difference values, the user can, for example, grasp the degree to which the imaging device 2 is tilted, and can take this into consideration when retaking the second image capture.
[0084] Also, during the first or second shooting, the inclination of the imaging device 2 and / or the brightness of the location where the image is shot may be detected and associated with the difference values for the approximation line, the average intra-dot luminance value, and the average inter-dot luminance value, and stored in the storage device of the computing device 1. In this way, the inclination of the imaging device 2 corresponding to the difference value can be output to the output device 4, and feedback can be provided to the user.
[0085] It should be noted that the hardware components described in the above embodiment are merely exemplary, and other configurations are possible. Also, the order of the processes described in the above embodiment does not necessarily have to be performed in the order described, and may be performed in any order. Furthermore, additional steps may be newly added without departing from the basic concept of the present invention.
[0086] Furthermore, 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, which may be stored in a non-transitory storage medium. Examples of non-transitory storage media include read-only memory (ROM), random access memory (RAM), registers, cache memory, semiconductor memory devices, magnetic media such as internal 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 computing device connected to an imaging device having a single camera, receiving a first image including at least a pattern array from the imaging device, the first image being generated based on capturing an image of a target by the single camera; calculating a first set of luminance values for the pattern sequence from the first image; receiving a second image including at least a pattern array from the imaging device that generated the first image, the second image being generated based on capturing an image of an object identical to the object captured by the single camera; calculating a second set of luminance values for the pattern sequence from the second image; calculating a set of difference values between the first set of luminance values and the second set of luminance values; detecting a mismatch between the first image and the second image by comparing the set of difference values to a predetermined threshold. A computing device comprising:
2. calculating the first set of luminance values from the first image by calculating luminance values for a first predetermined region in the pattern within each pattern in the pattern array; calculating, from the second image, a luminance value for a second predetermined area in the pattern in each pattern in the pattern array, thereby calculating the second set of luminance values; 2. The computing device of claim 1 .
3. the first pattern region includes a plurality of pixels, a luminance value for each of the pixels in the first pattern region is calculated, and an average of the calculated luminance values is calculated to calculate the first set of luminance values; the second pattern region includes a plurality of pixels, a luminance value of each of the pixels in the second pattern region is calculated, and an average of the calculated luminance values is calculated to calculate the second set of luminance values.
3. The computing device of claim 2.
4. calculating the first set of luminance values from the first image by calculating luminance values for a first predetermined inter-pattern region between adjacent patterns in the pattern array; calculating the second set of luminance values from the second image for predetermined second inter-pattern regions between adjacent patterns in the pattern array; A computing device according to any one of claims 1 to 3.
5. the first inter-pattern region includes a plurality of pixels, a luminance value for each of the pixels in the first inter-pattern region is calculated, and an average of the calculated luminance values is calculated to calculate the first set of luminance values; the second inter-pattern region includes a plurality of pixels, a luminance value of each of the pixels in the second inter-pattern region is calculated, and an average of the calculated luminance values is calculated to calculate the second set of luminance values.
5. A computing device as claimed in claim 4.
6. A method implemented by a computing device coupled to an imaging device having a single camera, comprising: receiving a first image from the imaging device, the first image including at least a pattern array, the first image being generated based on capturing an image of a target by the single camera; calculating a first set of luminance values for the pattern sequence from the first image; receiving a second image including at least a pattern array from the imaging device that generated the first image, the second image being generated based on capturing an image of an object identical to the object captured by the single camera; calculating a second set of luminance values for the pattern sequence from the second image; calculating a set of difference values between the first set of luminance values and the second set of luminance values; detecting a mismatch between the first image and the second image by comparing the set of difference values to a predetermined threshold; A method comprising:
7. A computer program comprising computer executable instructions which, when executed by a computing device, cause the computing device to carry out the method of claim 6.
Citation Information
Patent Citations
Id card preparation system
JP2003044791A
Image processing apparatus, camera calibration processing apparatus and method, and computer program
JP2004088247A
Image processing apparatus
JP2016018340A
