[go: up one dir, main page]

CN115255565A - Visual sensing detection method and application of narrow gap welding groove edge based on global pattern recognition - Google Patents

Visual sensing detection method and application of narrow gap welding groove edge based on global pattern recognition Download PDF

Info

Publication number
CN115255565A
CN115255565A CN202210856059.5A CN202210856059A CN115255565A CN 115255565 A CN115255565 A CN 115255565A CN 202210856059 A CN202210856059 A CN 202210856059A CN 115255565 A CN115255565 A CN 115255565A
Authority
CN
China
Prior art keywords
groove
edge
value
groove edge
window
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202210856059.5A
Other languages
Chinese (zh)
Other versions
CN115255565B (en
Inventor
苏娜
王加友
朱杰
胥国祥
姜玉清
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Jiangsu University of Science and Technology
Original Assignee
Jiangsu University of Science and Technology
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Jiangsu University of Science and Technology filed Critical Jiangsu University of Science and Technology
Priority to CN202210856059.5A priority Critical patent/CN115255565B/en
Publication of CN115255565A publication Critical patent/CN115255565A/en
Application granted granted Critical
Publication of CN115255565B publication Critical patent/CN115255565B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • BPERFORMING OPERATIONS; TRANSPORTING
    • B23MACHINE TOOLS; METAL-WORKING NOT OTHERWISE PROVIDED FOR
    • B23KSOLDERING OR UNSOLDERING; WELDING; CLADDING OR PLATING BY SOLDERING OR WELDING; CUTTING BY APPLYING HEAT LOCALLY, e.g. FLAME CUTTING; WORKING BY LASER BEAM
    • B23K9/00Arc welding or cutting
    • B23K9/095Monitoring or automatic control of welding parameters
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B23MACHINE TOOLS; METAL-WORKING NOT OTHERWISE PROVIDED FOR
    • B23KSOLDERING OR UNSOLDERING; WELDING; CLADDING OR PLATING BY SOLDERING OR WELDING; CUTTING BY APPLYING HEAT LOCALLY, e.g. FLAME CUTTING; WORKING BY LASER BEAM
    • B23K9/00Arc welding or cutting
    • B23K9/095Monitoring or automatic control of welding parameters
    • B23K9/0953Monitoring or automatic control of welding parameters using computing means
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B23MACHINE TOOLS; METAL-WORKING NOT OTHERWISE PROVIDED FOR
    • B23KSOLDERING OR UNSOLDERING; WELDING; CLADDING OR PLATING BY SOLDERING OR WELDING; CUTTING BY APPLYING HEAT LOCALLY, e.g. FLAME CUTTING; WORKING BY LASER BEAM
    • B23K9/00Arc welding or cutting
    • B23K9/32Accessories

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Plasma & Fusion (AREA)
  • Mechanical Engineering (AREA)
  • Theoretical Computer Science (AREA)
  • Image Analysis (AREA)

Abstract

本发明公开了一种全局模式识别的窄间隙焊接坡口边缘视觉传感检测方法及应用,所述检测方法的步骤是:利用被动视觉传感器采集焊接区域全局图像,通过位置自适应的坡口边缘ROI窗口,截取坡口边缘ROI窗口图像,采用图像处理方法提取电弧对侧的坡口边缘位置点。通过寻找坡口边缘线上具有相同横坐标的位置点子集合,剔除可能由焊接飞溅、弧光和烟尘等干扰引起的离群数据子集合;通过对保留的坡口边缘真实位置点进行线性拟合或求取均值,重构包含h个位置点的坡口边缘线。本发明方法实现了在干扰条件下窄间隙焊接被动视觉传感坡口边缘位置的精确检测。本发明方法简便、抗干扰能力强、环境适应性好、坡口边缘位置检测精度高。

Figure 202210856059

The invention discloses a visual sensing detection method and application of a narrow gap welding groove edge for global pattern recognition. ROI window, intercept the ROI window image of the groove edge, and use the image processing method to extract the position point of the groove edge on the opposite side of the arc. By looking for a subset of position points with the same abscissa on the edge of the groove, outlier data subsets that may be caused by interference such as welding spatter, arc light and smoke are eliminated; by performing linear fitting or Take the mean value and reconstruct the groove edge line containing h position points. The method of the invention realizes the precise detection of the edge position of the narrow gap welding passive vision sensing groove under the interference condition. The method of the invention is simple and convenient, the anti-interference ability is strong, the environmental adaptability is good, and the detection precision of the groove edge position is high.

Figure 202210856059

Description

全局模式识别的窄间隙焊接坡口边缘视觉传感检测方法及 应用Vision sensing detection method of narrow gap welding groove edge based on global pattern recognition and application

技术领域technical field

本发明属于焊接技术领域,具体涉及一种全局模式识别的窄间隙焊接坡口边缘视觉传感检测方法及应用。The invention belongs to the field of welding technology, and in particular relates to a visual sensor detection method and application of a narrow gap welding groove edge by global pattern recognition.

背景技术Background technique

窄间隙熔化极气体保护焊是一种高效、高质量、低成本的焊接方法。在窄间隙焊接过程中,因受坡口加工误差、装配误差、焊接变形、坡口形式等因素影响,导致焊炬中心偏离坡口中心,从而导致坡口两侧壁熔深的不均匀。因此,有必要对坡口边缘进行实时提取并检测,从而实现坡口宽度、坡口中心位置的检测和焊接过程的实时跟踪控制。Narrow gap MIG welding is a welding method with high efficiency, high quality and low cost. In the narrow gap welding process, due to the influence of groove processing error, assembly error, welding deformation, groove form and other factors, the center of the welding torch deviates from the center of the groove, resulting in uneven penetration on both sides of the groove. Therefore, it is necessary to extract and detect the edge of the groove in real time, so as to realize the detection of the width of the groove, the detection of the center of the groove and the real-time tracking control of the welding process.

为了实现精确检测和焊接过程的实时跟踪控制,传感技术是关键。目前,视觉传感因非接触、灵敏度高、抗干扰能力强等优点被广泛应用。具体可分为主动视觉传感(需要外加光源,比如激光传感器)和被动视觉传感(以电弧或熔池本身作为光源)。其中,被动视觉传感方法,可实现与电弧位置同步传感、无需外加光源、成本低、适合多种坡口、获取信息量大的优点,而被广泛应用。但是,焊接过程中存在焊接飞溅、电弧弧光和焊接烟尘等干扰,如何在干扰条件下准确地检测坡口边缘位置,是实现焊接过程参数的精确检测和实时跟踪控制的关键。In order to achieve accurate detection and real-time tracking control of the welding process, sensing technology is the key. At present, visual sensing is widely used due to its advantages of non-contact, high sensitivity, and strong anti-interference ability. Specifically, it can be divided into active visual sensing (requiring an external light source, such as a laser sensor) and passive visual sensing (using the arc or the molten pool itself as the light source). Among them, the passive visual sensing method can achieve synchronous sensing with the arc position, no need for an external light source, low cost, suitable for various grooves, and has the advantages of obtaining a large amount of information, and is widely used. However, there are interferences such as welding spatter, arc light and welding fumes in the welding process. How to accurately detect the edge position of the groove under the interference conditions is the key to realize the accurate detection and real-time tracking control of welding process parameters.

中国专利号为ZL201610517913.X、名称为“焊接坡口边缘位置视觉传感检测方法”的发明专利,公开了一种焊接坡口边缘位置视觉传感检测方法。其利用视觉传感器采集焊接区域全局图像,通过ROI窗口截取电弧对侧坡口边缘图像,经图像处理后提取坡口边缘线;在提取的坡口边缘线上,通过局部模式识别小窗口,检测坡口边缘线的最直段,并以最直段上坡口边缘的位置检测值作为焊接坡口边缘位置的检测值。其缺点是:1)该方法属于局部模式识别方法,容易陷入局部最优,当坡口边缘ROI窗口高度为100pixels时,能剔除单个焊接飞溅尺寸为1.4mm,若焊接飞溅尺寸继续增大,或当坡口边缘上焊接飞溅占比超过60%时,坡口边缘检测精度明显降低;当坡口边缘ROI窗口高度降至80pixels时,该方法剔除焊接飞溅尺寸约为0.8mm,说明算法精度受坡口边缘ROI窗口高度的影响;2)该方法通过整体阈值分割方法对坡口边缘的ROI窗口图像进行二值化处理,当存在因弧光和烟尘干扰引起的图像灰度分布不均匀时,难以准确提取坡口边缘轮廓线;3)对坡口边缘ROI窗口进行自适应定位时,没有采用抑制电弧最高点波动的数字滤波算法,其坡口边缘ROI窗口定位的准确性易受焊接飞溅干扰和电弧稳定性的影响。The Chinese patent number is ZL201610517913.X, and the invention patent titled "Welding Groove Edge Position Visual Sensing Detection Method" discloses a welding groove edge position visual sensing detection method. It uses the visual sensor to collect the global image of the welding area, intercepts the edge image of the opposite side of the arc through the ROI window, and extracts the edge line of the groove after image processing; on the extracted edge line of the groove, recognizes the small window through the local pattern to detect the edge The straightest section of the edge line, and the position detection value of the groove edge on the straightest section is used as the detection value of the welding groove edge position. The disadvantages are: 1) This method belongs to the local pattern recognition method, and it is easy to fall into the local optimum. When the height of the ROI window at the edge of the groove is 100 pixels, the size of a single welding spatter can be eliminated as 1.4 mm. If the size of the welding spatter continues to increase, or When the proportion of welding spatter on the edge of the groove exceeds 60%, the detection accuracy of the edge of the groove is significantly reduced; when the height of the ROI window on the edge of the groove drops to 80pixels, the size of the welding spatter removed by this method is about 0.8mm, which shows that the accuracy of the algorithm is affected by the slope. 2) This method uses the overall threshold segmentation method to binarize the image of the ROI window at the edge of the groove. When there is uneven distribution of image gray levels caused by arc light and smoke interference, it is difficult to accurately Extract the groove edge contour line; 3) When performing adaptive positioning on the groove edge ROI window, no digital filtering algorithm is used to suppress the fluctuation of the highest point of the arc, and the accuracy of the groove edge ROI window positioning is easily affected by welding spatter and arc impact on stability.

中国专利号为ZL201410741503.4、名称为“窄间隙焊接电弧摇动的适应控制方法及装置”的发明专利,公开了一种窄间隙焊接电弧摇动的适应控制方法及装置。该方法采用红外摄像机系统实时提取坡口宽度信息,并根据坡口宽度变化实现对电弧摇动角度的自适应控制;其缺点是:1)该方法没有采用模式识别方法,而是通过中值或均值滤波方法获取坡口左、右边缘位置和坡口宽度检测值,当焊接飞溅占比超过50%时,坡口宽度检测精度易受较大焊接飞溅的影响;2)该方法通过整体阈值分割方法对坡口边缘ROI窗口图像进行二值化处理,当存在因弧光和烟尘干扰引起图像灰度分布不均匀时,难以准确提取坡口边缘轮廓线,影响坡口宽度的检测精度;3)对ROI窗口位置进行自适应定位时,没有考虑坡口边缘ROI窗口图像中的背景占比对坡口边缘线提取的影响,从而降低了坡口宽度的检测精度。The Chinese patent number is ZL201410741503.4, and the invention patent titled "Adaptive Control Method and Device for Narrow Gap Welding Arc Shake" discloses an adaptive control method and device for narrow gap welding arc shake. This method uses the infrared camera system to extract the groove width information in real time, and realizes the adaptive control of the arc shaking angle according to the change of the groove width; its disadvantages are: 1) This method does not use the pattern recognition method, but uses the median or mean value The filter method obtains the left and right edge positions of the groove and the detection value of the groove width. When the welding spatter accounts for more than 50%, the detection accuracy of the groove width is easily affected by the large welding spatter; 2) This method uses the overall threshold segmentation method Binarize the image of the ROI window on the edge of the groove. When there is uneven distribution of image gray levels due to arc light and smoke interference, it is difficult to accurately extract the contour line of the edge of the groove, which affects the detection accuracy of the groove width; 3) ROI When the window position is adaptively positioned, the influence of the background ratio in the ROI window image on the edge of the groove on the edge line extraction of the groove is not considered, which reduces the detection accuracy of the groove width.

中国专利号为ZL201210325926.9、名称为“基于红外视觉传感的窄间隙焊接监控及焊缝偏差检测方法”的发明专利,公开了一种基于红外视觉传感的窄间隙焊接监控及焊缝偏差检测方法。该方法采用红外CMOS摄像机获取焊接图像,通过计算远离电弧侧的熔池左(或右) 边缘到左(或右)截取窗口的左(或右)边界的距离获取焊缝偏差值。其缺点是:1)该方法在设置左和右坡口边缘位置截取窗口时,未采用自适应定位方法,其适应性差;2)该方法未解决焊接烟尘、飞溅等干扰对坡口边缘位置检测精度的影响。The Chinese patent number is ZL201210325926.9, and the invention patent titled "Narrow Gap Welding Monitoring and Weld Deviation Detection Method Based on Infrared Vision Sensing" discloses a narrow gap welding monitoring and weld deviation detection method based on infrared vision sensing Detection method. This method uses an infrared CMOS camera to obtain welding images, and obtains the weld deviation value by calculating the distance from the left (or right) edge of the molten pool away from the arc side to the left (or right) boundary of the left (or right) interception window. The disadvantages are: 1) This method does not adopt the adaptive positioning method when setting the interception windows of the left and right groove edge positions, and its adaptability is poor; 2) This method does not solve the interference of welding smoke and spatter on the groove edge position detection. impact on precision.

发明内容Contents of the invention

本发明的目的是针对现有技术存在窄间隙焊接坡口边缘位置检测精度不高、焊接环境适应性不强、自适应能力不足等缺点,提出了一种检测精度高、抗焊接干扰能力强、实用性好的全局模式识别的窄间隙焊接坡口边缘视觉传感检测方法及应用。The purpose of the present invention is to address the shortcomings of the existing technology such as low detection accuracy of the edge position of the narrow gap welding groove, poor adaptability to the welding environment, and insufficient self-adaptive ability, and proposes a high detection accuracy, strong anti-welding interference ability, A narrow gap welding groove edge visual sensing detection method with good practicability and global pattern recognition and its application.

本发明的方法是通过位置自适应的坡口边缘ROI窗口,截取坡口边缘ROI窗口图像,通过局部图像处理,提取电弧对侧的坡口边缘原始位置点,通过寻找坡口边缘原始位置点中位于垂线段上的坡口边缘位置点,剔除非垂线段上的离群位置点,对保留的真实位置点进行坡口边缘的重构,实现在焊接干扰条件下,坡口边缘位置的精确检测。The method of the present invention intercepts the groove edge ROI window image through the position-adaptive groove edge ROI window, extracts the groove edge original position point on the opposite side of the arc through local image processing, and searches for the groove edge original position point Groove edge position points on the vertical line segment, outlier position points on the non-perpendicular line segment are eliminated, and the remaining real position points are reconstructed for the groove edge to achieve accurate detection of the groove edge position under welding interference conditions .

为达到上述目的,本发明采用如下技术方案予以实现。In order to achieve the above object, the present invention adopts the following technical solutions to achieve.

一种全局模式识别的窄间隙焊接坡口边缘视觉传感检测方法,基于的检测系统主要包括:红外摄像机8、滤光系统7、信号触发器9、图像传输数据线10及计算机图像处理系统11,其中所述信号触发器9与红外摄像机8相连接,所述滤光系统7同轴安装在所述红外摄像机 8的镜头上,所述计算机图像处理系统11通过所述图像传输数据线10与所述红外摄像机8 连接;通过红外摄像机8、滤光系统7和信号触发器9采集窄间隙焊接区域全局图像13;其特征是,所述检测方法具体包括以下步骤:A visual sensor detection method for narrow-gap welding groove edges based on global pattern recognition, based on a detection system that mainly includes: an infrared camera 8, a filter system 7, a signal trigger 9, an image transmission data line 10, and a computer image processing system 11 , wherein the signal trigger 9 is connected to the infrared camera 8, the filter system 7 is coaxially installed on the lens of the infrared camera 8, and the computer image processing system 11 communicates with the infrared camera 8 through the image transmission data line 10 The infrared camera 8 is connected; the overall image 13 of the narrow gap welding area is collected by the infrared camera 8, the filter system 7 and the signal trigger 9; it is characterized in that the detection method specifically includes the following steps:

1)确定坡口边缘ROI窗口原点的初始横向位置:计算机图像处理系统11通过全局图像处理,从所述全局图像13中提取电弧2最高点14位置,确定能截取电弧同侧坡口边缘的SROI窗口16的位置、或能同时截取坡口双边缘的BROI窗口17的位置;通过对SROI窗口 16截取的图像进行预设窗口图像处理、获取电弧同侧的初始坡口边缘位置,或通过对BROI 窗口17截取的图像进行预设窗口图像处理、获取电弧同侧和对侧的初始坡口边缘位置,以自适应确定电弧对侧坡口边缘ROI窗口12原点15的初始横向位置;1) Determine the initial lateral position of the origin of the ROI window on the edge of the groove: the computer image processing system 11 extracts the position of the highest point 14 of the arc 2 from the global image 13 through global image processing, and determines the SROI that can intercept the edge of the groove on the same side of the arc The position of the window 16, or the position of the BROI window 17 that can capture both edges of the groove at the same time; by performing preset window image processing on the image captured by the SROI window 16, to obtain the initial groove edge position on the same side of the arc, or by analyzing the BROI The image intercepted by the window 17 is processed by the preset window image, and the initial groove edge positions on the same side and the opposite side of the arc are obtained, so as to adaptively determine the initial lateral position of the origin 15 of the ROI window 12 on the opposite side of the arc;

2)获取坡口边缘原始位置点集合

Figure BDA0003734660950000031
根据电弧最高点位置和坡口边缘ROI窗口12原点 15的初始横向位置自适应确定坡口边缘ROI窗口12的位置后,通过该自适应定位方法确定的坡口边缘ROI窗口12,截取电弧2对侧的坡口左边缘4或坡口右边缘5的ROI窗口图像,并通过局部图像处理提取坡口左边缘4或坡口右边缘5,获取由h个数据组成的坡口边缘原始位置点集合
Figure BDA0003734660950000032
其中,i表示当前操作,h表示ROI窗口12的高度值;2) Obtain the set of original position points on the groove edge
Figure BDA0003734660950000031
After the position of the groove edge ROI window 12 is adaptively determined according to the position of the highest point of the arc and the initial lateral position of the origin 15 of the groove edge ROI window 12, the arc 2 pair is intercepted through the groove edge ROI window 12 determined by the adaptive positioning method The ROI window image of the left edge 4 of the groove or the right edge 5 of the groove on the side, and extract the left edge 4 or the right edge 5 of the groove through local image processing, and obtain the original position point set of the groove edge composed of h data
Figure BDA0003734660950000032
Wherein, i represents the current operation, and h represents the height value of the ROI window 12;

3)对获取的坡口边缘原始位置点集合

Figure BDA0003734660950000033
中的位置点进行一次数据滤波:沿坡口边缘ROI 窗口12的高度h方向上,依次计算坡口边缘原始位置点集合
Figure BDA0003734660950000034
中相邻两位置点的x坐标的差值,将差值为零的位置点分到同一个位置点子集合中;相应地,p(1≤p<h)个位置点子集合
Figure BDA0003734660950000035
被找到,从而形成包含p个位置点子集合的坡口边缘预处理位置点集合
Figure BDA0003734660950000036
相应地,形成p个垂线段,每一个垂线段含有相同的x坐标值,即横坐标值;3) Set the original position points of the obtained groove edge
Figure BDA0003734660950000033
Perform a data filtering on the position points in the groove edge: along the direction of the height h of the ROI window 12 on the edge of the groove, calculate the original position point set of the edge of the groove in sequence
Figure BDA0003734660950000034
The difference between the x-coordinates of two adjacent position points in , and the position points with a difference of zero are divided into the same position point subset; correspondingly, p(1≤p<h) position point subsets
Figure BDA0003734660950000035
is found, thus forming a groove edge preprocessing position point set containing p position point subsets
Figure BDA0003734660950000036
Correspondingly, p vertical line segments are formed, and each vertical line segment contains the same x-coordinate value, that is, the abscissa value;

4)对坡口边缘预处理位置点集合

Figure BDA0003734660950000037
中的位置点进行二次数据滤波:具体包括如下步骤:4) Preprocessing the position point set on the edge of the groove
Figure BDA0003734660950000037
Perform secondary data filtering on the position points in : specifically include the following steps:

①判断坡口边缘预处理位置点集合

Figure BDA0003734660950000038
中数据的分散度:针对步骤3)获取的坡口边缘预处理位置点集合
Figure BDA0003734660950000039
首先判断坡口边缘预处理位置点集合
Figure BDA00037346609500000310
中位置点的分散度;具体为:搜索坡口边缘预处理位置点集合
Figure BDA00037346609500000311
中所有位置点横坐标值
Figure BDA00037346609500000312
的最大值xk_max和最小值xk_min,计算极差Rk=xk_max-xk_min;判断极差Rk与数据分散度阈值Rt的大小,数据分散度阈值Rt=INT(h×4%),若满足Rk≤Rt,将坡口边缘预处理位置点集合
Figure BDA00037346609500000313
作为最终坡口边缘真实位置点集合
Figure BDA0003734660950000041
若Rk>Rt时,将坡口边缘原始位置点集合
Figure BDA0003734660950000042
中h个位置点横坐标值
Figure BDA0003734660950000043
的中值
Figure BDA0003734660950000044
并以
Figure BDA0003734660950000045
作为滤波阈值变量Mk,再结合方向滤波器,滤除离群数据后,获取坡口边缘保留位置点集合
Figure BDA0003734660950000046
① Judging the set of preprocessing position points on the edge of the groove
Figure BDA0003734660950000038
Dispersion of the data in: the set of preprocessing position points for the groove edge obtained in step 3)
Figure BDA0003734660950000039
Firstly, determine the set of preprocessing position points on the edge of the groove
Figure BDA00037346609500000310
Dispersion of mid-position points; specifically: search for the set of pre-processing position points on the edge of the groove
Figure BDA00037346609500000311
The abscissa values of all position points in
Figure BDA00037346609500000312
The maximum value x k_max and the minimum value x k_min , calculate the range R k =x k_max -x k_min ; judge the size of the range R k and the data dispersion threshold R t , the data dispersion threshold R t = INT(h×4 %), if satisfying R k ≤ R t , set the groove edge preprocessing position points
Figure BDA00037346609500000313
As the set of real position points of the final groove edge
Figure BDA0003734660950000041
If R k > R t , collect the original position points of the groove edge
Figure BDA0003734660950000042
The abscissa values of the h position points
Figure BDA0003734660950000043
median of
Figure BDA0003734660950000044
and
Figure BDA0003734660950000045
As the filtering threshold variable M k , combined with the direction filter, after filtering outlier data, obtain the set of reserved position points on the edge of the groove
Figure BDA0003734660950000046

②针对步骤①获取的坡口边缘保留位置点集合

Figure BDA0003734660950000047
判断位置点分散度:通过计算坡口边缘保留位置点集合
Figure BDA0003734660950000048
中每个位置点横坐标值
Figure BDA0003734660950000049
的极差Rk,如果满足Rk≤Rt,坡口边缘保留位置点集合
Figure BDA00037346609500000410
作为坡口边缘真实位置点集合
Figure BDA00037346609500000411
否则,计算坡口边缘保留位置点集合
Figure BDA00037346609500000412
中位置点横坐标值
Figure BDA00037346609500000413
的中值
Figure BDA00037346609500000414
并以
Figure BDA00037346609500000415
作为滤波阈值变量Mk。通过方向滤波器,获取过滤后的坡口边缘保留位置点集合
Figure BDA00037346609500000416
重复该过程,直至
Figure BDA00037346609500000417
中每个位置点横坐标值极差 Rk满足Rk≤Rt,形成坡口边缘真实位置点集合
Figure BDA00037346609500000418
②Reserve the set of position points for the edge of the groove obtained in step
Figure BDA0003734660950000047
Judging the degree of dispersion of position points: by calculating the edge of the groove to retain the set of position points
Figure BDA0003734660950000048
The abscissa value of each position point in
Figure BDA0003734660950000049
The range R k of , if R k ≤ R t is satisfied, the groove edge retains a set of position points
Figure BDA00037346609500000410
As a set of real position points on the edge of the groove
Figure BDA00037346609500000411
Otherwise, calculate the groove edge reserved position point set
Figure BDA00037346609500000412
The abscissa value of the middle position point
Figure BDA00037346609500000413
median of
Figure BDA00037346609500000414
and
Figure BDA00037346609500000415
As the filtering threshold variable M k . Through the direction filter, obtain the filtered groove edge reserved position point set
Figure BDA00037346609500000416
Repeat this process until
Figure BDA00037346609500000417
The extreme difference R k of the abscissa value of each position point in , satisfies R k ≤ R t , forming a set of real position points on the edge of the groove
Figure BDA00037346609500000418

5)重构坡口边缘线:针对步骤4)获取的坡口边缘真实位置点集合

Figure BDA00037346609500000419
统计保留的真实位置点的个数Ns;当Ns≤INT(h×10%)时,采用均值计算的方法重构包含h个坡口边缘位置点的坡口边缘重构位置点集合
Figure BDA00037346609500000420
否则,通过最小二乘线性拟合方法,重构包含h个坡口边缘位置点的坡口边缘重构位置点集合
Figure BDA00037346609500000421
其中,坡口边缘位置点的横坐标为
Figure BDA00037346609500000422
5) Reconstructing the groove edge line: for the set of real position points of the groove edge obtained in step 4)
Figure BDA00037346609500000419
The number N s of the real position points retained by statistics; when N s ≤ INT(h×10%), the method of mean value calculation is used to reconstruct the groove edge reconstruction position point set containing h groove edge position points
Figure BDA00037346609500000420
Otherwise, by the least squares linear fitting method, reconstruct the groove edge reconstruction position point set containing h groove edge position points
Figure BDA00037346609500000421
Among them, the abscissa of the groove edge position point is
Figure BDA00037346609500000422

6)获取坡口边缘位置检测值:针对步骤5)获取的包含h个坡口边缘位置点的坡口边缘重构位置点集合

Figure BDA00037346609500000423
通过计算h个坡口边缘位置点横坐标的均值或拟合值,获取坡口边缘位置采样值;针对坡口边缘位置采样值采用数字滤波方法,获取坡口边缘位置检测值;6) Obtain the detection value of groove edge position: for the groove edge reconstruction position point set containing h groove edge position points obtained in step 5)
Figure BDA00037346609500000423
Obtaining the sampling value of the groove edge position by calculating the mean value or fitting value of the abscissa of the h groove edge position points; adopting a digital filtering method for the groove edge position sampling value to obtain the groove edge position detection value;

7)重复上述所述步骤2)至步骤6),直至焊接过程结束。7) Repeat the above steps 2) to 6) until the welding process ends.

进一步优选,在所述步骤1)中,所述全局图像处理包括:先对全局图像13采用中值滤波,进行图像去噪;再采用直方图分析,计算全局图像13中处于不同灰度值的像素频数后,进行全局阈值将全局图像13二值化;最后,通过形态学运算,提取电弧轮廓后,通过灰度搜索,获取电弧最高点坐标值。所述预设窗口图像处理包括对截取的窗口图像进行中值滤波去噪,对比度拉伸提高图像对比度,对窗口图像采用Otsu阈值处理,再通过形态学运算剔除孤立点,然后采用Canny边缘算子提取预设窗口图像中的坡口边缘线;Further preferably, in the step 1), the global image processing includes: first adopting a median filter to the global image 13 to perform image denoising; After the pixel frequency is counted, global thresholding is performed to binarize the global image 13; finally, the arc contour is extracted through morphological operations, and the coordinate value of the highest point of the arc is obtained through grayscale search. The preset window image processing includes performing median filter denoising on the intercepted window image, contrast stretching to improve image contrast, using Otsu threshold processing on the window image, and then removing isolated points through morphological operations, and then using Canny edge operator Extract the groove edge line in the preset window image;

进一步优选,在所述步骤1)中,SROI窗口16和BROI窗口17的纵向位置是通过电弧最高点14的纵坐标值确定;SROI窗口16的横坐标位置是通过电弧最高点14的横坐标值和电弧最高点14的横坐标值到坡口边缘的设定距离获得。Further preferably, in said step 1), the longitudinal positions of the SROI window 16 and the BROI window 17 are determined by the ordinate value of the highest point 14 of the arc; and the set distance from the abscissa value of the arc highest point 14 to the groove edge.

进一步优选,在所述步骤2)中,所述坡口边缘ROI窗口12的自适应定位方法包括:Further preferably, in the step 2), the adaptive positioning method of the groove edge ROI window 12 includes:

①从最近连续N1帧所述全局图像13中,提取N1个电弧最高点14的纵坐标值,再通过数字滤波方法获取其N1个纵坐标值的滤波值F1,并以(F11)作为所述坡口边缘ROI窗口 12原点15的纵坐标值;其中,δ1为所述坡口边缘ROI窗口12原点15的纵坐标位置值的修正常数,其取值范围为[-h,h];① From the global image 13 of the latest N 1 consecutive frames, extract the ordinate values of N 1 arc highest points 14, and then obtain the filter value F 1 of the N 1 ordinate values by digital filtering method, and use (F 1 - δ1) as the ordinate value of the origin 15 of the groove edge ROI window 12; wherein, δ1 is a correction constant of the ordinate position value of the groove edge ROI window 12 origin 15, and its value range is [-h,h];

②从最近连续N2个与当前待检测坡口边缘同侧的前帧坡口边缘ROI窗口12图像中、提取N2个坡口左边缘4或坡口右边缘5的位置值,再通过数字滤波方法获取其N2个位置值的滤波值F2,并以(F22)作为所述坡口边缘ROI窗口12原点15的横坐标值;或针对当前全局图像13,通过所述能同时截取坡口双边缘的BROI窗口17提取坡口左边缘4和坡口右边缘5的当前位置值,再通过数字滤波方法获取最近N3个电弧对侧坡口边缘位置值的滤波值 F3,并以(F32)作为所述坡口边缘ROI窗口12原点15的横坐标值;其中,δ2为所述坡口边缘ROI窗口12原点15的横坐标位置值的修正常数,为所述坡口边缘ROI窗口12的半宽,即δ2=w/2,其中w为所述坡口边缘ROI窗口12的宽度。② Extract N 2 position values of the left edge 4 of the groove or the right edge 5 of the groove from the recent N 2 previous frame groove edge ROI window 12 images on the same side as the current groove edge to be detected, and then pass the digital The filter method obtains the filter value F 2 of its N 2 position values, and uses (F 22 ) as the abscissa value of the origin 15 of the groove edge ROI window 12; or for the current global image 13, through the The BROI window 17, which can simultaneously intercept the double edges of the groove, extracts the current position values of the left edge 4 of the groove and the right edge 5 of the groove, and then obtains the filter value F of the groove edge position values of the nearest N 3 opposite sides of the arc through a digital filtering method 3 , and take (F 32 ) as the abscissa value of the origin 15 of the groove edge ROI window 12; wherein, δ 2 is a correction constant for the abscissa position value of the groove edge ROI window 12 origin 15 , is the half-width of the groove edge ROI window 12 , that is, δ 2 =w/2, where w is the width of the groove edge ROI window 12 .

进一步优选,在所述步骤2)中:所述局部图像处理,包括对坡口边缘ROI窗口图像进行中值滤波去噪,再进行对比度拉伸提高坡口边缘ROI窗口图像对比度,然后进行分区阈值,获取二值化图像,采用形态学运算进一步去噪后,提取坡口边缘ROI窗口图像的边缘线。Further preferably, in the step 2): the local image processing includes performing median filtering and denoising on the groove edge ROI window image, then performing contrast stretching to improve the contrast of the groove edge ROI window image, and then performing partition threshold , obtain the binarized image, use morphological operations to further denoise, and extract the edge line of the groove edge ROI window image.

其中所述对比度拉伸选用分段线性变化函数,所述形态学运算选用闭运算,所述边缘提取选用Canny算子,所述分区阈值是将坡口边缘ROI窗口图像平均分成4等份后,分别对每一分区的图像采用大津法阈值。Wherein the contrast stretching selects the piecewise linear change function, the morphological operation selects the closed operation, the edge extraction selects the Canny operator, and the partition threshold is after the groove edge ROI window image is divided into 4 equal parts on average, Otsu method thresholding is applied to the image of each partition separately.

进一步优选,在所述步骤4)中:所述方向滤波器表述为:当所述坡口边缘位置点位于左边缘上时,方向滤波器为低通滤波器,表达为xk≤Mk,即保留位置点横坐标值小于等于滤波阈值变量Mk的位置点;当所述坡口边缘位置点位于右边缘上时,方向滤波器为高通滤波器,表达为xk≥Mk,即保留位置点的横坐标值大于等于滤波阈值变量Mk的位置点;xk表示循环数据变量,其值等于坡口边缘预处理位置点集合

Figure BDA0003734660950000051
或坡口边缘保留位置点集合
Figure BDA0003734660950000052
中的位置点横坐标值。Further preferably, in the step 4): the direction filter is expressed as: when the groove edge position point is located on the left edge, the direction filter is a low-pass filter, expressed as x k ≤ M k , That is, retain the position point whose abscissa value is less than or equal to the filter threshold variable M k ; when the groove edge position point is located on the right edge, the direction filter is a high-pass filter, expressed as x k ≥ M k , that is, retain The abscissa value of the position point is greater than or equal to the position point of the filter threshold variable M k ; x k represents the circular data variable, and its value is equal to the preprocessing position point set of the edge of the groove
Figure BDA0003734660950000051
or bevel edge retaining location point set
Figure BDA0003734660950000052
The abscissa value of the location point in .

进一步优选,在所述步骤6)中,所述数字滤波方法为限幅抗脉冲均值滤波,具体包括如下步骤:Further preferably, in the step 6), the digital filtering method is limiting and anti-pulse average filtering, which specifically includes the following steps:

①确定滤波窗口包含数据个数Nf:该滤波窗口包含本次坡口边缘位置采样值Gs在内的、最近连续Nf个坡口边缘位置采样值,所述滤波窗口包含数据个数Nf>2;① Determine the number of data Nf included in the filtering window: the filtering window includes the latest N f sampling values of the edge position of the groove including the sampling value G s of the edge position of the groove this time, and the filtering window includes the number of data N f >2;

②计算本次采样偏差η1:计算本次滤波窗口内Nf个坡口边缘位置采样值的均值Es,并计算本次坡口边缘位置采样值Gs与均值Es的差的绝对值,作为本次采样偏差η1② Calculate the current sampling deviation η 1 : Calculate the average value E s of the sampling values of the N f groove edge positions within the current filtering window, and calculate the absolute value of the difference between the current groove edge position sampling values G s and the average value E s , as this sampling deviation η 1 ;

③计算本次采样偏离度de:计算本次采样偏差η1与前次采样偏差η0的比值,并将该比值作为本次采样偏离度de③Calculate this sampling deviation degree d e : calculate the ratio of this sampling deviation η 1 to the previous sampling deviation η 0 , and use this ratio as this sampling deviation degree d e ;

④修复异常采样值:当本次采样偏离度de大于异常修复阈值dth时,则将前次坡口边缘位置检测值作为本次坡口边缘位置采样值Gs,实现对本次异常采样值的修复,所述异常修复阈值dth=3~10;④ Repair abnormal sampling value: when the sampling deviation d e is greater than the abnormal repair threshold d th , the previous detection value of the edge position of the groove is used as the sampling value G s of the edge position of the groove this time to realize the abnormal sampling of this time Value repair, the abnormal repair threshold d th =3~10;

⑤计算本次坡口边缘位置检测值Gd:在Nf个坡口边缘位置采样值中去除最大值和最小值后,对剩余的(Nf-2)个坡口边缘位置采样值求均值,并以此均值作为本次坡口边缘位置检测值Gd⑤Calculate the detection value G d of the groove edge position this time: after removing the maximum value and the minimum value from the N f groove edge position sampling values, calculate the mean value for the remaining (N f -2) groove edge position sampling values , and use this mean value as the groove edge position detection value G d this time.

本发明的一种全局模式识别的窄间隙焊接坡口边缘视觉传感检测方法应用于焊接坡口宽度、坡口中心位置的检测和焊接过程的实时跟踪控制;应用的方法是,基于检测到的焊接坡口左边缘4和坡口右边缘5,通过计算两边缘对应位置的均值,获取焊接坡口中心位置值;通过计算两边缘对应位置的差值,获取焊接坡口宽度值。A kind of global pattern recognition of the present invention narrow gap welding groove edge visual sensing detection method is applied to the detection of welding groove width, groove center position and real-time tracking control of welding process; the applied method is, based on the detected For the left edge 4 of the welding groove and the right edge 5 of the groove, the center position value of the welding groove is obtained by calculating the mean value of the corresponding positions of the two edges; the width value of the welding groove is obtained by calculating the difference between the corresponding positions of the two edges.

与现有技术相比,本发明的优点和有益效果主要是:Compared with prior art, advantage and beneficial effect of the present invention mainly are:

1)通过全局模式识别的窄间隙焊接坡口边缘视觉传感检测方法,对坡口边缘原始位置点进行离群数据过滤,能去除约2.4mm以下的模拟焊接飞溅,提高了坡口边缘检测精度和所提方法对焊接环境的适应性;1) Through the visual sensor detection method of the narrow gap welding groove edge by global pattern recognition, the outlier data is filtered on the original position point of the groove edge, which can remove the simulated welding spatter below about 2.4mm, and improve the detection accuracy of the groove edge and the adaptability of the proposed method to the welding environment;

2)通过自适应定位的坡口边缘ROI窗口,根据电弧最高点纵坐标值和同侧前帧坡口边缘位置值的数字滤波结果,自适应获取坡口边缘ROI窗口原点位置的纵坐标值和横坐标值,减少了焊接飞溅干扰和电弧稳定性对坡口边缘ROI窗口定位准确性的影响;通过焊接试验表明,相邻两帧焊接图像的电弧最高点最大位置差由滤波前的~4mm,稳定至1mm以内;提高了ROI窗口定位的有效性。2) Through the adaptively positioned groove edge ROI window, according to the ordinate value of the arc highest point and the digital filtering result of the groove edge position value in the previous frame on the same side, adaptively obtain the ordinate value and the origin position of the groove edge ROI window The abscissa value reduces the impact of welding spatter interference and arc stability on the positioning accuracy of the ROI window at the edge of the groove; through welding tests, it is shown that the maximum position difference of the arc highest point between two adjacent frames of welding images is reduced from ~4mm before filtering, Stable to within 1mm; improves the effectiveness of ROI window positioning.

3)通过坡口边缘图像位置自修正方法,使坡口边缘ROI窗口图像中的背景占比保持在~50%,提高了坡口边缘图像的可分性和坡口边缘的提取精度;3) Through the self-correction method of the groove edge image position, the background ratio in the groove edge ROI window image is kept at ~50%, which improves the separation of the groove edge image and the extraction accuracy of the groove edge;

4)通过坡口边缘ROI窗口图像的四等份分区阈值方法,在焊接烟尘和弧光影响下,降低了坡口边缘位置点的离散度,坡口边缘提取精度提高了~68%。4) Through the quarter-part partition threshold method of the ROI window image on the edge of the groove, under the influence of welding fume and arc light, the dispersion of the edge position points of the groove is reduced, and the extraction accuracy of the edge of the groove is increased by ~68%.

附图说明Description of drawings

图1为窄间隙坡口边缘的被动视觉传感检测系统框图;Figure 1 is a block diagram of a passive visual sensing detection system for narrow gap groove edges;

图2为利用图1所示的检测系统采集的焊接区域全局图像示意图;图2(a)为电弧位于坡口右边缘的全局图像示意图;图2(b)为电弧位于坡口左边缘的全局图像示意图。Fig. 2 is a schematic diagram of the global image of the welding area collected by the detection system shown in Fig. 1; Fig. 2(a) is a schematic diagram of the global image with the arc at the right edge of the groove; Fig. 2(b) is a global image with the arc at the left edge of the groove Image schematic.

图3为窄间隙焊接区域全局图像中的SROI和BROI窗口示意图;Figure 3 is a schematic diagram of the SROI and BROI windows in the global image of the narrow gap welding area;

图4为窄间隙焊接图像处理流程图;Fig. 4 is a flow chart of narrow gap welding image processing;

图5为窄间隙焊接被动视觉传感检测的坡口边缘全局模式识别算法原理图;图5(a)为一次数据过滤,图5(b)为二次数据过滤;Fig. 5 is a schematic diagram of the global pattern recognition algorithm of the groove edge for passive visual sensor detection of narrow gap welding; Fig. 5(a) is the primary data filtering, and Fig. 5(b) is the secondary data filtering;

图6为脉冲焊接时窄间隙焊接图像处理实施例。图6(a)和(b)为焊接区域全局图像,图6(c)和(d)为提取电弧区域图像,图6(e)和(f)为坡口右、左边缘ROI窗口,图6 (g)和(h)为坡口右、左边缘ROI窗口图像及图像处理结果,图6(j)和(j)为提取的坡口右、左边缘;Fig. 6 is an example of image processing for narrow gap welding during pulse welding. Figure 6(a) and (b) are the global images of the welding area, Figure 6(c) and (d) are the images of the extracted arc area, Figure 6(e) and (f) are the right and left edge ROI windows of the bevel, Fig. 6 (g) and (h) are the ROI window images and image processing results of the right and left edges of the groove, and Figure 6 (j) and (j) are the extracted right and left edges of the groove;

图7为脉冲焊接时针对坡口右边缘原始数据分布的全局模式识别算法实施例。7(a)坡口边缘原始位置点,7(b)搜索坡口边缘原始位置点中的离群位置点,7(c)坡口边缘预处理位置点,7(d)坡口边缘真实位置点,7(e)重构的坡口边缘线;Fig. 7 is an embodiment of the global pattern recognition algorithm for the distribution of raw data on the right edge of the groove during pulse welding. 7(a) The original position point of the groove edge, 7(b) Search the outlier position point in the original position point of the groove edge, 7(c) The preprocessing position point of the groove edge, 7(d) The real position of the groove edge Point, 7(e) reconstructed groove edge line;

图8为直流焊接时窄间隙焊接图像处理实施例;图8(a)和(b)为焊接区域全局图像,图8(c)和(d)为提取的电弧区域图像,图8(e)和(f)为坡口右、左边缘ROI窗口,图 8(g)和(h)为坡口右、左边缘ROI窗口图像及图像处理结果,图8(j)和(j)为提取的坡口右、左边缘;Fig. 8 is an embodiment of narrow gap welding image processing during DC welding; Fig. 8 (a) and (b) are the global images of the welding area, Fig. 8 (c) and (d) are the extracted arc area images, and Fig. 8 (e) and (f) are the right and left edge ROI windows of the groove, Figure 8(g) and (h) are the images and image processing results of the right and left edge ROI windows of the groove, and Figure 8(j) and (j) are the extracted Groove right and left edges;

图9为直流焊接时针对坡口右边缘原始数据分布的全局模式识别算法实施例;9(a)坡口边缘原始位置点,9(b)搜索坡口边缘原始位置点中的离群位置点,9(c)坡口边缘一次保留位置点,9(e)坡口边缘二次保留位置点,9(e)坡口边缘真实位置点,9(f)重构的坡口边缘线;Fig. 9 is the embodiment of the global pattern recognition algorithm for the original data distribution of the right edge of the groove during DC welding; 9 (a) the original position point of the groove edge, and 9 (b) search for the outlier position point in the original position point of the groove edge , 9(c) primary reserved position point of groove edge, 9(e) secondary reserved position point of groove edge, 9(e) real position point of groove edge, 9(f) reconstructed groove edge line;

图1、图2和图3中:1a—焊接坡口左侧墙;1b—焊接坡口右侧墙;2—电弧;3a—送丝机;3b—电弧运动驱动器;3c—导电杆机构;3d—焊丝;4—坡口左边缘;5—坡口右边缘;6—焊接坡口;7—滤光系统;8—红外摄像机;9—信号触发器;10—图像传输数据线;11—计算机图像处理系统;12—坡口边缘ROI窗口;13—焊接区域全局图像;14—电弧最高点;15—坡口边缘ROI窗口12的原点;16—SROI窗口;17—BROI窗口;Vw—焊接速度;θ—红外摄像机8的拍摄角度;Parc—摇动电弧位置信号;ib—基值电流信号;Oi-1—前一帧焊接区域全局图像的原点,也是直角坐标系xi-1-Oi-1-yi-1的原点;Oi—当前帧焊接区域全局图像的原点,也是直角坐标系xi-Oi-yi的原点;

Figure BDA0003734660950000071
为本次的坡口边缘ROI窗口12的原点;h—ROI窗口12 的高度;
Figure BDA0003734660950000081
Figure BDA0003734660950000082
—坡口左、右边缘位置点。In Figure 1, Figure 2 and Figure 3: 1a—left wall of welding groove; 1b—right wall of welding groove; 2—electric arc; 3a—wire feeder; 3b—arc motion driver; 3c—conductive rod mechanism; 3d—welding wire; 4—left edge of groove; 5—right edge of groove; 6—welding groove; 7—filter system; 8—infrared camera; 9—signal trigger; 10—image transmission data line; 11— Computer image processing system; 12—ROI window on groove edge; 13—global image of welding area; 14—highest point of arc; 15—origin of ROI window 12 on groove edge; 16—SROI window; 17—BROI window; V w — Welding speed; θ—shooting angle of infrared camera 8; P arc —shaking arc position signal; i b —base value current signal; O i-1 —origin of the global image of the welding area in the previous frame, which is also the rectangular coordinate system x i- The origin of 1 -O i-1 -y i-1 ; O i —the origin of the global image of the welding area in the current frame is also the origin of the Cartesian coordinate system x i -O i -y i ;
Figure BDA0003734660950000071
Be the origin of the groove edge ROI window 12 this time; h—the height of the ROI window 12;
Figure BDA0003734660950000081
and
Figure BDA0003734660950000082
—The position points of the left and right edges of the groove.

图2中的图2(a)对应于前次(第i-1次)采样,表示电弧位于右侧时的情形;图2(b)对应于本次(第i次)采样,表示电弧位于左侧时的情形。图中,黑色回形封闭实线表示焊接图像轮廓,包括坡口左右侧壁和熔池前后端边缘。Figure 2(a) in Figure 2 corresponds to the previous (i-1th) sampling, indicating the situation when the arc is on the right; Figure 2(b) corresponds to the current (i-th) sampling, indicating that the arc is at situation on the left. In the figure, the black back-shaped closed solid line represents the outline of the welding image, including the left and right side walls of the groove and the front and rear edges of the molten pool.

具体实施方式Detailed ways

下面结合附图和具体实施方式,对本发明的技术方案作进一步详细说明,但本发明保护范围不限于下述实施例,凡采用等同替换或等效变换形式获得的技术方案,均在本发明保护范围之内。Below in conjunction with accompanying drawing and specific embodiment, the technical scheme of the present invention is described in further detail, but the scope of protection of the present invention is not limited to the following examples, all technical schemes obtained in the form of equivalent replacement or equivalent transformation are protected by the present invention within range.

如图1所示,为本发明的全局模式识别的窄间隙焊接坡口边缘视觉传感检测方法使用的窄间隙坡口边缘的被动视觉传感检测系统框图,其主要包括:窄间隙摇动/旋转电弧焊炬、视觉传感系统及计算机图像处理系统11。其中,窄间隙摇动/旋转电弧焊炬包括电弧运动驱动器 3b和导电杆机构3c,其电弧运动驱动器3b包括驱动机构和焊炬控制器,其导电杆机构3c为由折弯导电杆和与之相接的直型导电嘴构成的折弯导电杆机构、或为由直型导电杆和与之相接的偏心导电嘴构成的偏心导电杆机构;焊丝3d经过送丝机3a,穿过电弧运动驱动器3b后,从导电杆机构3c中斜向伸出,在焊接坡口6中产生焊接电弧2,并围绕焊炬中心线作周期性圆弧形摇动或单向旋转。当电弧摇动或旋转至坡口左侧壁或坡口右侧壁最近位置时,焊炬控制器发出电弧位置信号Parc;脉冲焊接时,当电弧摇动至坡口左侧壁或坡口右侧壁最近位置处停留时,焊炬控制器通过电流传感器实时检测电弧电流,产生电弧基值电流信号ibAs shown in Figure 1, it is a block diagram of a passive visual sensing detection system for narrow gap groove edges used in the narrow gap welding groove edge visual sensing detection method for global pattern recognition of the present invention, which mainly includes: narrow gap shaking/rotation Arc welding torch, vision sensing system and computer image processing system 11. Among them, the narrow gap shaking/rotating arc welding torch includes an arc motion driver 3b and a conductive rod mechanism 3c, the arc motion driver 3b includes a driving mechanism and a welding torch controller, and its conductive rod mechanism 3c is composed of a bent conductive rod and a corresponding The bending conductive rod mechanism composed of a straight conductive tip connected to it, or the eccentric conductive rod mechanism composed of a straight conductive rod and an eccentric conductive tip connected to it; the welding wire 3d passes through the wire feeder 3a and passes through the arc motion driver After 3b, it protrudes obliquely from the conductive rod mechanism 3c, generates a welding arc 2 in the welding groove 6, and performs periodic circular arc shaking or unidirectional rotation around the center line of the welding torch. When the arc shakes or rotates to the nearest position on the left side wall of the groove or the right side wall of the groove, the torch controller sends out the arc position signal P arc ; When staying at the nearest position of the wall, the welding torch controller detects the arc current in real time through the current sensor, and generates the arc base value current signal i b .

视觉传感系统包括滤光系统7和红外摄像机8、信号触发器9、图像传输数据线10。其中,滤光系统7包括中心波长范围为800~1100nm窄带滤光镜、中性减光镜、UV镜;红外摄像机8与滤光系统7同轴安装,从焊接熔池前方以俯角θ(20~60°)对准焊接熔池,与焊炬保持固定距离,并以焊接速度Vw向前移动,红外摄像机8的焦距范围为18~45mm、光圈范围为f/5.6~36;信号触发器9接收到电弧位置信号Parc或还同时接收到电弧基值电流信号ib后,通过外触发方式触发红外摄像机8,开始采集焊接区域全局图像13,并通过与红外摄像机8相连的图像传输数据线10送入计算机图像处理系统11中,用于后续焊接坡口左边缘4和坡口右边缘5的检测。The visual sensing system includes a filter system 7 , an infrared camera 8 , a signal trigger 9 , and an image transmission data line 10 . Wherein, the filter system 7 includes a central wavelength range of 800 to 1100nm narrow-band filter, a neutral light-reducing mirror, and a UV mirror; ~60°) aim at the welding pool, keep a fixed distance from the welding torch, and move forward at the welding speed V w , the focal length range of the infrared camera 8 is 18-45mm, and the aperture range is f/5.6-36; the signal trigger 9 After receiving the arc position signal P arc or the arc base value current signal i b at the same time, trigger the infrared camera 8 through an external trigger method, start to collect the global image 13 of the welding area, and transmit data through the image connected to the infrared camera 8 The wire 10 is sent into the computer image processing system 11 for subsequent detection of the left edge 4 of the welding groove and the right edge 5 of the groove.

本发明的全局模式识别的窄间隙焊接坡口边缘视觉传感检测方法,其总体方案是:计算机图像处理系统11以外触发方式获取焊接区域全局图像13,通过全局图像处理获取电弧最高点14位置,如图2所示;通过与电弧位置和坡口边缘位置相适应的坡口边缘ROI窗口12,截取电弧2对侧的坡口边缘ROI窗口图像,在对坡口边缘ROI窗口图像处理后,提取坡口左边缘或坡口右边缘线,形成与坡口边缘ROI窗口高度相对应的坡口边缘原始位置点;针对获取的坡口边缘原始位置点,基于整体模式识别,提出了一种离群数据过滤算法,通过计算相邻位置点横坐标的差值和方向滤波器,剔除受焊接干扰的离群位置点,对保留的真实位置点通过线性拟合或计算均值的方法重构坡口边缘线,实现在焊接干扰条件下,坡口边缘位置的精确检测。其具体步骤包括:The general scheme of the narrow gap welding groove edge visual sensor detection method for global pattern recognition of the present invention is: the computer image processing system 11 is not triggered to obtain the global image 13 of the welding area, and the position of the highest arc point 14 is obtained by global image processing, As shown in Figure 2; through the groove edge ROI window 12 adapted to the arc position and the groove edge position, the groove edge ROI window image on the opposite side of the arc 2 is intercepted, and after the groove edge ROI window image is processed, the extracted The left edge of the groove or the right edge line of the groove form the original position point of the groove edge corresponding to the height of the ROI window of the groove edge; for the obtained original position point of the groove edge, based on the overall pattern recognition, an outlier Data filtering algorithm, by calculating the difference of the abscissa of adjacent position points and the direction filter, eliminating the outlier position points disturbed by welding, and reconstructing the edge of the groove by linear fitting or calculating the mean value of the retained real position points Line, to achieve accurate detection of the edge position of the groove under the condition of welding interference. Its specific steps include:

步骤1):确定坡口边缘ROI窗口的自适应定位,参见图2、图3和图4,具体包括如下步骤:Step 1): Determine the adaptive positioning of the groove edge ROI window, see Fig. 2, Fig. 3 and Fig. 4, specifically include the following steps:

①计算机图像处理系统11采集全局图像13,如图2所示;依次通过中值滤波、直方图分析、全局阈值和形态学运算,对全局图像13进行全局图像处理,如图4所示;从全局图像13中提取电弧2区域图像,对获取的电弧2区域图像进行灰度搜索,寻找出电弧最高点14的横坐标值和纵坐标值;①The computer image processing system 11 collects the global image 13, as shown in Figure 2; sequentially through median filtering, histogram analysis, global threshold and morphological operations, the global image 13 is processed globally, as shown in Figure 4; Extract the arc 2 area image from the global image 13, perform a grayscale search on the acquired arc 2 area image, and find out the abscissa value and ordinate value of the highest point 14 of the arc;

②通过电弧最高点14的纵坐标值,以及电弧最高点14的横坐标值到电弧同侧坡口边缘距离,在全局图像13中确定能截取电弧同侧坡口边缘的SROI窗口16的位置,或还根据全局图像13的宽度,确定能同时截取坡口双边缘的BROI窗口17的位置,如图3所示;② Through the ordinate value of the highest point 14 of the arc, and the distance from the abscissa value of the highest point 14 of the arc to the groove edge on the same side of the arc, determine the position of the SROI window 16 that can intercept the groove edge on the same side of the arc in the global image 13, Or also according to the width of the global image 13, determine the position of the BROI window 17 that can intercept the double edge of the groove simultaneously, as shown in Figure 3;

③针对SROI窗口16和BROI窗口17截取的预设窗口图像,分别依次进行窗口图像的中值滤波、对比度拉伸、全局阈值、形态学运算和Canny边缘提取,如图4所示,获取电弧 2同侧的初始坡口边缘位置,或获取电弧同侧和对侧的坡口边缘位置,以自适应确定电弧对侧坡口边缘ROI窗口12原点15的初始横向位置。③ For the preset window images intercepted by SROI window 16 and BROI window 17, the median filter, contrast stretching, global threshold, morphological operation and Canny edge extraction of the window images are respectively performed in sequence, as shown in Figure 4, to obtain the arc 2 The initial groove edge position on the same side, or obtain the groove edge positions on the same side and the opposite side of the arc, so as to adaptively determine the initial lateral position of the origin 15 of the ROI window 12 on the opposite side of the arc.

其中以自适应确定电弧对侧坡口边缘ROI窗口12原点15的初始横向位置的具体方法步骤是:Wherein the specific method steps of determining the initial lateral position of the origin 15 of the ROI window 12 of the groove edge on the opposite side of the arc adaptively are:

①通过从最近连续N1帧所述全局图像13中,提取N1个电弧最高点14的纵坐标值,再通过数字滤波方法获取其N1个纵坐标值的滤波值F1,并以(F11)作为所述坡口边缘ROI 窗口12原点15的纵坐标值;其中,δ1为所述坡口边缘ROI窗口12原点15的纵坐标位置值的修正常数,优选δ1为所述ROI窗口12高度的一半,即为所述坡口边缘ROI窗口12半高,此时δ1=h/2,h为所述坡口边缘ROI窗口12的高度;① By extracting the ordinate values of N 1 arc highest points 14 from the global image 13 of the latest continuous N 1 frames, and then obtaining the filter value F 1 of the N 1 ordinate values by digital filtering method, and using ( F 11 ) as the ordinate value of the origin 15 of the groove edge ROI window 12; wherein, δ 1 is a correction constant for the ordinate position value of the groove edge ROI window 12 origin 15, preferably δ 1 is Half of the height of the ROI window 12 is the half height of the groove edge ROI window 12, at this time δ 1 =h/2, where h is the height of the groove edge ROI window 12;

②从最近连续N2个与当前待检测坡口边缘同侧的前帧坡口边缘ROI窗口12图像中、提取N2个坡口左边缘4或坡口右边缘5的位置值,再通过数字滤波方法获取其N2个位置值的滤波值F2,并以(F22)作为所述坡口边缘ROI窗口12原点15的横坐标值;或针对当前全局图像13,通过所述能同时截取坡口双边缘的BROI窗口17提取坡口左边缘4和坡口右边缘5的当前位置值,再通过数字滤波方法获取最近N3个电弧对侧坡口边缘位置值的滤波值 F3,并以(F32)作为所述坡口边缘ROI窗口12原点15的横坐标值;其中,δ2为所述坡口边缘ROI窗口12原点15的横坐标位置值的修正常数,优选为所述坡口边缘ROI窗口12宽度的一半,即为所述坡口边缘ROI窗口12半宽,此时δ2=w/2,w为所述坡口边缘ROI窗口 12的宽度;坡口边缘ROI窗口12的高度h=80像素、宽度w=80像素。② Extract N 2 position values of the left edge 4 of the groove or the right edge 5 of the groove from the recent N 2 previous frame groove edge ROI window 12 images on the same side as the current groove edge to be detected, and then pass the digital The filter method obtains the filter value F 2 of its N 2 position values, and uses (F 22 ) as the abscissa value of the origin 15 of the groove edge ROI window 12; or for the current global image 13, through the The BROI window 17, which can simultaneously intercept the double edges of the groove, extracts the current position values of the left edge 4 of the groove and the right edge 5 of the groove, and then obtains the filter value F of the groove edge position values of the nearest N 3 opposite sides of the arc through a digital filtering method 3 , and take (F 32 ) as the abscissa value of the origin 15 of the groove edge ROI window 12; wherein, δ 2 is a correction constant for the abscissa position value of the groove edge ROI window 12 origin 15 , preferably half of the width of the groove edge ROI window 12, that is, the half width of the groove edge ROI window 12, at this time δ 2 =w/2, w is the width of the groove edge ROI window 12; The height of the groove edge ROI window 12 is h=80 pixels, and the width w=80 pixels.

步骤2):获取坡口边缘原始位置点集合,其分布参见图5;根据电弧最高点位置和同侧坡口边缘位置自适应确定坡口边缘ROI窗口12的位置后,通过该坡口边缘ROI窗口12截取电弧2对侧的坡口左边缘4或坡口右边缘5的坡口边缘ROI窗口图像,通过对坡口边缘ROI窗口图像进行局部图像处理,依次包括中值滤波、对比度拉伸、等份分区阈值、形态学运算和边缘提取,如图4所示,在所述坡口边缘ROI窗口12的高度h方向上,提取坡口左边缘4 或坡口右边缘5,获取由h个数据组成的坡口边缘原始位置点集合

Figure BDA0003734660950000101
其中,所述对比度拉伸优选采用分段线性变化函数、所述等份分区阈值优选采用4等份分区的大津法阈值算法、所述形态学运算优选闭运算、所述边缘提取优选采用Canny算子。Step 2): Obtain the original position point set of the groove edge, and its distribution is shown in Figure 5; after the position of the groove edge ROI window 12 is determined adaptively according to the position of the highest point of the arc and the position of the groove edge on the same side, pass through the groove edge ROI The window 12 intercepts the groove edge ROI window image of the groove left edge 4 or the groove right edge 5 on the opposite side of the arc 2, and performs local image processing on the groove edge ROI window image, including median filtering, contrast stretching, Equal partition threshold, morphological operation and edge extraction, as shown in Figure 4, on the height h direction of the ROI window 12 of the groove edge, extract the groove left edge 4 or the groove right edge 5, and obtain h A collection of original position points on the edge of the groove composed of data
Figure BDA0003734660950000101
Wherein, the contrast stretching preferably adopts a piecewise linear change function, the equal partition threshold preferably adopts the Otsu method threshold algorithm of four equal partitions, the morphological operation preferably uses a closed operation, and the edge extraction preferably adopts a Canny algorithm. son.

步骤3):一次数据过滤,参见图5;在所述坡口边缘ROI窗口12的高度h方向上,针对获取的坡口边缘原始位置点集合

Figure BDA0003734660950000102
依次对两相邻的位置点x坐标值做求差运算,并将其差值为零的两个及以上相邻位置点归入同一个垂直分布子集合,形成包含p(1≤p<h)个垂直分布子集合的坡口边缘预处理位置点集合
Figure BDA0003734660950000103
并从坡口边缘原始位置点集合
Figure BDA0003734660950000104
中搜索与p个子集合中横坐标相同的坡口边缘位置点原位保留;最后将剩余的不属于任何一个子集合的位置点滤除。其中,子集合
Figure BDA0003734660950000105
Figure BDA0003734660950000106
中的任一边缘位置点分别表示为
Figure BDA0003734660950000107
Figure BDA0003734660950000108
Figure BDA0003734660950000109
δ、ξ和ψ为坡口边缘位置点在坡口边缘原始位置点集合
Figure BDA00037346609500001010
中的y向位置序号。Step 3): a data filtering, see Fig. 5; in the height h direction of the groove edge ROI window 12, for the obtained groove edge original position point set
Figure BDA0003734660950000102
Perform a difference operation on the x-coordinate values of two adjacent position points in turn, and classify two or more adjacent position points whose difference is zero into the same vertical distribution subset to form a set containing p(1≤p<h ) Groove edge preprocessing position point set of vertically distributed subsets
Figure BDA0003734660950000103
And from the original position point collection on the edge of the groove
Figure BDA0003734660950000104
Search for the groove edge position points with the same abscissa coordinates in the p subsets and keep them in situ; finally filter out the remaining position points that do not belong to any subset. Among them, the sub-collection
Figure BDA0003734660950000105
and
Figure BDA0003734660950000106
Any edge position point in is expressed as
Figure BDA0003734660950000107
Figure BDA0003734660950000108
and
Figure BDA0003734660950000109
δ, ξ and ψ are the set of groove edge position points at the original position points of the groove edge
Figure BDA00037346609500001010
The y-direction position number in .

步骤4):二次数据过滤,参见图5;经k次循环滤波后获取坡口边缘保留位置点集合为

Figure BDA00037346609500001011
表示循环过滤后剩余的子集合数。针对上述一次数据过滤获取的坡口边缘预处理位置点集合
Figure BDA00037346609500001012
相应地,通过寻找坡口边缘预处理位置点集合
Figure BDA00037346609500001013
或坡口边缘保留位置点集合
Figure BDA00037346609500001014
中的横坐标值xk的最大值xk_max和最小值xk_min,计算极差Rk=(xk_max- xk_min)。当Rk≤Rt时,表明集合中位置点的分散度较小,则将坡口边缘预处理位置点集合
Figure BDA00037346609500001015
或坡口边缘保留位置点集合
Figure BDA00037346609500001016
直接作为坡口边缘真实位置点集合
Figure BDA00037346609500001017
否则,通过对坡口边缘预处理位置点集合
Figure BDA0003734660950000111
或坡口边缘保留位置点集合
Figure BDA0003734660950000112
进行重复迭代过滤处理,直至满足条件 Rk≤Rt时,将坡口边缘保留位置点集合
Figure BDA0003734660950000113
作为坡口边缘真实位置点集合
Figure BDA0003734660950000114
最后,对坡口边缘真实位置点集合
Figure BDA0003734660950000115
中的数据进行线性拟合或计算均值的方法,形成包含h个拟合数据或均值数据的坡口边缘重构位置点集合
Figure BDA0003734660950000116
试验中,数据分散度阈值Rt取值为INT(h×4%)。Step 4): Secondary data filtering, see Figure 5; after k times of cyclic filtering, the set of retained position points on the edge of the groove is obtained as
Figure BDA00037346609500001011
Indicates the number of subsets remaining after loop filtering. A collection of groove edge preprocessing position points obtained for the above-mentioned data filtering
Figure BDA00037346609500001012
Correspondingly, by finding the groove edge preprocessing position point set
Figure BDA00037346609500001013
or bevel edge retaining location point set
Figure BDA00037346609500001014
The maximum value x k_max and the minimum value x k_min of the abscissa value x k in the calculation range R k =(x k_max - x k_min ). When R k ≤ R t , it indicates that the dispersion degree of the position points in the set is small, then the groove edge preprocesses the position point set
Figure BDA00037346609500001015
or bevel edge retaining location point set
Figure BDA00037346609500001016
directly as the set of real position points on the groove edge
Figure BDA00037346609500001017
Otherwise, by preprocessing the location point set on the groove edge
Figure BDA0003734660950000111
or bevel edge retaining location point set
Figure BDA0003734660950000112
Perform repeated iterative filtering until the condition R k ≤ R t is satisfied, and the edge of the groove is retained as a set of position points
Figure BDA0003734660950000113
As a set of real position points on the edge of the groove
Figure BDA0003734660950000114
Finally, the set of real position points on the groove edge
Figure BDA0003734660950000115
The method of performing linear fitting or calculating the mean value of the data in , forming a set of reconstructed position points on the edge of the groove containing h fitting data or mean value data
Figure BDA0003734660950000116
In the experiment, the value of data dispersion threshold R t is INT(h×4%).

具体来说,当循环过滤次数k=1时,以坡口边缘预处理位置点集合

Figure BDA0003734660950000117
中任一位置点的横坐标
Figure BDA0003734660950000118
作为数据集合Xk中的任一循环数据变量xk,其中v(1≤v≤h)表示坡口边缘预处理位置点集合
Figure BDA0003734660950000119
中的数据在坡口边缘原始位置点集合
Figure BDA00037346609500001110
中的y向位置序号;计算坡口边缘原始位置点集合
Figure BDA00037346609500001111
中h个位置点横坐标中值
Figure BDA00037346609500001112
并以
Figure BDA00037346609500001113
作为滤波阈变量Mk。当k>1时,以坡口边缘保留位置点集合
Figure BDA00037346609500001114
中任一数据的横坐标
Figure BDA00037346609500001115
作为循环数据变量xk,其中ω(1≤ω≤h)表示坡口边缘保留位置点集合
Figure BDA00037346609500001116
中的数据在坡口边缘原始位置点集合
Figure BDA00037346609500001117
中的y向位置序号;计算坡口边缘保留位置点集合
Figure BDA00037346609500001118
的f个子集合中的所有位置点横坐标中值
Figure BDA00037346609500001119
并以
Figure BDA00037346609500001120
作为滤波阈变量Mk。Specifically, when the number of cyclic filtering k=1, the set of position points is preprocessed with the edge of the groove
Figure BDA0003734660950000117
The abscissa of any point in
Figure BDA0003734660950000118
As any cyclic data variable x k in the data set X k , where v(1≤v≤h) represents the set of groove edge preprocessing position points
Figure BDA0003734660950000119
The data in the set of original position points on the groove edge
Figure BDA00037346609500001110
The y-direction position number in ; calculate the set of original position points on the edge of the groove
Figure BDA00037346609500001111
The median value of the abscissa of the middle h position points
Figure BDA00037346609500001112
and
Figure BDA00037346609500001113
As the filtering threshold variable M k . When k>1, the set of position points is reserved by the edge of the groove
Figure BDA00037346609500001114
The abscissa of any data in
Figure BDA00037346609500001115
As a cyclic data variable x k , where ω(1≤ω≤h) represents the set of reserved position points on the edge of the groove
Figure BDA00037346609500001116
The data in the set of original position points on the groove edge
Figure BDA00037346609500001117
The y-direction position number in ; calculate the groove edge reserve position point set
Figure BDA00037346609500001118
The abscissa median value of all position points in the f subsets
Figure BDA00037346609500001119
and
Figure BDA00037346609500001120
As the filtering threshold variable M k .

步骤5)重构坡口边缘线:针对上述步骤4)获取的坡口边缘真实位置点集合

Figure BDA00037346609500001121
统计保留的真实位置点的个数Ns;当Ns≤INT(h×10%)时,采用均值计算的方法重构包含h个位置点的坡口边缘重构位置点集合
Figure BDA00037346609500001122
否则,通过最小二乘线性拟合方法,将拟合后的h个位置点作为坡口边缘重构位置点集合
Figure BDA00037346609500001123
Step 5) Reconstructing the groove edge line: for the set of real position points of the groove edge obtained in the above step 4)
Figure BDA00037346609500001121
Statistically retain the number N s of real position points; when N s ≤ INT(h×10%), use the mean value calculation method to reconstruct the groove edge reconstruction position point set containing h position points
Figure BDA00037346609500001122
Otherwise, through the least squares linear fitting method, use the fitted h position points as the groove edge reconstruction position point set
Figure BDA00037346609500001123

步骤6)计算坡口边缘位置检测值:通过重构后的h个位置点的均值或拟合值,获取坡口边缘位置采样值;对坡口边缘位置采样值采用数字滤波方法,获取坡口边缘位置检测值。Step 6) Calculate the detection value of the edge position of the groove: obtain the sampling value of the edge position of the groove through the mean value or fitting value of the reconstructed h position points; use the digital filtering method to obtain the sampling value of the edge position of the groove Edge position detection value.

以下提供本发明全局模式识别的窄间隙焊接坡口边缘视觉传感检测方法的4个具体实施例。Four specific embodiments of the narrow-gap welding groove edge visual sensing detection method for global pattern recognition of the present invention are provided below.

实施例1Example 1

图6所示,为脉冲焊接时窄间隙焊接图像处理实施例。试验条件包括:采用CMOS红外摄像机作为红外摄像机8,信号触发器9接收到电弧位置信号Parc和电弧基值电流信号ib后,通过外触发方式触发红外摄像机8,开始采集焊接区域全局图像13,并通过与红外摄像机8 相连的图像传输数据线10送入计算机图像处理系统11中,用于后续坡口宽度及坡口中心的检测。红外摄像机8的拍摄角度θ=25°,光圈为16,曝光时间为0.3ms;滤光系统7包括一个UV镜,一个透过率为30%的中性减光镜,一个中心波长为970nm、带宽为20nm的窄带滤光镜。焊接试件的母材为Q370qE钢板,焊接坡口6的间隙为11.75mm;脉冲电弧2的平均电流为322.5A,平均电弧电压为29.3V,焊接速度Vw为204mm/min,焊丝干伸长为20mm,焊丝3d的直径为1.2mm,焊接保护气体Ar-20%CO2的流量为25L/min。电弧2的圆弧形摇动频率为2.5Hz,摇动角度为64°,坡口两侧壁的停留时间均为100ms。As shown in Fig. 6, it is an embodiment of narrow gap welding image processing during pulse welding. The test conditions include: using a CMOS infrared camera as the infrared camera 8, after the signal trigger 9 receives the arc position signal Parc and the arc base value current signal i b , triggers the infrared camera 8 through an external trigger, and starts to collect the global image of the welding area 13 , and sent to the computer image processing system 11 through the image transmission data line 10 connected with the infrared camera 8, for subsequent detection of the groove width and groove center. The shooting angle θ=25° of the infrared camera 8, the aperture is 16, and the exposure time is 0.3ms; the filter system 7 includes a UV mirror, a neutral light-reducing mirror with a transmittance of 30%, and a center wavelength of 970nm, Narrowband filters with a bandwidth of 20nm. The base metal of the welded specimen is Q370qE steel plate, the gap of welding groove 6 is 11.75mm; the average current of pulse arc 2 is 322.5A, the average arc voltage is 29.3V, the welding speed V w is 204mm/min, and the dry elongation of welding wire is 20mm, the diameter of welding wire 3d is 1.2mm, and the flow rate of welding shielding gas Ar-20% CO2 is 25L/min. The arc-shaped shaking frequency of arc 2 is 2.5Hz, the shaking angle is 64°, and the residence time of both sides of the groove is 100ms.

图6(a)和(b)分别为计算机图像处理系统11采集的电弧2摇动到坡口左边缘4和坡口右边缘5停留时的相邻两帧焊接区域全局图像13,其图像尺寸为544×544像素。其中,图6(a)为电弧2在坡口左边缘4停留时采集的焊接区域全局图像13,此时电弧2对坡口左边缘4的弧光辐射较为严重,同时可观察到右边缘5上有一个焊接飞溅。图6(b)为电弧2在坡口右边缘5停留时采集的焊接区域全局图像13。计算机图像处理系统11接收到焊接区域全局图像13后,通过对全局图像13的灰度直方图分析,建立该焊接区域全局图像13的灰度直方图,选用250的灰度值作为全局阈值对焊接区域全局图像13(图6(a)和6(b))进行二值化,提取的电弧2区域图像分别如图6(c)和6(d)所示。Fig. 6 (a) and (b) are the global images 13 of two adjacent frames of the welding area when the electric arc 2 collected by the computer image processing system 11 shakes to the left edge 4 of the groove and the right edge 5 of the groove respectively, and the image size is 544×544 pixels. Among them, Fig. 6(a) is the global image 13 of the welding area collected when the arc 2 stays on the left edge 4 of the groove. There is a weld spatter. Fig. 6(b) is a global image 13 of the welding area collected when the arc 2 stays on the right edge 5 of the groove. After the computer image processing system 11 receives the global image 13 of the welding area, by analyzing the gray histogram of the global image 13, the gray histogram of the global image 13 of the welding area is established, and the gray value of 250 is selected as the global threshold for welding The regional global image 13 (Fig. 6(a) and 6(b)) is binarized, and the extracted arc 2 region images are shown in Fig. 6(c) and 6(d), respectively.

通过对图6(c)和6(d)中的电弧2区域图像进行灰度搜索,计算出相邻前后两帧图像中电弧2的最高点14在直角坐标系xi-1-Oi-1-yi-1和xi-Oi-yi中的横纵坐标分别为(167,390) 和(371,393)。此时,坡口边缘ROI窗口12的原点15的纵坐标值是通过电弧2的纵坐标值上移δ11=h/2)获得,横坐标值是通过同侧前帧坡口边缘位置减去δ22=w/2)获得;所以电弧对侧的坡口右、左边缘ROI窗口12原点15的坐标值分别为(385,350)和(61,353)。ROI窗口的高度h和宽度w均为80像素,分别如图6(e)和6(f)中白色小方框所示。实际上,在连续焊接图像的检测中,坡口边缘ROI窗口的原点坐标值,是通过连续N1电弧最高点纵坐标的滤波值和连续N2个同侧坡口边缘位置的滤波值来确定,可降低相邻两帧图像中坡口边缘ROI窗口位置突变对坡口边缘定位和坡口宽度检测精度的影响。By performing a grayscale search on the arc 2 region images in Figures 6(c) and 6(d), it is calculated that the highest point 14 of the arc 2 in the adjacent two frame images is in the Cartesian coordinate system x i-1 -O i- The horizontal and vertical coordinates of 1 -y i-1 and x i -O i -y i are (167, 390) and (371, 393) respectively. At this time, the ordinate value of the origin 15 of the groove edge ROI window 12 is obtained by moving the ordinate value of the arc 2 up by δ 11 =h/2), and the abscissa value is obtained by moving the value of the ordinate of the arc 2 up through the groove edge of the previous frame on the same side. The position is obtained by subtracting δ 22 =w/2); therefore, the coordinate values of the origin 15 of the ROI window 12 on the right and left edges of the groove on the opposite side of the arc are (385, 350) and (61, 353) respectively. The height h and width w of the ROI window are both 80 pixels, as shown by the small white boxes in Figure 6(e) and 6(f), respectively. In fact, in the detection of continuous welding images, the origin coordinate value of the ROI window on the edge of the groove is determined by the filter value of the ordinate of the highest point of the continuous N1 arc and the filter value of N2 consecutive edge positions of the groove on the same side , which can reduce the impact of the sudden change in the position of the ROI window on the groove edge in two adjacent frames of images on the groove edge positioning and groove width detection accuracy.

图6(g)和6(h)所示为经过中值滤波、对比度拉伸、四等份分区阈值后的坡口右、左边缘ROI窗口图像,上述坡口边缘ROI窗口图像中的背景占比约50%。图6(i)和6(j)所示为通过形态学运算和Canny边缘算子后,提取坡口右边缘5和坡口左边缘4,如图中白线所示。从图6(i)中可看出,ROI窗口图像12中提取的坡口右边缘5上有焊接飞溅,所以在后续的坡口边缘检测时必须采用有效的方法,才能有效避免焊接飞溅对坡口宽度和坡口中心的影响。Figures 6(g) and 6(h) show the ROI window images of the right and left edges of the groove after median filtering, contrast stretching, and quadrangular partition thresholding. The background in the above-mentioned groove edge ROI window images than about 50%. Figures 6(i) and 6(j) show the extraction of the right edge 5 of the groove and the left edge 4 of the groove after the morphological operation and the Canny edge operator, as shown by the white line in the figure. It can be seen from Fig. 6(i) that there is welding spatter on the right edge 5 of the groove extracted in the ROI window image 12, so an effective method must be adopted in the subsequent detection of the groove edge in order to effectively avoid the impact of welding spatter on the slope. The effect of mouth width and groove center.

实施例2Example 2

图7为脉冲焊接时针对坡口右边缘原始数据分布的全局模式识别算法实施例。因上述图6(i)中提取的坡口右边缘5含有焊接飞溅,需要通过所提的基于全局模式识别的离群数据过滤算法,剔除焊接飞溅对坡口边缘位置影响。针对由坡口右边缘5获取的h个数据组成的坡口边缘原始位置点集合

Figure BDA0003734660950000131
如图7(a)所示。依次计算相邻两位置点x坐标的值差,保留零差值对应的位置点,形成坡口边缘预处理位置点集合
Figure BDA0003734660950000132
剔除差值不为零位置点集合
Figure BDA0003734660950000133
中对应的数据,分别如图7(b)中圆空心点和方实心点所示。通过由滤波阈值变量Mk形成的右边缘方向滤波器,即xk≥Mk的高通滤波器,剔除远离中值的差值不为零位置点集合
Figure BDA0003734660950000134
中的位置点,获取坡口边缘保留位置点集合
Figure BDA0003734660950000135
如图7(c)中圆实心点和圆空心点所示;此时判断坡口边缘保留位置点集合
Figure BDA0003734660950000136
中数据极差Rk,该极差值Rk满足分散度判据Rk≤Rt,因此将坡口边缘保留位置点集合
Figure BDA0003734660950000137
作为坡口边缘真实位置点集合
Figure BDA0003734660950000138
如图7(d)所示。此时,因为坡口边缘真实位置点集合
Figure BDA0003734660950000139
中的位置点个数Ns大于INT(h×10%),所以采用线性拟合的方法,获得坡口边缘重构位置点集合
Figure BDA00037346609500001310
该坡口边缘能反映实际的左坡口边缘形态,如图7(e) 所示。Fig. 7 is an embodiment of the global pattern recognition algorithm for the distribution of raw data on the right edge of the groove during pulse welding. Because the right edge 5 of the groove extracted in Fig. 6(i) above contains welding spatter, it is necessary to eliminate the influence of welding spatter on the edge position of the groove through the proposed outlier data filtering algorithm based on global pattern recognition. For the set of original position points of the groove edge composed of h data obtained from the right edge of the groove 5
Figure BDA0003734660950000131
As shown in Figure 7(a). Sequentially calculate the value difference of the x coordinates of two adjacent position points, retain the position points corresponding to the zero difference value, and form a set of preprocessing position points on the edge of the groove
Figure BDA0003734660950000132
Eliminate the set of points where the difference is not zero
Figure BDA0003734660950000133
The corresponding data in , are respectively shown in the circle hollow point and the square solid point in Fig. 7(b). Through the right edge direction filter formed by the filter threshold variable M k , that is, the high-pass filter of x k ≥ M k , the set of points whose difference far away from the median value is not zero is eliminated
Figure BDA0003734660950000134
The location points in , get the collection of reserved location points on the edge of the groove
Figure BDA0003734660950000135
As shown in Figure 7(c) the circle solid point and the circle hollow point; at this time, it is judged that the edge of the groove retains the position point set
Figure BDA0003734660950000136
In the data range R k , the range value R k satisfies the dispersion criterion R k ≤ R t , so the set of position points on the edge of the groove is reserved
Figure BDA0003734660950000137
As a set of real position points on the edge of the groove
Figure BDA0003734660950000138
As shown in Figure 7(d). At this time, because the set of real position points on the groove edge
Figure BDA0003734660950000139
The number of position points N s in is greater than INT(h×10%), so the linear fitting method is used to obtain the set of reconstructed position points on the edge of the groove
Figure BDA00037346609500001310
The groove edge can reflect the actual shape of the left groove edge, as shown in Fig. 7(e).

从图7可以看出,图中包含飞溅的离群类数据被剔除,保留的真实数据能合理表征实际的坡口边缘分布;表明全局模式识别的窄间隙焊接坡口边缘视觉传感检测方法有更高的检测精度、更好的抗干扰能力和更强的焊接环境适应性。通过与坡口右边缘5相同的方法,对坡口左边缘4进行重构,并将重构的坡口右边缘5的位置点与重构的坡口左边缘4的位置点,拟合至同一焊接区域后,对应位置计算均值,获取的坡口宽度和坡口中心位置采样值分别为 11.71mm和9.39mm,检测精度高于未对坡口右边缘5进行重建时的采样值。It can be seen from Figure 7 that the outlier data containing spatter in the figure is eliminated, and the retained real data can reasonably represent the actual groove edge distribution; it shows that the visual sensing detection method of narrow gap welding groove edge by global pattern recognition is effective. Higher detection accuracy, better anti-interference ability and stronger welding environment adaptability. By the same method as the groove right edge 5, the groove left edge 4 is reconstructed, and the position points of the reconstructed groove right edge 5 and the reconstructed groove left edge 4 are fitted to After the same welding area, the average value is calculated for the corresponding position, and the obtained groove width and groove center position sampling values are 11.71mm and 9.39mm respectively, and the detection accuracy is higher than the sampling value when the right edge 5 of the groove is not reconstructed.

实施例3Example 3

图8所示,为直流焊接时窄间隙焊接图像处理实施例。试验条件包括:信号触发器9接收到电弧2位于坡口侧壁停留期的摇动电弧位置信号Parc后(此时不涉及基值电流信号ib),将摇动电弧位置信号Parc发送于红外摄像机8,开始采集焊接区域全局图像13。红外摄像机 8的拍摄角度θ=20°、光圈为16、曝光时间为3.5ms。滤光系统7包括一个UV镜,一个透过率为10%的中性减光镜,一个中心波长为970nm、带宽为20nm的窄带滤光镜。焊接试件的母材为Q370qE钢板,焊接坡口6的间隙为13.8mm;电弧2的电流为295A,电弧电压为 27.6V,焊接速度Vw为204mm/min,焊丝干伸长为20mm,焊丝3d的直径为1.2mm,焊接保护气体Ar-20%CO2的流量为25L/min;电弧2的圆弧形摇动频率为2.5Hz,摇动角度为72°,坡口两侧壁的停留时间均为100ms。Figure 8 shows an example of image processing for narrow gap welding during DC welding. The test conditions include: after the signal trigger 9 receives the shaking arc position signal P arc of the arc 2 at the side wall of the groove (the base value current signal ib is not involved at this time), the shaking arc position signal P arc is sent to the infrared The camera 8 starts to collect the global image 13 of the welding area. The shooting angle of the infrared camera 8 is θ=20°, the aperture is 16, and the exposure time is 3.5ms. The filter system 7 includes a UV mirror, a neutral filter with a transmittance of 10%, and a narrow-band filter with a center wavelength of 970nm and a bandwidth of 20nm. The base material of the welding specimen is Q370qE steel plate, the gap of welding groove 6 is 13.8mm; the current of arc 2 is 295A, the arc voltage is 27.6V, the welding speed V w is 204mm/min, the dry elongation of welding wire is 20mm, and the welding wire The diameter of 3d is 1.2mm, the flow rate of welding shielding gas Ar-20% CO2 is 25L/min; the arc-shaped shaking frequency of arc 2 is 2.5Hz, the shaking angle is 72°, and the residence time of both sides of the groove is equal. 100ms.

基于上述试验系统和条件,分别采集电弧2位于坡口左边缘4和右边缘5的直流焊接区域全局图像13,其图像尺寸为544×544像素,如图8(a)和8(b)所示。其中,图8(a) 中电弧2对坡口左边缘4的弧光辐射较为严重,同时可观察到在坡口右边缘5上有一个焊接飞溅。通过与上述脉冲焊接图像相同的图像处理方法,提取电弧2区域图像分别如图8(c) 和8(d)所示。通过位置自适应的坡口边缘位置的ROI窗口,如图8(e)和8(f)中白色方框所示;截取的坡口边缘ROI窗口图像,经坡口边缘局部图像处理后,获取的坡口边缘图像以及坡口边缘线如图8(g)~8(j)所示。Based on the above test system and conditions, the global image 13 of the DC welding area where the arc 2 is located at the left edge 4 and the right edge 5 of the groove is respectively collected, and the image size is 544×544 pixels, as shown in Figure 8(a) and 8(b). Show. Among them, in Fig. 8(a), the arc radiation from the arc 2 to the left edge 4 of the groove is relatively serious, and at the same time, it can be observed that there is a welding spatter on the right edge 5 of the groove. By the same image processing method as the pulse welding image above, the extracted arc 2 region images are shown in Fig. 8(c) and 8(d), respectively. The ROI window of the groove edge position through position adaptation, as shown in the white box in Figure 8(e) and 8(f); the captured ROI window image of the groove edge, after local image processing of the groove edge, is obtained The groove edge image and the groove edge line are shown in Fig. 8(g) ~ 8(j).

从图8(i)中可看出,坡口边缘ROI窗口图像中提取的坡口右边缘5上因有焊接飞溅,所以在后续的坡口边缘检测时必须采用有效的方法,才能避免焊接飞溅对坡口边缘位置值的影响,从而提高坡口宽度和坡口中心的检测精度。It can be seen from Figure 8(i) that there is welding spatter on the right edge 5 of the groove extracted from the ROI window image of the groove edge, so an effective method must be adopted in the subsequent groove edge detection to avoid welding spatter The influence on the position value of the edge of the groove, thereby improving the detection accuracy of the groove width and the groove center.

实施例4Example 4

图9所示为直流焊接时针对坡口右边缘原始数据分布的全局模式识别算法实施例。与上述脉冲焊接时的方法相似,针对上述图8(i)中提取到的坡口右边缘5获取的由h个数据组成的坡口边缘原始位置点集合

Figure BDA0003734660950000141
如图9(a)所示。通过依次计算相邻两个位置点的数值差,保留零差值对应的位置点,形成坡口边缘预处理位置点集合
Figure BDA0003734660950000142
剔除差值不为零位置点集合
Figure BDA0003734660950000143
中的位置点,分别如图9(b)中圆空心点和方实心点所示。因为坡口边缘预处理位置点集合
Figure BDA0003734660950000144
中的位置点不满足分散度判据Rk≤Rt,所以需要对坡口边缘预处理位置点集合
Figure BDA0003734660950000145
中的位置点通过由滤波阈值变量Mk形成的右边缘方向滤波器,即xk≥Mk的高通滤波器,第一次剔除远离滤波阈值变量Mk的数据集合
Figure BDA0003734660950000146
获取一次保留位置点集合
Figure BDA0003734660950000147
如图9(c)中圆实心点和圆空心点所示;通过计算一次保留位置点集合
Figure BDA0003734660950000148
中的保留位置点的极差Rk后,此时位置点极差Rk不满足Rk≤Rt,所以需要通过高通滤波器进行第二次剔除远离中值的数据集合
Figure BDA0003734660950000149
获取二次保留位置点集合
Figure BDA00037346609500001410
如图9(d)中圆实心和圆空心所示;然后通过计算二次保留位置点集合
Figure BDA00037346609500001411
中的保留位置点的极差Rk,得到此时的Rk<Rt,则二次保留位置点集合
Figure BDA00037346609500001412
作为坡口边缘真实位置点集合
Figure BDA00037346609500001413
如图9(e)所示。通过统计坡口边缘真实位置点集合
Figure BDA00037346609500001414
中的位置点个数Ns,因为满足Ns≥INT(h×10%),所以采用线性拟合方法,获得重构的坡口边缘重构位置点集合
Figure BDA00037346609500001415
该坡口边缘能反映实际的右坡口边缘形态,如图7(f)所示。通过重建的坡口右边缘和左边缘对应位置计算均值,获取的坡口宽度和坡口中心位置采样值分别为13.78mm和12.03mm,检测精度明显高于未对坡口右边缘5进行重建时的采样值。Fig. 9 shows an embodiment of the global pattern recognition algorithm for the distribution of raw data on the right edge of the groove during DC welding. Similar to the above-mentioned pulse welding method, the original position point set of the groove edge consisting of h data obtained for the right edge 5 of the groove extracted in Fig. 8(i) above
Figure BDA0003734660950000141
As shown in Figure 9(a). By sequentially calculating the numerical difference between two adjacent position points and retaining the position points corresponding to the zero difference value, a set of preprocessing position points for the edge of the groove is formed
Figure BDA0003734660950000142
Eliminate the set of points where the difference is not zero
Figure BDA0003734660950000143
The position points in , are respectively shown in the circle hollow point and the square solid point in Fig. 9(b). Because the groove edge preprocesses the location point set
Figure BDA0003734660950000144
The position points in do not satisfy the dispersion criterion R k ≤ R t , so it is necessary to preprocess the position point set on the edge of the groove
Figure BDA0003734660950000145
The position points in pass through the right edge direction filter formed by the filtering threshold variable M k , that is, the high-pass filter of x k ≥ M k , and the data set far away from the filtering threshold variable M k is eliminated for the first time
Figure BDA0003734660950000146
Get a collection of reserved location points
Figure BDA0003734660950000147
As shown in the circle solid point and the circle hollow point in Figure 9(c); by calculating once to reserve the position point set
Figure BDA0003734660950000148
After retaining the range R k of the position point in , the range R k of the position point does not satisfy R k ≤ R t at this time , so the data set far away from the median needs to be eliminated for the second time through a high-pass filter
Figure BDA0003734660950000149
Get the set of secondary reserved position points
Figure BDA00037346609500001410
As shown in the solid circle and hollow circle in Figure 9(d); and then by calculating the secondary set of reserved position points
Figure BDA00037346609500001411
The range R k of the reserved position points in , get R k < R t at this time, then the secondary reserved position point set
Figure BDA00037346609500001412
As a set of real position points on the edge of the groove
Figure BDA00037346609500001413
As shown in Figure 9(e). Through the statistics of the real position point set of the edge of the groove
Figure BDA00037346609500001414
The number of position points N s in , because N s ≥ INT(h×10%) is satisfied, so the linear fitting method is used to obtain the reconstructed groove edge reconstruction position point set
Figure BDA00037346609500001415
The groove edge can reflect the actual right groove edge shape, as shown in Fig. 7(f). Calculate the mean value by calculating the corresponding positions of the right edge and the left edge of the reconstructed groove, and the obtained groove width and groove center position sampling values are 13.78mm and 12.03mm respectively, and the detection accuracy is significantly higher than when the right edge 5 of the groove is not reconstructed The sampling value of .

从图9中可以看出,右坡口边缘5上包含飞溅的离群类数据被剔除,保留的真实位置点数据能合理表征实际的坡口边缘分布;表明全局模式识别的离群数据过滤算法有更高的检测精度、更好的抗干扰能力和更强的焊接环境适应性。It can be seen from Figure 9 that the outlier data containing splashes on the right groove edge 5 is eliminated, and the retained real position point data can reasonably represent the actual groove edge distribution; it shows that the outlier data filtering algorithm of global pattern recognition It has higher detection accuracy, better anti-interference ability and stronger welding environment adaptability.

以上所述,仅为本发明部分的具体实施方式。当然,本发明还可有其它多种实施例,在不背离本发明精神及其实质的情况下,任何熟悉本技术领域的技术人员,当可根据本发明作出各种相应的等效改变和变形,都应属于本发明所附的权利要求的保护范围。The above are only part of the specific implementation manners of the present invention. Certainly, the present invention also can have other multiple embodiments, without departing from the spirit and essence of the present invention, any person familiar with the technical field can make various corresponding equivalent changes and deformations according to the present invention , should belong to the scope of protection of the appended claims of the present invention.

Claims (10)

1.一种全局模式识别的窄间隙焊接坡口边缘视觉传感检测方法,基于的检测系统包括:红外摄像机(8)、滤光系统(7)、信号触发器(9)、图像传输数据线(10)及计算机图像处理系统(11),其中所述信号触发器(9)与红外摄像机(8)相连接,所述滤光系统(7)同轴安装在所述红外摄像机(8)的镜头上,所述计算机图像处理系统(11)通过所述图像传输数据线(10)与所述红外摄像机(8)连接;通过红外摄像机(8)、滤光系统(7)和信号触发器(9),采集窄间隙焊接区域全局图像(13);其特征是,所述检测方法具体包括以下步骤:1. A visual sensor detection method for narrow gap welding groove edge based on global pattern recognition, based on the detection system including: infrared camera (8), filter system (7), signal trigger (9), image transmission data line (10) and a computer image processing system (11), wherein the signal trigger (9) is connected with the infrared camera (8), and the filter system (7) is coaxially installed on the infrared camera (8) On the lens, the computer image processing system (11) is connected with the infrared camera (8) through the image transmission data line (10); through the infrared camera (8), filter system (7) and signal trigger ( 9), collecting the overall image of the narrow gap welding area (13); it is characterized in that, the detection method specifically includes the following steps: 1)确定坡口边缘ROI窗口原点的初始横向位置:计算机图像处理系统(11)通过全局图像处理,从所述全局图像(13)中提取电弧(2)电弧最高点(14)位置,确定能截取电弧(2)同侧坡口边缘的SROI窗口(16)的位置、或能同时截取坡口双边缘的BROI窗口(17)的位置;通过对SROI窗口(16)截取的图像进行预设窗口图像处理、获取电弧(2)同侧的初始坡口边缘位置,或通过对BROI窗口(17)截取的图像进行预设窗口图像处理、获取电弧(2)同侧和对侧的初始坡口边缘位置,以自适应确定电弧(2)对侧坡口边缘ROI窗口(12)原点(15)的初始横向位置;1) Determine the initial lateral position of the origin of the ROI window on the edge of the groove: the computer image processing system (11) extracts the position of the arc (2) highest point (14) of the arc from the global image (13) through global image processing, and determines the energy Capture the position of the SROI window (16) on the same side of the groove edge of the arc (2), or the position of the BROI window (17) that can capture both edges of the groove at the same time; by presetting the image captured by the SROI window (16) Image processing, obtaining the initial groove edge position on the same side of the arc (2), or by performing preset window image processing on the image captured by the BROI window (17), obtaining the initial groove edge on the same side and the opposite side of the arc (2) Position, to determine the initial lateral position of the origin (15) of the ROI window (12) on the opposite side of the groove edge of the arc (2) adaptively; 2)获取坡口边缘原始位置点集合
Figure FDA0003734660940000011
根据电弧最高点位置和坡口边缘ROI窗口(12)原点(15)的初始横向位置自适应确定坡口边缘ROI窗口(12)的位置后,通过该自适应定位方法确定的坡口边缘ROI窗口(12),截取电弧(2)对侧的坡口左边缘(4)或坡口右边缘(5)的ROI窗口图像,并通过局部图像处理提取坡口左边缘(4)或坡口右边缘(5),获取由h个数据组成的坡口边缘原始位置点集合
Figure FDA0003734660940000012
其中,i表示当前操作,h表示ROI窗口(12)的高度值;
2) Obtain the set of original position points on the groove edge
Figure FDA0003734660940000011
After the position of the groove edge ROI window (12) is adaptively determined according to the position of the highest point of the arc and the initial lateral position of the origin (15) of the groove edge ROI window (12), the groove edge ROI window determined by the adaptive positioning method (12), intercept the ROI window image of the left edge of the groove (4) or the right edge of the groove (5) on the opposite side of the arc (2), and extract the left edge of the groove (4) or the right edge of the groove through local image processing (5), obtain the original position point set of groove edge composed of h data
Figure FDA0003734660940000012
Wherein, i represents current operation, and h represents the height value of ROI window (12);
3)对获取的坡口边缘原始位置点集合
Figure FDA0003734660940000013
中的位置点进行一次数据滤波:沿坡口边缘ROI窗口(12)的高度h方向上,依次计算坡口边缘原始位置点集合
Figure FDA0003734660940000014
中相邻两位置点的x坐标的差值,将差值为零的位置点分到同一个位置点子集合中;相应地,p(1≤p<h)个位置点子集合
Figure FDA0003734660940000015
被找到,从而形成包含p个位置点子集合的坡口边缘预处理位置点集合
Figure FDA0003734660940000016
相应地,形成p个垂线段,每一个垂线段含有相同的x坐标值,即横坐标值;
3) Set the original position points of the obtained groove edge
Figure FDA0003734660940000013
The position points in are subjected to a data filtering: along the height h direction of the groove edge ROI window (12), the original position point set of the groove edge is calculated sequentially
Figure FDA0003734660940000014
The difference between the x-coordinates of two adjacent position points in , and the position points with a difference of zero are divided into the same position point subset; correspondingly, p(1≤p<h) position point subsets
Figure FDA0003734660940000015
is found, thus forming a groove edge preprocessing position point set containing p position point subsets
Figure FDA0003734660940000016
Correspondingly, p vertical line segments are formed, and each vertical line segment contains the same x-coordinate value, that is, the abscissa value;
4)对坡口边缘预处理位置点集合
Figure FDA0003734660940000017
中的位置点进行二次数据滤波:具体包括如下步骤:
4) Preprocessing the position point set on the edge of the groove
Figure FDA0003734660940000017
Perform secondary data filtering on the position points in : specifically include the following steps:
①判断坡口边缘预处理位置点集合
Figure FDA0003734660940000018
中数据的分散度:针对步骤3)获取的坡口边缘预处理位置点集合
Figure FDA0003734660940000021
首先判断坡口边缘预处理位置点集合
Figure FDA0003734660940000022
中位置点的分散度;具体为:搜索坡口边缘预处理位置点集合
Figure FDA0003734660940000023
中所有位置点横坐标值
Figure FDA0003734660940000024
的最大值xk_max和最小值xk_min,计算极差Rk=xk_max-xk_min;判断极差Rk与数据分散度阈值Rt的大小,数据分散度阈值Rt=INT(h×4%),当满足Rk≤Rt,则将坡口边缘预处理位置点集合
Figure FDA0003734660940000025
作为最终坡口边缘真实位置点集合
Figure FDA0003734660940000026
当Rk>Rt时,则将坡口边缘原始位置点集合
Figure FDA0003734660940000027
中h个位置点横坐标值
Figure FDA0003734660940000028
的中值
Figure FDA0003734660940000029
并以
Figure FDA00037346609400000210
作为滤波阈值变量Mk,再结合方向滤波器,滤除离群数据后,获取坡口边缘保留位置点集合
Figure FDA00037346609400000211
① Judging the set of preprocessing position points on the edge of the groove
Figure FDA0003734660940000018
Dispersion of the data in: the set of preprocessing position points for the groove edge obtained in step 3)
Figure FDA0003734660940000021
Firstly, determine the set of preprocessing position points on the edge of the groove
Figure FDA0003734660940000022
Dispersion of mid-position points; specifically: search for the set of pre-processing position points on the edge of the groove
Figure FDA0003734660940000023
The abscissa values of all position points in
Figure FDA0003734660940000024
The maximum value x k_max and the minimum value x k_min , calculate the range R k =x k_max -x k_min ; judge the size of the range R k and the data dispersion threshold R t , the data dispersion threshold R t = INT(h×4 %), when satisfying R k ≤ R t , the groove edge preprocessing position point set
Figure FDA0003734660940000025
As the set of real position points of the final groove edge
Figure FDA0003734660940000026
When R k > R t , the original position points of the groove edge are collected
Figure FDA0003734660940000027
The abscissa values of the h position points
Figure FDA0003734660940000028
median of
Figure FDA0003734660940000029
and
Figure FDA00037346609400000210
As the filtering threshold variable M k , combined with the direction filter, after filtering outlier data, obtain the set of reserved position points on the edge of the groove
Figure FDA00037346609400000211
②针对步骤①获取的坡口边缘保留位置点集合
Figure FDA00037346609400000212
判断位置点分散度:通过计算坡口边缘保留位置点集合
Figure FDA00037346609400000213
中每个位置点横坐标值
Figure FDA00037346609400000214
的极差Rk,当满足Rk≤Rt,则坡口边缘保留位置点集合
Figure FDA00037346609400000215
作为坡口边缘真实位置点集合Gi (s);否则,计算坡口边缘保留位置点集合
Figure FDA00037346609400000216
中位置点横坐标值
Figure FDA00037346609400000217
的中值
Figure FDA00037346609400000218
并以
Figure FDA00037346609400000219
作为滤波阈值变量Mk;通过方向滤波器,获取过滤后的坡口边缘保留位置点集合
Figure FDA00037346609400000220
重复该过程,直至
Figure FDA00037346609400000221
中每个位置点横坐标值极差Rk满足Rk≤Rt,形成坡口边缘真实位置点集合Gi (s)
②Reserve the set of position points for the edge of the groove obtained in step ①
Figure FDA00037346609400000212
Judging the degree of dispersion of position points: by calculating the edge of the groove to retain the set of position points
Figure FDA00037346609400000213
The abscissa value of each position point in
Figure FDA00037346609400000214
Range R k , when satisfying R k ≤ R t , the groove edge retains the set of position points
Figure FDA00037346609400000215
as the set of real position points G i (s) of the groove edge; otherwise, calculate the set of retained position points of the groove edge
Figure FDA00037346609400000216
The abscissa value of the middle position point
Figure FDA00037346609400000217
median of
Figure FDA00037346609400000218
and
Figure FDA00037346609400000219
As the filtering threshold variable M k ; through the direction filter, obtain the filtered groove edge reserved position point set
Figure FDA00037346609400000220
Repeat this process until
Figure FDA00037346609400000221
The extreme difference R k of the abscissa value of each position point satisfies R k ≤ R t , forming a set of true position points G i (s) on the edge of the groove;
5)重构坡口边缘线:针对步骤4)获取的坡口边缘真实位置点集合Gi (s),统计保留的真实位置点的个数Ns;当Ns≤INT(h×10%)时,则采用均值计算的方法重构包含h个坡口边缘位置点的坡口边缘重构位置点集合Gi (r);否则,通过最小二乘线性拟合方法,重构包含h个坡口边缘位置点的坡口边缘重构位置点集合Gi (r);其中,坡口边缘位置点的横坐标为
Figure FDA00037346609400000222
5) Reconstructing the groove edge line: for the set of real position points G i (s) of the groove edge obtained in step 4), count the number N s of the real position points retained; when N s ≤ INT(h×10% ), use the mean value calculation method to reconstruct the groove edge reconstruction location point set G i (r) containing h groove edge location points; otherwise, use the least squares linear fitting method to reconstruct the Groove edge reconstruction position point set G i (r) of the groove edge position points; where, the abscissa of the groove edge position point is
Figure FDA00037346609400000222
6)获取坡口边缘位置检测值:针对步骤5)获取的包含h个坡口边缘位置点的坡口边缘重构位置点集合Gi (r),通过计算h个坡口边缘位置点横坐标的均值或拟合值,获取坡口边缘位置采样值;针对坡口边缘位置采样值采用数字滤波方法,获取坡口边缘位置检测值;6) Obtaining the detection value of groove edge position: For the groove edge reconstruction position point set G i (r) obtained in step 5) containing h groove edge position points, by calculating the abscissa of h groove edge position points The average value or fitting value of the groove edge position is obtained to obtain the sampling value of the groove edge position; the digital filtering method is adopted for the groove edge position sampling value to obtain the groove edge position detection value; 7)重复上述所述步骤2)至步骤6),直至焊接过程结束。7) Repeat the above steps 2) to 6) until the welding process ends.
2.根据权利要求1所述的全局模式识别的窄间隙焊接坡口边缘视觉传感检测方法,其特征是:在步骤1)中,所述全局图像处理的具体内容和方法步骤是:先对全局图像(13)采用中值滤波,进行图像去噪;再采用直方图分析,计算全局图像(13)中处于不同灰度值的像素频数后,采用全局阈值将全局图像(13)二值化;最后,通过形态学运算,提取电弧(2)轮廓后,通过灰度搜索,获取电弧最高点(14)坐标值。2. the narrow-gap welding groove edge visual sensing detection method of global pattern recognition according to claim 1 is characterized in that: in step 1), the specific content and method steps of described global image processing are: first to The global image (13) uses a median filter to perform image denoising; and then uses histogram analysis to calculate the frequency of pixels in different gray values in the global image (13), and then uses a global threshold to binarize the global image (13) ; Finally, after extracting the contour of the arc (2) through morphological operations, the coordinate value of the highest point of the arc (14) is obtained through grayscale search. 3.根据权利要求1所述的全局模式识别的窄间隙焊接坡口边缘视觉传感检测方法,其特征是:在步骤1)中,所述预设窗口图像处理的具体内容和方法步骤是:对截取的窗口图像进行中值滤波去噪,对比度拉伸提高图像对比度,对窗口图像采用Otsu阈值处理,再通过形态学运算剔除孤立点,然后采用Canny边缘算子提取预设窗口图像中的坡口边缘线。3. the narrow gap welding groove edge visual sensing detection method of global pattern recognition according to claim 1 is characterized in that: in step 1), the specific content and method steps of described preset window image processing are: Perform median filter denoising on the intercepted window image, contrast stretching to improve image contrast, apply Otsu threshold value processing to the window image, and then remove isolated points through morphological operations, and then use the Canny edge operator to extract the slope in the preset window image Mouth edge. 4.根据权利要求1所述的全局模式识别的窄间隙焊接坡口边缘视觉传感检测方法,其特征是:在步骤1)中,SROI窗口(16)和BROI窗口(17)的纵向位置是通过电弧最高点(14)的纵坐标值确定;SROI窗口(16)的横坐标位置是通过电弧最高点(14)的横坐标值和电弧最高点(14)的横坐标值到坡口边缘的设定距离获得。4. the narrow-gap welding groove edge visual sensing detection method of global pattern recognition according to claim 1 is characterized in that: in step 1), the longitudinal position of SROI window (16) and BROI window (17) is Determined by the ordinate value of the highest point of the arc (14); the abscissa position of the SROI window (16) is through the abscissa value of the highest point of the arc (14) and the abscissa value of the highest point of the arc (14) to the groove edge Set the distance to get. 5.根据权利要求1所述的全局模式识别的窄间隙焊接坡口边缘视觉传感检测方法,其特征是:在步骤2)中,所述坡口边缘ROI窗口(12)的自适应定位方法的具体步骤是:5. the narrow-gap welding groove edge visual sensing detection method of global pattern recognition according to claim 1 is characterized in that: in step 2), the adaptive positioning method of the groove edge ROI window (12) The specific steps are: ①从最近连续N1帧所述全局图像(13)中,提取N1个电弧最高点(14)的纵坐标值,再通过数字滤波方法获取其N1个纵坐标值的滤波值F1,并以(F11)作为所述坡口边缘ROI窗口(12)原点(15)的纵坐标值;其中,δ1为所述坡口边缘ROI窗口(12)原点(15)的纵坐标位置值的修正常数,其取值范围为[-h,h];① From the global image (13) of the latest N 1 consecutive frames, extract the ordinate values of N 1 arc highest points (14), and then obtain the filter value F 1 of the N 1 ordinate values through a digital filtering method, And take (F 11 ) as the ordinate value of the origin (15) of the groove edge ROI window (12); wherein, δ 1 is the ordinate of the groove edge ROI window (12) origin (15) The correction constant of the coordinate position value, its value range is [-h,h]; ②从最近连续N2个与当前待检测坡口边缘同侧的前帧坡口边缘ROI窗口(12)图像中、提取N2个坡口左边缘(4)或坡口右边缘(5)的位置值,再通过数字滤波方法获取其N2个位置值的滤波值F2,并以(F22)作为所述坡口边缘ROI窗口(12)原点(15)的横坐标值;或针对当前全局图像(13),通过所述能同时截取坡口双边缘的BROI窗口(17)提取坡口左边缘(4)和坡口右边缘(5)的当前位置值,再通过数字滤波方法获取最近N3个电弧对侧坡口边缘位置值的滤波值F3,并以(F32)作为所述坡口边缘ROI窗口(12)原点(15)的横坐标值;其中,δ2为所述坡口边缘ROI窗口(12)原点(15)的横坐标位置值的修正常数,为所述坡口边缘ROI窗口(12)的半宽,即δ2=w/2,其中w为所述坡口边缘ROI窗口(12)的宽度。② Extract N 2 groove left edge (4) or groove right edge (5) images from the recent N 2 previous frame groove edge ROI window (12) images on the same side as the current groove edge to be detected Position value, then obtain the filter value F 2 of its N 2 position values by digital filtering method, and use (F 22 ) as the abscissa value of the origin (15) of the ROI window (12) on the edge of the groove; Or for the current global image (13), extract the current position values of the left edge of the groove (4) and the right edge of the groove (5) by the BROI window (17) that can intercept the double edges of the groove simultaneously, and then pass through digital filtering The method obtains the filter value F 3 of the groove edge position value of the nearest N 3 opposite sides of the arc, and uses (F 32 ) as the abscissa value of the origin (15) of the groove edge ROI window (12); wherein , δ 2 is the correction constant of the abscissa position value of the origin (15) of the groove edge ROI window (12), which is the half-width of the groove edge ROI window (12), that is, δ 2 =w/2, Wherein w is the width of the groove edge ROI window (12). 6.根据权利要求1所述的全局模式识别的窄间隙焊接坡口边缘视觉传感检测方法,其特征是,在步骤2)中:所述局部图像处理,包括对坡口边缘ROI窗口(12)图像进行中值滤波去噪,再进行对比度拉伸提高坡口边缘ROI窗口(12)图像对比度,然后进行分区阈值获取二值化图像,采用形态学运算进一步去噪后,提取坡口边缘ROI窗口(12)图像的边缘线。6. the narrow-gap welding groove edge visual sensing detection method of global pattern recognition according to claim 1, is characterized in that, in step 2): described local image processing, comprises the groove edge ROI window (12 ) image is subjected to median filter denoising, then contrast stretching is performed to improve the image contrast of the ROI window (12) on the edge of the groove, and then the partition threshold is used to obtain the binary image, and after further denoising by morphological operations, the ROI of the edge of the groove is extracted The edge line of the window (12) image. 7.根据权利要求6所述的全局模式识别的窄间隙焊接坡口边缘视觉传感检测方法,其特征是,所述对比度拉伸选用分段线性变化函数,所述形态学运算选用闭运算,所述边缘提取选用Canny算子,所述分区阈值是将坡口边缘ROI窗口(12)图像平均分成4等份后,分别对每一分区的图像采用大津法阈值。7. The narrow-gap welding groove edge visual sensor detection method according to claim 6, characterized in that, the contrast stretching selects a segmented linear change function, and the morphological operation selects a closed operation, The edge extraction selects the Canny operator, and the partition threshold is to divide the groove edge ROI window (12) image into 4 equal parts on average, and then use the Otsu method threshold for the image of each partition respectively. 8.根据权利要求1所述的全局模式识别的窄间隙焊接坡口边缘视觉传感检测方法,其特征是,在步骤4)中:所述方向滤波器表述为:当所述坡口边缘位置点位于左边缘上时,方向滤波器为低通滤波器,表达为xk≤Mk,即保留位置点横坐标值小于等于滤波阈值变量Mk的位置点;当所述坡口边缘位置点位于右边缘上时,方向滤波器为高通滤波器,表达为xk≥Mk,即保留位置点的横坐标值大于等于滤波阈值变量Mk的位置点;xk表示循环数据变量,其值等于坡口边缘预处理位置点集合
Figure FDA0003734660940000041
或坡口边缘保留位置点集合
Figure FDA0003734660940000042
中的位置点横坐标值。
8. The narrow-gap welding groove edge visual sensor detection method according to claim 1, characterized in that, in step 4): the direction filter is expressed as: when the groove edge position When the point is on the left edge, the direction filter is a low-pass filter, expressed as x k ≤ M k , that is, the position point whose abscissa value of the position point is less than or equal to the filter threshold variable M k is reserved; when the groove edge position point When located on the right edge, the direction filter is a high-pass filter, expressed as x k ≥ M k , that is, the position point whose abscissa value of the reserved position point is greater than or equal to the filter threshold variable M k ; x k represents the circular data variable, and its value Equal to the set of groove edge preprocessing position points
Figure FDA0003734660940000041
or bevel edge retaining location point set
Figure FDA0003734660940000042
The abscissa value of the location point in .
9.根据权利要求1所述的全局模式识别的窄间隙焊接坡口边缘视觉传感检测方法,其特征是:在步骤6)中,所述数字滤波方法为限幅抗脉冲均值滤波,具体包括如下步骤:9. The narrow-gap welding groove edge visual sensor detection method according to claim 1, characterized in that: in step 6), the digital filtering method is a limiter anti-pulse mean value filter, specifically comprising Follow the steps below: ①确定滤波窗口包含数据个数Nf:该滤波窗口包含本次坡口边缘位置采样值Gs在内的、最近连续Nf个坡口边缘位置采样值,所述滤波窗口包含数据个数Nf>2;① Determine the number of data N f included in the filtering window: the filtering window includes the latest N f sampling values of the edge position of the groove including the sampling value G s of the edge position of the groove, and the filtering window includes the number of data N f >2; ②计算本次采样偏差η1:计算本次滤波窗口内Nf个坡口边缘位置采样值的均值Es,并计算本次坡口边缘位置采样值Gs与均值Es的差的绝对值,作为本次采样偏差η1② Calculate the current sampling deviation η 1 : Calculate the average value E s of the sampling values of the N f groove edge positions within the current filtering window, and calculate the absolute value of the difference between the current groove edge position sampling values G s and the average value E s , as this sampling deviation η 1 ; ③计算本次采样偏离度de:计算本次采样偏差η1与前次采样偏差η0的比值,并将该比值作为本次采样偏离度de③Calculate this sampling deviation degree d e : calculate the ratio of this sampling deviation η 1 to the previous sampling deviation η 0 , and use this ratio as this sampling deviation degree d e ; ④修复异常采样值:当本次采样偏离度de大于异常修复阈值dth时,则将前次坡口边缘位置检测值作为本次坡口边缘位置采样值Gs,实现对本次异常采样值的修复,所述异常修复阈值dth=3~10;④ Repair abnormal sampling value: when the sampling deviation d e is greater than the abnormal repair threshold d th , the previous detection value of the edge position of the groove is used as the sampling value G s of the edge position of the groove this time to realize the abnormal sampling of this time Value repair, the abnormal repair threshold d th =3~10; ⑤计算本次坡口边缘位置检测值Gd:在Nf个坡口边缘位置采样值中去除最大值和最小值后,对剩余的(Nf-2)个坡口边缘位置采样值求均值,并以此均值作为本次坡口边缘位置检测值Gd⑤Calculate the detection value G d of the groove edge position this time: after removing the maximum value and the minimum value from the N f groove edge position sampling values, calculate the mean value for the remaining (N f -2) groove edge position sampling values , and use this mean value as the groove edge position detection value G d this time. 10.一种根据权利要求1所述的全局模式识别的窄间隙焊接坡口边缘视觉传感检测方法的应用,其特征是:用于焊接坡口宽度、坡口中心位置的检测和焊接过程的实时跟踪控制;应用的方法是,基于检测到的焊接坡口左边缘(4)和坡口右边缘(5),通过计算两边缘对应位置的均值,获取焊接坡口中心;通过计算两边缘对应位置差值,获取焊接坡口宽度值。10. An application of the narrow gap welding groove edge visual sensing detection method according to claim 1, characterized in that: it is used for the detection of the welding groove width, the groove center position and the welding process. Real-time tracking control; the applied method is, based on the detected left edge (4) and right edge (5) of the welded groove, by calculating the mean value of the corresponding positions of the two edges, the center of the welded groove is obtained; by calculating the corresponding position of the two edges Position difference, get the welding groove width value.
CN202210856059.5A 2022-07-07 2022-07-07 Narrow gap welding groove edge visual sensing detection method and its application based on global pattern recognition Active CN115255565B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210856059.5A CN115255565B (en) 2022-07-07 2022-07-07 Narrow gap welding groove edge visual sensing detection method and its application based on global pattern recognition

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210856059.5A CN115255565B (en) 2022-07-07 2022-07-07 Narrow gap welding groove edge visual sensing detection method and its application based on global pattern recognition

Publications (2)

Publication Number Publication Date
CN115255565A true CN115255565A (en) 2022-11-01
CN115255565B CN115255565B (en) 2024-11-29

Family

ID=83767854

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210856059.5A Active CN115255565B (en) 2022-07-07 2022-07-07 Narrow gap welding groove edge visual sensing detection method and its application based on global pattern recognition

Country Status (1)

Country Link
CN (1) CN115255565B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115945767A (en) * 2022-11-15 2023-04-11 厦门航天思尔特机器人系统股份公司 Adaptive welding system, method and device for groove welding
CN117047231A (en) * 2023-08-17 2023-11-14 江苏科技大学 Visual sensing weld joint tracking method and system for narrow-gap welding

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104551347A (en) * 2014-12-30 2015-04-29 江苏科技大学 Infrared vision sensing detection method and device for narrow-gap weld seam deviation
CN106141382A (en) * 2016-07-01 2016-11-23 江苏科技大学 Bevel for welding marginal position visual sensing detection method
CN113814528A (en) * 2021-10-11 2021-12-21 湖北忠和冶金机械制造股份有限公司 Interactive welding line curve extraction and automatic track generation method
CN114160926A (en) * 2021-12-21 2022-03-11 上海电机学院 A single oblique laser vision sensing method and system for welding seam tracking

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104551347A (en) * 2014-12-30 2015-04-29 江苏科技大学 Infrared vision sensing detection method and device for narrow-gap weld seam deviation
CN106141382A (en) * 2016-07-01 2016-11-23 江苏科技大学 Bevel for welding marginal position visual sensing detection method
CN113814528A (en) * 2021-10-11 2021-12-21 湖北忠和冶金机械制造股份有限公司 Interactive welding line curve extraction and automatic track generation method
CN114160926A (en) * 2021-12-21 2022-03-11 上海电机学院 A single oblique laser vision sensing method and system for welding seam tracking

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115945767A (en) * 2022-11-15 2023-04-11 厦门航天思尔特机器人系统股份公司 Adaptive welding system, method and device for groove welding
CN115945767B (en) * 2022-11-15 2024-05-28 厦门航天思尔特机器人系统股份公司 Self-adaptive welding system, method and device for groove welding
CN117047231A (en) * 2023-08-17 2023-11-14 江苏科技大学 Visual sensing weld joint tracking method and system for narrow-gap welding

Also Published As

Publication number Publication date
CN115255565B (en) 2024-11-29

Similar Documents

Publication Publication Date Title
CN108637435B (en) Three-dimensional weld tracking system and method based on vision and arc pressure sensing
CN104551347B (en) Infrared visual sensing detection method and the device of narrow gap weld seam deviation
US10870162B2 (en) Adaptive control method and equipment of arc swing in narrow gap welding
CN105205821B (en) A kind of welding image dividing method
CN107424144B (en) Laser vision-based weld joint tracking image processing method
CN115255565A (en) Visual sensing detection method and application of narrow gap welding groove edge based on global pattern recognition
CN113674206B (en) A method for extracting characteristic parameters of molten pool and keyhole entrance suitable for deep penetration K-TIG welding
CN111061231B (en) Weld assembly gap and misalignment feed-forward molten pool monitoring system and penetration monitoring method
CN103500321B (en) Vision guide welding robot weld seam method for quickly identifying based on double dynamic windows
Zhang et al. Narrow-seam identification and deviation detection in keyhole deep-penetration TIG welding
CN108320280A (en) The crater image method for detecting abnormality of view-based access control model clarity and contours extract
CN108247179A (en) I shape grooves CO based on crater image2Weld deviation detecting method and device
Lin et al. Intelligent seam tracking of an ultranarrow gap during K-TIG welding: A hybrid CNN and adaptive ROI operation algorithm
CN102519387B (en) A visual inspection method for shape parameters of molten pool in electron beam welding
CN114723738A (en) A kind of precision welding microscopic monitoring method and system
CN106141382B (en) Welding groove marginal position visual sensing detection method
CN114677296A (en) Multi-feature extraction method suitable for narrow-gap MAG surfacing molten pool image
CN108620714B (en) Welding deviation detection system based on GMAW (gas metal arc welding) molten pool profile characteristics and detection method thereof
CN111402239A (en) Laser welding seam tracking image processing method and system based on morphological feature filtering
Zhang et al. A study on seam tracking in robotic GMA welding process
CN118650189A (en) A steel plate milling bevel processing size control system and method
CN109146863A (en) A kind of pavement marker line defect detection device
CN114932292B (en) Narrow-gap passive vision weld joint tracking method and system
CN114160926A (en) A single oblique laser vision sensing method and system for welding seam tracking
CN117047231A (en) Visual sensing weld joint tracking method and system for narrow-gap welding

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant