针对人工检测手机背板表面缺陷效率低、成本高等问题,提出一种基于Halcon的手机背板表面缺陷检测方法.该方法可快速定位并校正光照不均、位置偏差等成像不一的背板图像,同时运用二进制大型对象分析、形态学处理和模板匹配等算法实现对手机背板表面缺陷图像的检测与分类.针对 logo 区域和非 logo 区域,该检测系统采用不同的策略来检测缺陷.缺陷分类环节利用Halcon中的分类工具,结合事先定义的特征集合,根据其形状、大小和颜色等特征进行分类,以便后续的品质监控和反馈.一方面对 120 张缺陷图片进行检测,检出 113 张缺陷图片,单张图片平均耗时约500 ms,检出率达 94%以上;另一方面对 800 张同样条件下的无缺陷图片进行测试,检出 25 张误判的图片,即误判率约3%.实验表明,该方法具有较高的准确性和实用性,相较于传统的人工检测,可大幅度提升生产效率和检测精度,有效控制企业人力成本.该方法已在工业生产线实际应用.
Surface Defect Detection Rapid Method of Mobile Phone Backplane Based on Halcon
Aiming at the problems of low efficiency and high cost of manually detecting defects on the surface of mobile phone backplane,a method based on Halcon was proposed for surface defects detection of mobile phone backplane.The method can quickly locate and correct the backplane images with different images such as uneven illumination and position deviation.At the same time,the algorithm of binary large object analysis,morphological processing and template matching was used to detect and classify the surface defect images of mobile phone backplane.For logo area and non-logo area,the detection system adopts different strategies to detect defects.The defect classification process utilizes the classification tool in Halcon,combined with the predefined feature set,according to its shape,size,color and other characteristics,so as to facilitate subsequent quality monitoring and feedback.On one hand,through the detection experiment of 120 defect diagrams,113 defect diagrams were detected,and the average time of a single image was about 500 ms,and the detection rate was more than 94%.On the other hand,800 non-defect pictures were tested under the same conditions,and 25 misjudgments were detected,that is,the misjudgment rate was 3%.The experiment shows that the method has high accuracy and practicability,compared with the traditional manual detection,can greatly improve the production efficiency and detection accuracy,and effectively control the labor cost of enterprises.At the same time,the method has been applied in industrial production lines.