The invention belongs to the technical field of
machine vision defect detection, and particularly discloses a self-adaptive workpiece defect detection method based on
machine vision,
electronic equipment and a storage medium, and the method comprises the following steps: S1, shooting an original picture of a workpiece, and
processing the original picture to obtain a
cut picture; s2, acquiring an end face template picture in the shot picture, and acquiring an end face area of the workpiece; s3, constructing a defect detection
algorithm for detecting surface defects of the workpiece; s4, constructing a self-
adaptive algorithm selector, and detecting surface defects of the workpiece by adopting a proper defect detection
algorithm; according to the method, the images acquired by the
image acquisition equipment are subjected to operations such as preprocessing and
adaptive algorithm selection, so that whether the surface of the workpiece has defects can be detected, a proper scratch detection scheme can be selected according to detection results of workpieces of different batches, the method can adapt to workpieces of different types and batches, detection of defects of different types is met, and the detection efficiency is improved. And the defect detection accuracy is improved.