Weld Surface Defect Detection Method based on Multi-feature Extraction and BT-SVM
-
摘要: 为实现化工管道焊缝表面缺陷的自动检测分类,提出一种基于多特征提取和二叉树支持向量机(BT-SVM)分类的机器视觉检测方法。针对正常焊缝、气孔、咬边、成型不良、焊穿、焊瘤6种分类目标,采用被动视觉传感技术和激光视觉传感技术两种模式提取焊缝图像特征,并将得到的焊缝几何形状特征、焊缝面积波形图特征、激光条纹特征等参数作为二叉树支持向量机的特征输入,设计合理结构的分类器对6种焊缝目标进行识别分类。测试结果表明,设计的BT-SVM分类器能较精准地检测出焊缝缺陷类型,识别率为96.94%。Abstract: In order to realize automatic detection and classification of chemical pipeline weld surface defects, a machine vision detection method based on multi-feature extraction and binary tree support vector machine(BT-SVM)for multiclass classification was proposed. For normal weld line, porosity, bite edge, poor forming, welding penetration, welding tumor, six kinds of classification target, the image features of weld line were extracted by passive vision sensing technology and line laser visual sensing technology respectively. And those obtained parameters, such as weld line geometry features, the wave features of weld area, laser stripe features and so on, were used as input parameters of BT-SVM. Then the reasonable structure of the BT-SVM was designed to classify the six kinds of weld surface defects. The test results show that the designed BT-SVM classifier can accurately detect the type of welding defects with a recognition rate of 96.94%.
-
表 1 常见焊缝缺陷图像特点
名称 特点总结 正常焊缝 焊缝成型优良, 波纹均匀平整 焊瘤 形态为球状, 大小与飞溅类似, 面积像素数较大 焊穿 焊缝表面形成的穿孔缺陷, 呈近似圆形, 面积像素数较大 气孔 近似圆形的孔洞, 成群或孤立的分布在焊缝表面, 形状大小不一, 灰度与背景有明显的区别, 面积像素较小 成型不良 焊缝表面高低不平、焊缝宽窄不齐、尺寸过大或过小 咬边 焊缝两侧出现局部凹点, 没有达到规定的焊缝宽度和高度 表 2 BT-SVM特征输入参数表
特征提取方法 特征参数序号 特征名称 特征公式 参数注解 P1 缺陷面积 S 缺陷区域像素点总数 P2 周长 L 缺陷区域轮廓像素点统计 P3 圆形度 ε=4πS/L2 目标为圆时, ε=1, 目标形状越复杂, ε越小 被动 P4 矩形度 R=S/SMER SMER为缺陷最小外接矩形 视觉 P5 长短径比 Lb=LA/SA LA为缺陷区域长径, SA为缺陷区域短径 传感 P6 欧拉数 E(A)=M-H M为连通分量个数, H为孔洞数 焊缝 P7 填充度 c=S/Sa Sa为焊缝图像像素面积 特征 P8 区域紧度的形状因子 C=max(1, C1) 圆的形状因子C=1, 如果缺陷区域轮廓复杂或者有洞, C>1 P9 列向面积波形图极差值 Ra 缺陷区域图像列向累加波形图特征值 P10 横向面积波形图极差值 Rl 缺陷区域图像横向累加波形图特征值 焊缝 P11 最大偏移点 P(l, h) l, h为离焊缝中心的偏移距离 激光 P12 曲线斜率 k 线激光条纹斜率 条纹 P13 P13连通域数量 m 线激光条纹连通域数量 特征 P14 峰度系数 m4为线激光条纹各轮廓数据点的4阶中心矩
m2为线激光条纹各轮廓数据点的2阶中心矩表 3 焊缝缺陷分类检测测试数据表
检测类型 数量 成功检测数 漏检个数 误检个数 准确率/% 正常焊缝 860 847 0 13 98.48 焊瘤 84 79 1 4 94.05 焊穿 69 61 2 6 88.41 气孔 31 27 3 1 87.09 成型不良 27 24 1 2 88.89 咬边 39 35 2 2 89.74 总计 1100 1063 9 28 96.94 -
[1] WANG T, CHEN J Q, GAO X D, et al. Quality monitoring for laser welding based on high-speed photography and support vector machine[J]. Applied Sciences, 2017, 7(3): 299 doi: 10.3390/app7030299 [2] 胡宏伟, 张婕, 彭刚, 等. 基于LBP-KPCA特征提取的焊缝超声检测缺陷分类方法[J]. 焊接学报, 2019, 40(6): 34-39 https://www.cnki.com.cn/Article/CJFDTOTAL-HJXB201906007.htmHU H W, ZHANG J, PENG G, et al. Defect classification for ultrasonic inspection in weld seam based on LBP-KPCA feature extraction[J]. Transactions of the China Welding Institution, 2019, 40(6): 34-39 (in Chinese) https://www.cnki.com.cn/Article/CJFDTOTAL-HJXB201906007.htm [3] 葛为民, 申耀华, 王肖锋. 箱梁结构件焊缝表面缺陷特征提取及分类研究[J]. 仪器仪表学报, 2018, 39(12): 207-215 https://www.cnki.com.cn/Article/CJFDTOTAL-YQXB201812024.htmGE W M, SHEN Y H, WANG X F. Feature extraction and classification of weld surface defects in box girder structures[J]. Chinese Journal of Scientific Instrument, 2018, 39(12): 207-215 (in Chinese) https://www.cnki.com.cn/Article/CJFDTOTAL-YQXB201812024.htm [4] LEO M, DEL COCO M, CARCAGNI P, et al. Automatic visual monitoring of welding procedure in stainless steel kegs[J]. Optics and Lasers in Engineering, 2018, 104: 220-231 doi: 10.1016/j.optlaseng.2017.09.001 [5] 雷正龙, 沈健雄, 黎炳蔚, 等. 基于自动阈值的窄间隙端接焊缝识别技术[J]. 光学学报, 2018, 38(8): 0815011 https://www.cnki.com.cn/Article/CJFDTOTAL-GXXB201808012.htmLEI Z L, SHEN J X, LI B W, et al. Recognition of narrow-gap edge welding seam based on autonomous threshold value[J]. Acta Optica Sinica, 2018, 38(8): 0815011 (in Chinese) https://www.cnki.com.cn/Article/CJFDTOTAL-GXXB201808012.htm [6] NGUYEN H C, LEE B R. Laser-vision-based quality inspection system for small-bead laser welding[J]. International Journal of Precision Engineering and Manufacturing, 2014, 15(3): 415-423 doi: 10.1007/s12541-014-0352-7 [7] CORTES C, VAPNIK V. Support-vector networks[J]. Machine Learning, 1995, 20(3): 273-297 [8] VAPNIK V N. The nature of statistical learning theory[M]. New York: Springer-Verlage, 1995 [9] MOOSAVIAN A, KHAZAEE M, NAJAFI G, et al. Spark plug fault recognition based on sensor fusion and classifier combination using Dempster-Shafer evidence theory[J]. Applied Acoustics, 2015, 93: 120-129 doi: 10.1016/j.apacoust.2015.01.008 [10] 熊鹏博, 王晓东. 多时域特征与SVM的隔膜泵单向阀故障诊断[J]. 机械科学与技术, 2019, 38(4): 538-543 doi: 10.13433/j.cnki.1003-8728.20180200XIONG P B, WANG X D. Fault diagnosis of check valve for diaphragm pump with multi-time domain feature and SVM[J]. Mechanical Science and Technology for Aerospace Engineering, 2019, 38(4): 538-543 (in Chinese) doi: 10.13433/j.cnki.1003-8728.20180200 [11] 蹇清平, 艾志久, 张勇, 等. 基于支持向量机的油管内外表面缺陷识别方法[J]. 机械科学与技术, 2015, 34(1): 118-123 doi: 10.13433/j.cnki.1003-8728.2015.0125JIAN Q P, AI Z J, ZHANG Y, et al. Identification of oil tube defects on internal and external surfaces based on SVM[J]. Mechanical Science and Technology for Aerospace Engineering, 2015, 34(1): 118-123 (in Chinese) doi: 10.13433/j.cnki.1003-8728.2015.0125 [12] 孙林, 杨世元, 吴德会. X射线底片焊缝缺陷的支持向量机识别方法[J]. 应用科学学报, 2008, 26(4): 418-424 https://www.cnki.com.cn/Article/CJFDTOTAL-YYKX200804017.htmSUN L, YANG S Y, WU D H. Detection of defects in welding line from X-Ray film using SVM[J]. Journal of Applied Sciences, 2008, 26(4): 418-424 (in Chinese) https://www.cnki.com.cn/Article/CJFDTOTAL-YYKX200804017.htm [13] 王雒瑶, 高炜欣, 王欣. 一种基于SVM及LE降维的X射线焊缝缺陷分类算法研究[J]. 西安石油大学学报(自然科学版), 2017, 32(5): 96-101+106 https://www.cnki.com.cn/Article/CJFDTOTAL-XASY201705016.htmWANG L Y, GAO W X, WANG X. Research of X-ray weld defect classification algorithm based on SVM and LE dimensionality reduction[J]. Journal of Xi'an Shiyou University (Natural Science Edition), 2017, 32(5): 96-101+106 (in Chinese) https://www.cnki.com.cn/Article/CJFDTOTAL-XASY201705016.htm [14] CHEONG S, OH S H, LEE S Y. Support vector machines with binary tree architecture for multi-class classification[J]. Neural Information Processing-Letters and Reviews, 2004, 2(3): 47-51 [15] 褚慧慧. 基于视觉的焊缝质量检测技术研究[D]. 哈尔滨: 哈尔滨工程大学, 2017CHU H H. Research on weld quality inspection technology based on vision[D]. Harbin: Harbin Engineering University, 2017 (in Chinese)