CPC G06T 7/001 (2013.01) [G06T 7/11 (2017.01); G06T 7/70 (2017.01); G06T 11/00 (2013.01); G06T 2207/10152 (2013.01); G06T 2207/20132 (2013.01); G06T 2207/30164 (2013.01)] | 24 Claims |
1. A workpiece surface defect detection device comprising:
a first hardware processor that:
obtains a plurality of images indicating a portion to be measured of a workpiece serving as a target of detection of a surface defect, in a state where a bright-and-dark pattern of an illumination device is moved relative to the workpiece;
extracts a tentative defect candidate for each of the plurality of images that has been obtained;
determines the tentative defect candidate as a defect candidate, when among a plurality of images from which the tentative defect candidate has been extracted, a number of images including the tentative defect candidate is greater than or equal to a threshold that has been set in advance;
cuts out, for each of a plurality of the defect candidates determined, a predetermined region around the defect candidate as an estimated region from a plurality of images including the defect candidate, and generates a plurality of estimated region image groups;
combines a plurality of images including the defect candidate that has been determined, and generates a composite image by combining a plurality of estimated region images that has been generated, and generating the composite image, for each of the plurality of the defect candidates; and
detects a defect on a basis of the composite image that has been generated, wherein
when generating the composite image, the first hardware processor aligns the plurality of estimated region images to gain a maximum evaluation value from among a plurality of combinations obtained by respectively shifting the center coordinates of each of the plurality of images in X-coordinate and Y-coordinate directions.
|