针对利用图像差影法进行缺陷检测时易受配准精度和产品制作过程扰动的影响,以及单掩模算法难以检测不同类型缺陷的问题,结合工业产品表面缺陷,提出基于双掩模的图像差影策略。通过分别提取模板图像和待测图像的边缘并作膨胀处理得到双掩模即模板掩模和待测掩模,双掩模进行融合处理后分别与模板图像和待测图像做卷积,再采用差影法进行缺陷检测。实验证明:该方法能精确检测出多类表面缺陷,且满足实时要求。
Concerning the problem of image subtraction methods which are sensitive to matching precision and disturbances in product fabricating process when it is applied to defect detection, and problem of missing detection with single mask algorithm, an improved image subtraction strategy based on double masks is proposed for the detection of industrial products surface defects. Edges of template and test images are extracted and dilated, which are used for the template mask and the test mask. After fusion process on the two masks, the synthesized one is convoluted with the template and the test images, the surface defects are detected with two convoluted images subtraction. Experiments show that the methods can detect multi-defects on surfaces, and satisfies real-time requirements.