Apparatus for visual inspection and method for visual inspection
The apparatus enhances inspection accuracy by distinguishing fixed and variability regions, employing a difference method in aligned areas and AI in misaligned regions, addressing misalignment issues and resolution limitations in existing technologies.
Patent Information
- Application Number
- JP2025082294
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2025-05-16
- Publication Date
- 2026-11-27
Smart Images

Figure 2026185288000001_ABST
Abstract
Description
[Technical Field]
[0001] The present invention relates to an apparatus and method for inspecting the appearance of an object using image data. [Background Art]
[0002] At manufacturing sites such as factories, inspections are sometimes conducted to determine the quality of an inspection object's appearance based on the difference between a pre-prepared image of a non-defective product and an image of the inspection object. An image processing apparatus has been proposed that detects abnormalities in the appearance of an article to be inspected using a difference image that represents, for each pixel, a grayscale difference value, which is the difference in grayscale values between a reference image representing an article with no appearance abnormalities and an inspection target image capturing the article to be inspected (Patent Document 1). [Prior Art Documents] [Patent Documents]
[0003] [Patent Document 1] Japanese Unexamined Patent Application Publication No. 2025-064389 [Summary of the Invention] [Problem to be Solved by the Invention]
[0004] In the difference method that calculates the difference between images, for example, when nameplates are manually affixed to the surface of each inspection object, if the nameplates are misaligned, accurate inspection results cannot be obtained. To address this issue, AI (Artificial Intelligence) inspection has been proposed in which an AI model is trained by providing a large number of images in advance, and the trained AI model is used to inspect the appearance of articles. However, in many cases, AI inspection has lower resolution compared to the difference method, and accurate shape information may not be obtained.
[0005] An object of one aspect of the present invention is to provide an apparatus and method capable of performing an accurate appearance inspection on an object in which misalignment may occur in a partial region within image data. [Means for solving the problem]
[0006] An appearance inspection apparatus according to one aspect of the present invention includes: a variance calculation unit that calculates the variance of pixel values for each pixel of a plurality of good product images; a region identification unit that identifies a first region in which the variance is less than or equal to a predetermined threshold and a second region in which the variance is greater than the threshold; an average good product image creation unit that creates an average good product image by calculating the average of pixel values for each pixel of the plurality of good product images; a first detection unit that detects defects in the appearance of an object to be inspected by calculating the difference between an image of an object to be inspected obtained by photographing the object to be inspected and the average good product image in the first region; and a second detection unit that detects defects in the appearance of an object to be inspected in the second region in a method different from that of the first detection unit, based on the image of the object to be inspected. [Effects of the Invention]
[0007] According to the above-described embodiment, accurate visual inspection can be performed on objects where positional misalignment may occur in some areas of the image data. [Brief explanation of the drawing]
[0008] [Figure 1] This figure shows an example of a visual inspection according to an embodiment of the present invention. [Figure 2] This figure shows an example of the functional configuration of an appearance inspection device according to an embodiment of the present invention. [Figure 3] This is a flowchart showing an example of a preparation process in the visual inspection method according to an embodiment of the present invention. [Figure 4] This figure shows an example of a good product image. [Figure 5] This figure shows examples of identified fixed and variable regions. [Figure 6] This figure shows an example of the procedure for creating an average good image from multiple good image files. [Figure 7] This figure shows an example of the procedure for training an AI model using images of good products. [Figure 8]This flowchart shows an example of a determination process in the visual inspection method according to an embodiment of the present invention. [Figure 9] This figure shows an example of a method for detecting defects in an image being inspected. [Figure 10] This figure shows an example of a defect list and an updated defect list. [Figure 11] This flowchart shows an example of a process for determining whether an object being inspected is a good product or a defective product. [Figure 12] This is a diagram (part 1) showing an example of the test result display screen displayed by the results display unit. [Figure 13] This is Figure (2) showing an example of the test result display screen displayed by the results display unit. [Figure 14] This figure shows an example of the hardware configuration of a visual inspection device. [Modes for carrying out the invention]
[0009] Figure 1 shows an example of a visual inspection according to an embodiment of the present invention. In the visual inspection according to the embodiment of the present invention, the object to be inspected 2 is photographed using a camera 1. That is, the object to be inspected 2 is placed within the shooting range of the camera 1. At this time, the posture of the object to be inspected 2 is adjusted so that a predetermined surface of the object to be inspected 2 is photographed by the camera 1. Alternatively, the camera 1 may be placed at a predetermined distance in a predetermined direction from the fixed object to be inspected 2.
[0010] The object to be inspected 2 is not particularly limited, but for example, it could be an industrial product manufactured in a factory. A nameplate 3 is attached to the surface of the object to be inspected 2. The nameplate 3 is a plate containing information related to the object to be inspected 2, and is made of materials such as metal, plastic, or paper. For example, the nameplate 3 contains information such as the name of the object to be inspected 2, model number, manufacturing serial number, manufacturing date, and production line number of the manufacturing plant. In this example, the nameplate 3 is assumed to be a sticker made of paper or similar material, and is manually attached to a designated location on the surface of the object to be inspected 2.
[0011] The appearance inspection device 4 acquires image data generated when the camera 1 images the inspection target 2. Then, the appearance inspection device 4 inspects whether there is any abnormality in the appearance of the inspection target 2 based on the acquired image data. At this time, the appearance inspection device 4 detects scratches, stains, and the like on the surface of the inspection target 2.
[0012] FIG. 2 illustrates an example of a functional configuration of the appearance inspection device 4. As illustrated in FIG. 2, the appearance inspection device 4 includes an image acquisition unit 11, a result display unit 12, a storage unit 13, and a control unit 20. The appearance inspection device 4 may further include other functions not illustrated in FIG. 2.
[0013] The image acquisition unit 11 acquires image data generated by the camera 1 illustrated in FIG. 1. The camera 1 and the appearance inspection device 4 may be communicably connected to each other via a communication line. In this case, the communication line may be a wired line, a wireless link, or include both of them. Further, the communication line may be a local area network or include a public network. Furthermore, the camera 1 and the appearance inspection device 4 do not necessarily need to be communicably connected to each other via a communication line.
[0014] The result display unit 12 creates an inspection result display screen indicating a result of the appearance inspection by the control unit 20. Then, the result display unit 12 causes a display device (not illustrated) to display the created inspection result display screen. The display device may be a part of the appearance inspection device 4 or may be connected to the appearance inspection device 4.
[0015] The storage unit 13 stores a plurality of non-defective product images, an average non-defective product image, a learned AI model, and the like. Each of the non-defective product images is obtained by imaging, with the camera 1, an inspection target that has been confirmed to have no abnormality (for example, scratches, stains) in appearance. The sizes (that is, the numbers of pixels) of the plurality of non-defective product images are the same as each other. The average non-defective product image and the learned AI model will be described later.
[0016] As shown in Figure 2, the control unit 20 includes a variance calculation unit 21, a region identification unit 22, an average good product image creation unit 23, an AI learning unit 24, detection units 25 and 26, an image measurement unit 27, and a determination unit 28. The control unit 20 may also include other functions not shown in Figure 2.
[0017] The variance calculation unit 21 calculates the variance value of each pixel in a plurality of good image files. This creates a variance map based on the good image files. Based on the results of the calculation by the variance calculation unit 21, the region identification unit 22 identifies a "fixed region (first region)" consisting of pixels whose variance value is below a predetermined threshold and a "variability region (second region)" consisting of pixels whose variance value is greater than that threshold.
[0018] The average good product image creation unit 23 creates an average image of multiple good product images. At this time, the average good product image creation unit 23 calculates the average of the pixel values of each pixel within a fixed region of each good product image. The AI learning unit 24 trains an AI model for visual inspection of items based on the multiple good product images. At this time, the AI learning unit 24 trains the AI model using images within the variability region of each good product image.
[0019] The detection unit 25 detects abnormalities in the appearance of the object to be inspected by calculating the difference between the image of the object to be inspected obtained by photographing the object in a fixed area and the average image of a good product. The detection unit 26 detects abnormalities in the appearance of the object to be inspected by inputting the image of the object to be inspected into a trained AI model in a variability area. In the following description, abnormalities detected by the detection units 25 and 26 may be referred to as "defects".
[0020] The image measurement unit 27 measures the location, shape, color, and other characteristics of each defect (scratch, stain, etc.) detected by the detection unit 25. In addition, the image measurement unit 27 may also measure the characteristics of each defect detected by the detection unit 26. The determination unit 28 determines whether the object being inspected is a good product or not based on the characteristics of the defects measured by the image measurement unit 27. As described above, this inspection result is displayed on a display device (not shown) by the result display unit 12.
[0021] In this way, the visual inspection device 4 creates a variance map of pixel values for good product images and identifies fixed regions with small variance values and variability regions with large variance values. Then, in fixed regions with small variability in pixel values, the visual inspection device 4 detects abnormalities in the appearance of the object to be inspected 2 by calculating the difference between the image of the object to be inspected obtained by photographing the object to be inspected 2 and the average good product image using a difference method. That is, in regions where it is assumed that there are no differences from the good product image other than defects such as scratches or dirt, a high-resolution difference method is used. Therefore, defects can be detected with high accuracy in these regions. Furthermore, in variability regions with large variability in pixel values, the visual inspection device 4 detects abnormalities in the appearance of the object to be inspected 2 using an AI method that utilizes a trained AI model. That is, in regions where positional misalignment may occur for each object to be inspected (in the example shown in Figure 1, the region where the nameplate 3 is attached), by applying the AI method, although the resolution is lower compared to the difference method, it is possible to determine the presence or absence of defects even when positional misalignment occurs. Therefore, the visual inspection apparatus 4 according to the embodiment of the present invention can detect abnormalities or defects in the appearance of the object to be inspected 2 with greater accuracy compared to cases where the difference method is applied to the entire image, or cases where an AI method is applied to the entire image.
[0022] Figure 3 is a flowchart showing an example of a preparation process in a visual inspection method according to an embodiment of the present invention. The preparation process is performed before the determination process, which determines whether or not the object to be inspected has defects.
[0023] In S1, the image acquisition unit 11 acquires multiple images of good products. These multiple images of good products are generated by individually photographing multiple inspection targets that have been confirmed to be free of defects with the camera 1. The image acquisition unit 11 then saves the acquired multiple images of good products to the storage unit 13. In the example shown in Figure 4, the image acquisition unit 11 acquires multiple images of good products 31 (31a, 31b, 31c, ...). The good product images 31a, 31b, and 31c each show the target objects 2a, 2b, 2c, ..., respectively.
[0024] In S2, the variance calculation unit 21 creates a variance map from multiple good product images 31. Specifically, the variance calculation unit 21 first obtains the pixel values of pixels at the same position (i.e., the same pixel coordinates) within each good product image 31. For example, if the image acquisition unit 11 acquires 100 good product images, the variance calculation unit 21 obtains 100 pixel values for each pixel coordinate. When brightness is represented by 8 bits, the range of the pixel value is from "zero" to "255". "Zero" represents the lowest brightness state, and "255" represents the highest brightness state. Note that each pixel may be represented by a combination of R (red) pixel value, G (green) pixel value, and B (blue) pixel value. Then, the variance calculation unit 21 calculates the variance of the pixel values for each pixel coordinate. Variance represents the degree of dispersion of an index that shows how far each pixel value is from its mean. Therefore, the variance of the pixel values is calculated by dividing the sum of the squares of the differences between each pixel value and its mean by the number of samples (i.e., the number of good images). The variance calculation unit 21 calculates the variance of the pixel values for each pixel coordinate. This creates a variance map.
[0025] The variance V(xi, yi) of the pixel values at pixel coordinates (xi, yi) on a good product image is expressed by the following formula (1). In formula (1), n represents the number of good product images stored in the storage unit 13. k(k=1~n) represents a variable that specifies one good product image from among the n good product images. pk(xi, yi) represents the pixel value at pixel coordinates (xi, yi) of the k-th good product image. μ(xi, yi) represents the average of the pixel values at pixel coordinates (xi, yi) for the n good product images.
number
[0026] In S3, the region identification unit 22 identifies fixed regions and variability regions based on the dispersion map. At this time, the region identification unit 22 binarizes the dispersion map using a predetermined dispersion threshold. Specifically, for each pixel coordinate, the region identification unit 22 compares the dispersion value calculated by the dispersion value calculation unit 21 with a predetermined dispersion threshold. The dispersion threshold is determined in advance, for example, by simulation. The region identification unit 22 then identifies regions consisting of pixels whose dispersion value is less than or equal to the dispersion threshold as fixed regions, and regions consisting of pixels whose dispersion value is greater than the dispersion threshold as variability regions.
[0027] In the example shown in Figure 4, each good product image 31 (31a, 31b, 31c) contains an image of the object 2a, 2b, and 2c, respectively. Here, it is assumed that when objects 2a, 2b, and 2c are photographed, their positions and orientations are appropriately set relative to camera 1. It is also assumed that objects 2a, 2b, and 2c are photographed against the same background. In this case, the images of the regions containing objects 2a, 2b, and 2c in the good product images 31a, 31b, and 31c are almost identical. Similarly, the images of the background regions in the good product images 31a, 31b, and 31c are also almost identical. Therefore, assuming that objects 2a, 2b, and 2c are good products and free from defects (scratches, dirt, etc.), the variance of pixel values for the same pixels in the good product images 31a, 31b, and 31c will be relatively small. In other words, if objects 2a, 2b, and 2c are good quality, the areas in which objects 2a, 2b, and 2c are captured become "fixed areas" where the pixel values essentially do not change from image to image. Similarly, the background area also becomes a fixed area.
[0028] However, each of the objects 2a, 2b, and 2c has a nameplate 3 attached to it. Here, the nameplate 3 is assumed to be attached manually. That is, the positions of the nameplates 3 on objects 2a, 2b, and 2c may be offset from each other. In the example shown in Figure 4, the position of the nameplate 3 attached to object 2b is shifted to the upper right relative to the position of the nameplate 3 attached to object 2a. The dotted line frame shown in the good product image 31b represents the position of the nameplate 3 attached to object 2a. Also, in object 2c, the nameplate 3 is attached at an angle. Therefore, the area where the nameplate 3 is attached will have a relatively large dispersion of pixel values for each pixel. In other words, even if objects 2a, 2b, and 2c are good products, the area where the nameplate 3 is attached will be a "variation area" where the pixel values can change from image to image.
[0029] In this way, the region identification unit 22 identifies fixed regions and variability regions based on the distribution map. For example, when the good product images 31 (31a, 31b, 31c) shown in Figure 4 are given, the fixed regions and variability regions shown in Figure 5 are identified. The variability regions correspond to the areas where the nameplate 3 is attached.
[0030] In S4, the average good image creation unit 23 creates an average good image by calculating the average of the pixel values of multiple good images for each pixel. However, for the variability region, the average good image is not used in the judgment process described later, so it is not necessary to calculate the average of the pixel values for each pixel. For example, the pixel value of each pixel in the variability region of the average good image may be set to "zero".
[0031] Figure 6 shows an example of a procedure for creating an average good product image from good product images 31 (31a, 31b, 31c). In this embodiment, a mask is applied to each good product image 31 (31a, 31b, 31c). The mask is created to extract images within a fixed region from the good product images. Then, the average good product image is obtained by calculating the average of each masked good product image. Therefore, the average good product image is an image that has the average image of multiple good product images within a fixed region, with black set in the variation region.
[0032] In S5, the AI learning unit 24 trains an AI model based on the images within the variability region of each good product image. For example, the AI learning unit 24 extracts features from the images within the variability region of each good product image and creates a feature vector. In this case, the elements of the features to be extracted are not particularly limited, but may include two or more of the following: brightness distribution, color occurrence rate / distribution / type, object positional relationship, and edges. The algorithm for extracting features is also not particularly limited, but may include, for example, CNN (Convolutional Neural Network), VGG (Visual Geometry Group), or ResNet (Residual Networks).
[0033] Figure 7 shows an example of the procedure for training an AI model based on images of good products. In this embodiment, a feature vector is created from the images within the variability region of each good product image 31 (31a, 31b, 31c) and input into the neural network. The neural network is an example of an AI model and includes an input layer, one or more hidden layers, and an output layer. Each layer contains one or more nodes. Each node synthesizes multiple input data by multiplying them by weights. The AI learning unit 24 then updates the weights of each node so that the judgment result becomes "good product". This updates the AI model, and thus a trained AI model is obtained.
[0034] In this embodiment, the AI model is trained using images of good products, but the AI model may also be trained using images of both good and defective products. When using images of defective products, the weights of each node may be updated so that the judgment result is "defective". The AI learning unit 24 may also extract features of the variability region by other methods. For example, the AI learning unit 24 may perform image recognition on the variability region and extract a string. In the example shown in Figure 4 or Figure 7, it is detected that each good product image contains the string "FE25".
[0035] Figure 8 is a flowchart showing an example of a judgment process in an appearance inspection method according to an embodiment of the present invention. The judgment process is performed after the preparation process shown in Figure 3. That is, it is assumed that the creation of the average good product image and the training of the AI model are completed before the judgment process is performed.
[0036] In S11, the image acquisition unit 11 acquires the image to be inspected. The image to be inspected is captured in the same way as the image of a good product, has the same size as the image of a good product, and has the same data format as the image of a good product.
[0037] In S12, the detection unit 25 detects abnormalities (i.e., defects) in the appearance of the object to be inspected 2 by calculating the difference between the image to be inspected and the average good product image in a fixed region. For example, as shown in Figure 9, the detection unit 25 is given an image to be inspected in which the object to be inspected 2x is shown. The detection unit 25 then extracts images within the fixed region from the image to be inspected. The mask for extracting images within the fixed region from the image to be inspected is assumed to be created using the dispersion map described above. In Figure 9, this mask is configured to extract images within the black region.
[0038] The detection unit 25 calculates the difference between the image within a fixed area of the image to be inspected and the average good product image. The average good product image is the average image of the fixed area of each good product image, as explained with reference to Figure 6. The detection unit 25 then calculates the difference between the pixel value of the image to be inspected and the pixel value of the average good product image for each pixel within the fixed area. At this time, the detection unit 25 calculates, for example, the absolute value of the difference between the two pixel values for each pixel. This allows the difference between the object to be inspected 2x and the good product to be detected. Furthermore, the detection unit 25 detects abnormal pixels whose pixel value difference is greater than a predetermined threshold as "defects". At this time, the detection unit 25 may also detect N or more consecutive abnormal pixels whose pixel value difference is greater than a predetermined threshold as "defects". The value of N is not particularly limited, but it is preferable to determine it in such a way that noise in the image is removed. In any case, defects (scratches, dirt, etc.) that appear on the appearance of the object to be inspected 2x are detected by the above procedure.
[0039] In S13, the detection unit 26 uses a trained AI model to detect anomalies in the variability region of the image under inspection. At this time, the detection unit 26 extracts images from the variability region from the image under inspection. The mask for extracting images from the variability region is assumed to be created using the distribution map described above. In Figure 9, this mask is configured to extract images within the black region.
[0040] The detection unit 26 creates, for example, a feature vector of images within the variation region of the image to be inspected. In this case, the feature vector of images within the variation region of the image to be inspected is created in the same way as the feature vector created from the image of good products. The detection unit 26 then inputs the feature vector created from the image to be inspected into the AI model. Here, the AI model has been trained as explained with reference to Figure 7. Therefore, the detection unit 26 can detect anomalies within the variation region.
[0041] Alternatively, the detection unit 26 may extract features of a region by performing image recognition on the variability region of the image to be inspected. For example, the detection unit 26 may extract a string of characters that appears within the variability region of the image to be inspected. The detection unit 26 then detects an abnormality in the object to be inspected 2x in the variability region by comparing the string of characters extracted from the image of a good product with the string of characters extracted from the image to be inspected. In this case, a printing error on the nameplate attached to the object to be inspected 2x, or a state in which the wrong nameplate is attached to the object to be inspected 2x, can be detected.
[0042] In S14, the image measurement unit 27 measures the characteristics of the defects detected in S12 and S13 (mainly the defects detected in S12). Specifically, the image measurement unit 27 measures, for example, the position, area, and brightness of each defect detected in S12. The position is represented by the pixel coordinates of the location where the defect was detected on the image under inspection. The area is represented by the number of pixels in the area occupied by the detected defect. The brightness represents the average of the pixel values of each pixel in the area occupied by the detected defect. The image measurement unit 27 then creates a defect list.
[0043] Figure 10A shows an example of a defect list. In this example, the detection unit 25 has detected three defects. The defect list records information representing the characteristics (location, area, and brightness) of each defect as measured by the image measurement unit 27.
[0044] In step S15 shown in Figure 8, the determination unit 28 determines, based on the defect list, whether the object to be inspected (in the example shown in Figure 9, object 2x) in the image to be inspected is a good product or a defective product. Specifically, the determination unit 28 determines whether the object to be inspected is a good product or a defective product by following the steps in the flowchart shown in Figure 11, for example.
[0045] In S21, the determination unit 28 acquires the defect list created by the image measurement unit 27. In this embodiment, the defect list contains information representing the location, area, and brightness of each defect, as described above. Steps S22 to S26 are performed for each defect registered in the defect list.
[0046] In S22, the determination unit 28 determines whether or not a defect is located within the detection target area. The detection target area may be, for example, the area in which the object to be inspected is captured. In this case, abnormalities in the background area are ignored. Alternatively, the detection target area may be an area in which the object to be inspected is captured and which has a predetermined color. For example, the detection target area may be set to an area in which the exterior of the object to be inspected is white.
[0047] If the defect is located within the detection target area, the determination unit 28 proceeds to S23. On the other hand, if the defect is not located within the detection target area, the determination unit 28 removes the defect from the defect list in S26.
[0048] In S23, the determination unit 28 determines whether the area of the defective region is 40 pixels or more, and whether the average brightness value within the defective region is 100 or less. "40 pixels" is an example of an area threshold. "100" is an example of a brightness threshold. If the area of the defective region is 40 pixels or more, the determination unit 28 assigns an NG label to the defect in S24. Similarly, if the average brightness value within the defective region is 100 or less, the determination unit 28 assigns an NG label to the defect in S24. On the other hand, if the area of the defective region is less than 40 pixels and the average brightness value within the defective region is higher than 100, the determination unit 28 assigns an OK label to the defect in S25.
[0049] The determination unit 28 executes the processes S22 to S26 for each defect registered in the defect list. As a result, the defect list is updated. An example of the updated defect list is shown in Figure 10B. In this example, the area of the defects registered in the first and third records is less than 40 pixels, and the brightness value is 100 or more. Therefore, these defects are assigned the OK label. In contrast, the area of the defect registered in the second record is greater than 40 pixels, so this defect is assigned the NG label.
[0050] Next, in S27, the determination unit 28 counts the number of defects on the defect list that have been assigned the NG label. If one or more defects have been assigned the NG label, the determination unit 28 determines that the inspected object is a defective product. On the other hand, if there are no defects assigned the NG label, the determination unit 28 determines that the inspected object is a good product. In the example shown in Figure 10B, the defect registered in the second record has been assigned the NG label. Therefore, in this case, the determination unit 28 determines that the inspected object 2x is a defective product.
[0051] In S16 shown in Figure 8, the result display unit 12 displays the inspection results obtained by the control unit 20 on the display device. An example of the inspection result display screen displayed by the result display unit 12 is shown in Figures 12 to 13.
[0052] In this embodiment, when the object to be inspected is photographed using camera 1, the visual inspection device 4 acquires the image of the object to be inspected from camera 1. Then, as shown in Figure 12, the visual inspection device 4 displays an inspection result display screen 51, which includes the image of the object to be inspected, on a display device. The inspection result display screen 51 is equipped with a judgment start button for receiving instructions to start the visual inspection. That is, when the judgment start button is clicked by the user, the visual inspection device 4 starts the visual inspection of the object to be inspected using the image of the object to be inspected displayed on the inspection result display screen 51.
[0053] The visual inspection device 4 executes the process shown in the flowchart in Figure 8. Specifically, the visual inspection device 4 detects defects / abnormalities in the fixed area and the variation area, respectively. Then, the visual inspection device 4 performs a determination process to determine whether the object being inspected is a good product or a defective product according to the flowchart shown in Figure 11, and displays the inspection result display screen 51 representing the result on the display device.
[0054] Once the judgment process is complete, the inspection result display screen 51 displays the judgment result and defect list in addition to the inspection target image, as shown in Figure 13. Furthermore, detected defects in the inspection target image are highlighted for easier viewing. In this embodiment, each defect is surrounded by a dashed circle. Alternatively, a defect judged as NG (defect 2) may be surrounded by a red circle, for example, and defects judged as OK (defects 1 and 3) may be surrounded by a blue circle, for example.
[0055] In addition, the area where AI inspection using the AI model is performed is surrounded by a dashed line frame, as shown in Figure 13. At this time, if a defect is detected by the AI inspection, the inspection area may be surrounded by a red dashed line frame, and if no defect is detected by the AI inspection, the inspection area may be surrounded by a blue dashed line frame. Furthermore, when a defect is detected by the AI inspection, a comment describing the nature of the defect may be displayed on the inspection result display screen 51. For example, in the good product images 31a to 31c shown in Figure 4, each nameplate 3 contains the string "FE25", but in the inspection target images shown in Figures 12 to 13, nameplate 3 contains the string "FE23". In this case, the visual inspection device 4 may display, for example, the comment "An incorrect nameplate has been attached. Or, there is a printing error on the nameplate."
[0056] <Hardware Configuration> Figure 14 shows an example of the hardware configuration of the visual inspection device 4. The visual inspection device 4 is implemented by a computer 100 which includes a processor 101, memory 102, storage device 103, input / output device 104, recording medium reader 105, and communication interface 106.
[0057] The processor 101 can execute various programs stored in the storage device 103. When the processor 101 executes the visual inspection program according to an embodiment of the present invention, the functions of the variance calculation unit 21, area identification unit 22, average good product image creation unit 23, AI learning unit 24, detection units 25 and 26, image measurement unit 27, determination unit 28, and result display unit 12 shown in Figure 2 are provided. The visual inspection program according to an embodiment of the present invention includes, for example, program code describing the procedures shown in Figures 3, 8, and 11. Memory 102 is used as the working area for the processor 101. Storage device 103 stores the visual inspection program and other programs. The storage unit 13 shown in Figure 2 is realized by memory 102 and / or storage device 103.
[0058] The input / output device 104 may include input devices such as a keyboard, mouse, touch panel, and microphone. The input / output device 104 may also include output devices such as a display device and speaker. The recording medium reader 105 can acquire data and / or information recorded on the recording medium 110. The recording medium 110 is a removable recording medium that can be attached to and detached from the computer 100. The recording medium 110 can be implemented, for example, by semiconductor memory, a medium from which signals can be read by optical action, or a medium from which signals can be read by magnetic action. The visual inspection program may be provided from the recording medium 110 to the computer 100. The communication interface 106 provides the function of connecting to a network. When the visual inspection program is stored on the program server 120, the computer 100 may acquire the visual inspection program from the program server 120. [Explanation of Symbols]
[0059] 1 Camera 2(2x) Items to be inspected 3 Nameplate 4. Visual Inspection Device 11 Image acquisition unit 12 Result display area 13 Preservation Department 20 Control Unit 21. Variance Calculation Unit 22 Area identification part 23. Average Quality Image Creation Department 24 AI Learning Department 25, 26 Detection unit 27 Image Measurement Unit 28 Judgment section 31 (31a~31c) Good condition images 51. Test Result Display Screen 100 Computers 101 Processors
Claims
1. A variance calculation unit calculates the variance of pixel values for each pixel in multiple good image files, A region identification unit that identifies a first region in which the variance value is less than or equal to a predetermined threshold and a second region in which the variance value is greater than the threshold, An average good image creation unit that creates an average good image by calculating the average of the pixel values for each pixel of the aforementioned plurality of good images, In the first region, a first detection unit detects defects in the appearance of the object to be inspected by calculating the difference between the image of the object to be inspected obtained by photographing the object and the average good product image, In the second region, a second detection unit detects defects in the appearance of the object to be inspected based on the image of the object to be inspected in a manner different from that of the first detection unit, A visual inspection device equipped with the following features.
2. The system further includes a determination unit that determines whether the object to be inspected is a good product or a defective product based on the detection results of the first and second detection units. The visual inspection apparatus according to feature 1.
3. The system further includes an image measurement unit that measures the characteristics of the defect detected by the first detection unit, The first detection unit calculates the difference between the image to be inspected and the average good image for each pixel, thereby detecting abnormal pixels where the difference between the image to be inspected and the average good image is greater than a predetermined value. The image measurement unit measures the area of the region where the abnormal pixels are continuous, The determination unit determines that the object to be inspected is a defective product when the area is greater than a predetermined area threshold. The visual inspection apparatus according to feature 2.
4. The system further includes an AI learning unit that trains an AI model for visual inspection of items using the aforementioned multiple images of good products. The second detection unit detects defects in the appearance of the object to be inspected by inputting the image of the second region extracted from the image to be inspected into the trained AI model. The visual inspection apparatus according to feature 1.
5. Using a computer For each pixel in multiple good images, calculate the variance of the pixel values. A first region in which the variance value is less than or equal to a predetermined threshold and a second region in which the variance value is greater than the threshold are identified. An average good image is created by calculating the average pixel value for each pixel of the aforementioned multiple good image. In the first region, defects in the appearance of the object to be inspected are detected by calculating the difference between the image of the object to be inspected obtained by photographing the object and the average good product image. In the second region, defects in the appearance of the object to be inspected are detected based on the image of the object to be inspected, in a manner different from that of the first region. A visual inspection method characterized by the following features.
Citation Information
Patent Citations
Program and image processing device
JP2025064389A
