Defect detection device, defect detection method, and program
Abstract
A plurality of captured images is acquired while changing a light illumination state. Each captured image is compared with a corresponding reference image to acquire a region where the captured image is darker than the reference image as a dark defect candidate region. From each of a plurality of captured images, a region where the captured image is lighter than the reference image is acquired as a lightness/darkness inverted region. Among the dark defect candidate regions, those that do not overlap by a prescribed criterion or more with any of the lightness/darkness inverted regions are excluded from defect candidates, and then the presence of a defect is acquired on the basis of the defect candidate regions. This suppresses over-detection of defects arising from, for example, grime on the surface during external appearance inspection.
Claims
exact text as granted — not AI-modified1 . A defect detection device for detecting a surface defect in an object, comprising:
an image capturing part for capturing an image of an object to acquire a captured image; a storage for storing a reference image that corresponds to the captured image; and a defect acquisition part for acquiring presence of a defect in the captured image, the defect acquisition part including:
a self-comparison defect candidate acquisition part for acquiring a self-comparison defect candidate region on a basis of at least one of differences and ratios between pixel values in the captured image and pixel values in a first image corresponding respectively to the pixel values of the captured image, wherein the first image is obtained by performing first processing, and then second processing, on the captured image, wherein the first processing performs one of expansion processing and reduction processing on the captured image, and wherein the second processing performs another of the expansion processing and the reduction processing on the captured image;
an other-image-related comparison defect candidate acquisition part for, after aligning the captured image and the reference image, when the first processing is the expansion processing, acquiring a region of which the captured image is darker than the reference image as an other-image-related comparison defect candidate region on a basis of at least one of a difference image and a ratio image between the captured image and the reference image, and when the first processing is the reduction processing, acquiring a region of which the captured image is lighter than the reference image as the other-image-related comparison defect candidate region on the basis of at least one of the difference image and the ratio image between the captured image and the reference image; and
a defect candidate narrowing part for acquiring, as a defect candidate region, a region of overlap between the self-comparison defect candidate region output from the self-comparison defect candidate acquisition part and the other-image-related comparison defect candidate region output from the other-image-related comparison defect candidate acquisition part.
2 . The defect detection device according to claim 1 , wherein the self-comparison defect candidate acquisition part is configured to:
detect a self-comparison mask region on a basis of at least one of a difference and a ratio between pixel values in the reference image and pixel values in a second image corresponding respectively to the pixel values of the reference image, wherein the second image is obtained by performing the first processing on the reference image and then performing the second processing on the reference image; and exclude a region of the self-comparison defect candidate region that overlaps with the self-comparison mask region from the self-comparison defect candidate region, and then output the self-comparison defect candidate region to the defect candidate narrowing part.
3 . The defect detection device according to claim 1 , wherein
the expansion processing includes applying a maximum value filter on the captured image, and the reduction processing includes applying a minimum value filter on the captured image.
4 . A defect detection method of detecting a surface defect in an object, comprising:
a) an image capturing step of capturing an image of an object with an image capturing part to acquire a captured image; b) a self-comparison defect candidate acquisition step of acquiring a self-comparison defect candidate region on a basis of at least one of differences and ratios between pixel values in the captured image and pixel values in a first image corresponding respectively to the pixel values of the captured image, wherein the first image is obtained by performing first processing, and then second processing, on the captured image, wherein the first processing performs one of expansion processing and reduction processing on the captured image, and wherein the second processing performs another of the expansion processing and the reduction processing on the captured image; c) an other-image-related comparison defect candidate acquisition step of, after a reference image corresponding to the captured image is prepared and after the captured image and the reference image are aligned with each other, when the first processing is the expansion processing, acquiring a region of which the captured image is darker than the reference image as an other-image-related comparison defect candidate region on a basis of at least one of a difference image and a ratio image between the captured image and the reference image, and when the first processing is the reduction processing, acquiring a region of which the captured image is lighter than the reference image as the other-image-related comparison defect candidate region on the basis of at least one of the difference image and the ratio image between the captured image and the reference image; and d) a defect candidate narrowing step of acquiring, as a defect candidate region, a region of overlap between the self-comparison defect candidate region acquired in the self-comparison defect candidate acquisition step and the other-image-related comparison defect candidate region acquired in the other-image-related comparison defect candidate acquisition step.
5 . The defect detection method according to claim 4 , wherein the self-comparison defect candidate acquisition step includes:
detecting a self-comparison mask region on a basis of at least one of a difference and a ratio between pixel values in the reference image and pixel values in a second image corresponding respectively to the pixel values of the reference image, wherein the second image is obtained by performing the first processing on the reference image and then performing the second processing on the reference image; and excluding a region of the self-comparison defect candidate region that overlaps with the self-comparison mask region from the self-comparison defect candidate region and then output the self-comparison defect candidate region to the defect candidate narrowing step.
6 . The defect detection method according to claim 4 , wherein
the expansion processing includes applying a maximum value filter on the captured image, and the reduction processing includes applying a minimum value filter on the captured image.
7 . A non-transitory tangible machine-readable medium having a program for causing a computer to detect a defect in a target region of a surface of an object from a plurality of images of the target object, the program, when executed by the computer, causing the computer to execute:
a) a step of preparing a captured image acquired by capturing an image of the target region, and a corresponding reference image; b) a self-comparison defect candidate acquisition step of acquiring a self-comparison defect candidate region on a basis of at least one of differences and ratios between pixel values in the captured image and pixel values in a first image corresponding respectively to the pixel values of the captured image, wherein the first image is obtained by performing first processing, and then second processing, on the captured image, wherein the first processing performs one of expansion processing and reduction processing on the captured image, and wherein the second processing performs another of the expansion processing and the reduction processing on the captured image; c) an other-image-related comparison defect candidate acquisition step of, after aligning the captured image and the reference image, when the first processing is the expansion processing, acquiring a region of which the captured image is darker than the reference image as an other-image-related comparison defect candidate region on a basis of at least one of a difference image and a ratio image between the captured image and the reference image, and when the first processing is the reduction processing, acquiring a region of which the captured image is lighter than the reference image as the other-image-related comparison defect candidate region on the basis of at least one of the difference image and the ratio image between the captured image and the reference image; and d) a defect candidate narrowing step of acquiring, as a defect candidate region, a region of overlap between the self-comparison defect candidate region acquired in the self-comparison defect candidate acquisition step and the other-image-related comparison defect candidate region acquired in the other-image-related comparison defect candidate acquisition step.
8 . The non-transitory tangible machine-readable medium according to claim 7 , wherein the self-comparison defect candidate acquisition step includes:
detecting a self-comparison mask region on a basis of at least one of a difference and a ratio between pixel values in the reference image and pixel values in a second image corresponding respectively to the pixel values of the reference image, wherein the second image is obtained by performing the first processing on the reference image and then performing the second processing on the reference image; and excluding a region of the self-comparison defect candidate region that overlaps with the self-comparison mask region from the self-comparison defect candidate region and then output the self-comparison defect candidate region to the defect candidate narrowing step.
9 . The non-transitory tangible machine-readable medium according to claim 7 , wherein
the expansion processing includes applying a maximum value filter on the captured image, and the reduction processing includes applying a minimum value filter on the captured image.Join the waitlist — get patent alerts
Track US2022084183A1 — get alerts on status changes and closely related new filings.
We store only your email — no account needed. See our privacy policy.