Image inspection device
The image inspection device addresses the challenge of shifting works by automatically adjusting mask ranges using AI and preprocessing units, enhancing detection accuracy and reducing costs.
Patent Information
- Application Number
- JP2023120032
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2023-07-24
- Publication Date
- 2025-02-05
- Estimated Expiration
- 2043-07-24
AI Technical Summary
Image inspection using AI and machine learning is challenging when works composed of multiple colors or lines are shifted, leading to incorrect detection due to lighting or environmental factors, and manual mask resetting increases costs.
An image inspection device that automatically adjusts the mask range by using an image acquisition unit, memory unit, priority setting unit, preprocessing unit, and detection judgment unit to identify and reset mask areas based on halation detection, reducing manual intervention.
Automated mask range adjustment improves detection accuracy and reduces operational costs by minimizing false positives and manual resets.
Smart Images

Figure 2025017130000001_ABST
Abstract
Description
[Technical field]
[0001] The present disclosure relates to an image inspection device. [Background technology]
[0002] In recent years, there has been an increasing demand for AI-based image inspection to check for adhesions and scratches on vehicles. For example, an image inspection device that performs such AI-based image inspection can capture images of the target object while illuminating it, and then perform a judgment process. [Prior art documents] [Patent documents]
[0003] [Patent Document 1] Japanese Patent Application Publication No. 5-203584 Summary of the Invention [Problem to be solved by the invention]
[0004] However, image inspection using AI and machine learning (ML) cannot be applied unless the workpiece to be inspected has sufficient features. In particular, when the workpiece is composed of two or more colors or has no features such as lines, there is a problem that it becomes difficult to align the reference when the position of the workpiece shifts.
[0005] Furthermore, in such an inspection device, if halation occurs in the captured image due to lighting or ambient light, the work may be erroneously detected as being defective.
[0006] Here, one method for suppressing false detection due to halation from lighting, etc. is to mask the captured image. That is, as described in Patent Document 1, an inspection device can prepare an image from which halation has been removed by performing mask processing on the captured image, and then perform image inspection using AI.
[0007] However, if the position of the mask with respect to the workpiece is shifted due to misalignment of the workpiece during transportation, it may not be possible to improve the false detection caused by halation, and the position of the mask must be reset. In this case, the number of steps required by the operator increases, which increases costs. Therefore, it has been desired to automatically reset the range of the mask with respect to the captured image of the workpiece.
[0008] The present disclosure provides an image inspection device that automatically resets a mask range for a captured image of a workpiece and performs inspection. [Means for solving the problem]
[0009] The image inspection device according to the present disclosure includes an image acquisition unit that acquires an image by photographing a workpiece, a memory unit that stores a plurality of mask images in advance, a priority setting unit that generates a priority image in which a mask unit having a high priority for performing mask processing on the photographed image and a mask candidate unit having a low priority for performing mask processing are set in the mask image corresponding to the photographed image acquired by the image acquisition unit, a preprocessing unit that generates a preprocessed image in which an area in which halation occurs is extracted in the photographed image acquired by the image acquisition unit, and a mask adding unit that sets the area in which halation occurs as the mask unit having a high priority when the area in which halation occurs extracted in the preprocessed image is within the range of the mask candidate units set by the priority setting unit. This allows priorities to be set among a plurality of defined mask ranges, and the mask ranges can be automatically re-set based on the inspection results. Effect of the Invention
[0010] According to the present disclosure, it is possible to provide an image inspection device that automatically resets the mask range for an image of a workpiece and performs inspection. [Brief description of the drawings]
[0011] [Figure 1] 1 is a block diagram showing an example of a configuration of an image inspection device according to a first embodiment. [Diagram 2] 3A to 3C are diagrams showing examples of captured images acquired by the image inspection device according to the first embodiment and examples of generated mask images. [Diagram 3] FIG. 4 is a diagram showing an example of an operation flow of the image inspection device according to the first embodiment. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0012] First embodiment An image inspection device according to the present embodiment will be described below with reference to the drawings. Fig. 1 is a diagram showing an example of the configuration of an image inspection device 1.
[0013] The image inspection device 1 includes an image acquisition unit 11 that acquires a photographed image by photographing a workpiece, a storage unit 12 that stores a plurality of photographed images and a plurality of masked images, a priority setting unit 13 that sets the priority of an inspection area for the photographed image, a preprocessing unit 14 that performs preprocessing required for image inspection using AI, a detection judgment unit 15 that performs image inspection using AI on the photographed image or a preprocessed image obtained by preprocessing the photographed image and judges whether or not a detection target object has been detected, a difference calculation unit 16 that calculates the difference between the masked image and the preprocessed image, a mask addition unit 17 that automatically adds a mask range according to the priority set by the priority setting unit 13 at the location of the difference calculated by the difference calculation unit 16, and an output unit 18 that outputs the judgment result of the detection judgment unit 15. Here, the image inspection device 1 will be described as a device that photographs a workpiece such as a vehicle part transported on a conveyor and inspects the workpiece for adhesions and scratches.
[0014] The image acquisition unit 11 captures images of the workpieces being transported on the conveyor. Here, the image acquisition unit 11 will be described as utilizing a camera that captures still images. The captured images captured by the image acquisition unit 11 are stored in the storage unit 12. Specifically, the conveyor that transports the workpieces transmits a signal when the workpieces are transported to a predetermined position on the conveyor, and the image acquisition unit 11 can capture images in response to receiving the signal transmitted from the conveyor.
[0015] In addition, if the image acquisition unit 11 is provided in an equipment for image acquisition and the other components are provided in a separate inspection equipment, the image acquired by the image acquisition unit 11 may be sent from the equipment for image acquisition to the inspection equipment.
[0016] The storage unit 12 is a storage medium capable of storing the captured images and the like acquired by the image acquisition unit 11. Specifically, the storage unit 12 stores a plurality of captured images captured in advance by the image acquisition unit 11, images for which mask priorities have been set for the captured images by the pre-processing unit 14 described below, mask images for applying mask processing to the captured images, and the like. Note that the storage unit 12 may store information other than the above.
[0017] The priority setting unit 13 is a setting unit where an operator arbitrarily sets priorities on a mask image when creating a mask image for a photographed image of a workpiece. For example, Fig. 2(a) is a photographed image acquired by the image acquisition unit 11, and Fig. 2(b) is an example of a mask image in which a mask range corresponding to the photographed image is set.
[0018] As shown in FIG. 2(b), in the mask image, the area that is actually masked as an area that is not subject to inspection because parts are assembled from above, etc., is shown in black as the mask area 21. In other words, the mask area 21 is an area with a high priority for masking. On the other hand, the area that serves as a buffer for the body deviation caused by transportation is set as the mask candidate area 22, which has a low priority for masking. Here, the mask candidate area 22 is described as being colored blue in the mask image, but in FIG. 2(b), the mask candidate area 22 is shown with diagonal lines. Note that in FIG. 2(b), the area that is neither the mask area 21 nor the mask candidate area 22 is shown in white. In the following, the mask image with this priority setting is referred to as the priority image.
[0019] The pre-processing unit 14 performs pre-processing and the like for making a judgment on the captured image in the detection and judgment unit 15. For example, the pre-processing unit 14 performs background separation of the captured image. In particular, the pre-processing unit 14 can calculate the difference between a mask image and a plurality of captured images that have been judged to be defective by the detection and judgment unit 15, which will be described later, using machine learning (hereinafter, AI), and perform background separation.
[0020] Specifically, the pre-processing unit 14 performs threshold processing so that the areas of the workpiece where paint is applied are white and the areas of the background are black. Here, particularly in the pre-processing unit 14, when threshold processing is performed, the areas where halation occurs in the captured image remain white. In the pre-processing unit 14, the areas (halation areas 23) that are extracted as white due to halation from the processing results are colored red on a mask image that is stored and selected in the storage unit 12. Note that the mask image in which the halation areas 23 are colored red is the pre-processed image. In FIG. 2(c), in order to make the figure easier to understand, the halation areas 23 are indicated by dashed lines, or areas where multiple halation areas 23 occur are surrounded by dotted lines.
[0021] In addition, in the pre-processing unit 14, the detection and determination unit 15 can perform pre-processing required for performing image inspection using AI, and the contents of this processing can be changed as appropriate.
[0022] The detection and judgment unit 15 performs image inspection on the masked photographed image using AI, and judges whether or not adhesions, scratches, etc. are detected on the surface of the workpiece. The masked photographed image used at this time is a photographed image in which the range of the mask portion 21 is masked. The detection and judgment unit 15 outputs the judgment result to the output unit 18.
[0023] The difference calculation unit 16 compares the priority image generated by the priority setting unit 13 with the preprocessed image generated by the preprocessing unit 14. More specifically, the difference calculation unit 16 calculates whether or not a red area indicating an area where halation occurs in the preprocessed image generated by the preprocessing unit 14 is present in the mask candidate area 22 colored blue in the priority image set by the priority setting unit 13.
[0024] The mask adding unit 17 adds the red parts of the preprocessed image within the range of the mask candidate part 22 in the priority image as the range of the new mask part 21 in the mask image. Fig. 2(d) is an example of a mask image in which a new mask part 21 is added to the target mask image based on the relationship between the red parts of the preprocessed image and the blue range in the priority image.
[0025] The output unit 18 outputs the determination result by the detection and determination unit 15. For example, a display or a speaker can be used as the output unit 18, but the output device is not limited to these.
[0026] Next, an example of an operational flow for performing image inspection of a workpiece and resetting a mask used for image inspection in the image inspection device 1 will be described with reference to Fig. 3. Here, image inspection is shown in steps S1 to S8, and mask resetting is shown in steps S11 to S13.
[0027] First, as a preliminary preparation, an operator registers a plurality of mask images in the storage unit 12 (step S1).
[0028] The workpiece is conveyed on the conveyor, which is the conveying path. Then, a trigger for performing photography by the image acquisition unit 11 is turned ON (step S2). Here, for example, when the workpiece passes a predetermined position on the conveyor, the workpiece is photographed by a camera provided as the image acquisition unit 11 (step S3). Note that the photographed images can be set for each target vehicle model and type of part, and each photography No. when photography is performed continuously as the workpiece is conveyed on the conveyor and passes in front of the image acquisition unit 11, and stored in the memory unit 12.
[0029] The image inspection device 1 selects an optimum mask image from a plurality of mask images stored in the storage unit 12 in accordance with the captured image captured by the image acquisition unit 11 (step S4).
[0030] The image inspection device 1 performs mask processing on the captured image using the selected mask image (step S5). Furthermore, the pre-processing unit 14 performs pre-processing on the captured image so that the detection and judgment unit 15 can easily perform detection and judgment using AI (step S6). The captured image to be pre-processed by the pre-processing unit 14 may be the captured image that has been subjected to the mask processing set in step S5.
[0031] The detection and determination unit 15 performs image inspection using AI on the masked photographed image processed by the pre-processing unit 14, and determines whether or not any adhesions or scratches have been detected on the surface of the workpiece (step S7). As described above, the masked photographed image is a photographed image in which the mask portion 21 is masked. Here, the determination result by the detection and determination unit 15 can be output by the output unit 18.
[0032] When the detection and determination unit 15 determines that the workpiece is a non-defective product (non-defective product in step S8), it is determined that the mask range is suitable for the captured image. In this case, the process returns to step S2 without performing any particular processing on the mask image, and the image inspection device 1 starts image inspection processing on the next workpiece.
[0033] On the other hand, if the detection and judgment unit 15 judges that the workpiece is defective (defective in step S8), the mask range may be inappropriate for the captured image, so the process proceeds to step S11 and the mask is reset.
[0034] The difference calculation unit 16 calculates the difference between the priority image generated by the priority setting unit 13 and the preprocessed image generated by the preprocessing unit 14 (step S11).
[0035] Specifically, the pre-processing unit 14 performs threshold processing so that the areas on the workpiece where paint is applied are displayed in white and the background areas are displayed in black. Furthermore, at this time, the pre-processing unit 14 performs processing so that the range of halation that remains as white at this time is displayed in red on the mask image selected in step S4.
[0036] Furthermore, the worker sets the priority of the mask image using the priority setting unit 13. Here, the priority setting unit 13 sets the mask candidate portion 22, which is the hatched portion in FIG. 2, as a portion of the priority image where the mask has a low priority.
[0037] Then, the difference calculation unit 16 calculates and judges whether or not the red range of the preprocessed image is in the mask candidate portion 22 in the priority image. If it is judged that the red range indicating halation in the preprocessed image is not in the mask candidate portion 22 in the priority image (no need to reset the mask in step S12), the process returns to step S2 and continues image inspection. On the other hand, if it is judged that the red range indicating halation is in the mask candidate portion 22 (no need to reset the mask in step S12), the process proceeds to step S13.
[0038] The mask adding unit 17 updates the mask image by adding a red portion indicating halation in the preprocessed image within the range of the mask candidate portion 22 in the priority image as a new mask portion 21 (step S13). Fig. 2(e) is a diagram showing an example of a mask image in which a halation portion 23 that was within the range of the mask candidate portion 22 is added as a new mask portion 21. After that, the process returns to step S2 and image inspection is continued.
[0039] In this way, the image inspection device 1 can perform image inspection and reset the mask portion 21 in the mask image according to the state of the captured image. In particular, the image inspection device 1 can set the mask candidate portion 22 as a range with a low mask priority setting, and reset the mask portion 21 based on the state in which halation occurs within this range. That is, a part of the area set as the mask candidate portion 22 in the mask image can be reset as a new mask portion 21 that actually masks the captured image. This makes it unnecessary to mask a range that is wider than necessary to suppress erroneous detection by image inspection using AI as in the conventional method, and image inspection using AI can be performed in a wide range of the captured image while suppressing erroneous detection.
[0040] The present invention is not limited to the above-described embodiment, and can be modified as appropriate without departing from the spirit of the present invention. In other words, the above description has been omitted or simplified as appropriate for the purpose of clarity, and a person skilled in the art can easily modify, add, or convert each element of the embodiment within the scope of the present invention.
[0041] 3, the mask is reset every time a photographed image is acquired and image inspection is performed, but this is not limited to the above, and the mask can be reset once a day, etc. In this case, for example, for a plurality of photographed images determined to be defective among the photographed images stored in the storage unit 12, a corresponding mask image is set, and a priority is set for each mask image to set the mask portion 21 and the mask candidate portion 22. In addition, the position of the halation portion 23 is set for each photographed image, and a new mask portion 21 can be reset to a location where the halation portion 23 is located within the range of the mask candidate portion 22 in the mask image. [Explanation of symbols]
[0042] 1. Image inspection equipment 11 Image acquisition section 12 Storage section 13 Priority setting section 14 Pretreatment section 15 Detection and judgment unit 16 Difference calculation part 17 Mask Addition Section 18 Output section 21 Mask Section 22 Mask candidate part 23 Halation section
Claims
[Claim 1] an image acquisition unit that captures an image of a workpiece; A storage unit that stores a plurality of mask images in advance; a priority setting unit that generates a priority image in which a mask portion having a high priority for performing mask processing on the photographed image and a mask candidate portion having a low priority for performing mask processing are set in the mask image corresponding to the photographed image acquired by the image acquisition unit; a pre-processing unit that generates a pre-processed image by extracting an area where halation occurs in the photographed image acquired by the image acquisition unit; a mask adding unit that, when a range in which halation extracted in the preprocessed image occurs is included in the range of the mask candidate portion set by the priority setting unit, sets the range in which halation occurs as the mask portion having a high priority. Image inspection equipment.
Citation Information
Patent Citations
Method and device for removing halo influence in surface defect detection of large-curvature optical lens
CN113447489A
Inspection device, inspection method, and program
JP2015099071A
Device for detecting characteristic amount on work surface
JP1993203584A