高级检索

基于边缘导向算子模板匹配的熔池轮廓提取方法

张楚昊, 赵壮, 陆骏, 柏连发, 韩静

张楚昊, 赵壮, 陆骏, 柏连发, 韩静. 基于边缘导向算子模板匹配的熔池轮廓提取方法[J]. 焊接学报, 2022, 43(2): 67-74. DOI: 10.12073/j.hjxb.20210628001
引用本文: 张楚昊, 赵壮, 陆骏, 柏连发, 韩静. 基于边缘导向算子模板匹配的熔池轮廓提取方法[J]. 焊接学报, 2022, 43(2): 67-74. DOI: 10.12073/j.hjxb.20210628001
ZHANG Chuhao, ZHAO Zhuang, LU Jun, BAI Lianfa, HAN Jing. Molten pool contour extraction method based on edge oriented operator template matching[J]. TRANSACTIONS OF THE CHINA WELDING INSTITUTION, 2022, 43(2): 67-74. DOI: 10.12073/j.hjxb.20210628001
Citation: ZHANG Chuhao, ZHAO Zhuang, LU Jun, BAI Lianfa, HAN Jing. Molten pool contour extraction method based on edge oriented operator template matching[J]. TRANSACTIONS OF THE CHINA WELDING INSTITUTION, 2022, 43(2): 67-74. DOI: 10.12073/j.hjxb.20210628001

基于边缘导向算子模板匹配的熔池轮廓提取方法

基金项目: 国家自然科学基金资助项目 (61727802, 61901220)
详细信息
    作者简介:

    张楚昊,硕士;主要从事图像分割与边缘检测方面研究;Email:fish8sank@126.com

    通讯作者:

    韩静,博士, 副研究员;Email:eohj@njust.edu.cn.

  • 中图分类号: TG409

Molten pool contour extraction method based on edge oriented operator template matching

  • 摘要: 轮廓提取作为熔池的基本视觉形态特征,在焊接质量在线监测中起着重要作用. 文中建立了非熔化极惰性气体保护电弧焊(tungsten Inert gas welding, TIG)焊接工艺环境下的熔池视觉传感系统,采集了高质量的熔池图像. 针对TIG焊不锈钢熔池图像中弱边缘检测的难点提出了一种基于边缘导向算子模板匹配的熔池轮廓提取算法(operator template matching based on edge direction guidance, OTM-EDG),算法中首先基于非线性灰度变换方法增强弱边缘. 之后利用4个方向的Sobel算子与熔池图像进行卷积操作来判断后端弱边缘的方向并计算梯度图. 最后对梯度图进行边缘连接操作以及基于数学形态学的边缘平滑操作,得到需要提取的熔池轮廓. 结果表明,文中算法能够提取到封闭完整且定位准确的TIG焊不锈钢熔池轮廓. 在实际焊接环境中具有较高的鲁棒性,有效解决了熔池区域弱边缘难以准确检测的问题.
    Abstract: As the basic visual morphological feature of molten pool, contour extraction plays an important role in on-line monitoring of welding quality. A molten pool visual sensing system under the environment of tungsten inert gas welding (TIG) welding process is established, and high-quality molten pool images are collected. Aiming at the difficulty of weak edge detection in TIG welding stainless steel molten pool image, a molten pool contour extraction algorithm based on operator template matching based on edge direction guidance (OTM-EDG) is proposed. Firstly, the algorithm enhances the weak edge based on the nonlinear gray transformation method. Then, the Sobel operator in four directions is used to convolute with the molten pool image to judge the direction of the back-end weak edge and calculate the gradient map. Finally, the edge connection operation and edge smoothing operation based on mathematical morphology are carried out on the gradient map to obtain the molten pool contour to be extracted. Experiments show that the algorithm can extract the closed, complete and accurate molten pool contour of TIG welding stainless steel. It has high robustness in the actual welding environment, and effectively solves the problem that the weak edge of the molten pool area is difficult to accurately detect.
  • 图  1   熔池视觉传感系统示意图

    Figure  1.   Schematic of visual sensing system of molten pool. (a) device diagram; (b) schematic diagram

    图  2   采集并进行裁切之后的熔池图像

    Figure  2.   Collected molten pool images

    图  3   Canny算子在TIG不锈钢熔池图像上的检测效果图

    Figure  3.   Detection effect of Canny operator on TIG stainless steel molten pool images. (a) original image; (b) Canny edge detection graph (c) superposition of Canny detection result and original image

    图  4   OTM-EDG算法流程示意图

    Figure  4.   Flow chart of OTM-EDG algorithm

    图  5   弱边缘区域经过增强之后的灰度分布示意图

    Figure  5.   Gray distribution of the weak edge region after enhancement

    图  6   熔池表面亮度饱和区域形成的伪边缘示意图

    Figure  6.   Schematic of fake edge formed in the brightness saturation region of the molten pool surface. (a) brightness saturation region in molten pool image; (b) interference edge caused by brightness saturation area

    图  7   预处理之后的熔池图像

    Figure  7.   Molten pool image after preprocessing. (a) original image; (b) preprocessed image

    图  8   扩展后的Sobel算子模板示意图

    Figure  8.   Schematic of Sobel operator template after expansion. (a) horizontal direction; (b) 45° direction; (c) vertical direction; (d) 135° direction

    图  9   4个方向上的Sobel算子模板卷积梯度图

    Figure  9.   Gradient image of four direction Sobel operator template. (a) original image; (b) horizontal direction; (c) 45° direction; (d) vertical direction; (e) 135° direction

    图  10   基于边缘方向算子模板匹配的梯度图

    Figure  10.   Gradient image based on edge direction operator template matching. (a) original image; (b) gradient amplitude grayscale; (c) gradient amplitude binary diagram

    图  11   边缘粗提取效果图

    Figure  11.   Schematic of rough edge detection

    图  12   基于梯度幅值与方向的边缘连接效果图

    Figure  12.   Schematic of edge connection based on gradient and direction. (a) original gradient binary graph; (b) edge connection effect image

    图  13   干扰边缘去除示意图

    Figure  13.   Schematic of interference edge removal. (a) original image; (b) result image

    图  14   熔池区域连通域获取流程示意图

    Figure  14.   Schematic of obtaining region of molten pool area. (a) original image; (b) fill effect image; (c) difference effect image; (d) reserved maximum connected domain

    图  15   连通域的轮廓提取示意图

    Figure  15.   Schematic of contour extraction. (a) original image; (b) smoothing effect image; (c) contour edge of connected domain; (d) effect of superimposing the contour on the molten pool image

    图  16   算法流程示意图

    Figure  16.   Schematic of OTM-EDG algorithm

    图  17   多种算法效果对比图

    Figure  17.   Comparison of effects of various algorithms. (a) Otsu threshold method; (b) CV active contour method; (c) Canny method; (d) OTM-EDG method

    图  18   连续帧图像测试结果示意图

    Figure  18.   Schematic of continuous frame images test results. (a) the first frame; (b) the second frame; (c) the third frame; (d) the fourth frame; (e) the fifth frame

    表  1   焊接工艺参数

    Table  1   Welding process parameters

    焊丝ER316L直径
    d/mm
    送丝速度
    vs/(mm·s−1)
    氩气流量
    Q/( L·min−1)
    焊接电流
    I/A
    钨极直径
    D/mm
    曝光时间
    t/μs
    1.2 7 25 110 ~ 160 5.0 2
    下载: 导出CSV

    表  2   测试过程耗时

    Table  2   Test process time

    方法帧率f/fps
    Otsu阈值法12.6
    CV主动轮廓算法8.3
    Canny算法16.1
    OTM-EDG15.7
    下载: 导出CSV
  • [1] 潘龙威, 董红刚. 焊接增材制造研究新进展[J]. 焊接, 2016(4): 27 − 32. doi: 10.3969/j.issn.1001-1382.2016.04.007

    Pan Longwei, Dong Honggang. New progress in welding additive manufacturing[J]. Welding & Joining, 2016(4): 27 − 32. doi: 10.3969/j.issn.1001-1382.2016.04.007

    [2] 宫建锋, 李慧知, 李俐群, 等. 基于同轴图像传感的激光焊接过程质量监测技术[J]. 焊接学报, 2019, 40(1): 37 − 42.

    Gong Jianfeng, Li Huizhi, Li Liqun, et al. Quality monitoring technology of laser welding process based on coaxial image sensing[J]. Transactions of the China Welding Institution, 2019, 40(1): 37 − 42.

    [3] 郭枭, 何鹏, 徐锴, 等. 一种核电用镍基合金焊丝熔敷金属的组织与性能[J]. 焊接学报, 2020, 41(4): 26 − 30.

    Guo Xiao, He Peng, Xu Kai, et al. Microstructure and mechanical properties of deposited metal for nuclear plant nickel alloy welding wire[J]. Transactions of the China Welding Institution, 2020, 41(4): 26 − 30.

    [4] 郑睿. 基于计算机视觉的激光焊接在线监测系统设计[D]. 武汉: 华中科技大学, 2014.

    Zheng Rui. On-line laser welding monitoring system design based on computer vision methods[D]. Wuhan: Huazhong University of Science & Technology, 2014.

    [5]

    Yong Z, Jiang L, Yunhua L I, et al. Welding deviation detection agorithm based on extremum of molten pool image contour[J]. Chinese Journal of Mechanical Engineering, 2016, 29(1): 74 − 83. doi: 10.3901/CJME.2015.0908.110

    [6] 刘晓刚, 闫红方, 张荣. 基于形态学多尺度多结构的熔池图像边缘检测[J]. 热加工工艺, 2019, 48(5): 216 − 219.

    Liu Xiaogang, Yan Hongfang, Zhang Rong. Edge detection of molten pol image based on morphology multi-scale and multi-structuring elements[J]. Hot Working Technolog, 2019, 48(5): 216 − 219.

    [7] 于海川, 穆平安. 自适应Canny算法在钢板缺陷边缘检测中的应用[J]. 软件导刊, 2018, 17(4): 175 − 177.

    Yu Haichuan, Mu Ping'an. Application of adaptive Canny algorithm in edge detection of steel plate defects[J]. Software, 2018, 17(4): 175 − 177.

    [8] 张亚红, 覃科. 一种形态学与Canny算子融合的焊接熔池边缘检测算法[J]. 桂林航天工业学院学报, 2017, 22(1): 9 − 13. doi: 10.3969/j.issn.1009-1033.2017.01.003

    Zhang Yahong, Qin Ke. A welding pool edge detection algorithm based on morphology and Canny operator fusion[J]. Journal of Guilin University of Aerospace Technology, 2017, 22(1): 9 − 13. doi: 10.3969/j.issn.1009-1033.2017.01.003

    [9]

    Zhang Yuwei, Zhao Zhuang, Zhang Yi, et al. Online weld pool contour extraction and seam width prediction based on mixing spectral vision[J]. Optical Review, 2019, 26(1): 65 − 76. doi: 10.1007/s10043-018-0479-3

    [10]

    Xia Chunyang, Pan Zengxi, Zhang Shiyu, et al. Model predictive control of layer width in wire arc additive manufacturing[J]. Journal of Manufacturing Processes, 2020, 58: 179 − 186. doi: 10.1016/j.jmapro.2020.07.060

    [11] 韩庆璘, 李大用, 李鑫磊, 等. 基于分区减光的电弧增材制造熔敷道尺寸主被动联合视觉检测[J]. 焊接学报, 2020, 41(9): 28 − 32. doi: 10.12073/j.hjxb.20200418001

    Han Qinglin, Li Dayong, Li Xinlei, et al. Bead geometry measurement for wire and arc additive manufacturing using active-passive composite vision sensing based on regional filter[J]. Transactions of the China Welding Institution, 2020, 41(9): 28 − 32. doi: 10.12073/j.hjxb.20200418001

    [12] 蔡敏. 铝合金GTAW熔池区视觉特征检测及焊缝成型控制[D]. 上海: 上海交通大学, 2013.

    Cai Min. Visual characters extraction of weld pool and shape control during aluminum alloy GTAW process[D]. Shanghai : Shanghai Jiao Tong University, 2013.

    [13] 李钦弟, 蔡利栋. 一种基于非线性灰度变换的弱边缘检测方法[J]. 中国体视学与图像分析, 2011, 16(3): 232 − 236.

    Li Qindi, Cai Lidong. A weak edge detection method based on nonlinear transform of gray levels[J]. Chinese Journal of Stereology and Image Analysis, 2011, 16(3): 232 − 236.

图(18)  /  表(2)
计量
  • 文章访问数:  464
  • HTML全文浏览量:  26
  • PDF下载量:  65
  • 被引次数: 0
出版历程
  • 收稿日期:  2021-06-27
  • 网络出版日期:  2022-01-23
  • 刊出日期:  2022-04-12

目录

    /

    返回文章
    返回