Weld surface defect detection based on improved two-dimensional principal component analysis
-
摘要: 机器人焊接因零件形状不规则和焊接工艺复杂不可避免带来各种焊缝缺陷. 针对二维主成分分析应用于焊缝表面缺陷检测时面临计算复杂度高、分类准确率低及无法进行增量学习等问题,提出了一种基于均值更新的增量二维主成分分析(mean updated incremental two-dimensional principal component analysis,MUI2DPCA)算法,并将MUI2DPCA和前馈神经网络( feedforward neural network,FNN)相结合进行焊缝表面缺陷在线检测. 首先,对相机捕获的视频帧图像进行预处理得到焊缝局部块图像. 然后,利用MUI2DPCA在线提取局部块图像的模式特征. MUI2DPCA对图像的特征主成分进行增量迭代估计,降低计算复杂度,并且能够增量更新当前的样本均值,减少无关特征变化对主成分收敛性的影响. 最后,利用FNN建立提取的模式特征与焊缝类别之间的联系,实时返回焊缝表面缺陷的检测信息. 试验结果表明,该检测方法平均分类准确率为95.40%,平均处理速度可达29帧/s,能够满足焊缝在线检测的实时性要求.Abstract: Robot welding inevitably brings various weld defects due to the irregularity of part shape and the complexity of welding process. When applying two-dimensional principal component analysis to the detection of weld surface defects, it often faces problems such as high computational complexity, low classification accuracy and inability to incrementally learn. To resolve these problems, a mean updated incremental two-dimensional principal component analysis (MUI2DPCA) algorithm is proposed. MUI2DPCA and feedforward neural network (FNN) are combined to detect weld surface defects online. Firstly, the local block images are obtained by preprocessing the video frame images captured by the camera. Then, the pattern features of weld block images are extracted online by MUI2DPCA. The algorithm performs incremental iterative estimation on principal components of block images, significantly reduces the computational complexity, and incrementally updates the current sample mean to reduce the influence of irrelevant feature changes on the convergences of principal components. Finally, FNN is used to establish the relationship between pattern features and weld categories, and the weld defect detection information is obtained in real time. The test results show that the average classification accuracy of the detection method is 95.40%, and the average processing speed reaches 29 frames per second, and it can meet the real-time requirements of weld detection.
-
-
表 1 前
$ k $ 阶特征向量评价值Table 1 Evaluation value of the first
$k$ -order eigenvectors特征向量阶数k(个) 重构误差E 运行时间t/s 评价值Q 2 4 185.99 18.709 55.09 4 3 762.56 31.773 54.19 6 3 519.44 47.377 56.01 8 3 344.40 63.382 59.55 10 3 219.00 80.712 64.87 12 3 086.90 96.118 70.23 14 2 972.33 112.484 76.66 表 2 MUI2DPCA和2DPCA分类准确率及复杂度试验
Table 2 Classification accuracy and complexity experiments of MUI2DPCA and 2DPCA
算法 样本数
n(个)分类准确率 $ \eta $ (%)运行时间
t/s内存
M/kBMUI2DPCA 200 94.0 3.992 6 500 400 94.5 8.174 6 504 600 95.0 11.794 6 483 800 95.0 15.553 6 516 1 000 96.5 19.094 6 508 2DPCA 200 94.0 2.917 18 202 400 94.0 9.232 33 575 600 94.0 18.956 48 950 800 94.5 31.560 64 257 1 000 94.5 47.465 79 610 表 3 焊接试验平台检测焊缝缺陷所需的时间
Table 3 Required time of weld defect detection using the platform running test
检测步骤 时间t/s 图像预处理 32.694 特征提取 2.847 FNN 分类 0.454 跨帧优化 0.978 总计 36.973 -
[1] Hou W H, Zhang D S, Wei Y, et al. Review on computer aided weld defect detection from radiography images[J]. Applied Sciences-Basel, 2020, 10(5): 1878. doi: 10.3390/app10051878
[2] Kermorgant O. A magnetic climbing robot to perform autonomous welding in the shipbuilding industry[J]. Robotics and Computer- Integrated Manufacturing, 2018, 53: 178 − 186. doi: 10.1016/j.rcim.2018.04.008
[3] 于朋, 刚铁. 基于全聚焦成像技术的焊缝近表面平面类缺陷检测[J]. 焊接学报, 2019, 40(12): 36 − 40. Yu Peng, Gang Tie. Use total focusing method to image the near-surface planar defect in welded joint[J]. Transactions of the China Welding Institution, 2019, 40(12): 36 − 40.
[4] Sun J, Li C, Wu X J, et al. An effective method of weld defect detection and classification based on machine vision[J]. IEEE Transactions on Industrial Informatics, 2019, 15(12): 6322 − 6333. doi: 10.1109/TII.2019.2896357
[5] 马增强, 钱荣威, 许丹丹, 等. 线结构光焊接图像去噪方法[J]. 焊接学报, 2021, 42(2): 8 − 15. doi: 10.12073/j.hjxb.20200519002 Ma Zengqiang, Qian Rongwei, Xu Dandan, et al. Denoising of line structured light welded seams image based on adaptive top-hat transform[J]. Transactions of the China Welding Institution, 2021, 42(2): 8 − 15. doi: 10.12073/j.hjxb.20200519002
[6] 胡宏伟, 张婕, 彭刚, 等. 基于LBP-KPCA特征提取的焊缝超声检测缺陷分类方法[J]. 焊接学报, 2019, 40(6): 34 − 39. Hu Hongwei, Zhang Jie, Peng Gang, 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.
[7] Zhang L, Zhang Y J, Dai B C, et al. Welding defect detection based on local image enhancement[J]. IET Image Processing, 2019, 13(13): 2647 − 2658. doi: 10.1049/iet-ipr.2018.5840
[8] Shao W J, Huang Y, Zhang Y. A novel weld seam detection method for space weld seam of narrow butt joint in laser welding[J]. Optics and Laser Technology, 2018, 99: 39 − 51. doi: 10.1016/j.optlastec.2017.09.037
[9] Oh S J, Jung M J, Lim C, et al. Automatic detection of welding defects using faster R-CNN[J]. Applied Sciences-Basel, 2020, 10(23): 8629. doi: 10.3390/app10238629
[10] Zhang Z F, Wen G R, Chen S B. Weld image deep learning-based on-line defects detection using convolutional neural networks for Al alloy in robotic arc welding[J]. Journal of Manufacturing Processes, 2019, 45: 208 − 216. doi: 10.1016/j.jmapro.2019.06.023
[11] Wang Y, Guo H. Weld defect detection of X-ray images based on support vector machine[J]. IETE Technical Review, 2014, 31(2): 137 − 142. doi: 10.1080/02564602.2014.892739
[12] Chu H H, Wang Z Y. A vision-based system for post-welding quality measurement and defect detection[J]. International Journal of Advanced Manufacturing Technology, 2016, 86(9-12): 3007 − 3014. doi: 10.1007/s00170-015-8334-1
[13] Jiang H Q, Zhao Y L, Gao J M, et al. Weld defect classification based on texture features and principal component analysis[J]. Insight, 2016, 58(4): 194 − 199. doi: 10.1784/insi.2016.58.4.194
[14] Cruz F C, Simas E F, Albuquerque M C S, et al. Efficient feature selection for neural network-based detection of flaws in steel welded joints using ultrasound testing[J]. Ultrasonics, 2017, 73: 1 − 8. doi: 10.1016/j.ultras.2016.08.017
[15] He K F, Li X J. Time-frequency feature extraction of acoustic emission signals in aluminum alloy MIG welding process based on SST and PCA[J]. IEEE Access, 2019, 7: 113988 − 113998. doi: 10.1109/ACCESS.2019.2935117
[16] Yang J, Zhang D, Frangi A F, et al. Two-dimensional PCA: a new approach to appearance-based face representation and recognition[J]. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2004, 26(1): 131 − 137. doi: 10.1109/TPAMI.2004.1261097
[17] Esmaeili M, Ahmadi M, Kazemi A. Kernel-based two-dimensional principal component analysis applied for parameterization in history matching[J]. Journal of Petroleum Science and Engineering, 2020, 191: 107134. doi: 10.1016/j.petrol.2020.107134
[18] Bi P F, Xu J, Du X, et al. l2, p-norm sequential bilateral 2DPCA: a novel robust technology for underwater image classification and representation[J]. Neural Computing and Applications, 2020, 32(22): 17027 − 17041. doi: 10.1007/s00521-020-04936-1
[19] Can J, Zhang F, Wang J J, et al. Robust principal component analysis with intra-block correlation[J]. Neurocomputing, 2020, 386: 165 − 178. doi: 10.1016/j.neucom.2019.12.092
[20] Wang Q Q, Gao Q X, Gao X B, et al. Optimal mean two-dimensional principal component analysis with F-norm minimization[J]. Pattern Recognition, 2017, 68: 286 − 294. doi: 10.1016/j.patcog.2017.03.026
[21] Weng J Y, Zhang Y L, Hwang W S. Candid covariance-free incremental principal component analysis[J]. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2003, 25(8): 1034 − 1040. doi: 10.1109/TPAMI.2003.1217609
[22] Ge W M, Sun M Y, Wang X F. An incremental two-dimensional principal component analysis for object recognition[J]. Mathematical Problems in Engineering, 2018(3): 1 − 13.
[23] Li Yongyan, Zhao Weimin, Xue Haitao, et al. Defect recognition of resistance spot welding based on artificial neural network[C]// Proceedings of 2010 International Conference on Services Science, Management and Engineering. Berlin, Heidelberg: Springer, 2012, 115: 423-430.