Inspection device and inspection method

JP7615763B2Active Publication Date: 2025-01-17OMRON CORP
View PDF 10 Cites 0 Cited by

Patent Information

Application Number
JP2021030427
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Filing Date
2021-02-26
Publication Date
2025-01-17
Estimated Expiration
2041-02-26

AI Technical Summary

Benefits of technology

【0016】 本発明によれば、検査対象物に歪みが生じて撮影された場合であっても精度よく良品判定が可能となる。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007615763000001
    Figure 0007615763000001
  • Figure 0007615763000002
    Figure 0007615763000002
  • Figure 0007615763000003
    Figure 0007615763000003
Patent Text Reader

Abstract

To provide an inspection device which can accurately determine a non-defective product even when a subject is imaged with deformation.SOLUTION: An inspection apparatus includes: storage means for storing non-defective product images; acquisition means which acquires an input image; detection means which detects a region corresponding to each of search models corresponding to a plurality of subdivided regions of the non-defective product images, from the input image; correction means which corrects the input image; and inspection means which compares the corrected input image with the non-defective product images to determine whether a subject is defective or not. The detection means defines positions of the search models in the input image corresponding to a reference position, as detection positions of the search models. The correction means corrects deformation of the input image by linear transformation which transforms a quadrangle formed of the detection positions of the search models in the input image to a rectangle while storing a ratio of positions of points located on the sides thereof.SELECTED DRAWING: Figure 2
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present disclosure relates to an inspection apparatus and an inspection method. [Background technology]

[0002] In the visual inspection of products using image processing, there is a method for determining whether a product is good or bad based on a difference comparison between a preregistered good product image and an image of the product being inspected. When determining whether a pattern formed on an object to be inspected is to be determined, the object is photographed in a state where the whole or part of the object is deformed, and a slight positional shift in the image caused by this is detected as a difference, and a good product may be erroneously determined to be defective.

[0003] One method to avoid such erroneous judgments is to exclude the vicinity of the edges (ends) in the images from the comparison target when comparing the differences in the images, or to change the inspection method for the edge parts (such as lowering the judgment threshold or comparing the edge direction).However, if the amount of partial pattern misalignment is large compared to the size of the defect to be detected or the fineness of the pattern itself, the misaligned part of the pattern may extend beyond the range near the edge, and the product may be judged to be defective.

[0004] Another method is to use projective transformation to correct the entire captured image so that the distortion occurring in the inspection target is the same as that of a non-defective pattern, and then compare the image difference with the non-defective pattern (Patent Document 1). However, if the image deformation is not uniform, projective transformation of the entire image cannot restore the image to the same state as the non-defective pattern. Another possible method is to divide the image into multiple parts, measure the positional deviation of each small area, and deform and combine each small area by projective transformation. However, projective transformation creates steps at the boundaries of the small areas, making it difficult to accurately determine whether the product is defective or not even with this method. [Prior art documents] [Patent documents]

[0005] [Patent Document 1] Special Publication No. 2005-515527 Summary of the Invention [Problem to be solved by the invention]

[0006] The present disclosure aims to provide an inspection device that can accurately determine whether an object to be inspected is non-defective even if the object is photographed in a distorted state. [Means for solving the problem]

[0007] According to one aspect of the present disclosure, there is provided a method for detecting a defect in an input image by a linear transformation that converts a quadrangle formed by detecting positions of the search models in the input image, the method comprising: detecting a region corresponding to the search model from the input image for each of a plurality of search models obtained by dividing the good-quality image; correcting the input image; and inspecting the input image after correction and the good-quality image to determine whether the object to be inspected is a good-quality product. Each of the search models has a reference position, and each of the reference positions is aligned in a lattice pattern on the good-quality image. The detection means detects positions in the input image corresponding to each of the reference positions of the search models as detection positions of the search models. The correction means corrects distortion of the input image by linear transformation that converts a quadrangle formed by the detection positions of the search models in the input image into a rectangle while preserving the ratio of the positions of points on its sides. The inspection device is characterized in that it corrects

[0008] There is no particular limitation on the object to be inspected, but the inspection device disclosed herein can be suitably applied to products that are prone to individual variation and have designs, designs, letters, markings, uneven patterns, etc. on their surfaces.

[0009] The linear transformation used by the correction means in the present disclosure is preferably a linear transformation that converts a quadrangle formed from the detected positions of the search model in the input image into a rectangle while preserving the ratio of the positions of points present on the sides. Here, the "ratio of the positions of points present on the sides" is defined as, for example, AX / BX for a side AB and a point X on that side. Therefore, the linear transformation used by the correction means converts two adjacent vertices A and B of the quadrangle and a point X on the side AB into points A', B', and X' that satisfy AX / BX=A'X' / B'X'. Here, it is preferable to use a quadrangle whose vertices are the detected positions in the input image of the four rectangular search models.

[0010] According to this aspect, the input image is corrected for each small region, but since the ratio of the positions of the points on the sides is preserved, points on the common sides of adjacent small regions (rectangles) are converted to the same points, so that no step occurs in the corrected input image. Therefore, even if the object to be inspected has partial distortion (non-uniform distortion), the distortion can be appropriately corrected, and therefore inspection based on the corrected input image can be performed satisfactorily.

[0011] The inspection means in this aspect may perform a labeling process on the image difference between the corrected input image and the good product image, and determine whether the inspection object is a good product or not based on the number of labels or the feature amount for each label. If at least one search model is not detected from the input image, or if the detected position is outside the allowable range, the inspection means may determine that the inspection object is a defective product without comparing the corrected input image with the good product image, and otherwise may determine whether the inspection object is a good product or not based on a comparison between the corrected input image and the good product image.

[0012] If the search model is not detected from the input image, or if it is detected but is significantly displaced from the expected position, the distorted state of the image of the object to be inspected cannot be properly restored to the same state as the good product image. In such a case, a method of performing image difference without correcting the distortion is conceivable, but if this is done, it is expected that a large number of image differences will be detected, and the labeling process in the subsequent stage will take time. In particular, if the input image is large, the increase in processing time is significant, and there is a risk that the takt time cannot be secured. As described above, if the search model is not detected from the input image, or if it is detected but is significantly displaced from the expected position, it is possible to immediately determine that the product is defective, thereby shortening the time required for determination.

[0013] In this aspect, the apparatus may further include a registration unit for registering a search model among a plurality of regions obtained by dividing the non-defective image. The division of the non-defective image may be performed manually by a user, or may be performed automatically by an inspection device based on the number of divisions or the size of a search model designated by a user, or may be performed automatically by an inspection device based on the image size, the size of an inspection target part, etc.

[0014] It is preferable that the registration means does not register as the search model any area in which a searchable pattern does not exist among the multiple areas obtained by dividing the non-defective image. An area in which a searchable pattern does not exist is an area in which there are not enough features, for example, an area in which the total amount of edges in the area is equal to or less than a threshold. Note that, for an area not registered as the search model, the correction means may correct the distortion of the area by using the detection position of a nearby search model.

[0015] The present disclosure can be understood as an inspection device including at least a part of the above-mentioned means. The present disclosure can also be understood as a method including at least a part of the above-mentioned processing, or a program for implementing such a method by a computer, or a recording medium on which such a program is non-temporarily recorded. The present disclosure also includes an apparatus or method in which each of the above-mentioned means and processing is combined with each other as much as possible. Effect of the Invention

[0016] According to the present invention, even if an image of an inspection object is captured while the object is distorted, it is possible to accurately determine whether the object is non-defective. [Brief description of the drawings]

[0017] [Figure 1] Diagram showing the overall configuration of the inspection system [Diagram 2] Block diagram showing the functional configuration of the inspection device [Diagram 3] Flowchart showing the registration process of a non-defective product image and a search model [Figure 4] Diagram explaining the good product image and search model [Diagram 5] Inspection process flow chart [Figure 6] FIG. 1 is a diagram illustrating a correction process for an input image. [Figure 7] FIG. 1 is a diagram illustrating a correction process for an input image. [Figure 8] (A) An example of an input image, (B) the difference from a good image without correction, (C) the difference from a good image with correction DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0018] <Application Examples> An application example of the present invention will be described with reference to Fig. 1. Fig. 1 shows an inspection system 10 to which the present invention is applied. Here, the inspection system 10 is responsible for inspection in a process of attaching a label L printed by a label printer 1 to a packaging box B. A camera 2 takes an image of the label L attached to the packaging box B and passes it to an image sensor controller 3. The image sensor controller 3 judges whether the label L is good or defective based on the captured image, and passes the judgment result to a PLC 4. The PLC 4 controls the line so that the packaging box B is shipped if it is judged to be good, and the packaging box B is discharged if it is judged to be defective.

[0019] Here, even if the label L is a non-defective product, a difference may occur between the image captured by the camera 2 and the pre-registered non-defective product image due to the following reasons. -Changes in height, angle, and unevenness of packaging box B to which the sticker is to be applied - Label placement misalignment -Expansion of the label L itself Image distortion caused by the lens of Camera 2

[0020] Image distortion caused by the lens occurs in the same way every time and is easy to correct, but other factors differ for each inspection and are difficult to correct. Also, the entire label L is not necessarily distorted uniformly, and distortion may occur partially.

[0021] Therefore, in the inspection system 10, for each of the multiple search models obtained by dividing the non-defective image, the region corresponding to the search model is detected from the input image, the input image is corrected based on the detected position, and then the difference from the non-defective image is taken for inspection. The input image is corrected by a linear transformation that converts a quadrangle formed by the search model detection positions into a rectangle while preserving the ratio of the positions of the points on its sides.

[0022] By performing this type of correction, it is possible to correct distortions that differ from test to test, or that are localized. Even if there is a defect, it can be correctly corrected, and therefore the accuracy of the non-defective product determination can be improved.

[0023] <Embodiment> The inspection system 10 according to this embodiment will be described in more detail below with reference to the drawings.

[0024] 2 is a block diagram showing the functional configuration of the image sensor controller 3. The image sensor controller 3 is responsible for the main function of component inspection, and corresponds to the inspection device in the present invention. The image sensor controller 3 has, as its functional units, an image input unit 21, an image registration unit 22, a memory unit 23, a detection unit 24, an image correction unit 25, an inspection unit 26, and an output unit 27. Each of these functional units is realized by a general-purpose arithmetic processor provided in the image sensor controller 3 loading a program into memory and executing it. However, some or all of these functional units may be realized by a dedicated hardware device.

[0025] The details of each of the above functional units will be described in the explanation of the processing with reference to the flowcharts.

[0026] (Registration process of good product images and search models) The registration process for registering a non-defective product image and a search model will be described with reference to Fig. 3 and Fig. 4. Fig. 3 is a flowchart showing the flow of the process performed by the image registration unit 22, and Fig. 4 is a diagram for explaining a non-defective product image and a search model.

[0027] In step S31, the image registration unit 22 acquires an image showing a non-defective product. The acquisition method is not particularly limited, and the image may be captured by the camera 2, or may be acquired from another device via communication. Image 40 in FIG. 4A is an example of an image acquired in step S31. Image 40 shows a label 41 which is a non-defective product. Here, an example is shown in which image 40 shows one label, but image 40 may show multiple non-defective products.

[0028] In step S32, the image registration unit 22 receives from the user a designation of a range of the acquired image that should be registered as a non-defective product image. For example, the user designates a registration range 42 in the image 40 so as to include the label 41. The registration range 42 is generally designated as a rectangle, but the shape is not particularly limited. Note that the image registration unit 22 may automatically determine the registration range by image processing without receiving a designation of the registration range 42 from the user.

[0029] In step S33, the image registration unit 22 divides the registration range 42 to determine a plurality of divided regions. In FIG. 4B, the registration range 42 is divided into 16 divided regions 43 of 4×4. The method of dividing the registration range 42 may be based on a user's designation, or may be automatically performed by the image registration unit 22. For example, the user may designate the number of divisions in the vertical direction and the horizontal direction, or may designate the size of one divided region. Alternatively, the image registration unit 22 may determine the number of divisions in the vertical direction and the horizontal direction so that the size of the divided region is appropriate according to the image size of the registration range 42 and the size of the inspection object.

[0030] Furthermore, the image registration unit 22 sets a reference position 44 in each registration range. The reference position 44 may be set based on a user's specification, or may be automatically set by the image registration unit 22. The reference positions 44 are preferably arranged in a lattice pattern on the good product image. The reference positions 44 are adopted as reference positions of a search model, which will be described later. Therefore, the reference positions may be set before the search model is registered. If the divided regions 43 are all rectangular and of the same size as shown in FIG. 4B, the reference positions are arranged in a lattice pattern on the good product image by setting the same position (for example, the center) in each divided region 43 as the reference position.

[0031] In step S34, the image registration unit 22 determines an area to be registered as a search model from among the multiple divided areas 43. For example, which divided area 43 is to be registered as a search model? The image registration unit 22 may receive a designation from the user as to whether or not to register the divided region 43, and make the above-mentioned decision based on this designation. Alternatively, the image registration unit 22 may decide not to register the region in the divided region 43 in which no searchable pattern exists as a search model, and to register only the other regions as search models. Whether or not a searchable pattern exists in the divided region 43 can be determined depending on whether or not there is a sufficient feature amount in the divided region 43, for example, whether or not the sum of the edge amount or the harmonic components of the spatial frequency is equal to or greater than a threshold. Note that, when no registrable pattern exists in the divided region 43, the image registration unit 22 may prompt the user not to register the divided region 43 as a search model, and the final decision on whether or not to register the divided region 43 may be made based on a designation from the user.

[0032] In step S34, the image registration unit 22 stores the registration range 42 in the storage unit 23 as a non-defective product image, and also stores the divided area 43 determined in step S33 in the storage unit 23 as a search model. The search model does not need to be the entire divided area 43, and only a part of the divided area 43 may be registered as the search model. In addition, the reference position 44 of each search model is also stored in the storage unit 23 in association with the search model. In addition, information regarding the position of the divided area 43 within the registration range 42 is also stored in the storage unit 23 as information regarding the search model.

[0033] (Inspection processing) The inspection process will be described with reference to Fig. 5 to Fig. 8. The inspection process is roughly divided into distortion correction for an input image (S40 to S45 in Fig. 5) and quality determination for the corrected input image (S46 to S50).

[0034] In step S40, the image input unit 21 acquires an input image of an object to be inspected captured by the camera 2. In this embodiment, as shown in Fig. 1, the object to be inspected is a label L printed by a label printer 1 and affixed to a packaging box B.

[0035] In steps S41 to S44, the detection unit 24 detects, from the input image, an area corresponding to each of the plurality of search models stored in the storage unit 23. Each step will be described in detail below.

[0036] In step S41, the detection unit 24 selects one of a plurality of search models stored in the storage unit 23. In the following description, unless otherwise specified, it is assumed that all divided regions obtained by dividing a non-defective product image into 16 regions as shown in FIG. 4B are registered as search models.

[0037] In step S42, the detection unit 24 detects an area corresponding to the selected search model from the input image. The detection unit 24 obtains the similarity (correlation) with the search model at each position for the entire input image or the range where the search model is assumed to exist, determines that the search model exists at the position with the highest similarity, and outputs the detected position. The search range when detecting the search model can be a neighborhood area of ​​the area corresponding to the search model, and more specifically, can be an area obtained by expanding the area corresponding to the search model by a predetermined size in the up, down, left, and right directions. The detected position of the search model is, for example, a position corresponding to the reference position of the search model, but may be a position corresponding to another point of the search model. Note that, if the highest similarity is lower than a predetermined detection threshold, the detection unit 24 outputs a result that the search model was not detected from the input image.

[0038] In step S43, the detection unit 24 judges whether or not the search model is detected within the allowable range. If the search model is not detected, or if the search model is detected but outside the allowable range (S43-NO), the process proceeds to step S50 without performing any further processing. It is determined to be a defective product, and the determination result is output from the output unit 27 to the PLC 4. On the other hand, if the search model is detected to be within the allowable range (S43-YES), the process proceeds to step S44.

[0039] In step S44, the detection unit 24 determines whether the detection process has been completed for all search models stored in the storage unit 23, and if there are unprocessed search models, the process returns to step S42 and performs the same process on the next search model.

[0040] If all search models are detected within the allowable range in the input image, the process proceeds to step S45. Conversely, if at least one search model is not detected from the input image, or if the detected position is outside the allowable range, the process proceeds to step S50 without further processing and the product is determined to be defective.

[0041] Although the processing of steps S41 to S44 has been described as being executed sequentially for each search model, it is also possible to execute searches of multiple search models simultaneously by parallel processing. When performing parallel processing, if any one search model is not detected, or is detected but outside an allowable range (S43-NO), the other searches being executed in parallel at that time may be terminated and the process may proceed to step S50, or the process may proceed to step S50 when all searches being executed in parallel are completed.

[0042] In step S45, the image correction unit 25 performs distortion correction on the input image based on the detection positions of the search model. The left diagram in FIG. 6 shows the detection positions 61 of the search model. Since the arrangement of the detection positions 61 is distorted, the image correction unit 25 corrects the entire image so that the distortion is removed and the detection positions 63 after correction are aligned. Specifically, the image correction unit 25 converts the detection positions 61 into the corrected positions 63 by a linear transformation that converts a quadrangle (one example is quadrangle 62) consisting of the detection positions of four search models adjacent vertically and horizontally into a rectangle while preserving the ratio of the positions of the points on the sides. The image correction unit 25 corrects the entire input image by applying different linear transformations to each quadrangle.

[0043] An example of the linear transformation performed by the image correction unit 25 will be described in more detail with reference to FIG. 7. A quadrangle ABCD indicates one of the quadrangles consisting of the detection position of the search model in the input image. The linear transformation performed by the image correction unit 25 transforms the quadrangle ABCD into a rectangle EFGH that coincides with the reference position of the search model in the non-defective image. It is assumed that the linear transformation causes a point P in the quadrangle ABCD to correspond to a point Q in the quadrangle EFGH. In this case, points q1 and q2 are the intersections of the straight line that passes through point Q and is parallel to the side EH (FG), and the sides EF and GH. Then, a:b=q1Q:Qq2, and c:d=Fq1:q1E=Gq2:q2H. In the quadrangle ABCD, the point that divides the side BA into c:d is p1, the point that divides the side CD into c:d is p2, and the point that divides the side p1p2 into a:b is P. The linear transformation in this example is defined as a transformation that associates point P obtained in this way with point Q. Note that, although the intersection of a line that passes through point Q and is parallel to side EH is used here, the same transformation can be obtained by using the intersection of a line that passes through point Q and is parallel to side EF.

[0044] More specifically, the linear transformation in the above example is defined as a transformation that associates an arbitrary point P(X,Y) inside the quadrangle ABCD with a point Q(x,y) expressed by the following equation. X1=(sx2×(y-dy1)+sx1×(dy2-y)) / (dy2-dy1) Y1=(sy2×(y-dy1)+sy1×(dy2-y)) / (dy2-dy1) X2=(sx3×(y-dy1)+sx4×(dy2-y)) / (dy2-dy1) Y2=(sy3×(y-dy1)+sy4×(dy2-y)) / (dy2-dy1) X=(X2×(x-dx1)+X1×(dx2-x)) / (dx2-dx1) Y=(Y2×(x-dx1)+Y1×(dx2-x)) / (dx2-dx1)

[0045] Here, (sx1,sy1), (sx2,sy2), (sx3,sy3), and (sx4,sy4) correspond to the coordinates of points A, B, C, and D, respectively. Similarly, (dx1,dy1) correspond to the coordinates of point E, (dx2,dy2) correspond to the coordinates of point G, (X1,Y1) correspond to the coordinates of point p1, and (X2,Y2) correspond to the coordinates of point p2, respectively.

[0046] Note that points E (dx1, dy1) and G (dx2, dy2) are the original positions of points A (sx1, sy1) and C (dx2, sy2) and are known. By eliminating the four variables X1, X2, Y1, and Y2 from these six equations, a transformation can be defined that associates (X, Y) with (x, y) using known values.

[0047] This transformation is an example of a transformation that preserves the ratio of the positions of points on the sides of a quadrilateral. For example, if y=dy1, then X1=sx1, Y1=sy1, X2=sx4, Y2=sy4, X=(sx4×(x-dx1)+sx1×(dx2-x)) / (dx2-dx1) Y=(sy4×(x-dx1)+sy1×(dx2-x)) / (dx2-dx1) In other words, the coordinate transformation of the points on side AD is determined only by the coordinates of the two vertices. Therefore, in the transformation of the quadrangle that shares this side, the points on this quadrangle are transformed in the same way, so no step occurs on the image.

[0048] The image correction unit 25 determines the pixel value of the point (x, y) of the corrected image as the pixel value of the point (X, Y) of the input image that corresponds to the point (x, y) by the above conversion. If the coordinates of the point (X, Y) are not integers, the pixel value may be determined by interpolation from surrounding pixels.

[0049] In addition, if a part of the area is excluded from the search model registration, the detection position of the area cannot be obtained. In this case, the image correction unit 25 estimates the detection position of the area by interpolation from the detection positions of the adjacent search models, and performs the conversion in the same manner as described above using the estimated position.

[0050] In this manner, the image correction process of step S45 is completed, and an image in which the distortion has been corrected (corrected image) is obtained.

[0051] In step S46, the inspection unit 26 extracts an image difference between the corrected image and the non-defective image. Then, in step S47, the inspection unit 26 judges whether the object to be inspected in the input image is a non-defective product based on the obtained image difference. In this embodiment, a labeling process is performed on the difference image, and a non-defective product is judged using the obtained number of labels or feature values ​​for each label. The difference image is a binary image according to the presence or absence of a difference, and the labeling process is a process of assigning a different label (value) to each connected component of the difference image (binary image). For example, the inspection unit 26 judges that the product is defective if the number of labels, i.e., the number of connected components, is equal to or greater than a judgment threshold. Alternatively, the inspection unit 26 may judge the product to be non-defective based on whether feature values ​​such as the area or shape of the difference region for each label satisfy a predetermined standard.

[0052] If the standard for a pass / fail product is met in the pass / fail product judgment in step S47 (YES in S48), inspection unit 26 judges that the inspection object shown in the input image is a pass / fail product (S49), and output unit 27 outputs a message to that effect to PLC 4. Conversely, if the standard for a pass / fail product is not met (NO in S48), inspection unit 26 judges that the inspection object shown in the input image is a defective product (S50), and output unit 27 outputs a message to that effect to PLC 4. PLC 4 controls the line so that packaging boxes B judged to be pass / fail products are shipped, and packaging boxes B judged to be defective are discharged.

[0053] FIG. 8 is a diagram for explaining the inspection in this embodiment. FIG. 8A shows a label to be inspected. FIG. 8B is an example of an input image showing a defective product with a defect in the number below the barcode, with the number being "8" instead of "3" if it were a good product. FIG. 8B is a diagram showing the image difference using a conventional method. Many differences due to label distortion are detected, making it difficult to distinguish them from defects. FIG. 8C is a diagram showing the image difference after distortion correction using this embodiment. By correcting the distortion, only the defective areas (areas surrounded by dotted lines) can be detected as differences, allowing appropriate product judgment. Note that the rectangles in FIG. 8B and FIG. 8C indicate the inspection range.

[0054] (Advantageous Effects of the Present Embodiment) According to this embodiment, the distortion appearing in the image of the object to be inspected is corrected, and then the image difference between the image and a good product image is taken for inspection, so that the effect of the distortion can be eliminated to determine defects. Inspection objects such as labels, which are prone to individual variation, are prone to distortion at the time of image capture. The distortion that occurs may not be uniform across the entire object but may be localized, and projective transformation of the entire object cannot provide appropriate correction. Therefore, in this embodiment, correction is performed for each small area, and linear transformation is used to prevent steps (shifts) from occurring at the boundaries of the small areas. This makes it possible to appropriately remove distortion and perform inspection based on image difference with high accuracy.

[0055] In addition, some areas of a non-defective product image may not have detectable features. By not registering such areas as search models, but instead calculating the amount of positional deviation by interpolation from the positions of adjacent search models and then performing the interpolation, appropriate correction can be performed on the featureless areas in the same way as on other areas, and inspection based on image differences can be performed with high accuracy.

[0056] In addition, in this embodiment, if an image corresponding to the search model is not detected from the input image, or if an image corresponding to the search model is detected but the amount of positional deviation is large, the product is determined to be defective without performing a judgment process based on the image difference at the subsequent stage. In such a case, performing an inspection based on the image difference may significantly increase the processing time. This is because if there are many image differences, the number of connected areas increases and the time required for the labeling process increases significantly. Therefore, in this embodiment, if at least one search model is not correctly detected, the subsequent processes are not performed, thereby shortening the processing time and ensuring the takt time.

[0057] <Other> The above-described embodiment merely illustrates an exemplary configuration of the present invention. The present invention is not limited to the above-described specific embodiment, and various modifications are possible within the scope of the technical concept thereof.

[0058] For example, the object to be inspected was a label affixed to a packaging box, but it may be a label before being affixed to a packaging box. Furthermore, the object to be inspected may be any object, but the inspection device of this embodiment is particularly useful for inspecting products that are prone to individual variation and have designs, patterns, letters, markings, uneven patterns, etc. on their surfaces. The material of the product is not particularly limited, and may be, for example, paper, cloth, plastic, etc. The printing material is also not particularly limited, and may be, for example, pigment ink, dye ink, etc. Furthermore, the content to be printed is also not particularly limited, and examples include letters, symbols, figures, electronic components, and wiring.

[0059] <Additional Notes> 1. A storage means (23) for storing a non-defective product image (42) showing a non-defective product; An acquisition means (21) for acquiring an input image including an object to be inspected; a detection means (24) for detecting, from the input image, an area corresponding to each of the plurality of search models (43), at least a portion of at least one of the plurality of areas obtained by dividing the non-defective product image as a search model (43); A correction means (25) for correcting the input image; an inspection means (26) for comparing the corrected input image with the non-defective image to determine whether the object to be inspected is a non-defective product; Equipped with Each of the search models (43) has a reference position (44), and each of the reference positions is aligned in a grid pattern on the non-defective product image; The detection means (24) determines positions in the input image corresponding to the respective reference positions of the search model (43) as detection positions of the search model, The correction means (25) corrects the distortion of the input image by a linear transformation that converts a quadrangle formed by the detected positions of the search model in the input image into a rectangle while preserving the ratio of the positions of the points on its sides. An inspection device (3).

[0060] 2. An inspection method performed by an inspection device (3), An acquisition step (S40) of acquiring an input image including an object to be inspected; a detection step (S42) of dividing a non-defective product image (42) showing a non-defective product into a plurality of regions, and determining at least a portion of the region as a search model (43), and detecting a corresponding region, which is a region corresponding to the search model, from the input image for each of the plurality of search models (43); a correction step (S45) of correcting the input image; an inspection step (S46) of comparing the corrected input image with the non-defective image to determine whether the inspection object is a non-defective product; Including, Each of the search models (43) has a reference position (44), and each of the reference positions is aligned in a grid pattern on the non-defective product image; In the detection step (S42), a position in the input image corresponding to each reference position of the search model is set as a detection position of the search model; In the correction step (S45), a quadrangle formed by the detected positions of the search model in the input image is converted into a rectangle while preserving the ratio of the positions of the points on its sides by linear transformation to correct the distortion of the input image. An inspection method comprising: [Explanation of symbols]

[0061] 1: Label printer 2: Camera 3: Image sensor controller 4: PLC 10: Inspection system 21: Image input unit 22: Image registration unit 23: Memory unit 24: Detection section 25: Image correction section 26: Inspection section 27: Output section

Claims

1. A storage means for storing a non-defective product image showing a non-defective product; An acquisition means for acquiring an input image including an object to be inspected; a detection means for detecting an area corresponding to each of a plurality of search models from the input image, the area being at least a part of at least one of a plurality of regions obtained by dividing the non-defective product image, as a search model; a correction means for correcting the input image; an inspection means for comparing the corrected input image with the non-defective image to determine whether the object to be inspected is a non-defective product; Equipped with The search models each have a reference position, and the reference positions are aligned in a grid pattern on the non-defective product image. the detection means determines positions in the input image corresponding to the respective reference positions of the search models as detection positions of the search models; the correction means performs linear transformation on each of the quadrangles formed by the detected positions of the search model in the input image to convert the quadrangles into a rectangle while preserving the ratio of the positions of the points on the sides of the quadrangles, thereby correcting distortion of the entire input image; An inspection device comprising:

2. the inspection means performs a labeling process on the image difference between the corrected input image and the non-defective image, and judges whether the inspection object is a non-defective product or not based on the number of labels or the feature amount for each label.

2. The inspection device according to claim 1.

3. When at least one search model is not detected from the input image, or when the detected position is outside an allowable range, the inspection means determines that the inspection object is defective without comparing the corrected input image with the good product image, and otherwise determines whether the inspection object is good or not based on a comparison between the corrected input image and the good product image.

3. The inspection device according to claim 1 or 2.

4. The method further includes a registration means for registering a search model among a plurality of regions obtained by dividing the non-defective product image. The inspection device according to any one of claims 1 to 3.

5. the registration means does not register, as the search model, any area in which a searchable pattern does not exist among the multiple areas obtained by dividing the non-defective product image; 5. The inspection apparatus according to claim 4.

6. The correction means corrects distortion of an area not registered as the search model by using a detection position of a nearby search model.

6. The inspection device according to claim 4 or 5.

7. The correction means corrects the input image using a linear transformation that converts a point (X, Y) within a quadrangle formed by the detected positions of the search model in the input image into a point (x, y) expressed by the following formula, where the vertices of the quadrangle are (sx1, sy1), (sx2, sy2), (sx3, sy3), and (sx4, sy4), and the original position of (sx1, sy1) is (dx1, dy1), and the original position of (sx2, sy2) is (dx2, dy2): The inspection device according to any one of claims 1 to 6. X1=(sx2×(y-dy1)+sx1×(dy2-y)) / (dy2-dy1) Y1=(sy2×(y-dy1)+sy1×(dy2-y)) / (dy2-dy1) X2=(sx3×(y-dy1)+sx4×(dy2-y)) / (dy2-dy1) Y2=(sy3×(y-dy1)+sy4×(dy2-y)) / (dy2-dy1) X=(X2×(x-dx1)+X1×(dx2-x)) / (dx2-dx1) Y=(Y2×(x-dx1)+Y1×(dx2-x)) / (dx2-dx1)

8. An inspection method performed by an inspection device, comprising: An acquisition step of acquiring an input image including an object to be inspected; a detection step of using at least a part of at least one of a plurality of regions obtained by dividing a non-defective product image containing a non-defective product as a search model, and detecting a corresponding region that corresponds to the search model from the input image for each of the plurality of search models; a correction step of correcting the input image; an inspection step of comparing the corrected input image with the non-defective image to determine whether the inspection object is a non-defective product; Including, The search models each have a reference position, and the reference positions are aligned in a grid pattern on the non-defective product image. In the detection step, a position in the input image corresponding to each reference position of the search model is set as a detection position of the search model; In the correction step, a linear transformation is performed on each of the quadrangles formed by the detected positions of the search model in the input image, to convert the quadrangles into a rectangle while preserving the ratio of the positions of the points on the sides of the quadrangle, thereby correcting distortion of the entire input image. An inspection method comprising:

9. A program for causing a computer to execute each step of the method according to claim 8.

Citation Information

Patent Citations

  • Device and method for image conversion, memory medium and program

    JP2003303341A

  • Separation registration

    JP2005515527A

  • Image distortion correction method, and three-dimensional shape measuring instrument

    JP2007292619A

  • Visual inspection apparatus, visual inspection method and visual inspection program

    JP2011075289A

  • Two-dimensional code, image reader, image reading method, program, and storage medium

    JP2012238097A