In response to the automated detection of weld seams and high-precision image recognition requirements for small-diameter clean pipes before leaving the factory, an intelligent weld seam recognition method based on gray-level co-occurrence matrix feature extraction was proposed and integrated into a small pipe weld seam detection robot system. This method accurately distinguished between weld seams and pipe walls by extracting four typical texture features: entropy, contrast, angular second moment, and inverse differential moment from the sampled images, combined with threshold judgment. Upon detecting the weld seam, the system controlled the camera module to rotate and capture images of the weld seam area and restored the complete weld seam image through image stitching. To verify the performance of the algorithm, detection experiments were conducted on different types of pipeline welds. Through the prototype fabrication and experimental validation, the results indicate that the weld recognition rate reaches 98.94%, and the complete weld recognition rate reaches 97.87%, the gray-level co-occurrence matrix feature extraction recognition method demonstrates good weld recognition rates and detection performance in small-diameter clean pipelines.The proposed method has a higher average accuracy over time compared to other methods, and thus possesses good application value.
SUN Ya-nan, WANG Yi, LIU Meng-lin, LIU Yong-da, LI Xiao-ping, ZHENG Yun-chao.
Pipeline Weld Detection Robot Based on Gray Level Co-occurrence Matrix[J].
Science Technology and Engineering, 2026, 26(15): 6412-6424 DOI:10.12404/j.issn.1671-1815.2506244
图像采集模块采用通用系统接口(common system interface,CSI)图像传感器,结合对称LED点光源补光模块在管内黑暗环境下提供稳定照明条件;图像处理框架通过V4L2驱动获取摄像头数据流,图像数据通过图像传感器OV5647采集模块进行采集,实时传输捕获每一帧图像数据;图像处理部分基于Python环境进行图像灰度化、灰度共生矩阵构建与纹理特征提取;系统在实时图像采集传输过程中,通过灰度共生矩阵对角二阶矩与对比度特征值的快速判定,完成机器人制动并驱动ES9251微型舵机带动摄像云台对焊缝进行整周图像采集与获取。
为了更全面地评估本方法的有效性及可行性,将本文方法与其他主流模型进行对比分析,选择与YOLOv5s-GhostNet-GAM(global attention mechanism)[24]模型、改进的YOLOv5[25]模型、改进的CADETR(detection transformer with concatenated expand convolutions and augmented feature pyramid networks)[26]模型进行对比,对比的核心指标包括精确率、召回率、均值平均精度(mean average precision,mAP)及平均检测速率,计算公式为
LuHongwei, ZhouHuihui, GongQingshan, et al. Lightweight weld defect detection algorithm based on YOLOv8n[J]. Instrumentation Technology and Sensors, 2025(5): 56-65.
[9]
LuK, WangW, FengX, et al. FCCNet: surface defects identification of hot rolled strip based on lightweight convolutional neural network: regular article[J]. ISIJ International, 2023, 63(12): 2010-2016.
[10]
SatishS, ShitalC. Enhancing weld defect detection and classification with MDCBNet: a multi-scale dense cross block network for improved explainability[J]. NDT and E International, 2024, 142: 103029.
DuanXiaomei, WangChenyang. Research on phased array ultrasonic testing technology for weld defects in pressure pipelines[J]. Journal of Today’s Manufacturing and Upgrading, 2025(5): 87-89.
LiuYan, WuYuxuan, YangFengping, et al. Quantitative method for phased array ultrasonic testing of corner weld defects in type B socket[J]. Applied Acoustics, 2023, 42(1): 145-153.
[15]
LiuF P. Application of ultrasonic phased array technology in the inspection of small diameter pipe welds on the heating surface of circulating fluidized bed boilers[J]. Journal of Physics: Conference Series, 2023, 2442(1): 012005.
[16]
TangY, ZhuoJ, DouG, et al. Structured light device and algorithmic enhancements for automated bridge steel bar weld inspection[J]. CE/Papers, 2025, 8(2): 988-995.
DaiZhongchen, ChenQi, DingYaping, et al. Design of an online detection system for aluminum alloy welds based on line structured light[J]. Journal of Thermal Processing Technology, 2024, 53(13): 68-74.
ChenBing, HeSheng, LiuJian, et al. Image segmentation of weld seam structure based on lightweight DeepLab v3+ network[J]. Chinese Laser, 2023, 50(8): 49-58.
DengXiandong, LiuChunhua, ChenXiaohui, et al. Research on weld seam visual tracking method based on deep learning[J]. Modern Manufacturing Engineering, 2023(6): 124-131.
[23]
YuY B, NiC W, CuiW T, et al. Dynamic evolution characteristics of loaded coal fractures based on gray level co-occurrence matrix and digital volume correlation[J]. Journal of Angular Second Moment Engineering, 2025, 151(4): 04025033.
JiangSupeng, XiangWei, LiuYunpeng, et al. Template matching using multi-feature co-occurrence matrix[J]. Optical Precision Engineering, 2021, 29(6): 1459-1467.
[28]
DhingraS, BansalP. Experimental analogy of different texture feature extraction techniques in image retrieval systems[J]. Multimedia Tools and Applications, 2020, 79(37): 27391-27406.
[29]
EtienneP, LucL. Periodical monitoring of 3D welds and defects generated from ultrasound scans[J]. The International Journal of Advanced Manufacturing Technology, 2023, 125(3/4): 1239-1249.
TuDongkun, ChenZhenhua, ZhangQi, et al. Intelligent nonlinear ultrasonic testing of the mechanical performance degradation of gas PE pipelines[J]. Science Technology and Engineering, 2025, 25(18): 7551-7557.
[32]
LiC, WangQ Y, JiaoW H, et al. Deep learning-based detection of penetration from weld pool reflection images[J]. Welding Journal, 2020, 99(9): 239-245.
LiZhang, OuYue, ChenJianwen, et al. A pipeline positioning and planning method for pipeline weld penetration detection robots[J]. Science Technology and Engineering, 2024, 24(17): 7168-7176.
[35]
成大先. 机械设计手册(第1卷)[M]. 7版. 北京: 化学工业出版社, 2025.
[36]
ChengDaxian. Mechanical design handbook(Volume 1)[M]. 7th Edition. Beijing: Chemical Industry Press, 2025.
ZhouYichen, YuDan, LiJiacheng, et al. Research on weld seam recognition algorithm based on improved YOLOv5[J]. Manufacturing Technology and Machine Tools, 2024(7): 19-25.
DaiZheng, LiuXiaojia, PanQuan. Research on weld defect detection method based on improved DETR algorithm[J]. Journal of Electronics & Information Technology, 2025, 47(7): 2298-2307.