传统软包装缺陷检测方法采用人工检测耗时耗力,常出现漏检等问题且对检测者不友好。现提出基于机器视觉的软包装缺陷检测方案,提高检测效率。本方案包括硬件设备与算法设计,着重算法设计,包括图像灰度处理、图像分割、特征提取等,最终形成完整算法方案。图像分割采用基于阈值的图像分割,用户自设阈值进行分割,此外还采用了基于区域的图像分割以及基于边缘的图像分割。提取的特征主要为纹理特征,主要包括角二阶矩、相关性、对比度等特征,将提取的特征值存Excel表格中供回溯查证或其它处理。经过实验验证,此算法检测效率相较于人工大大提高,且正确率也得到保证,为应用于相关生产工厂奠定一定的基础。
The traditional defect detection method of flexible packaging is time-consuming and labor-consuming by manual detection, which often presents problems such as missed detection and is not friendly to the tester. A defect detection scheme for flexible packaging based on machine vision is proposed to improve the detection efficiency. This scheme includes hardware equipment and algorithm design, focusing on algorithm design, including image grayscale processing, image segmentation, feature extraction and so on, and finally form a complete algorithm scheme. Image segmentation is based on the threshold of the image segmentation, user-set threshold segmentation, in addition to the region based on the image segmentation and image segmentation based on the edge. The extracted features are mainly texture features, including angular second moment, correlation, contrast and other features. The extracted feature values are stored in Excel for retrospective verification or other processing. Through experimental verification, the detection efficiency of this algorithm is greatly improved compared with that of manual, and the accuracy is also guaranteed, which lays a certain foundation for its application in related production factories.