Inspection device and inspection method
The inspection apparatus and method enhance defect detection efficiency by focusing on specific judgment areas within images using tailored learning models, addressing the trade-off between time and accuracy in existing machine learning-based defect detection.
Patent Information
- Application Number
- JP2020002460
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2020-01-09
- Publication Date
- 2024-09-06
- Estimated Expiration
- 2040-01-09
AI Technical Summary
Existing inspection methods using machine learning for defect detection face a trade-off between accuracy and time efficiency, with longer times required for defect determination leading to potential decreases in detection accuracy.
The inspection apparatus and method utilize a defect candidate extraction section, judgment area extraction unit, and learning models to determine defects in specific areas of an image, including a determination unit that uses machine learning on selected judgment areas to reduce the time required for defect inspection while maintaining accuracy.
This approach allows for faster defect inspection with reduced time requirements while suppressing a decrease in detection accuracy by focusing on specific judgment areas within the image, using tailored learning models for different defect sizes and types.
Smart Images

Figure 0007546356000003 
Figure 0007546356000004 
Figure 0007546356000002
Abstract
Description
[Technical field]
[0001] The present invention relates to an inspection apparatus and an inspection method for inspecting an object for defects. [Background technology]
[0002] As an inspection device for inspecting the presence or absence of defects in an object to be inspected, for example, an inspection device that inspects the presence or absence of defects based on an image of the object to be inspected is known. The following Patent Document 1 discloses an inspection device including an estimation unit that estimates a visual defect part of the object to be inspected from an image of the object to be inspected by using a learning model constructed by machine learning. [Prior art documents] [Patent documents]
[0003] [Patent Document 1] Utility Model Registration No. 3223248 Summary of the Invention [Problem to be solved by the invention]
[0004] When determining the presence or absence of defects from an image using a learning model constructed by machine learning, as in the inspection device described in Patent Document 1 above, the accuracy of defect detection tends to be higher than when determining the presence or absence of defects from an image without using a learning model, but the time it takes to determine the presence or absence of defects tends to be longer.
[0005] Therefore, an object of the present invention is to provide an inspection apparatus and an inspection method that can reduce the time required to inspect for defects while suppressing a decrease in the accuracy of defect detection. [Means for solving the problem]
[0006] In order to achieve the above-mentioned object, the inspection apparatus of the present invention is characterized by comprising: a defect candidate extraction unit that extracts one or more defect candidates based on predetermined features in an image of an object to be inspected; a judgment region extraction unit that extracts a judgment region from the image that contains at least a part of the extracted defect candidate; and a judgment unit that judges the presence or absence of a defect using a learning model constructed by machine learning for the extracted judgment region.
[0007] In addition, to achieve the above-mentioned object, the inspection method of the present invention is characterized by comprising a defect candidate extraction step of extracting one or more defect candidates based on predetermined features in an image of an object to be inspected, a judgment area extraction step of extracting a judgment area from the image that contains at least a part of the extracted defect candidate, and a judgment step of judging the presence or absence of a defect using a learning model constructed by machine learning for the extracted judgment area.
[0008] In the inspection device and the inspection method, the learning model is used to determine the presence or absence of a defect in a determination area that includes at least a portion of a defect candidate in an image of an object to be inspected. Therefore, the inspection device and the inspection method can suppress a decrease in the accuracy of defect detection compared to a case where the presence or absence of a defect is determined without using a learning model. Furthermore, the inspection device and the inspection method can reduce the time required to inspect the presence or absence of a defect compared to a case where the learning model is used to determine the presence or absence of a defect in the entire image of an object to be inspected.
[0009] The judgment region extraction section may extract the judgment region such that the center of the judgment region is located at or near the centroid of the defect candidate.
[0010] A learning model for inspecting the presence or absence of defects based on an image of an object to be inspected is generally constructed by machine learning learning images including a plurality of defect images including defects of the object to be inspected. In this inspection device, as described above, a judgment area in which the presence or absence of a defect is judged is extracted so that the center of the judgment area is located at or near the centroid of a defect candidate. Therefore, even if a learning model is constructed by machine learning learning images that do not include a defect image in which the centroid of the defect is located on the outer edge side of the image, the inspection device can suppress a decrease in the accuracy of defect detection. Therefore, the inspection device can reduce the time required to construct a learning model.
[0011] The above-mentioned inspection apparatus may further include a distance calculation unit that calculates a minimum distance between the centroid of a defect candidate extracted by the defect candidate extraction unit and the centroid of another defect candidate, wherein the judgment area extraction unit extracts a first judgment area of a predetermined size from the image containing at least a part of the defect candidate for which the calculated minimum distance is equal to or greater than a predetermined distance, and extracts a second judgment area of the image containing at least a part of the defect candidate for which the calculated minimum distance is less than the predetermined distance, the second judgment area being smaller than the first judgment area, and the judgment unit may determine the presence or absence of a defect in the first judgment area using a first learning model constructed by machine learning of a learning image including a plurality of first defect images of a specific size that contain at least a part of a defect of the object to be inspected, and may determine the presence or absence of a defect in the second judgment area using a second learning model constructed by machine learning of a learning image including a plurality of second defect images that contain at least a part of the defect of the object to be inspected and are smaller than the first defect images.
[0012] In this inspection apparatus, as described above, the distance calculation unit calculates the minimum distance between the centroid of a defect candidate extracted by the defect candidate extraction unit and the centroid of another defect candidate. In addition, the judgment region extraction unit extracts a first judgment region of a predetermined size that includes at least a part of the defect candidate from the image for a defect candidate whose calculated minimum distance is equal to or greater than a predetermined distance, and extracts a second judgment region of the image that includes at least a part of the defect candidate and is smaller than the first judgment region for a defect candidate whose calculated minimum distance is less than the predetermined distance. Therefore, in this inspection apparatus, the first judgment region or the second judgment region smaller than the first judgment region is extracted for the defect candidate, and these judgment regions may not include other defect candidates. Therefore, compared to the case where a judgment region of a predetermined size is extracted for the defect candidate, this inspection apparatus may reduce the influence of a defect candidate different from the defect candidate corresponding to the judgment region when determining the presence or absence of a defect in the judgment region. Therefore, this inspection apparatus may further suppress a decrease in the accuracy of defect detection. The size of the learning model tends to increase according to the size of the learning image to be machine-learned, and the larger the learning model, the longer it takes to determine the presence or absence of a defect using the learning model. As described above, the judgment unit judges the presence or absence of a defect in the first judgment area using a first learning model constructed by machine learning a learning image including a plurality of first defect images, and judges the presence or absence of a defect in the second judgment area using a second learning model constructed by machine learning a learning image including a plurality of second defect images smaller than the first defect images. Therefore, this inspection device can judge the presence or absence of a defect using a learning model according to the size of the judgment area, and can further reduce the time required for inspection for the presence or absence of a defect.
[0013] Alternatively, the above-mentioned inspection apparatus may further include a width calculation unit that calculates a maximum width of the defect candidates extracted by the defect candidate extraction unit, and the judgment area extraction unit may extract a third judgment area of a predetermined size from the image for a defect candidate whose calculated maximum width is equal to or greater than a predetermined width and which includes at least a portion of the defect candidate, and extract a fourth judgment area from the image for a defect candidate whose calculated maximum width is less than the predetermined width and which includes at least a portion of the defect candidate and is smaller than the third judgment area, and the judgment unit may determine the presence or absence of a defect in the third judgment area using a third learning model constructed by machine learning of a learning image including a plurality of first defect images of a specific size which include at least a portion of the defect of the object to be inspected, and may determine the presence or absence of a defect in the fourth judgment area using a fourth learning model constructed by machine learning of a learning image including a plurality of second defect images which include at least a portion of the defect of the object to be inspected and are smaller than the first defect images.
[0014] In this inspection apparatus, as described above, the width calculation unit calculates the maximum width of the defect candidates extracted by the defect candidate extraction unit. Furthermore, the judgment region extraction unit extracts a third judgment region from the image that includes at least a part of the defect candidate for a defect candidate whose calculated maximum width is equal to or greater than a predetermined width, and extracts a fourth judgment region from the image that includes at least a part of the defect candidate and is smaller than the third judgment region for a defect candidate whose calculated maximum width is less than the predetermined width. Therefore, this inspection apparatus may extract the third judgment region for a defect candidate that is equal to or greater than a predetermined size, and extract a fourth judgment region that is smaller than the third judgment region for a defect candidate that is less than the predetermined size. In other words, this inspection apparatus may extract a large third judgment region for a defect candidate that may be a large defect, and extract a small fourth judgment region for a defect candidate that may be a small defect. Incidentally, the characteristics of a defect may differ depending on the size of the defect. As described above, the judgment unit judges the presence or absence of a defect in the third judgment region using the third learning model constructed by machine learning a learning image including a plurality of first defect images, and judges the presence or absence of a defect in the fourth judgment region using the fourth learning model constructed by machine learning a learning image including a plurality of second defect images smaller than the first defect images. Therefore, in this inspection device, the learning model for judging the presence or absence of a defect in a judgment region including a defect candidate that may be a large defect is different from the learning model for judging the presence or absence of a defect in a judgment region including a defect candidate that may be a small defect. Therefore, this inspection device can further suppress a decrease in the accuracy of defect detection compared to a case in which the presence or absence of a defect is judged using one learning model.
[0015] The defect candidate extraction unit may extract, as the defect candidate, a region in the image whose brightness value is greater than a predetermined brightness value and whose area is greater than a predetermined area, or a region in the image whose brightness value is less than a predetermined brightness value and whose area is greater than the predetermined area.
[0016] Since the presence of defects changes the reflection, refraction, absorption, etc. of light, the defects can be displayed as dark or bright areas in the image. In this inspection device, dark or bright areas in the image that are larger than a predetermined area are extracted as defect candidates, and dark or bright areas caused by small dust particles or the like that are different from defects are not extracted as defect candidates. Therefore, this inspection device can prevent the number of judgment regions from increasing, and can shorten the time required to inspect for the presence or absence of defects. Effect of the Invention
[0017] As described above, according to the present invention, it is possible to provide an inspection apparatus and an inspection method that can reduce the time required to inspect for the presence or absence of defects while suppressing a decrease in the accuracy of defect detection. [Brief description of the drawings]
[0018] [Figure 1] FIG. 1 is a diagram illustrating an inspection device according to a first embodiment of the present invention. [Diagram 2] 4 is a diagram showing a schematic diagram of a part of an example of an image of an object to be inspected captured by an imaging section; FIG. [Diagram 3] 3 is a flowchart showing an inspection method in the first embodiment of the present invention. [Figure 4] FIG. 13 is a diagram illustrating an inspection device according to a second embodiment of the present invention. [Diagram 5] 11 is a diagram showing a part of another example of an image of an object to be inspected captured by the imaging section. FIG. [Figure 6] 10 is a flowchart showing an inspection method according to a second embodiment of the present invention. [Figure 7] FIG. 13 is a diagram illustrating an inspection device according to a third embodiment of the present invention. [Figure 8] 13 is a diagram showing a part of still another example of an image of an object to be inspected captured by the imaging section. FIG. [Figure 9] 10 is a flowchart showing an inspection method according to a third embodiment of the present invention. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0019] Hereinafter, embodiments for carrying out the inspection device and inspection method according to the present invention will be illustrated with reference to the accompanying drawings. The embodiments illustrated below are intended to facilitate understanding of the present invention and are not intended to limit the present invention. The present invention can be modified or improved from the following embodiments without departing from the spirit of the present invention. In the drawings referred to below, the dimensions of each component may be changed or reference symbols may be omitted in order to facilitate understanding.
[0020] (First embodiment) FIG. 1 is a diagram showing a schematic diagram of an inspection device according to a first embodiment of the present invention. As shown in FIG. 1, the inspection device 1 according to this embodiment mainly includes an illumination unit 10, an imaging unit 20, an inspection unit 30, a storage unit 40, a display unit 50, and a control unit CO. An inspection object 60 inspected by the inspection device 1 according to this embodiment is an outer cover of a vehicle lamp that transmits light. The inspection device 1 inspects the surface of the inspection object 60 for defects, for example, the presence or absence of foreign matter attached to the surface. For ease of understanding, the inspection object 60 is shown by a vertical cross section in FIG. 1.
[0021] The inspection object 60 of this embodiment, which is an outer cover, is a plate-like member having translucency and curved in a convex shape toward one surface 60S1. A translucent rib 61 protruding toward the other surface 60S2 is provided on the outer periphery of the inspection object 60, and the rib 61 extends around the entire circumference of the outer periphery of the inspection object 60. The inspection object 60 includes a hard coat layer (not shown) provided on the one surface 60S1 and an anti-fogging coat layer (not shown) provided on the other surface 60S2. The outer surface of the hard coat layer is the one surface 60S1 of the inspection object 60, and the outer surface of the anti-fogging coat layer is the other surface 60S2 of the inspection object 60. For example, when forming the hard coat layer or the anti-fogging coat layer, foreign matter such as dust may adhere to these layers, causing defects on the surface of the inspection object 60. The inspection device 1 of this embodiment inspects the object 60 to see if there are any defects on one surface 60S1 and the other surface 60S2.
[0022] The control unit CO may be, for example, an integrated circuit such as a microcontroller, an integrated circuit (IC), a large-scale integrated circuit (LSI), or an application specific integrated circuit (ASIC), or an NC (Numerical Control) device. When an NC device is used, the control unit CO may or may not use a machine learning device. As described below, some components of the inspection device 1 are controlled by the control unit CO.
[0023] The illumination unit 10 of this embodiment is disposed above the object 60 to irradiate one surface 60S1 of the object 60 with white light. In FIG. 1, the light emitted from the illumination unit 10 is indicated by a two-dot chain line. As described above, the object 60 has translucency, so the light emitted from the illumination unit 10 passes through the object 60 from one surface 60S1 to the other surface 60S2 of the object 60. The illumination unit 10 switches between emitting and not emitting light according to a control signal from the control unit CO. Examples of the illumination unit 10 include a line illumination in which a plurality of LEDs (Light Emitting Diodes) are arranged in a predetermined direction, and a planar illumination in which a plurality of LEDs are arranged two-dimensionally. The number of illumination units 10 is not particularly limited, and the illumination unit 10 may be one or more.
[0024] The imaging unit 20 of this embodiment is disposed below the object 60 to face the illumination unit 10, and images the object 60 in a state where light from the illumination unit 10 is passing through the object 60. That is, the imaging unit 20 is disposed on the opposite side of the object 60 to the illumination unit 10, and images the object 60 in a state where light from the illumination unit 10 is passing through the object 60. Therefore, the light passing through the object 60 is imaged by the imaging unit 20. The control unit CO controls the imaging unit 20 to cause the imaging unit 20 to capture a two-dimensional image including the entire other surface 60S2 of the object 60, and output the image to the inspection unit 30. Examples of the imaging unit 20 include a line sensor camera and an area sensor camera. In addition, when the imaging unit 20 is a line sensor camera, for example, the object 60 is moved so as to cross between the illumination unit 10 and the imaging unit 20, and the object 60 is imaged by the imaging unit 20 at a predetermined time interval.
[0025] Here, when one surface 60S1 or the other surface 60S2 of the inspection object 60 has a defect such as a foreign object, most of the light irradiated to the inspection object 60 by the illumination unit 10 and incident on the defect is absorbed or reflected by the defect. On the other hand, most of the light not incident on the defect passes through the inspection object 60 from the one surface 60S1 side to the other surface 60S2 side. In this embodiment, the positional relationship between the illumination unit 10, the imaging unit 20, and the inspection object 60 is adjusted so that the light emitted from the illumination unit 10 and transmitted through the inspection object 60 enters the imaging unit 20, and the light emitted from the illumination unit 10 and reflected by the defect is less likely to enter the imaging unit 20. Therefore, in the image of the inspection object 60 captured by the imaging unit 20, the defect can be displayed as a dark area with a brightness value lower than a predetermined value, and the non-defective part can be displayed as a bright area with a brightness value higher than a predetermined value.
[0026] The inspection unit 30 of this embodiment inspects the presence or absence of defects on one surface 60S1 and the other surface 60S2 of the inspection object 60 based on the two-dimensional image input from the imaging unit 20, and outputs a signal according to the inspection result to the control unit CO. An example of the configuration of such an inspection unit 30 is a configuration similar to that of the control unit CO.
[0027] Further, a storage unit 40 is connected to the inspection unit 30. The storage unit 40 is configured to store information and to be able to read out the stored information. The storage unit 40 stores an inspection program for executing a process to determine the presence or absence of a defect and information necessary for the process, and the inspection unit 30 reads out the inspection program and information stored in the storage unit 40. Examples of the storage unit 40 include a semiconductor memory such as a ROM, a magnetic disk, and the like.
[0028] The inspection unit 30 of this embodiment, when the inspection program is read from the memory unit 40, is equipped with an inspection area extraction unit 31, a defect candidate extraction unit 32, a judgment area extraction unit 33, and a judgment unit 34, and executes a process of determining whether or not there is a defect.
[0029] The inspection area extraction unit 31 extracts an inspection area to be inspected for the presence or absence of defects in the image of the inspection object 60 input from the imaging unit 20. In this embodiment, the inspection area extraction unit 31 extracts a predetermined area in the image input from the imaging unit 20 as the inspection area. This predetermined area is an area of the inspection object 60 that does not include the ribs 61, and the outer edge of the predetermined area is separated from the ribs 61 by approximately a predetermined distance. In other words, the position, orientation, etc. of the imaging unit 20 with respect to the inspection object 60 are adjusted so that the predetermined area becomes such an area.
[0030] The defect candidate extraction unit 32 extracts one or more defect candidates based on a predetermined feature amount from the image of the inspection object 60 input from the imaging unit 20. As described above, in the present embodiment, a defect may be shown as a dark area with a brightness value lower than a predetermined value in the image of the inspection object 60 captured by the imaging unit 20. For this reason, in the present embodiment, the defect candidate extraction unit 32 extracts one or more defect candidates based on a brightness value from the inspection area extracted by the inspection area extraction unit 31 from the image of the inspection object 60 input from the imaging unit 20. Specifically, the defect candidate extraction unit 32 extracts an area in the inspection area where the brightness value is lower than a predetermined brightness value and the area is larger than a predetermined area as a defect candidate.
[0031] The judgment area extraction unit 33 extracts a judgment area including at least a part of the defect candidate extracted by the defect candidate extraction unit 32 from the image of the inspection object 60 input from the imaging unit 20. In this embodiment, as shown in FIG. 2, for the defect candidate 70 extracted by the defect candidate extraction unit 32, a judgment area 71 of a predetermined size including at least a part of the defect candidate 70 is extracted in the inspection area extracted by the inspection area extraction unit 31 from the image of the inspection object 60 input from the imaging unit 20. Note that FIG. 2 is a diagram that shows a schematic part of an example of the image of the inspection object 60 captured by the imaging unit 20, and a diagram that shows a schematic part of the inspection area extracted by the inspection area extraction unit 31. In FIG. 2, the defect candidate 70 is hatched, and the outer edge of the judgment area 71 is indicated by a dashed line. In this embodiment, the outer shape of the judgment area 71 is a square, and the center of the judgment area 71 is located at or near the centroid 70F of the defect candidate 70. That is, the judgment region extraction unit 33 extracts such a judgment region 71. Note that the vicinity is, for example, a region whose distance from the centroid 70F is 10% or less of the maximum width of the judgment region 71. The outer shape of the judgment region 71 is not particularly limited, and may be, for example, a rectangle or a circle. The center of the judgment region 71 does not have to be located at or near the centroid 70F of the defect candidate 70.
[0032] The judgment unit 34 judges the presence or absence of a defect by using a learning model constructed by machine learning for the judgment region 71 extracted by the judgment region extraction unit 33. The learning model of this embodiment is constructed by learning images including a plurality of defect images that include at least a part of the defect of the inspection object 60 and are approximately the same size as the judgment region 71, and the machine learning that constructs the learning model is supervised learning. Then, when the judgment unit 34 judges that there is a defect in any of the judgment regions 71 extracted by the judgment region extraction unit 33, it outputs a signal indicating that there is a defect to the control unit CO. On the other hand, when the judgment unit 34 judges that there is no defect in all of the judgment regions 71 extracted by the judgment region extraction unit 33 or when the defect candidate 70 is not extracted by the defect candidate extraction unit 32, it outputs a signal indicating that there is no defect to the control unit CO. Note that the above-mentioned learning images may include a plurality of defect images that include at least a part of the defect of the inspection object 60. For example, the learning images may include a plurality of non-defective images that do not include defects of the inspection object 60 in addition to these defect images.
[0033] In this manner, the inspection unit 30, which is equipped with the inspection area extraction unit 31, the defect candidate extraction unit 32, the judgment area extraction unit 33, and the judgment unit 34, inspects the presence or absence of defects on one surface 60S1 and the other surface 60S2 of the object to be inspected 60 based on the two-dimensional image input from the imaging unit 20, and outputs a signal according to the inspection result to the control unit CO.
[0034] The display unit 50 displays the inspection result of the presence or absence of defects by the inspection unit 30. An example of the display unit 50 is a liquid crystal display.
[0035] Next, a method of inspecting the object 60 for defects in this embodiment will be described.
[0036] Fig. 3 is a flowchart showing the inspection method of this embodiment. According to the inspection method of this embodiment, the presence or absence of defects on one surface 60S1 and the other surface 60S2 of the inspection object 60 is inspected using the inspection device 1. As shown in Fig. 3, the inspection method of this embodiment mainly includes an imaging step P1, an inspection area extraction step P2, a defect candidate extraction step P3, a judgment area extraction step P4, and a judgment step P5.
[0037] <Imaging process P1> This step is a step of imaging the object 60. In this embodiment, the illumination unit 10 emits light in response to a control signal from the control unit CO. The light emitted from the illumination unit 10 passes through the object 60 from one surface 60S1 side to the other surface 60S2 side. In addition, the imaging unit 20 images the object 60 in a state where the light from the illumination unit 10 is passing through the object 60 in response to a control signal from the control unit CO, and outputs a two-dimensional image including the entire other surface 60S2 of the object 60 to the inspection unit 30. In this embodiment, the object 60 is imaged so that defects in the object 60 are displayed as dark areas with a luminance value lower than a predetermined value, and non-defective parts of the object 60 are displayed as bright areas with a luminance value higher than a predetermined value.
[0038] <Inspection area extraction process P2> This step is a step of extracting an inspection area to be inspected for the presence or absence of defects in an image of the inspection object 60. In this embodiment, the inspection area extraction section 31 of the inspection section 30 extracts an inspection area in an image of the inspection object 60 that is input to the inspection section 30 from the imaging section 20. Specifically, a predetermined area in the image input from the imaging section 20 is extracted as the inspection area. This predetermined area is an area of the inspection object 60 that does not include the ribs 61, and the outer edge of the predetermined area is separated from the ribs 61 by approximately a predetermined distance. That is, in the imaging step P1, the inspection object 60 is imaged so that the predetermined area is such an area.
[0039] <Defect candidate extraction process P3> This step is a step of extracting one or more defect candidates based on a predetermined feature amount in an image of the inspection object 60. In this embodiment, the defect candidate extraction section 32 of the inspection section 30 extracts one or more defect candidates based on a luminance value in the inspection area extracted in the inspection area extraction step P2 from the image of the inspection object 60 input to the inspection section 30 from the imaging section 20. Specifically, in this inspection area, an area whose luminance value is smaller than a predetermined luminance value and whose area is larger than a predetermined area is extracted as a defect candidate.
[0040] <Judgment area extraction process P4> This step is a step of extracting a judgment region 71 including at least a part of the defect candidate extracted in the defect candidate extraction step P3 from an image of the inspection object 60. In this embodiment, as shown in Fig. 3, a judgment region 71 of a predetermined size including at least a part of the defect candidate 70 is extracted by the judgment region extraction unit 33 of the inspection unit 30. The outer shape of the judgment region 71 is a square, and the center of the judgment region 71 is located at or near the centroid 70F of the defect candidate 70. In other words, such a judgment region 71 is extracted.
[0041] <Judgment process P5> This step is a step of judging the presence or absence of a defect by using a learning model constructed by machine learning for the judgment region 71 extracted in the judgment region extraction step P4. In this embodiment, the judgment unit 34 of the inspection unit 30 judges the presence or absence of a defect by using a learning model constructed by machine learning for the judgment region 71 extracted in the judgment region extraction step P4. Then, when the judgment unit 34 judges that there is a defect in any of the extracted judgment regions 71, it outputs a signal indicating that there is a defect to the control unit CO. On the other hand, when the judgment unit 34 judges that there is no defect in all of the extracted judgment regions 71 or when the defect candidate extraction unit 32 does not extract a defect candidate 70, it outputs a signal indicating that there is no defect to the control unit CO. The control unit CO outputs a control signal corresponding to the signal input from the judgment unit 34 of the inspection unit 30 to the display unit 50, and causes the display unit 50 to display the inspection result. In this manner, the presence or absence of a defect on one surface 60S1 and the other surface 60S2 of the inspection object 60 is inspected.
[0042] As described above, the inspection apparatus 1 of this embodiment includes the defect candidate extraction unit 32, the judgment area extraction unit 33, and the judgment unit 34. The defect candidate extraction unit 32 extracts one or more defect candidates 70 based on a predetermined feature amount in an image of the inspection object 60. The judgment area extraction unit 33 extracts a judgment area 71 including at least a part of the defect candidate 70 from the image of the inspection object 60. The judgment unit 34 judges the presence or absence of a defect for the extracted judgment area 71 using a learning model constructed by machine learning.
[0043] The inspection method of this embodiment also includes a defect candidate extraction step P3, a judgment area extraction step P4, and a judgment step P5. In the defect candidate extraction step P3, one or more defect candidates 70 are extracted based on a predetermined feature amount in an image of the inspection object 60. In the judgment area extraction step P4, a judgment area that includes at least a part of the extracted defect candidate 70 is extracted from the image. In the judgment step P5, the presence or absence of a defect is judged for the extracted judgment area 71 using a learning model constructed by machine learning.
[0044] As described above, the inspection device 1 and the inspection method of the present embodiment use a learning model to determine the presence or absence of a defect in the judgment region 71 that includes at least a part of the defect candidate 70 in the image of the inspection object 60 captured. Therefore, the inspection device 1 and the inspection method of the present embodiment can suppress a decrease in the accuracy of defect detection compared to a case where the presence or absence of a defect is determined without using a learning model. Furthermore, the inspection device 1 and the inspection method of the present embodiment can reduce the time required to inspect the presence or absence of a defect compared to a case where the presence or absence of a defect is determined for the entire image of the inspection object 60 captured using a learning model.
[0045] Here, a learning model for inspecting the presence or absence of a defect based on an image of the inspection object 60 is generally constructed by machine learning learning images including a plurality of defect images including defects of the inspection object 60. In the inspection device 1 and the inspection method of the present embodiment, as described above, the judgment area 71 in which the presence or absence of a defect is judged is extracted so that the center of the judgment area 71 is located at or near the centroid 70F of the defect candidate 70. Therefore, the inspection device and the inspection method of the present embodiment can suppress a decrease in the accuracy of defect detection even if a learning model is constructed by machine learning learning learning images that do not include a defect image in which the centroid of the defect is located on the outer edge side of the image. Therefore, the inspection device 1 and the inspection method of the present embodiment can reduce the time required to construct a learning model.
[0046] Furthermore, in the inspection device 1 and the inspection method of this embodiment, regions in an image of the object to be inspected 60 whose brightness value is less than a predetermined brightness value and whose area is greater than a predetermined area are extracted as defect candidates 70. Therefore, the inspection device 1 and the inspection method of this embodiment can avoid extracting dark areas caused by small dust particles or the like that are different from defects as defect candidates. Therefore, the inspection device 1 and the inspection method of this embodiment can prevent the number of judgment regions 71 from increasing, and can shorten the time required to inspect for the presence or absence of defects.
[0047] As described above, when one surface 60S1 or the other surface 60S2 of the inspection object 60 has a defect such as a foreign substance, most of the light irradiated onto the inspection object 60 by the illumination unit 10 and incident on the defect is absorbed or reflected by the defect, and most of the light not incident on the defect passes through the inspection object 60 from the one surface 60S1 side to the other surface 60S2 side. For this reason, when the positional relationship among the illumination unit 10, the imaging unit 20, and the inspection object 60 is adjusted so that the light emitted from the illumination unit 10 and reflected by the defect enters the imaging unit 20 and the light emitted from the illumination unit 10 and transmitted through the inspection object 60 is unlikely to enter the imaging unit 20, the defect can be displayed as a bright part having a luminance value higher than a predetermined value in the image of the inspection object 60 captured by the imaging unit 20, and the non-defective part can be displayed as a dark part having a luminance value higher than a predetermined value. In this case, in the defect candidate extraction step P3, the defect candidate extraction section 32 of the inspection unit 30 extracts regions in the image of the object to be inspected 60 that have a brightness value greater than a predetermined brightness value and a predetermined area greater than a predetermined area as defect candidates. Even with the inspection device 1 and inspection method configured as described above, it is possible to prevent the number of judgment regions 71 from increasing by not extracting bright areas caused by small dust particles or the like that are not defects as defect candidates, and to shorten the time required to inspect for the presence or absence of defects.
[0048] Second embodiment Next, a second embodiment of the present invention will be described in detail with reference to Fig. 4. Note that components that are the same as or equivalent to those in the first embodiment will be given the same reference numerals and will not be described again unless otherwise specified.
[0049] Fig. 4 is a diagram illustrating an inspection device according to the present embodiment. As shown in Fig. 4, the inspection device 1 according to the present embodiment is mainly different from the inspection device 1 according to the first embodiment in that the inspection unit 30 includes a distance calculation unit 35.
[0050] The inspection area extraction unit 31 of this embodiment is the same as the inspection area extraction unit 31 of the first embodiment, and the defect candidate extraction unit 32 of this embodiment is the same as the defect candidate extraction unit 32 of the first embodiment. Therefore, a description of the inspection area extraction unit 31 and the defect candidate extraction unit 32 of this embodiment will be omitted.
[0051] The distance calculation section 35 calculates, for each defect candidate 70 extracted by the defect candidate extraction section 32, the minimum distance between the centroid 70F of that defect candidate 70 and the centroids 70F of the other defect candidates 70.
[0052] As shown in FIG. 5, the judgment area extraction unit 33 of this embodiment extracts a first judgment area 71A of a predetermined size that includes at least a part of the defect candidate 70 from the image of the inspection object 60 captured, for a defect candidate 70 whose minimum distance calculated by the distance calculation unit 35 is equal to or greater than a predetermined distance. Also, the judgment area extraction unit 33 of this embodiment extracts a second judgment area 71B that includes at least a part of the defect candidate 70 from the image of the inspection object 60 captured, and is smaller than the first judgment area 71A, for a defect candidate 70 whose minimum distance calculated by the distance calculation unit 35 is less than a predetermined distance. Note that FIG. 5 is a diagram that diagrammatically shows a part of another example of an image of the inspection object 60 captured by the imaging unit 20, and diagrammatically shows a part of the inspection area extracted by the inspection area extraction unit 31. In FIG. 5, the defect candidate 70 is hatched, and the outer edges of the first judgment area 71A and the second judgment area 71B are indicated by dashed lines. In this embodiment, the first judgment region 71A and the second judgment region 71B have a square outer shape. The above-mentioned predetermined distance is half the distance between the opposite sides of the first judgment region 71A, and the distance between the opposite sides of the second judgment region 71B is half the distance between the opposite sides of the first judgment region 71A. The center of the first judgment region 71A is located at or near the centroid 70F of the defect candidate 70 whose minimum distance is equal to or greater than the predetermined distance, and the center of the second judgment region 71B is located at or near the centroid 70F of the defect candidate 70 whose minimum distance is less than the predetermined distance. That is, the judgment region extraction unit 33 extracts such first judgment region 71A and second judgment region 71B. The above-mentioned predetermined distance is not particularly limited. The vicinity of the centroid 70F of the defect candidate 70 whose minimum distance is equal to or greater than the predetermined distance is, for example, an area whose distance from the centroid 70F is 10% or less of the maximum width of the first judgment region 71A. Moreover, the centroid 70F or its vicinity of the defect candidate 70 where the small distance is less than the predetermined distance is, for example, an area where the distance from the centroid 70F is 10% or less of the maximum width of the second judgment area 71B. Furthermore, the outer shapes of the first judgment area 71A and the second judgment area 71B are not particularly limited and may be, for example, rectangular or circular.The outer shape of first judgment region 71A and the outer shape of second judgment region 71B may be different from each other, in which case, for example, the area of first judgment region 71A is set to be larger than the area of second judgment region 71B. The center of first judgment region 71A does not have to be located at or near centroid 70F of defect candidate 70 where the calculated minimum distance is equal to or greater than a predetermined distance. The center of second judgment region 71B does not have to be located at or near centroid 70F of defect candidate 70 where the calculated minimum distance is less than a predetermined distance.
[0053] The judgment unit 34 of this embodiment judges the presence or absence of a defect in the first judgment region 71A using a first learning model constructed by machine learning a learning image including a plurality of first defect images having a specific size and including at least a part of the defect of the inspection object 60. The judgment unit 34 of this embodiment also judges the presence or absence of a defect in the second judgment region 71B using a second learning model constructed by machine learning a learning image including a plurality of second defect images including at least a part of the defect of the inspection object 60 and smaller than the first defect image. In this embodiment, each of the learning images including the first defect images is approximately the same size as the first judgment region 71A, and each of the learning images including the second defect images is approximately the same size as the second judgment region 71B. When the judgment unit 34 judges that there is a defect in either the first judgment region 71A or the second judgment region 71B, it outputs a signal indicating that there is a defect to the control unit CO. On the other hand, when the judgment unit 34 judges that there is no defect in either the first judgment region 71A or the second judgment region 71B, or when the defect candidate extraction unit 32 does not extract the defect candidate 70, the judgment unit 34 outputs a signal indicating that there is no defect to the control unit CO. Then, the control unit CO outputs a control signal corresponding to the signal input from the inspection unit 30 to the display unit 50, and causes the display unit 50 to display the inspection result. Note that the learning images for constructing the first learning model only need to include the above-mentioned multiple first defect images, and may, for example, include multiple non-defective images of the inspection object 60 that do not contain defects in addition to these first defect images. Also, the learning images for constructing the second learning model only need to include the above-mentioned multiple second defect images, and may, for example, include multiple non-defective images of the inspection object 60 that do not contain defects in addition to these second defect images.
[0054] Next, a method of inspecting the object 60 for defects in this embodiment will be described.
[0055] Fig. 6 is a flow chart showing the inspection method in this embodiment. As shown in Fig. 6, the inspection method in this embodiment differs from the inspection method in the first embodiment mainly in that it includes a distance calculation step P6.
[0056] The imaging process P1 of this embodiment is the same as the imaging process P1 of the first embodiment, the inspection area extraction process P2 of this embodiment is the same as the inspection area extraction process P2 of the first embodiment, and the defect candidate extraction process P3 of this embodiment is the same as the defect candidate extraction process P3 of the first embodiment. Therefore, the description of the imaging process P1, the inspection area extraction process P2, and the defect candidate extraction process P3 of this embodiment will be omitted.
[0057] <Distance calculation process P6> This step is a step of calculating, for a defect candidate 70 extracted in the defect candidate extraction step P3, the minimum distance among the distances between the centroid 70F of the defect candidate 70 and the centroids 70F of other defect candidates 70. In this embodiment, the distance calculation unit 35 of the inspection unit 30 calculates this minimum distance.
[0058] <Judgment area extraction process P4> In the judgment region extraction step P4 of this embodiment, the judgment region extraction unit 33 of the inspection unit 30 extracts a first judgment region 71A of a predetermined size that includes at least a part of the defect candidate 70 from the image of the inspection object 60 for the defect candidate 70 whose minimum distance calculated in the distance calculation step P6 is equal to or greater than the predetermined distance. In the judgment region extraction step P4 of this embodiment, the judgment region extraction unit 33 of the inspection unit 30 extracts a second judgment region 71B that includes at least a part of the defect candidate 70 from the image of the inspection object 60 and is smaller than the first judgment region 71A for the defect candidate 70 whose minimum distance calculated in the distance calculation step P6 is less than the predetermined distance. In this embodiment, the outer shapes of the first judgment region 71A and the second judgment region 71B are square. In addition, the predetermined distance is half the distance between the opposite sides of the first judgment region 71A, and the distance between the opposite sides of the second judgment region 71B is half the distance between the opposite sides of the first judgment region 71A. The center of the first judgment region 71A is located at or near the centroid 70F of the defect candidate 70 whose minimum distance is equal to or greater than the predetermined distance, and the center of the second judgment region 71B is located at or near the centroid 70F of the defect candidate 70 whose minimum distance is less than the predetermined distance. In other words, such first judgment region 71A and second judgment region 71B are extracted.
[0059] <Judgment process P5> In the judgment step P5 of this embodiment, the judgment unit 34 of the inspection unit 30 judges the presence or absence of a defect in the first judgment region 71A using a first learning model constructed by machine learning a learning image including a plurality of first defect images having a specific size and including at least a part of the defect of the inspection object 60. In the judgment step P5 of this embodiment, the judgment unit 34 of the inspection unit 30 judges the presence or absence of a defect in the second judgment region 71B using a second learning model constructed by machine learning a learning image including a plurality of second defect images including at least a part of the defect of the inspection object 60 and smaller than the first defect image. In this embodiment, each of the learning images including the first defect images is approximately the same size as the first judgment region 71A, and each of the learning images including the second defect images is approximately the same size as the second judgment region 71B. When the judgment unit 34 judges that there is a defect in either the first judgment region 71A or the second judgment region 71B, it outputs a signal indicating that there is a defect to the control unit CO. On the other hand, when the judgment unit 34 judges that there are no defects in either the first judgment region 71A or the second judgment region 71B, or when the defect candidate extraction unit 32 does not extract the defect candidate 70, it outputs a signal indicating that there are no defects to the control unit CO. The control unit CO outputs a control signal corresponding to the signal input from the judgment unit 34 of the inspection unit 30 to the display unit 50, and causes the display unit 50 to display the inspection result. In this manner, the presence or absence of defects on one surface 60S1 and the other surface 60S2 of the inspection object 60 is inspected.
[0060] As described above, the inspection device 1 and the inspection method of the present embodiment calculate the minimum distance between the centroid 70F of the defect candidate 70 and the centroid 70F of another defect candidate 70 for each extracted defect candidate 70. Furthermore, the inspection device 1 and the inspection method of the present embodiment extract a first judgment region 71A of a predetermined size that includes at least a part of the defect candidate 70 from an image of the object 60 captured for each defect candidate 70 for which the calculated minimum distance is equal to or greater than a predetermined distance. Furthermore, the inspection device 1 and the inspection method of the present embodiment extract a second judgment region 71B that includes at least a part of the defect candidate 70 from an image of the object 60 captured for each defect candidate 70 for which the calculated minimum distance is less than a predetermined distance and is smaller than the first judgment region 71A. Therefore, the inspection device 1 and the inspection method of the present embodiment extract the first judgment region 71A or the second judgment region 71B that is smaller than the first judgment region 71A for each defect candidate 70, so that other defect candidates 70 are not included in these judgment regions 71A and 71B. Therefore, the inspection apparatus 1 and the inspection method of this embodiment can reduce the influence of defect candidates 70 different from the defect candidates 70 corresponding to the judgment areas 71A, 71B when determining the presence or absence of a defect in the judgment areas 71A, 71B, compared to a case where a judgment area of a predetermined size is extracted for the defect candidates 70. Therefore, the inspection apparatus 1 and the inspection method of this embodiment can further suppress a decrease in the accuracy of defect detection.
[0061] The size of the learning model tends to increase according to the size of the learning image to be machine-learned, and the larger the learning model, the longer the time required to determine the presence or absence of a defect using the learning model. As described above, in the judgment step P5 of this embodiment, the judgment unit 34 judges the presence or absence of a defect in the first judgment region 71A using a first learning model constructed by machine learning a learning image including a plurality of first defect images, and judges the presence or absence of a defect in the second judgment region 71B using a second learning model constructed by machine learning a learning image including a plurality of second defect images smaller than the first defect images. Therefore, the inspection device 1 and the inspection method of this embodiment can judge the presence or absence of a defect using a learning model according to the size of the judgment regions 71A and 71B, and therefore the time required to inspect the presence or absence of a defect can be further shortened.
[0062] In the judgment region extraction step P4 of this embodiment, the judgment region extraction unit 33 extracts the first judgment region 71A so that the center of the first judgment region 71A is located at or near the centroid 70F of the defect candidate 70 whose minimum distance is equal to or greater than the predetermined distance. In addition, the judgment region extraction unit 33 extracts the second judgment region 71B so that the center of the second judgment region 71B is located at or near the centroid 70F of the defect candidate 70 whose minimum distance is less than the predetermined distance. Therefore, the inspection device 1 and the inspection method of this embodiment can suppress a decrease in the detection accuracy of the defect even if the multiple first defect images for constructing the first learning model do not include a defect image whose centroid is located on the outer edge side of the image. Furthermore, the inspection device 1 and the inspection method of this embodiment can suppress a decrease in the detection accuracy of the defect even if the multiple second defect images for constructing the second learning model do not include a defect image whose centroid is located on the outer edge side of the image. Therefore, the inspection device 1 and the inspection method of this embodiment can reduce the time required to construct the first learning model and the second learning model.
[0063] Third embodiment Next, a third embodiment of the present invention will be described in detail with reference to Fig. 7. Note that components that are the same as or equivalent to those in the first embodiment will be given the same reference numerals and will not be described again unless otherwise specified.
[0064] 7 is a diagram illustrating an inspection device according to the present embodiment. As illustrated in FIG. 7, the inspection device 1 according to the present embodiment is different from the inspection device 1 according to the first embodiment mainly in that the inspection unit 30 includes a width calculation unit 36.
[0065] The inspection area extraction unit 31 of this embodiment is the same as the inspection area extraction unit 31 of the first embodiment, and the defect candidate extraction unit 32 of this embodiment is the same as the defect candidate extraction unit 32 of the first embodiment. Therefore, a description of the inspection area extraction unit 31 and the defect candidate extraction unit 32 of this embodiment will be omitted.
[0066] The width calculation unit 36 calculates the maximum width of the defect candidates 70 extracted by the defect candidate extraction unit 32 .
[0067] As shown in FIG. 8, the judgment area extraction unit 33 of this embodiment extracts a third judgment area 71C of a predetermined size that includes at least a part of the defect candidate 70 from the image of the inspection object 60 captured, for the defect candidate 70 whose maximum width calculated by the width calculation unit 36 is equal to or greater than a predetermined width. Also, the judgment area extraction unit 33 of this embodiment extracts a fourth judgment area 71D that includes at least a part of the defect candidate 70 from the image of the inspection object 60 captured, and is smaller than the third judgment area 71C, for the defect candidate 70 whose minimum width calculated by the width calculation unit 36 is less than a predetermined distance. Note that FIG. 8 is a diagram that diagrammatically shows a part of yet another example of an image of the inspection object 60 captured by the imaging unit 20, and diagrammatically shows a part of the inspection area extracted by the inspection area extraction unit 31. In FIG. 8, the defect candidate 70 is hatched, and the outer edges of the third judgment area 71C and the fourth judgment area 71D are indicated by dashed lines. In this embodiment, the third judgment region 71C and the fourth judgment region 71D have a square outer shape. The above-mentioned predetermined width is half the distance between the opposite sides of the third judgment region 71C, and the distance between the opposite sides of the fourth judgment region 71D is half the distance between the opposite sides of the third judgment region 71C. The center of the third judgment region 71C is located at or near the centroid 70F of the defect candidate 70 whose maximum width is equal to or greater than the predetermined width. The center of the fourth judgment region 71D is located at or near the centroid 70F of the defect candidate 70 whose maximum width is less than the predetermined width. That is, the judgment region extraction unit 33 extracts such third judgment region 71C and fourth judgment region 71D. The above-mentioned predetermined width is not particularly limited. The vicinity of the centroid 70F of the defect candidate 70 whose maximum width is equal to or greater than the predetermined width is, for example, an area whose distance from the centroid 70F is 10% or less of the maximum width of the third judgment region 71C. Moreover, the vicinity of centroid 70F of defect candidate 70 whose maximum width is less than a predetermined width is, for example, a region whose distance from centroid 70F is 10% or less of the maximum width of fourth judgment region 71D. The outer shapes of third judgment region 71C and fourth judgment region 71D are not particularly limited and may be, for example, rectangular or circular. The outer shapes of third judgment region 71C and fourth judgment region 71D may be different from each other, in which case, for example, the area of third judgment region 71C is larger than the area of fourth judgment region 71D.In addition, the center of the third judgment region 71C does not have to be located at or near the centroid 70F of the defect candidate 70 whose calculated maximum width is greater than or equal to a predetermined width, and the center of the fourth judgment region 71D does not have to be located at or near the centroid 70F of the defect candidate 70 whose calculated maximum width is less than a predetermined width.
[0068] The judgment unit 34 of this embodiment judges the presence or absence of a defect in the third judgment region 71C, similarly to the judgment unit 34 of the second embodiment, by using a third learning model constructed by machine learning a learning image including a plurality of first defect images having a specific size including at least a part of the defect of the inspection object 60. The judgment unit 34 of this embodiment also judges the presence or absence of a defect in the fourth judgment region 71D by using a fourth learning model constructed by machine learning a learning image including a plurality of second defect images including at least a part of the defect of the inspection object 60 and smaller than the first defect image. In this embodiment, each of the learning images including the first defect images is approximately the same size as the third judgment region 71C, and each of the learning images including the second defect images is approximately the same size as the fourth judgment region 71D. When the judgment unit 34 judges that there is a defect in either the third judgment region 71C or the fourth judgment region 71D, it outputs a signal indicating that there is a defect to the control unit CO. On the other hand, when the inspection unit 30 judges that there are no defects in the third judgment region 71C and the fourth judgment region 71D or when the defect candidate extraction unit 32 does not extract the defect candidate 70, the inspection unit 30 outputs a signal indicating that there are no defects to the control unit CO. Then, the control unit CO outputs a control signal corresponding to the signal input from the inspection unit 30 to the display unit 50, and causes the display unit 50 to display the inspection result. Note that the learning images for constructing the third learning model only need to include the above-mentioned multiple first defect images, and may, for example, include multiple non-defective images of the inspected object 60 that do not contain defects in addition to these first defect images. Also, the learning images for constructing the fourth learning model only need to include the above-mentioned multiple second defect images, and may, for example, include multiple non-defective images of the inspected object 60 that do not contain defects in addition to these second defect images.
[0069] Next, a method of inspecting the object 60 for defects in this embodiment will be described.
[0070] Fig. 9 is a flow chart showing the inspection method in this embodiment. As shown in Fig. 9, the inspection method in this embodiment differs from the inspection method in the first embodiment mainly in that it includes a width calculation step P7.
[0071] The imaging process P1 of this embodiment is the same as the imaging process P1 of the first embodiment, the inspection area extraction process P2 of this embodiment is the same as the inspection area extraction process P2 of the first embodiment, and the defect candidate extraction process P3 of this embodiment is the same as the defect candidate extraction process P3 of the first embodiment. Also, the judgment process P5 of this embodiment is the same as the judgment process P5 of the first embodiment. Therefore, the description of the imaging process P1, the inspection area extraction process P2, the defect candidate extraction process P3, and the judgment process P5 of this embodiment will be omitted.
[0072] <Width calculation process P7> This step is a step for calculating the maximum width of the defect candidates 70 extracted in the defect candidate extraction step P3. In this embodiment, this maximum width is calculated by the width calculation unit 36 of the inspection unit 30.
[0073] <Judgment area extraction process P4> In the judgment region extraction step P4 of this embodiment, the judgment region extraction unit 33 of the inspection unit 30 extracts a third judgment region 71C of a predetermined size that includes at least a part of the defect candidate 70 from the image of the inspection object 60 captured by the judgment region extraction unit 33 of the inspection unit 30 for the defect candidate 70 whose maximum width calculated in the width calculation step P7 is equal to or greater than a predetermined width. In the judgment region extraction step P4 of this embodiment, the judgment region extraction unit 33 of the inspection unit 30 extracts a fourth judgment region 71D that includes at least a part of the defect candidate 70 from the image of the inspection object 60 captured by the judgment region extraction unit 33 of the inspection unit 30 and is smaller than the third judgment region 71C for the defect candidate 70 whose minimum width calculated in the width calculation step P7 is less than a predetermined distance. In this embodiment, the external shapes of the third judgment region 71C and the fourth judgment region 71D are square. In addition, the predetermined width is half the distance between the opposite sides of the third judgment region 71C, and the distance between the opposite sides of the fourth judgment region 71D is half the distance between the opposite sides of the third judgment region 71C. The center of third judgment region 71C is located at or near centroid 70F of defect candidate 70 whose maximum width is equal to or greater than the predetermined width. The center of fourth judgment region 71D is located at or near centroid 70F of defect candidate 70 whose maximum width is less than the predetermined width. That is, such third judgment region 71C and fourth judgment region 71D are extracted.
[0074] As described above, the inspection device 1 and the inspection method of the present embodiment calculate the maximum width of the extracted defect candidate 70. Furthermore, the inspection device 1 and the inspection method of the present embodiment extract a third judgment region 71C of a predetermined size that includes at least a part of the defect candidate 70 from the image of the inspection object 60 captured for the defect candidate 70 whose calculated maximum width is equal to or greater than a predetermined width. Furthermore, the inspection device 1 and the inspection method of the present embodiment extract a fourth judgment region 71D that includes at least a part of the defect candidate 70 from the image of the inspection object 60 captured for the defect candidate 70 whose calculated maximum width is less than a predetermined width and is smaller than the third judgment region 71C. Therefore, the inspection device 1 and the inspection method of the present embodiment can extract the third judgment region 71C for the defect candidate 70 whose size is equal to or greater than the predetermined size, and extract the fourth judgment region 71D that is smaller than the third judgment region 71C for the defect candidate 70 whose size is less than the predetermined size. That is, the inspection device 1 and the inspection method of the present embodiment may extract a large third judgment region 71C for a defect candidate 70 that may be a large defect, and may extract a small fourth judgment region 71D for a defect candidate 70 that may be a small defect. However, the characteristics of the defect may differ depending on the size of the defect. In the inspection device 1 and the inspection method of the present embodiment, similarly to the inspection device 1 and the inspection method of the second embodiment, the presence or absence of a defect is judged for the third judgment region 71C using a third learning model constructed by machine learning a learning image including a plurality of first defect images, and the presence or absence of a defect is judged for the fourth judgment region 71D using a fourth learning model constructed by machine learning a learning image including a plurality of second defect images smaller than the first defect images. For this reason, in the inspection device 1 and the inspection method of the present embodiment, the learning model for judging the presence or absence of a defect for a judgment region including a defect candidate 70 that may be a large defect is different from the learning model for judging the presence or absence of a defect for a judgment region including a defect candidate 70 that may be a small defect. Therefore, the inspection device 1 and the inspection method of the present embodiment can better prevent a decrease in the accuracy of defect detection compared to a case in which the inspection unit 30 determines the presence or absence of a defect using a single learning model.
[0075] In the judgment region extraction step P4 of this embodiment, the judgment region extraction unit 33 extracts the third judgment region 71C so that the center of the third judgment region 71C is located at or near the centroid 70F of the defect candidate 70 whose maximum width is equal to or greater than the predetermined width. In addition, the judgment region extraction unit 33 extracts the fourth judgment region 71D so that the center of the second judgment region 71B is located at or near the centroid 70F of the defect candidate 70 whose maximum width is less than the predetermined width. Therefore, the inspection device 1 and the inspection method of this embodiment can suppress a decrease in the detection accuracy of the defect even if the multiple first defect images for constructing the first learning model do not include a defect image whose centroid is located on the outer edge side of the image. Furthermore, the inspection device 1 and the inspection method of this embodiment can suppress a decrease in the detection accuracy of the defect even if the multiple second defect images for constructing the second learning model do not include a defect image whose centroid is located on the outer edge side of the image. Therefore, the inspection device 1 and the inspection method of this embodiment can reduce the time required to construct the first learning model and the second learning model.
[0076] Although the present invention has been described above using the above-mentioned embodiments as examples, the present invention is not limited to these.
[0077] For example, in the above embodiment, the inspection object 60 is an outer cover provided with a rib 61 around the entire circumference of the outer periphery. However, the inspection object 60 is not particularly limited, and may not have translucency. When the inspection object 60 does not have translucency, the imaging unit 20 is disposed on the illumination unit 10 side with respect to the inspection object 60 as a reference, and an image of the surface of the inspection object 60 on which the light from the illumination unit 10 is irradiated is captured. In such a case, the reflection direction of the light from the illumination unit 10 at a defect such as a scratch, a dent, or a protrusion on the surface of the inspection object 60 is different from the reflection direction of the light from the illumination unit 10 at the corresponding portion when there is no defect. Therefore, by preventing the light from the illumination unit 10 reflected by the defect from entering the imaging unit 20, the defect can be displayed as a dark portion with a luminance value lower than a predetermined value in the image of the inspection object 60 captured by the imaging unit 20. Therefore, the inspection device 1 in the above embodiment can inspect the presence or absence of a defect on the surface of the inspection object 60 even if the inspection object 60 does not have translucency.
[0078] In the above embodiment, the defect candidate extraction unit 32 is described as extracting one or more defect candidates based on a luminance value from an image of the inspection object 60 input from the imaging unit 20. However, it is sufficient for the defect candidate extraction unit 32 to extract one or more defect candidates based on a predetermined feature value from an image of the inspection object 60 input from the imaging unit 20, and the predetermined feature value is not limited to a luminance value. For example, the predetermined feature value may be a color.
[0079] In the above embodiment, the inspection unit 30 including the inspection area extraction unit 31 is described as an example. However, the inspection unit 30 does not need to include the inspection area extraction unit 31. When the inspection unit 30 does not include the inspection area extraction unit 31, for example, the position and orientation of the imaging unit 20 relative to the object to be inspected 60 and the position of the inspection area are adjusted so that the image captured by the imaging unit 20 is an image in which only the inspection area is shown. When the inspection unit 30 does not include the inspection area extraction unit 31, for example, the entire image of the object to be inspected 60 captured by the imaging unit 20 may be the inspection area. In this case, light emitted from the illumination unit 10 and reflected by the rib 61 may be projected onto the inspection area, and this light may make it difficult for the judgment unit 34 to judge whether or not there is a defect. However, for example, by machine learning learning images including a plurality of defect images including at least a portion of the defects of the object to be inspected 60 and a plurality of non-defective images not including the defects of the object to be inspected 60, it is possible to suppress the judgment unit 34 from being difficult to judge whether or not there is a defect.
[0080] In the above embodiment, the illumination unit 10 that irradiates the object 60 with white light has been described as an example. However, the color of the light that the illumination unit 10 irradiates the object 60 is not particularly limited. When a part of the object 60 is colorless and transparent and another part of the object 60 is colored and transparent, it is preferable that the color of the light that the illumination unit 10 irradiates the object 60 is approximately the same color as the color of the colored and transparent part of the object 60. With this configuration, unevenness in the brightness of the image captured by the imaging unit 20 due to differences in color is suppressed, and the detection accuracy of the defect in the object 60 can be suppressed from decreasing.
[0081] The inspection device may also include a learning model construction unit that constructs a learning model used by the judgment unit 34. With this configuration, the learning model can be changed.
[0082] Furthermore, the inspection device does not necessarily have to include the illumination unit 10, the imaging unit 20, and the control unit CO. In this case, for example, the inspection device is configured so that an image of the inspection object 60 captured by an imaging device different from the inspection device is input to the inspection unit 30. [Industrial Applicability]
[0083] According to the present invention, an inspection device and an inspection method are provided that can reduce the time required to inspect for defects while preventing a decrease in the accuracy of defect detection, and can be used in fields such as inspection devices for the surface of lighting fixtures. [Explanation of symbols]
[0084] 1. Inspection equipment 10. Lighting section 20 Imaging unit 30. Inspection Department 31 Inspection area extraction unit 32 Defect candidate extraction section 33...Judgment area extraction unit 34...judgment department 35 Distance calculation unit 36...width calculation section 40...Storage section 50...Display section 60....Inspection object 70 Defect candidates 70F: Center of gravity 71...judgment area 71A...1st judgment area 71B...Second judgment area 71C...Third judgment area 71D...4th judgment area CO··· Control unit P1: Imaging process P2: Inspection area extraction process P3: Defect candidate extraction process P4... Judgment area extraction process P5...Judgment process P6...Distance calculation process P7... Width calculation process
Claims
1. a defect candidate extraction unit that extracts one or more defect candidates based on a predetermined feature amount in an image of an object to be inspected; a judgment region extraction unit that extracts a judgment region from the image for the extracted defect candidate, the judgment region including at least a part of the defect candidate; A determination unit that determines whether or not there is a defect by using a learning model constructed by machine learning for the extracted determination region; a distance calculation unit that calculates, for each of the defect candidates extracted by the defect candidate extraction unit, a minimum distance between a centroid of the defect candidate and a centroid of another defect candidate; Equipped with the judgment region extraction unit extracts, for the defect candidate whose calculated minimum distance is equal to or greater than a predetermined distance, a first judgment region of a predetermined size which includes at least a portion of the defect candidate from the image, and, for the defect candidate whose calculated minimum distance is less than the predetermined distance, extracts a second judgment region of the image which includes at least a portion of the defect candidate and is smaller than the first judgment region; the judgment unit judges the presence or absence of a defect in the first judgment region using a first learning model constructed by machine learning of a learning image including a plurality of first defect images having a specific size and including at least a portion of the defect of the object to be inspected, and judges the presence or absence of a defect in the second judgment region using a second learning model constructed by machine learning of a learning image including a plurality of second defect images having at least a portion of the defect of the object to be inspected and smaller than the first defect images; The learning image including the first defect image and the first judgment region are approximately the same size, and the learning image including the second defect image and the second judgment region are approximately the same size. An inspection device characterized by:
2. The judgment region extraction unit extracts the judgment region so that the center of the judgment region is located at or near the centroid of the defect candidate.
2. The inspection apparatus according to claim 1 .
3. The defect candidate extraction unit extracts, as the defect candidate, a region in the image whose luminance value is greater than a predetermined luminance value and whose area is greater than a predetermined area, or a region in the image whose luminance value is less than a predetermined luminance value and whose area is greater than the predetermined area.
3. The inspection apparatus according to claim 1 or 2.
4. a defect candidate extraction step of extracting one or more defect candidates based on a predetermined feature amount in an image of the object to be inspected; a judgment region extraction step of extracting a judgment region from the image, the judgment region including at least a part of the defect candidate, for the extracted defect candidate; a judgment step of judging the presence or absence of a defect using a learning model constructed by machine learning for the extracted judgment region; a distance calculation step of calculating a minimum distance between the centroid of the defect candidate extracted by the defect candidate extraction step and the centroids of other defect candidates; Equipped with In the judgment region extraction step, for the defect candidate whose calculated minimum distance is equal to or greater than a predetermined distance, a first judgment region of a predetermined size including at least a part of the defect candidate is extracted from the image, and for the defect candidate whose calculated minimum distance is less than the predetermined distance, a second judgment region of the image that includes at least a part of the defect candidate and is smaller than the first judgment region is extracted; In the judgment step, a first learning model is constructed by machine learning a learning image including a plurality of first defect images each having a specific size and including at least a portion of the defect of the object to be inspected, to judge the presence or absence of a defect in the first judgment region, and a second learning model is constructed by machine learning a learning image including a plurality of second defect images each having at least a portion of the defect of the object to be inspected and smaller than the first defect images, to judge the presence or absence of a defect in the second judgment region, The learning image including the first defect image and the first judgment region are approximately the same size, and the learning image including the second defect image and the second judgment region are approximately the same size.
13. An inspection method comprising:
5. In the judgment region extraction step, the judgment region is extracted so that the center of the judgment region is located at or near the centroid of the defect candidate.
5. The inspection method according to claim 4.
Citation Information
Patent Citations
Method and apparatus for detecting unevenness defect
JP2004212311A
Apparatus and method for detecting defect
JP2006098152A
Visual examination method by image processing, and its device
JP2009008564A
Defect detecting apparatus, defect detecting method and defect detecting program
JP2010198476A
Defect inspection device, defect inspection method, and program
JP2013167596A
