Appearance inspection device and appearance inspection method
By minimizing color change within the edge range through adjusted background color, the method improves visual inspection reliability by accurately detecting defects near edges.
Patent Information
- Application Number
- JP2023115377
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2023-07-13
- Publication Date
- 2025-01-24
AI Technical Summary
Existing visual inspection methods struggle to accurately detect defects near the edges of inspection targets due to positional shifts causing pixel value emphasis, leading to false positives or negatives.
The method adjusts the background color to minimize color change within the edge range, using a background color model to ensure the color difference between the edge and background is minimal, thereby reducing pixel value emphasis and improving detection accuracy.
This approach enhances the reliability of visual inspection by accurately detecting defects regardless of their proximity to edges, reducing false positives and negatives.
Smart Images

Figure 2025012503000001_ABST
Abstract
Description
[Technical field]
[0001] The present invention relates generally to visual inspection of an object to be inspected, such as a product. [Background technology]
[0002] There is a demand for highly reliable appearance inspection. For example, a device disclosed in Patent Document 1 is known as an appearance inspection device. According to Patent Document 1, the problem is to "minimize the inclusion of unnecessary image noise and perform highly reliable appearance inspection of defective parts by measuring feature amounts for a stable contour image," and the solution is to "image an electrode plate 2 of a secondary battery having an electrode terminal portion and a portion coated with an active material, and perform appearance inspection of the electrode plate 2 based on the contour of the electrode plate 2 in the image data, and when the electrode plate 2 is photographed by a TV camera 8, a background color tone board 20 that has an intermediate color tone between the electrode terminal portion and the portion coated with the active material is placed in the background of the electrode plate 2." [Prior art documents] [Patent documents]
[0003] [Patent Document 1] Japanese Patent Application Publication No. 10-40383 Summary of the Invention [Problem to be solved by the invention]
[0004] Due to the positional deviation of the inspection object, the pixel values near the edge of the inspection object in the image are emphasized. As a result, even if a detection object (e.g., a scratch) is present near the edge of the inspection object, it may be difficult to detect the detection object (distinguish between the edge vicinity and the scratch). In addition, even if the inspection object is normal, it may be erroneously determined that the inspection object is abnormal.
[0005] Although Patent Document 1 discloses an inspection target having multiple parts with different degrees of light reflection (for example, an electrode terminal part and a part coated with an active material), there is no description regarding detection of a detection target that is not present in a normal inspection target. According to Patent Document 1, if the shading level of the detection target is close to the background color, there is a risk that the detection target will be overlooked. [Means for solving the problem]
[0006] The visual inspection device receives image data representing an image of an inspection target captured by a camera, and performs visual inspection of the inspection target based on the image data. In the visual inspection, a first image, which is an image represented by the image data, or a second image, which is an image obtained after image processing of the first image, is an image influenced by one or more parameters that affect the image of the inspection target and a parameter group determined before the visual inspection. In the first image or the second image, the color change amount in the edge range is smaller than the reference change amount. The edge range is a range having an edge vicinity including the edge of the inspection target, and is a range composed of a part of the inspection target and a part of the background of the inspection target with the edge of the inspection target as a boundary. The color change amount in the edge range is the difference between the background color in the edge range and the color of the inspection target part in the edge range. Effect of the Invention
[0007] According to the present invention, the reliability of the appearance inspection can be improved. [Brief description of the drawings]
[0008] [Figure 1] 1 shows an example of the configuration of an entire system including a visual inspection apparatus according to an embodiment. [Diagram 2] 1 shows an example of the configuration of a visual inspection device. [Diagram 3] 1 shows an overview of a visual inspection according to a comparative example. [Figure 4] 1 shows an overview of a visual inspection according to an embodiment. [Diagram 5] 1 shows an overview of measurement of color variation in edge areas. [Figure 6] 1 shows an overview of measurement of the amount of color change in the detection range. [Figure 7] 13 shows an example of the relationship between the brightness difference and the frequency of edge abnormality occurrence. [Figure 8] 13 shows an example of the relationship between saturation difference and edge abnormality occurrence frequency. [Figure 9] 11A and 11B are diagrams illustrating an example of flaw detection before background color adjustment. [Figure 10] 13A and 13B are diagrams illustrating an example of flaw detection after background color adjustment. [Figure 11] 10A and 10B show schematic diagrams of examples of adjustment of a group of shooting parameters. [Figure 12] An example of a background color adjustment UI (User Interface) is shown. [Figure 13] Examples of elements included in the management data are shown below. [Figure 14] 13 shows an example of a flow of an inspection control process. [Figure 15] 13A and 13B show schematic diagrams of an example of replacing an inspection model. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0009] In the following description, an "interface unit" may refer to one or more interface devices. The one or more interface devices may be at least one of the following: An I / O interface device which is one or more I / O (Input / Output) interface devices. The I / O interface device is an interface device to at least one of an I / O device and a remote display computer. The I / O interface device to the display computer may be a communications interface device. The at least one I / O device may be a user interface device, for example, either an input device such as a keyboard and a pointing device, or an output device such as a display device. A communication interface apparatus which is one or more communication interface devices. The one or more communication interface devices may be one or more homogeneous communication interface devices (e.g., one or more NICs (Network Interface Cards)) or two or more heterogeneous communication interface devices (e.g., a NIC and an HBA (Host Bus Adapter)).
[0010] In the following description, a "memory" refers to one or more memory devices, typically a primary storage device. At least one of the memory devices in the memory may be a volatile memory device or a non-volatile memory device.
[0011] In the following description, a "persistent storage device" refers to one or more persistent storage devices. A persistent storage device is typically a non-volatile storage device (e.g., an auxiliary storage device), and specifically, for example, a hard disk drive (HDD) or a solid state drive (SSD).
[0012] Also, in the following description, "storage device" may be at least memory, including memory and persistent storage device.
[0013] In the following description, a "processor" refers to one or more processor modules. The at least one processor module is typically a microprocessor device such as a CPU (Central Processing Unit), but may be another type of processor device such as a GPU (Graphics Processing Unit). The at least one processor device may be a single core or a multi-core. The at least one processor module may be a processor core.
[0014] In addition, in the following description, processing may be described with a program as the subject, but since a program is executed by a processor to perform a defined process using a storage device and / or an interface device, etc. as appropriate, the subject of the process may also be the processor (or a device such as a controller having the processor). A program may be installed in a device such as a computer from a program source. The program source may be, for example, a program distribution server or a computer-readable (e.g., non-transitory) recording medium. In the following description, two or more programs may be realized as one program, or one program may be realized as two or more programs.
[0015] In addition, in the following description, processing may be described with a function as the subject, but the function may be realized by one or more computer programs being executed by a processor. When a function is realized by a program being executed by a processor, the function may be at least a part of the processor, since the defined processing is performed using a storage device and / or an interface device, etc., as appropriate. Processing described with a function as the subject may be processing performed by a processor or a device having the processor. The description of each function is an example, and multiple functions may be combined into one function, or one function may be divided into multiple functions.
[0016] In addition, various objects can be the "inspection object", but in the following embodiment, the inspection object is a bottle. A bottle may be an example of a product, and a product may be an example of an object as the inspection object. The inspection object may also be a part or a semi-finished product.
[0017] In addition, any element of the inspection object can be the "detection object," but in the following embodiment, the detection object is a scratch. The "detection object" may be an object that is not present in a normal product but is present in an abnormal product, such as a scratch, or an object that is present in an appropriate position on a normal product, such as a label.
[0018] FIG. 1 shows an example of the overall configuration of a system including a visual inspection apparatus according to an embodiment of the present invention.
[0019] The interface device 131 of the appearance inspection device 110 is connected to a control device 501 (interface device 511 of the control device 501) that controls one or more controlled devices. Communication between the appearance inspection device 110 and the control device 501 may be performed using, for example, TCP / IP. Furthermore, in the present invention, among the elements illustrated in FIG. 1, the presence of at least the control device 501 is not essential.
[0020] The control device 501 has an interface device 511, a storage device including a shared memory 512, and a processor 513 connected to the interface device 511 and the storage device. As the device to be controlled, a conveying device for bottles 550 (for example, a conveyor including a conveying belt 533 and a device for driving the conveying belt 533) can be used.
[0021] An I / O (Input / Output) device 502 is connected to an interface device 511 of the control device 501. Devices such as peripheral devices, peripheral devices, or other devices to be controlled are connected to the I / O device 502. Input and output are performed from the control device 501 to these devices via the I / O device 502. The peripheral devices may be devices such as a camera 531 for photographing a bottle 550 and sensors (e.g., optical sensors) 532A and 532B for detecting the bottle 550. The appearance inspection device 110 may be connected to the I / O device 502 instead of or in addition to the interface device 511 of the control device 501.
[0022] A camera 531 may be connected to the interface device 131 of the appearance inspection device 110. The camera 531 captures the bottle 550 passing through a blackout curtain 594. In the blackout curtain 594, the bottle 550 and its background plate 591 are illuminated by a lighting device 592, and the reflected light of the bottle 550 and the background plate 591 enters the camera 531. A lighting control device 593 and a background plate 591 are connected to the interface device 131 of the appearance inspection device 110. The lighting control device 593 is a device that controls the illumination (e.g., the illumination angle) by the lighting device 592. The background plate 591 is, for example, a display device (e.g., an LED display device) that provides a background for the bottle 550. The appearance inspection device 110 adjusts (controls) the illumination through the lighting control device 593, and adjusts (controls) the background color displayed by the background plate 591. In this embodiment, both the illumination and the background color can be adjusted by the appearance inspection device 110, but as a modified example, one of the illumination and the background color may be adjustable by the appearance inspection device 110, or either the illumination or the background color may be adjusted manually, and the background board 591 is not limited to an electronic medium such as a display device (for example, a paper medium or other medium). For example, the background color may be adjusted by manually replacing a background board 591 of a certain color with a background board 591 of another color. Also, for example, the background color may be adjusted by changing the background color of the bottle in the captured image by image processing.
[0023] The processor 513 of the control device 501 executes an OS (Operating System) 563, and also executes a control program 561 and an information program 562 that run on the OS 563. The OS 563 may be a real-time general-purpose OS (an OS that is a type of general-purpose OS for information processing, but has a real-time function that can provide the required real-time performance), and the execution timing of the control program 561 and the information program 562 may be controlled by the real-time general-purpose OS. Alternatively, the execution timing of the control program 561 and the information program 562 may be controlled by runtime software.
[0024] The control program 561 is a program that performs a scan process, which is a process for controlling a control target device and has real-time characteristics, within each control period defined for the control program 561. The information program 562 is a program that performs information processing defined for the information program 562.
[0025] The shared memory 512 is a shared memory for the control program 561 and the information program 562, and has a control area, which is an area where data is written from the control program 561, and an information area, which is an area where data is written from the information program 562. The information area is smaller than the control area.
[0026] In this embodiment, for example, the following processing is performed.
[0027] When the control program 561 detects the bottle 550 on the conveyor belt 533 through the sensors 532A and 532B, it causes the camera 531 to take a picture. As a result, an image of the bottle 550 detected through the sensors 532A and 532B is taken, and the data of the taken image is input from the camera 531 to the appearance inspection device 110 via or not via the control device 501. The appearance inspection device 110 performs inference on the image data (including a judgment as to whether the bottle 550 shown in the image of the bottle 550 is normal or not). In the inference, the control unit 201 of the appearance inspection device outputs an OK / NG value (a value indicating whether the bottle 550 is normal ("OK") or not ("NG")) to the control device 501. The information program 562 receives the OK / NG value and writes it into the information area of the shared memory 512. Since the OK / NG value is small in size, there is no problem in writing the OK / NG value to an information area smaller in size than the control area. The control program 561 reads out the OK / NG value from the information area, and controls at least one device to be controlled based on the OK / NG value. For example, the device to be controlled is an exclusion device that excludes the photographed bottle 550 from the conveyor belt 533, and when the read OK / NG value indicates NG, the control program 561 causes the exclusion device to exclude the photographed bottle 550 from the conveyor belt 533. Instead of excluding the bottle 550, or other processing may be performed as control based on the OK / NG value.
[0028] The control device 501 may be an industrial control device. The controlled device may be, for example, industrial equipment such as an industrial motor or a compressor. The control device 501 may be a main arithmetic device of the control system, and the appearance inspection device 110 may be a arithmetic device serving as an extended device in the control system. The functions of the appearance inspection device 110 may be realized by executing an information program in the arithmetic device serving as an extended device. In addition, the camera 531 may be controlled by at least one of the control device 501 and the appearance inspection device 110 (details will be described later).
[0029] FIG. 2 shows an example of the configuration of the appearance inspection device 110.
[0030] The appearance inspection apparatus 110 includes an interface device 131, a storage device 132, and a processor 133 connected thereto. The appearance inspection apparatus 110 may be a core device (e.g., a server device) capable of communicating with one or more edge devices (e.g., clients) (e.g., a cloud computing system based on a cloud platform), but in this embodiment, the appearance inspection apparatus 110 is an edge device (e.g., an information processing terminal such as a personal computer).
[0031] The interface device 131 accepts image data from the camera 531. The camera 531 may be an example of a source of image data. The image data is stored in the storage device 132 by the processor 133. The data source may be an external storage device in which the image data from the camera 531 is accumulated.
[0032] The appearance inspection apparatus 110 includes a display device 102 and an input device 103 (for example, a keyboard and a pointing device), and these devices 102 and 103 are connected to an interface device 131 .
[0033] The storage device 132 stores a background color model 141, an inspection model 142, and management data 143. The background color model 141 is a model that receives a predetermined parameter group (described in detail later) as an input and outputs a background color parameter group. The inspection model 142 is a model that receives image data as an input and outputs an inferred value. The background color model 141 and the inspection model 142 may both be machine learning models, for example, deep learning models, and specifically, may be neural networks (particularly DNNs (Deep Neural Networks)). The background color model 141 and the inspection model 142 may be the same type of model or different types of models. In the latter case, for example, the background color model 141 may be a regression model and the inspection model 142 may be a DNN. The background color parameter group may be determined by a method other than the method using the background color model 141 (for example, the background color model 141 may not be required). Furthermore, the determination as to whether the bottle 550 shown in the captured image is normal or not may be performed by a method other than the method using the inspection model 142. Furthermore, the details of the management data 143 will be described later.
[0034] In this embodiment, the "parameter group" is one or more parameters. The "parameter" may be a pair of a parameter item and a parameter value. The parameter group input to the background color model 141 may include a lighting parameter group. The "lighting parameter group" is a parameter group related to lighting, and may include, for example, at least one of brightness, illuminance, irradiation angle, and the angle of the lighting device 592. The "background color parameter group" is a parameter group related to the background color, and may include, for example, a value for at least one color component of color components such as hue, saturation, and brightness. In other words, the background color may be a color expressed in the HSV color space.
[0035] One or more computer programs are stored in storage device 132. When these computer programs are executed by processor 133, functions such as background color learning unit 151, background color inference unit 152, inspection learning unit 153, inspection inference unit 154, and control unit 201 are realized.
[0036] A background color learning unit 151 learns the background color model 141, and a background color inference unit 152 performs inference using the background color model 141. If there is no background color model 141, the background color learning unit 151 and the background color inference unit 152 may not be required.
[0037] A checking learning unit 153 learns the checking model 142 , and a checking inference unit 154 performs inference using the checking model 142 .
[0038] Control unit 201 controls the operation of appearance inspection device 110. For example, control unit 201 causes background color learning unit 151 to learn background color model 141, and causes background color inference unit 152 to perform inference using background color model 141. Control unit 201 also causes inspection learning unit 153 to learn inspection model 142, and causes inspection inference unit 154 to perform inference using inspection model 142. Control unit 201 also adjusts the background color (color of background board 591) according to a background board parameter group, and adjusts lighting via lighting control device 593 according to a lighting parameter group.
[0039] A specific example of the checking model 142 and inference using the checking model 142 will be described.
[0040] The inspection model 142 may include an encoder model and a decoder model. The encoder model may be a model that receives image data as input and outputs a feature of the image data (e.g., the degree of abnormality of the bottle 550). The decoder model may be a model that receives image data as input and outputs image data restored based on the input feature.
[0041] The inspection inference unit 154 may include an encoder and a decoder. The encoder may perform an encoding process using an encoder model, and the encoding process may include acquiring a feature of the image data by inputting the image data to the encoder model. The decoder may perform a decoding process using a decoder model, and the decoding process may include acquiring restored image data by inputting a feature acquired in the encoding process to the decoder model. The inspection inference unit 154 may generate differential image data that is image data that represents a difference between the input image data and the restored image data (image data output from the decoder). For example, the differential image data may be image data in which an abnormal part such as a scratch on the product is emphasized. Specifically, for example, the decoder model may be trained to restore image data of a normal product (bottle 550 without an abnormal part such as a scratch) from the feature of image data of an abnormal product (bottle 550 with an abnormal part such as a scratch). Therefore, in the inference, the image data restored based on the feature of the image data of the abnormal product may be image data similar to the image data of the normal product. As a result, when the input image data of the defective product is compared with the restored image data, if a scratch is shown in the image represented by the input image data, the location of the scratch may be detected as a difference, and as a result, differential image data in which the location of the scratch is emphasized may be generated. The inspection inference unit 154 may use the differential image data to determine whether the bottle 550 is normal or not, and output an OK / NG value indicating the determination result.
[0042] According to the above-mentioned specific example of the inspection model 142 and the inference using the inspection model 142, the inference value as the output of the inspection model 142 may be restored image data, and the output of the inspection inference unit 154 may include an OK / NG value as a judgment result based on the difference image data generated using the restored image data. The example of the inference using the inspection model 142 and the inspection model 142 is not limited to this example. For example, the inference value as the output of the inspection model 142 may include an OK / NG value. Furthermore, the judgment of whether the bottle 550 is normal or not is not limited to the judgment based on the difference image data generated using the restored image data.
[0043] The visual inspection according to the comparative example and the present embodiment will be described below. In the following description, the definitions of "edge range" and "detection range" are as follows. The "edge range" is a range that includes the vicinity of the edge of the bottle 550 (an example of an object to be inspected) (including the edge), and is a range that is composed of part of the bottle 550 and part of the background of the bottle 550, with the edge of the bottle 550 as the boundary. The "detection range" is a range that is made up of at least a part of the scratch on bottle 550 (an example of a detection target) and at least a part of the area around the scratch on bottle 550.
[0044] In addition, both the "edge range" and the "detection range" may be a two-dimensional range in a planar view of the shooting direction (for example, an image captured by a camera). In addition, both the "edge range" and the "detection range" may be a one-dimensional range or a two-dimensional range.
[0045] FIG. 3 shows an overview of the appearance inspection according to the comparative example.
[0046] The emphasis of pixel values in the vicinity of the edge may be caused by the positional deviation of the bottle 550. Specifically, for example, the image in the teacher data of the inspection model 142 is an image captured after the bottle 550 is positioned, but the position of the bottle 550 conveyed by the conveyor belt 533 along the conveying direction may be shifted along the conveying direction during learning or inference due to slippage of the conveyor belt 533 or deviation of the stepping motor. The background color (color of the background plate 91) in the comparative example is not a color that takes into consideration the amount of color change in the edge range of the bottle 550 on the conveyor belt 533. Therefore, in the image 95 of the bottle 550 in which a positional deviation has occurred, pixel values in the vicinity of the edge are emphasized (for example, see the inside of the frame 92), and even if there is a scratch near the edge, it is difficult to detect the scratch (distinguish between the edge vicinity and the scratch). Furthermore, even if the bottle 550 is normal (in other words, regardless of whether there is a scratch near the edge), the bottle 550 may be determined to be abnormal. Note that image 95 (and image 395 in FIG. 4) is an image obtained after image processing of the photographed image of bottle 550, and may be, for example, a difference image represented by the above-mentioned difference image data.
[0047] FIG. 4 shows an overview of the appearance inspection according to the embodiment.
[0048] The background color (color of the background plate 591) according to the embodiment is a color in which the amount of color change in the edge range is taken into consideration. Specifically, the amount of color change in the edge range of the background color may be less than a predetermined value, and the amount of color change in the detection range may be adopted as an example of the "predetermined value". More specifically, the value of at least one color component of the background color (at least one of the hue, saturation, and brightness components constituting the HSV color space) is adjusted to a value that makes the amount of color change in the edge range smaller than the amount of color change in the detection range. Therefore, in the image 395 of the bottle 550, there is no particular emphasis on pixel values belonging to the vicinity of the edge (see, for example, the inside of the frame 392), and pixel values belonging to scratches in the detection range are emphasized (see, for example, the inside of the frame 393). Therefore, scratches can be detected even if they are near the edge. In addition, since there is no emphasis on the vicinity of the edge, it is possible to avoid erroneous determination that the bottle is a defective product even if there is no scratch. Note that image 95 in FIG. 3 does not have highlighted pixel values in a range similar to the range indicated by frame 393 in image 395 in FIG. 4, because bottle 550 shown in FIG. 3 is a bottle without any scratches, unlike bottle 550 shown in FIG. 4.
[0049] FIG. 5 shows an overview of the measurement of color variation in the edge area.
[0050] The measurement areas 51 and 55 are located in the edge vicinity portion 59A of the captured image 50A of the bottle 550. The edge vicinity portion 59A is a portion including the entire area or a part of the edge range. The measurement area 51 is an area including a measurement point 52 of the background color. The measurement area 55 is an area including a measurement point 56 of the color near the edge of the bottle 550. There are only the measurement points 52 and 56, and the concept of the measurement areas 51 and 55 is not necessarily required. Alternatively, the measurement areas 51 and 55 may be areas overlapping the edge range, and the measurement points 52 and 56 may be provided from the measurement areas 51 and 55. There are typically multiple measurement points 52 and 56, but there may be only one. The number of measurement points 52 and 56 may be the same or different.
[0051] The "amount of color change in the edge range" is the difference between the background color in the edge range and the color of the bottle part in the edge range. The "background color in the edge range" may be the color in the measurement area 51, specifically, for example, a statistical value (for example, average value or mode value) of one or more color values (for example, HSV values) measured from one or more measurement points 52. The "color of the bottle part in the edge range" may be the color in the measurement area 55, specifically, for example, a statistical value (for example, average value or mode value) of one or more color values (for example, HSV values) measured from one or more measurement points 56. Note that the method of calculating the amount of color change in the edge range is not limited to this example. For example, the difference in color value for each pair of the measurement point 52 and the measurement point 56 may be calculated, and the statistical value (for example, average value or mode value) of the calculated difference may be the amount of color change in the edge range.
[0052] FIG. 6 shows an overview of the measurement of the color change amount in the detection range.
[0053] Image portion 59B of captured image 50B is an image portion in which scratch 60 of bottle 550 is captured in its entirety. A measurement area 63 is located in scratch portion 61 of image portion 59B. Scratch portion 61 is a portion that includes the entire or part of the detection range. Measurement area 63 is an area that includes multiple measurement points 62, each of which is composed of one or more measurement points 62 on the scratch and one or more measurement points 62 in its periphery. It is sufficient to have measurement points 62, and the concept of a measurement area 63 is not necessarily required. Alternatively, measurement area 63 may be an area that overlaps with the detection range, and multiple measurement points 62 may be provided from measurement area 63.
[0054] The "amount of color change in the detection range" is the difference between the color of the flaw in the detection range and the color of the periphery of the flaw (the portion to be inspected other than the flaw) in the detection range. This difference may be, for example, the difference between the maximum and minimum values of multiple color values measured from multiple measurement points 56, or may be a difference calculated by analyzing the flawed portion 61.
[0055] The measurement area 63 may be divided into a flaw area, which is an area including measurement points of the flaw, and one or more known areas, which are one or more areas including measurement points other than the flaw. The "color of the flaw in the detection range" may be the color in the flaw area, specifically, for example, a statistical value (e.g., average or mode) of one or more color values measured from one or more measurement points 62 in the flaw area. The "color of the bottle portion in the detection range" may be the color in one or more surrounding areas, specifically, for example, a statistical value (e.g., average or mode) of one or more color values measured from one or more measurement points 62.
[0056] In order to establish the relationship that the amount of color change in the edge range is less than the amount of color change in the detection range, since the amount of color change in the detection range cannot be essentially adjusted, it is preferable that the amount of color change in the edge range is as small as possible, that is, the difference between the background color in the edge range and the color of the bottle part in the edge range is as small as possible (for example, the difference is zero).
[0057] As shown in Figs. 7 and 8, the smallest possible color change in the edge range contributes to preventing pixel values in the vicinity of the edge of the bottle 550 from being emphasized. Specifically, Fig. 7 shows an example of the relationship between the brightness difference as the color change in the edge range and the frequency of edge abnormality occurrence (frequency at which pixel values in the vicinity of the edge are emphasized), and Fig. 8 shows an example of the relationship between the saturation difference as the color change in the edge range and the frequency of edge abnormality occurrence. Note that even if the color change in the edge range is large, if the color change in the detection range is larger than the color change in the edge range, there is a high possibility that the scratch can be detected even if there is a scratch in the vicinity of the edge. Note that the color value may be an HSV value converted from the RGB value. When the (R, G, B) values are in the range of 0.0 (minimum) to 1.0 (maximum), the hue (H) is 0 to 360°, the saturation (S) is 0 to 1, and the brightness (V) is 0 to 1.
[0058] As illustrated in Figs. 9 and 10, the smallest possible color change in the edge range contributes to improving the accuracy of flaw detection. Specifically, Fig. 9 is an explanatory diagram of an example of flaw detection before background color adjustment, and Fig. 10 is an explanatory diagram of an example of flaw detection after background color adjustment. For example, as illustrated in Fig. 9, the background color before adjustment (e.g., the initial background color) is black, and the brightness difference between the background color and the color of the bottle is large in the brightness range of the entire image (because the color change in the edge range is large), so the accuracy of flaw detection near the edge is low. However, as illustrated in Fig. 10, the color change in the edge range is small due to the adjustment of the background color (specifically, because the background color is adjusted so that the change is substantially zero), so the brightness range of the entire image is reduced, and the contrast ratio for the flaw increases, and as a result, the accuracy of flaw detection is improved regardless of whether the flaw is near the edge or not. Furthermore, even if the brightness of bottle 550 and the scratch are the same, as long as a saturation difference in the amount of color change in the detection range can be secured (i.e., in terms of saturation, if the amount of color change in the detection range is greater than the amount of color change in the edge range), the scratch can be detected regardless of whether it is near the edge or not.
[0059] Reducing the amount of color change in the edge range (specifically, for example, reducing the amount of color change to be smaller than the amount of color change in the detection range) may be performed by adjusting the position and orientation of the camera 531 and / or adjusting the lighting, instead of or in addition to adjusting the background color (color of the background board 591), as shown in FIG. 11. For example, the control unit 201 may adjust the angle of the lighting device 592 through the lighting control device 593. Instead of or in addition to adjusting the lighting, the control unit 201 may adjust the position and orientation of the camera 531. That is, by adjusting the relative position and orientation of the camera 531 with respect to the lighting, adjustment is made so that extra noise does not enter the camera 531 (for example, so that reflected light of the lighting does not enter the camera 531), and as a result, it is expected that the amount of color change in the edge range can be reduced. Note that the adjustment of the lighting and / or the adjustment of the position and orientation of the camera 531 may be performed manually.
[0060] The background color parameters for reducing the amount of color variation in the edge range can be determined using the background color model 141, but may also be determined manually.
[0061] For example, a user can input background color parameters via the example background color adjustment UI 1200 of Fig. 12. The background color parameters include at least one of an H value (hue value), an S value (saturation value), and a V value (brightness value).
[0062] The background color adjustment UI 1200 is, for example, a GUI (Graphical User Interface), and is displayed on the display device 102 by the control unit 201. The background color adjustment UI 1200 has a start button 1221, a read button 1222, a color detection status field 1223, a hue field 1201, a hue setting button 1231, a saturation field 1202, a saturation setting button 1232, a brightness field 1203, a brightness setting button 1233, a hue difference field 1241, a saturation difference field 1242, a brightness difference field 1243, an optimum button 1250, an apply button 1260, and a captured image field 1210. All of these elements of the background color adjustment UI 1200 may be examples of GUI components. Furthermore, an input to the background color adjustment UI 1200 is accepted from the input device 103.
[0063] An example of the use of the background color adjustment UI 1200 may be as follows.
[0064] The control unit 201 displays the captured image represented by the captured image data of the bottle 550 in the captured image field 1210. The control unit 201 displays area A as the measurement area 51 and area B as the measurement area 55 on the captured image in the captured image field 1210.
[0065] When the start button 1221 is pressed, the control unit 201 starts color detection of the captured image in the captured image column 1210, and displays the status “color detection in progress” in the color detection status column 1223. In color detection, for example, the control unit 201 detects color values (H value, S value, and V value) in area A and color values (H value, S value, and V value) in area B. When color detection is completed, the control unit 201 displays the status “color detection completed” in the color detection status column 1223.
[0066] When color detection is completed and the read button 1222 is pressed, the control unit 201 displays the H value, S value, and V value of area A in columns 1201 to 1203, and displays the H value, S value, and V value as the difference between the H value, S value, and V value of area A and the H value, S value, and V value of area B in columns 1241 to 1243.
[0067] When any of the setting buttons 1231 to 1233 is pressed, the control unit 201 accepts input of a value in a field (any of the fields 1201 to 1203) corresponding to the pressed setting button, adjusts the background color in the captured image according to the input value, updates the H value, S value, or V value as a difference, and displays the updated value in the corresponding field among the fields 1241 to 1243. This allows the user to input the H value, S value, and V value that will minimize the values in the fields 1241 to 1243 in the fields 1201 to 1203, that is, to input a background color parameter group that will minimize the color change amount in the edge range. When the optimum button 1250 is pressed, the control unit 201 may calculate a background color parameter group (H value, S value, and V value of area A) that will optimize (minimum) the H value, S value, and V value as a difference, and display the calculated background color parameter group in the fields 1201 to 1203. In addition, columns 1241 to 1243 may also be columns into which values can be input, and when any of columns 1241 to 1243 is updated, control unit 201 may update the values of columns 1201 to 1203 based on the updated value and the amount of color change in the detection range.
[0068] The control unit 201 may selectively determine the background color parameter group using the background color model 141 or manually. For example, the control unit 201 may determine whether the processing load of the appearance inspection device 110 is higher than a predetermined load at the timing when the background color parameter group needs to be determined, and select whether the background color parameter group is determined using the background color model 141 or manually depending on the result of the determination. When the processing load is higher than the predetermined load, manual determination may be selected. When the processing load is equal to or lower than the predetermined load, determination using the background color model 141 may be selected.
[0069] FIG. 13 shows an example of elements included in the management data 143.
[0070] The management data 143 includes a shooting parameter group 1320, conveying speed data 1305, a background color model parameter group 1311, and an inspection model parameter group 1312. The shooting parameter group 1320 is a parameter group that affects shooting, and includes, for example, a background color parameter group 1302, a lighting parameter group 1303, and a camera parameter group 1304.
[0071] The background color parameter group 1302 and the lighting parameter group 1303 are as described above. The camera parameter group 1304 may include a parameter group related to the camera 531, for example, parameters representing the position, orientation, and shutter speed of the camera 531. The camera parameter group 1304 may include a parameter representing at least one of the aperture and ISO sensitivity.
[0072] Conveying speed data 1305 is data that indicates the speed of conveyor belt 533. Background color model parameter group 1311 is a parameter group related to background color model 141 (e.g., background color model 141 after learning). Inspection model parameter group 1312 is a parameter group related to inspection model 142 (e.g., inspection model 142 after learning).
[0073] An example of the processing performed in this embodiment will be described below.
[0074] <Preparation Phase>
[0075] Before the start of the inspection (before the inference phase starts), preparation for the inspection is performed. In preparation for the inspection, the bottle 550 may be transported at the same transport speed as in the operation phase (the phase in which the visual inspection of the bottle 550 is actually performed).
[0076] The shooting parameters 1320 are adjusted by the control unit 201 and / or manually, and the shooting environment based on the adjusted shooting parameters 1320 is set.
[0077] For example, at least one of the lighting parameter group 1303 and the camera parameter group 1304 is adjusted. Specifically, for example, every time the lighting and the camera 531 are adjusted, the bottle 550 is photographed by the camera 531, and the control unit 201 calculates the amount of color change in the edge range and the amount of color change in the detection range based on the photographed image, and when at least one of the magnitude relationship between them and the difference between them satisfies a predetermined requirement, the adjustment of the lighting parameter group 1303 and the camera parameter group 1304 may be completed. Also, at least one of the shutter speed, the aperture, and the ISO sensitivity in the camera parameter group 1304 may be adjusted to a value according to the conveying speed. The adjusted parameters (for example, the shutter speed, the aperture, and the ISO sensitivity) are set in the camera 531 from the control unit 201 via or not via the control device 501, and as a result, the camera 531 can perform shooting according to the set parameters.
[0078] Also, for example, the control unit 201 may cause the background color learning unit 151 to execute learning of the background color model 141. The learning of the background color model 141 may be performed using a teacher data set for the background color model 141. The teacher data set for the background color model 141 may include a set of a background color parameter group as an output and a predetermined parameter group as an input. The predetermined parameter group as an input may include at least a part of a lighting parameter group, a camera parameter group, a color value of the bottle near the edge (color value of the measurement area 55), and a color change amount in the detection range. The background color model 141 is learned to output a background color parameter group that minimizes the color change amount in the edge range (for example, a color value of the measurement area 51 that minimizes the color change amount in the edge range compared to the color change amount in the detection range).
[0079] The control unit 201 may cause the background color inference unit 152 to infer a background color parameter group using the background color model 141. The background color parameter group is inferred by inputting a predetermined parameter group (for example, a parameter group including the lighting parameter group 1303 and the camera parameter group 1304 for which adjustment has been completed) to the learned background color model 141. The control unit 201 may control the background plate 591 to provide a background color according to the background color parameter group. The control unit 201 may photograph the bottle 550 with the camera 531, calculate the color change amount in the edge range and the color change amount in the detection range based on the photographed image, and when a relationship is established in which the color change amount in the edge range is smaller than the color change amount in the detection range (or, in addition, when the difference between them becomes a predetermined difference or more), the background color provided by the background plate 591 may be the background color in the operation phase. Note that the adjustment of the background color may be performed manually instead of the learning and inference of the background color model 141. Each time the background color is manually adjusted, an image of the bottle 550 may be acquired, and a determination may be made as to whether or not the relationship that the amount of color change in the edge range is smaller than the amount of color change in the detection range is established (or, in addition, whether or not the difference therebetween is equal to or greater than a predetermined difference). If the result of the determination is true, the adjustment of the background color may be completed.
[0080] Furthermore, in the preparation phase, the control unit 201 may cause the inspection learning unit 153 to execute learning of the inspection model 142. Learning of the inspection model 142 may be performed using a teacher data set for the inspection model 142. The teacher data set for the inspection model 142 may include a pair of an inference value as an output and image data (image data of a photographed image of a bottle) as an input.
[0081] Learning of the background color model 141 is completed, and a background color model parameter group 1311 is stored in the storage device 132. Learning of the inspection model 142 is completed, and an inspection model parameter group 1312 is stored in the storage device 132. A background color parameter group 1302, an illumination parameter group 1303, and a camera parameter group 1304 determined in the preparation phase are stored in the storage device 132. The background color model parameter group 1311, the inspection model parameter group 1312, the background color parameter group 1302, the illumination parameter group 1303, and the camera parameter group 1304 determined and stored in the preparation phase are associated with conveying speed data 1305 indicating the conveying speed at the time of determining these parameter groups.
[0082] Such a preparation phase may be performed for each color of the bottle 550. For example, a set of background color parameters 1302 may be prepared and stored for each color of the bottle 550. Also, a set of lighting parameters 1303 and / or a set of camera parameters 1304 may be prepared for each color of the bottle 550. Also, an inspection model 142 may be generated for each color of the bottle 550.
[0083] <Operation Phase>
[0084] In the operation phase, an appearance inspection of the bottle 550 is actually performed. That is, in the imaging environment (imaging specifications) constructed in the preparation phase, the bottle 550 being transported is photographed, and the control unit 201 causes the inspection inference unit 154 to determine whether the bottle 550 is normal or not using the inspection model 142 based on the photographed image.
[0085] In the operation phase, for example, the inspection control process illustrated in FIG. 14 may be performed.
[0086] FIG. 14 shows an example of the flow of the inspection control process.
[0087] If there are bottles 550 to be inspected (S1401), the control unit 201 selects a predetermined number of bottles 550 (S1402) and obtains captured image data for each selected bottle 550 (S1403).
[0088] The control unit 201 analyzes at least one captured image obtained in S1403, and determines whether or not there is a change corresponding to at least one of the following conditions (S1404). (Condition 1) The relationship that the amount of color change in the edge range is less than the amount of color change in the detection range is no longer true, and the amount of color change in the edge range is equal to or greater than the amount of color change in the detection range. (Condition 2) The amount of color change in the edge range is greater than a reference amount of color change. The "reference amount of color change" may be the amount of color change in the edge range adopted when determining the background color parameter group 1302 in the preparation phase, or may be the amount of color change in the edge range identified from the captured image at the start of the inspection. (Condition 3) The balance of TP (True Positive), FP (False Positive), FN (False Negative) and TN (True Negative) does not satisfy a specified condition. (Condition 4) The difference between the latest captured image (for example, feature amount such as color) and the captured image used in training the inspection model 142 (as training data) is equal to or greater than a certain difference.
[0089] If the determination result of S1404 is true (S1404: Yes), the control unit 201 determines whether or not to change the background color (S1405). This determination may be, for example, a determination of whether or not the condition that is satisfied when S1404: Yes is a condition that requires a background color change. An example of the "condition that requires a background color change" may be at least one of (Condition 1) to (Condition 3) among the above (Condition 1) to (Condition 4).
[0090] When the determination result of S1405 is true (S1405: Yes), the control unit 201 determines a changed background color parameter group and replaces the inspection model 142 (S1406). Specifically, for example, as shown in FIG. 16, the control unit 201 inputs a parameter group based on the photographed image acquired in the inspection (for example, a parameter group including at least a part of a lighting parameter group, a camera parameter group, a color value of the bottle near the edge (color value of the measurement area 55), and a color change amount in the detection range) to the background color model 141 to obtain a new background color parameter group. The control unit 201 changes the background color to a background color according to the obtained background color parameter group. The control unit 201 causes the inspection learning unit 153 to generate (prepare) the inspection model 142 learned using the photographed image with the changed background color, and the generated inspection model is set as the inspection model to be used in the future appearance inspection. In S1403 after S1406, the inspection inference unit 154 uses the generated inspection model 142.
[0091] When the determination result of S1405 is false (S1405: No), the control unit 201 determines whether the conveying speed has changed (S1407). For example, when the conveying speed has been changed, the control unit 201 may receive data indicating the changed conveying speed from a predetermined device such as the conveying device or the control device 501, or may monitor whether the conveying speed specified by communication with the predetermined device (or by other method) is different from the conveying speed indicated by the conveying speed data 1305.
[0092] If the determination result of S1407 is true (S1407: Yes), the control unit 201 changes at least one of the shutter speed, the aperture, and the ISO sensitivity in the camera parameter group 1304 to a parameter corresponding to the changed conveying speed (S1408), and applies the changed parameters to the camera 531. Subsequent photographing by the camera 531 is performed according to the changed parameters.
[0093] When the determination result of S1407 is true (S1407: Yes), the control unit 201 adjusts at least some of the parameters of the illumination parameter group 1303 and the camera parameter group 1304 (S1409). For example, when the satisfied condition is (Condition 2) in S1404: Yes, the control unit 201 outputs an alert (for example, outputs a voice or displays a screen), and if the change is only in the luminance, may adjust the shutter speed or the illumination luminance so that the current image difference approaches the image difference at the start of the inspection.
[0094] After S1406, S1408, or S1409, the control unit 201 causes the inspection inference unit 154 to perform a visual inspection using the inspection model 142 (S1410).
[0095] In the process shown in FIG. 14, for example, in S1402, if the bottle 550 to be inspected this time is a bottle 550 of a different color from the bottle 550 to be inspected previously, the control unit 201 may change the background color to a background color conforming to the background color parameter group 1302 corresponding to the current inspection target, and replace the inspection model 142 with the inspection model 142 corresponding to the background color parameter group 1302.
[0096] Although one embodiment has been described above, this is an example for explaining the present invention, and the scope of the present invention is not limited to this embodiment. The present invention can be implemented in various other forms. For example, various objects other than the bottle 550 can be adopted as the inspection object. In addition, various objects (e.g., stains) that can be a difference from a normal inspection object other than scratches can be adopted as the detection object. Specifically, for example, by learning using multiple images in which a normal inspection object is shown, an object that does not need to be a detection object (for example, an allowable shape change that occurs in the manufacturing process) can be identified, and an object other than such an object (an object that is a difference from a normal inspection object) can be detected.
[0097] Furthermore, for example, the above description can be summarized as follows. The following summary may include supplementary explanations and explanations of modified examples.
[0098] The visual inspection device (e.g., visual inspection device 110) includes an interface device (e.g., interface device 131) that accepts image data representing an image of a detection target (e.g., bottle 550) captured by a camera (e.g., camera 531), a storage device (e.g., storage device 132) in which the accepted image data is stored, and a processor (e.g., processor 133) that is connected to the interface device and the storage device and performs visual inspection of the inspection target based on the image data. In visual inspection, a first image (an image represented by image data) or a second image (an image obtained after the first image is subjected to image processing by a processor) is an image that is influenced by one or more parameters that affect the image of the inspection target, which are a group of parameters determined before the visual inspection. In the first image or the second image, the color change amount in the edge range is smaller than the reference change amount. The edge range is a range having an edge vicinity including the edge of the inspection target, and is a range that is composed of a part of the inspection target and a part of the background of the inspection target with the edge of the inspection target as a boundary. The color change amount in the edge range is the difference between the background color in the edge range and the color of the inspection target part in the edge range. This reduces the possibility that pixel values near the edge of the inspection target are emphasized, and as a result, the reliability of the appearance inspection is improved. The "background color in the edge range" may be a color based on a statistical value of one or more color values identified from the background part in the edge range, and similarly, the "color of the inspection target part in the edge range" may be a color based on a statistical value of one or more color values identified from the inspection target part in the edge range. The "difference between the background color in the edge range and the color of the inspection target part in the edge range" may be a statistical value of the difference between the background color and the color of the inspection target part. The "image influenced by the parameter group determined before the appearance inspection" may be a photographed image influenced by the photographing environment according to at least a part of the parameter group, or may be an image resulting from image processing performed by a processor based on at least a part of the parameter group (for example, image processing that changes the background color in the photographed image (or the image after image processing thereof) to a background color according to the background color parameter group).
[0099] The reference change amount to be compared with the color change amount in the edge range may be a predetermined threshold value, but is preferably the color change amount in the detection range of the first image or the second image. This increases the possibility of detecting the detection target even if the detection target is located near the edge. The detection range may be a range consisting of at least a part of the detection target (e.g., a scratch) in the inspection target and at least a part of the surroundings of the detection target in the inspection target. The color change amount in the detection range may be the difference between the color of the detection target in the detection range and the color of the surroundings of the detection target in the detection range. The "color of the detection target" may be a color based on a statistical value of one or more color values in the detection target, and the "color of the surroundings of the detection target" may be a color based on a statistical value of one or more color values in the surroundings of the detection target.
[0100] The determined parameter group may include a background color parameter group, which is one or more parameters related to a background color. The background color parameter group may be at least one parameter of hue, saturation, and brightness. By adjusting the background color in this manner, the possibility of highlighting pixel values near the edge of the inspection target is reduced.
[0101] The processor may provide a background color adjustment UI (e.g., background color adjustment UI 1200) that is a UI that accepts input of background color parameters. The determined parameters may include the background color parameters input via the background color adjustment UI. This allows the background color parameters that reduce the amount of color change in the edge range to be set via the UI provided by the processor. The processor may display, in the scenery adjustment UI, difference parameters (e.g., values displayed in columns 1241-1243) that are differences between the background color parameters (e.g., values displayed in columns 1201-1203) displayed in the background color adjustment UI for the background color in the edge range and the parameters that represent the color of the inspection target portion in the edge range. When at least a part of the displayed background color parameters is updated, the processor may update the difference parameters based on the updated background color parameters, or instead of or in addition to this, when at least a part of the displayed difference parameters is updated, the processor may update the background color parameters based on the updated difference parameters. In this way, it is possible to assist the user in determining the background color parameters that reduce the amount of color change in the edge range. For example, instead of or in addition to the fields 1201 to 1203, the fields 1241 to 1243 may receive any value from the user.
[0102] The photographed image of the inspection target shows a background color provided by a background medium (e.g., background board 591) of the inspection target, and the background color provided by the background medium may be a color conforming to the background color parameter group. In this way, by changing the background color in the photographing environment, the amount of color change in the edge range can be reduced. The background medium may be a background device as a display device connected to the interface device. The processor may control the background device through the interface device so that the background color provided by the background device is a background color conforming to the background color parameter group. In this way, the background color can be automatically set to conform to the determined background color parameter group.
[0103] The determined parameter group may include an illumination parameter group, which is one or more parameter groups related to illumination for the inspection object. In photographing the inspection object, the illumination for the inspection object may be illumination according to the illumination parameter group in the determined parameter group. In this manner, controlling the illumination can contribute to reducing the amount of color change in the edge range.
[0104] The parameter set determined before the visual inspection may be a parameter set determined based on the amount of color change in an edge range of an image of an object to be inspected before the visual inspection. The image may be a grayscale image. For example, an image represented by the received image data or an image resulting from image processing performed by a processor on the image may be a grayscale image. This emphasizes shading, resulting in brightness (e.g., lightness) that stands out, which can contribute to determining an appropriate background color parameter set.
[0105] The appearance inspection device may receive image data of each inspection object captured by a camera for each inspection object being transported. The determined parameter group may include a camera parameter group that is one or more camera parameters and includes at least one of a shutter speed, an aperture, and an ISO sensitivity determined according to the transport speed of the inspection object. In the appearance inspection, when the processor determines that the transport speed of the inspection object has been changed, it may change at least one parameter (a parameter in the camera parameter group) of the shutter speed, the aperture, and the ISO sensitivity to a parameter corresponding to the changed transport speed. This makes it possible to maintain a highly reliable appearance inspection even if the transport speed is changed.
[0106] In the visual inspection, the processor may use a trained first inspection model (e.g., inspection model 142) to determine whether an inspection target shown in an image represented by image data is normal or not. For each of a plurality of time points in the visual inspection, the processor may use image data of the inspection target captured at the time point to determine whether there is a change that satisfies one or more conditions (e.g., S1404). If the result of the determination is true and the satisfied condition is a condition that requires a change in background color (e.g., any one of (Condition 1) to (Condition 3)), the processor may determine a set of changed background color parameters, generate a trained second inspection model (e.g., new inspection model 142) corresponding to the set of changed background color parameters using image data of the inspection target with a changed background color according to the determined set of changed background color parameters, and continue the visual inspection using the second inspection model instead of the first inspection model. This makes it possible to maintain a highly reliable visual inspection. The "changed background color parameter group" may be determined by a processor using the background color model 141 or another method, or may be input by a user via a background color adjustment UI. The "changed background color according to the determined changed background color parameter group" may be realized by controlling a background device, by replacing a background medium by a user, or by image processing that changes the background color of an image represented by image data.
[0107] If the result of the determination is true and the satisfied condition is a condition that does not require a change in the background color, the processor may change at least a part of a group of illumination parameters, which are one or more parameters related to illumination of the inspection object, and / or at least a part of a group of camera parameters, which are one or more parameters related to the camera, based on the image difference. This "image difference" may be the difference between (x) and (y) below. This makes it possible to maintain highly reliable appearance inspection without re-learning the inspection model (generating a new inspection model). (x) The amount of color change in the edge range of the latest image of the object to be inspected. (y) The amount of color change in the edge range of the image at the start of appearance inspection, or the amount of color change in the edge range of the image of the inspection target used to train the first inspection model.
[0108] If the result of the determination is true and the satisfied condition is a condition that does not require a change in the background color, the processor may narrow the difference between (a) and (b) below by performing image processing on the latest image of the inspection target, thereby making it possible to maintain a highly reliable appearance inspection without re-learning the inspection model. (a) The background color in the latest image. (b) The background color in the image at the start of the visual inspection, or the background color in the image of the inspection object used to train the first inspection model. [Explanation of symbols]
[0109] 110: visual inspection device, 131: interface device, 132: storage device, 133: processor
Claims
1. an interface device that accepts image data representing an image of the inspection object captured by the camera; a storage device in which the received image data is stored; a processor connected to the interface device and the storage device, the processor performing an appearance inspection of the inspection object based on the image data; Equipped with In the appearance inspection, a first image which is an image represented by the image data, or a second image which is an image obtained after image processing of the first image, is an image which is influenced by one or more parameters which affect the image of the inspection target, and a parameter group which is determined before the appearance inspection, In the first image or the second image, a color change amount in an edge range is smaller than a reference change amount; the edge range is a range including an edge of the inspection object and having a vicinity of the edge, and is configured by a part of the inspection object and a part of a background of the inspection object with the edge of the inspection object as a boundary, the color change amount in the edge range is a difference between a background color in the edge range and a color of the inspection target portion in the edge range; Visual inspection equipment.
2. the reference change amount is a color change amount in a detection range of the first image or the second image, The detection range is a range that is configured by at least a part of the detection target in the inspection target and at least a part of the surroundings of the detection target in the inspection target, The amount of color change in the detection range is a difference between the color of the detection object in the detection range and the color of the surroundings of the detection object in the detection range. The visual inspection apparatus according to claim 1.
3. the determined parameter group includes a background color parameter group, which is one or more parameter groups related to the background color; The background color parameter group is at least one parameter of hue, saturation, and brightness. The visual inspection apparatus according to claim 1.
4. the processor provides a background color adjustment UI, which is a UI (User Interface) that accepts an input of the background color parameter group; the determined parameter group includes the background color parameter group input via the background color adjustment UI; The visual inspection apparatus according to claim 3.
5. The processor, displaying, in the background color adjustment UI, a difference parameter group that is a difference between a background color parameter group currently being displayed in the background color adjustment UI for the background color in the edge range and a parameter group that represents a color of the inspection target portion in the edge range; when at least a part of the background color parameter group being displayed is updated, the difference parameter group is updated based on the updated background color parameter group, and / or when at least a part of the background color parameter group being displayed is updated, the difference parameter group is updated based on the updated background color parameter group.
5. The visual inspection apparatus according to claim 4.
6. The photographed image of the test subject includes a background color provided by a background medium of the test subject; the background color provided by the background medium is a color according to the background color parameter group; The visual inspection apparatus according to claim 3.
7. the background medium is a background device as a display device connected to the interface device; said processor controls said background device through said interface device such that a background color provided by said background device is a background color according to said set of background color parameters; 7. The visual inspection apparatus according to claim 6.
8. the determined group of parameters includes an illumination parameter group, which is one or more parameter groups related to illumination of the inspection object; In photographing the inspection object, illumination of the inspection object is illumination according to the illumination parameter group in the determined parameter group. The visual inspection apparatus according to claim 1.
9. the determined group of parameters before the appearance inspection is a group of parameters determined based on an amount of color change in an edge range of an image of any one of the inspection targets before the appearance inspection, The image is a grayscale image. The visual inspection apparatus according to claim 3.
10. Image data of each inspection object photographed by the camera is received for each inspection object that is transported; the determined parameter group includes a camera parameter group including at least one of a shutter speed, an aperture, and an ISO sensitivity, the camera parameter group being one or more parameters related to the camera and determined in accordance with a transport speed of the inspection object; When the processor determines that a conveying speed of an inspection target has been changed, the processor changes at least one parameter of a shutter speed, an aperture, and an ISO sensitivity to a parameter corresponding to the changed conveying speed. The visual inspection apparatus according to claim 1.
11. In the appearance inspection, the processor is configured to determine whether or not an inspection object shown in an image represented by the image data is normal by using a trained first inspection model, The processor determines, for each of a plurality of time points in the appearance inspection, whether or not there is a change that satisfies any one of one or more conditions, using image data of the inspection object photographed at that time point; If the determination is true and the satisfied condition is a condition that requires a change in background color, the processor: Determine the changed background color parameters, generating a trained second inspection model corresponding to the changed background color parameter set using image data of the inspection target with the changed background color according to the determined changed background color parameter set; continuing the visual inspection using the second inspection model instead of the first inspection model; The visual inspection apparatus according to claim 3.
12. When the result of the determination is true and the satisfied condition is a condition that does not require a change in background color, the processor changes at least a portion of a group of illumination parameters, which are one or more parameters related to illumination of the inspection object, and at least a portion of a group of camera parameters, which are one or more parameters related to the camera, based on the image difference; The image difference is the difference between (x) and (y) below: (x) the amount of color change in the edge region of the current image of the object of inspection; (y) a color change amount in an edge range of an image at the start of the appearance inspection, or a color change amount in an edge range of an image of an inspection target used for learning the first inspection model; The visual inspection apparatus according to claim 11.
13. When the result of the determination is true and the satisfied condition is a condition that does not require a change in background color, the processor performs image processing on the latest image of the inspection object to reduce a difference between (a) and (b) below: (a) the background color in the latest image; (b) a background color in an image at the start of the appearance inspection, or a background color in an image of an inspection target used in learning the first inspection model; The visual inspection apparatus according to claim 11.
14. accepting image data representing an image of an object to be inspected captured by a camera; A visual inspection of the inspection object is performed based on the image data. This is done by a computer, In the appearance inspection, a first image which is an image represented by the image data, or a second image which is an image obtained after image processing of the first image, is an image which is influenced by one or more parameters which affect the image of the inspection target, and a parameter group which is determined before the appearance inspection, In the first image or the second image, a color change amount in an edge range is smaller than a reference change amount; the edge range is a range including an edge of the inspection object and having a vicinity of the edge, and is configured by a part of the inspection object and a part of a background of the inspection object with the edge of the inspection object as a boundary, the color change amount in the edge range is a difference between a background color in the edge range and a color of the inspection target portion in the edge range; Visual inspection method.
Citation Information
Patent Citations
Appearance inspecting device
JP1998040383A
Board image extract device, board image extract method and board appearance inspection device
JP2008292348A
Image processing system, setting method and program
JP2021071310A
Cited By
Inspection system, inspection method, and program
JP7870102B1