[go: up one dir, main page]

CN104776799A - Cosmetic welding front seam detection device and method adopting lateral light to construct light and shadow characteristics - Google Patents

Cosmetic welding front seam detection device and method adopting lateral light to construct light and shadow characteristics Download PDF

Info

Publication number
CN104776799A
CN104776799A CN201510170038.8A CN201510170038A CN104776799A CN 104776799 A CN104776799 A CN 104776799A CN 201510170038 A CN201510170038 A CN 201510170038A CN 104776799 A CN104776799 A CN 104776799A
Authority
CN
China
Prior art keywords
weld
weld seam
image
connected domain
pce
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
CN201510170038.8A
Other languages
Chinese (zh)
Other versions
CN104776799B (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.)
Tsinghua University
Original Assignee
Tsinghua University
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 Tsinghua University filed Critical Tsinghua University
Priority to CN201510170038.8A priority Critical patent/CN104776799B/en
Publication of CN104776799A publication Critical patent/CN104776799A/en
Application granted granted Critical
Publication of CN104776799B publication Critical patent/CN104776799B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Length Measuring Devices By Optical Means (AREA)
  • Image Analysis (AREA)

Abstract

一种使用侧向光构建光影特征的盖面焊前焊缝检测装置及方法,属于焊接自动化领域。该发明采用面光源照射焊缝边缘,成像元件放置在坡口侧壁镜面反射光轴附近,并避开母材和焊缝表面的镜面反射光轴,采集焊缝表面灰度图像,经处理控制单元进行图像处理后准确提取焊缝轨迹。本发明构建的侧向光照条件能有效凸显焊缝边缘特征信息,焊缝边缘灰度接近饱和,便于快速、准确地提取焊缝轨迹位置;检测精度可达0.04mm,系统结构简单,成本低,实时性好,适用于焊缝与母材表面高度差低至1mm甚至更低的盖面焊前焊缝轨迹自动检测场合。

A device and method for detecting a weld seam before welding on a cover surface using side light to construct light and shadow features, belonging to the field of welding automation. The invention uses a surface light source to irradiate the edge of the weld, and the imaging element is placed near the optical axis of the specular reflection on the side wall of the groove, and avoids the optical axis of the specular reflection on the base material and the surface of the weld, and collects the grayscale image of the weld surface, which is processed and controlled After image processing by the unit, the seam trajectory can be accurately extracted. The lateral illumination condition constructed by the invention can effectively highlight the feature information of the edge of the weld, and the gray level of the edge of the weld is close to saturation, which is convenient for quickly and accurately extracting the position of the weld trajectory; the detection accuracy can reach 0.04mm, the system structure is simple, and the cost is low. It has good real-time performance and is suitable for automatic detection of weld trajectory before cover welding where the height difference between the weld seam and the base metal surface is as low as 1mm or even lower.

Description

使用侧向光构建光影特征的盖面焊前焊缝检测装置及方法Apparatus and method for pre-weld weld detection on cap surface using side light to construct light and shadow features

技术领域technical field

本发明属于焊接自动化领域,特别涉及一种使用侧向光构建光影特征的盖面焊前焊缝检测装置及方法。The invention belongs to the field of welding automation, and in particular relates to a welding seam detection device and method for cover surface before welding by using side light to construct light and shadow features.

背景技术Background technique

盖面焊前焊缝轨迹在线检测在焊接过程实时跟踪等应用场合具有重要意义。目前,结构光方法被广泛应用于焊缝检测领域,然而在盖面焊前焊缝轨迹检测场合,特别在焊缝与母材表面高度差低至1mm甚至更低的场合,焊缝表面的几何结构特征变得十分微弱,结构光光条畸变特征的缺失将导致无法有效准确识别焊缝轨迹。目前,尚未有一种能适用于以上场合的焊缝轨迹检测装置及方法。On-line detection of weld trajectory before cap welding is of great significance in applications such as real-time tracking of the welding process. At present, the structured light method is widely used in the field of weld detection. However, in the case of weld trajectory detection before cover welding, especially when the height difference between the weld and the base metal surface is as low as 1 mm or even lower, the geometry of the weld surface The structural features become very weak, and the lack of distortion features of the structured light strip will make it impossible to effectively and accurately identify the weld trajectory. At present, there is no welding seam trajectory detection device and method applicable to the above occasions.

发明内容Contents of the invention

本发明的目的是针对已有技术的不足之处,提出一种使用侧向光构建光影特征的盖面焊前焊缝检测装置及方法,该发明旨在解决目前技术存在的过分依赖焊缝宏观几何结构特征、检测精度和适用性受限等问题,以求实现盖面焊前焊缝轨迹自动识别,特别针对焊缝与母材表面高度差低至1mm甚至更低的盖面焊前焊缝轨迹自动检测场合。The purpose of the present invention is to address the deficiencies of the prior art, and to propose a device and method for detecting weld seams on the cover surface before welding using side light to construct light and shadow features. Geometric structural features, detection accuracy and limited applicability, etc., in order to realize automatic identification of weld trajectory before cap welding, especially for pre-weld welds with a height difference between the weld seam and the base metal surface as low as 1mm or even lower Track automatic detection occasions.

本发明的技术方案如下:Technical scheme of the present invention is as follows:

一种使用侧向光构建光影特征的盖面焊前焊缝检测装置,其特征在于:包括面光源阵列、成像元件和处理控制单元;所述面光源阵列包含至少两个面光源,所述面光源分别放置在待检测焊缝两侧,同侧的面光源发出的光线投射在另一侧的待检测焊缝与母材的边缘处;所述面光源、待检测焊缝与所述成像元件的相对位置满足:成像元件采集每个面光源的主轴光线经坡口侧壁的镜面反射光,且成像元件不采集每个面光源的主轴光线经母材和待检测焊缝表面的镜面反射光;所述面光源阵列与处理控制单元通过导线相连;所述成像元件与处理控制单元通过导线相连,或通过无线传输方式通讯;所述处理控制单元处理成像元件采集的图像;A pre-weld inspection device for cover surface welding using side light to construct light and shadow features, characterized in that it includes a surface light source array, an imaging element and a processing control unit; the surface light source array includes at least two surface light sources, and the surface light source array includes at least two surface light sources. The light sources are respectively placed on both sides of the weld to be detected, and the light emitted by the surface light source on the same side is projected on the edge of the weld to be detected and the base material on the other side; the surface light source, the weld to be detected and the imaging element The relative position of is satisfied: the imaging element collects the specular reflection light of the main axis ray of each surface light source passing through the side wall of the groove, and the imaging element does not collect the specular reflection light of the main axis ray of each surface light source passing through the base material and the surface of the weld to be detected The surface light source array is connected to the processing control unit through wires; the imaging element is connected to the processing control unit through wires, or communicates through wireless transmission; the processing control unit processes the image collected by the imaging element;

本发明所述的盖面焊前焊缝检测装置,其特征在于:所述成像元件为电荷耦合器件、互补金属氧化物半导体成像器件、位置敏感器件或电荷注入器件;所述成像元件的敏感波长范围大于或等于所述面光源的发光波长范围;The welding seam detection device before cover welding according to the present invention is characterized in that: the imaging element is a charge coupled device, a complementary metal oxide semiconductor imaging device, a position sensitive device or a charge injection device; the sensitive wavelength of the imaging element is The range is greater than or equal to the emission wavelength range of the surface light source;

本发明提供的一种使用侧向光构建光影特征的盖面焊前焊缝检测方法,其特征在于该方法包括以下步骤:The present invention provides a method for detecting a weld seam on a cover surface before welding using side light to construct light and shadow features, which is characterized in that the method includes the following steps:

1)将位于待检测焊缝两侧的所有面光源同时点亮,或位于待检测焊缝不同侧的面光源交替点亮;1) Turn on all surface light sources located on both sides of the weld to be detected at the same time, or alternately light up surface light sources on different sides of the weld to be detected;

2)所述面光源发出的光线投射在待检测焊缝边缘处,所述处理控制单元控制所述成像元件采集图像,所述成像元件将采集的焊缝表面灰度图像传输至所述处理控制单元,处理控制单元对所述焊缝表面灰度图像进行预处理:2) The light emitted by the surface light source is projected on the edge of the weld to be detected, the processing control unit controls the imaging element to collect images, and the imaging element transmits the collected weld surface grayscale image to the processing control unit unit, the processing control unit preprocesses the grayscale image of the weld surface:

a)若将位于待检测焊缝两侧的所有面光源同时点亮,所述处理控制单元控制成像元件在所述面光源阵列点亮时采集焊缝表面灰度图像,记为I(x,y),其中x,y分别是焊缝表面灰度图像的行坐标值和列坐标值,所述成像元件将焊缝表面灰度图像传输至所述处理控制单元;处理控制单元使用阈值分割方法,将所述焊缝表面灰度图像I(x,y)转换为二值图像B(x,y);处理控制单元提取所述二值图像B(x,y)中面积最大的两个连通域,记为R1和R2a) If all the surface light sources on both sides of the weld to be detected are turned on at the same time, the processing control unit controls the imaging element to collect a grayscale image of the surface of the weld when the surface light source array is turned on, denoted as I(x, y), where x, y are row coordinates and column coordinates of the weld surface grayscale image respectively, and the imaging element transmits the weld surface grayscale image to the processing control unit; the processing control unit uses a threshold segmentation method , convert the grayscale image I(x,y) of the weld surface into a binary image B(x,y); the processing control unit extracts the two connected elements with the largest area in the binary image B(x,y) domain, denoted as R 1 and R 2 ;

b)若位于待检测焊缝不同侧的面光源交替点亮,所述处理控制单元发出触发信号,使成像元件分别在不同侧的面光源点亮时采集焊缝表面灰度图像,分别记为I1(x,y)和I2(x,y),其中x,y分别是焊缝表面灰度图像的行坐标值和列坐标值,所述成像元件将焊缝表面灰度图像传输至所述处理控制单元;处理控制单元使用阈值分割方法,分别将所述焊缝表面灰度图像I1(x,y)和I2(x,y)转换为二值图像B1(x,y)和B2(x,y);所述处理控制单元分别提取所述二值图像B1(x,y)和B2(x,y)中面积最大的连通域,记为R1和R2b) If the surface light sources on different sides of the weld to be detected are turned on alternately, the processing control unit sends a trigger signal, so that the imaging element collects the grayscale images of the weld surface when the surface light sources on different sides are turned on, respectively denoted as I 1 (x, y) and I 2 (x, y), where x, y are the row coordinates and column coordinates of the weld surface grayscale image respectively, and the imaging element transmits the weld surface grayscale image to The processing control unit; the processing control unit converts the weld surface grayscale images I 1 (x, y) and I 2 (x, y) into binary images B 1 (x, y ) and B 2 (x, y); the processing control unit respectively extracts the connected domains with the largest area in the binary images B 1 (x, y) and B 2 (x, y), denoted as R 1 and R 2 ;

3)设连通域R1和R2包含的像素点个数分别为#R1和#R2,连通域R1中的第i个像素点坐标为(x1i,y1i),连通域R2中的第j个像素点坐标为(x2j,y2j),其中#R1和#R2均是正整数,i为大于零且小于或等于#R1的正整数,j为大于零且小于或等于#R2的正整数;所述处理控制单元对所述连通域R1和R2进行处理,提取焊缝与母材的边缘坐标:3) Let the number of pixels contained in the connected domain R 1 and R 2 be #R 1 and #R 2 respectively, the i-th pixel coordinate in the connected domain R 1 is (x 1i , y 1i ), and the connected domain R The coordinates of the jth pixel in 2 are (x 2j , y 2j ), where both #R 1 and #R 2 are positive integers, i is a positive integer greater than zero and less than or equal to #R 1 , and j is greater than zero and A positive integer less than or equal to #R 2 ; the processing control unit processes the connected domains R 1 and R 2 to extract the edge coordinates of the weld seam and the base metal:

a)若焊缝轨迹与焊缝表面灰度图像列坐标轴夹角大于45°,则计算连通域R1和R2 a) If the angle between the weld track and the coordinate axis of the gray image of the weld surface is greater than 45°, calculate the connected domains R 1 and R 2

所有像素点的平均列坐标 Average column coordinates of all pixels and

ythe y ‾‾ 11 == ΣΣ ii == 11 ## RR 11 ythe y 11 ii ## RR 11 ythe y ‾‾ 22 == ΣΣ jj == 11 ## RR 22 ythe y 22 jj ## RR 22

则将连通域R1记为焊缝左边缘区域,将连通域R2记为焊缝右边缘区域;若则将连通域R1记为焊缝右边缘区域,将连通域R2记为焊缝左边缘区域;记所述焊缝左边缘区域为L1,所述焊缝右边缘区域为L2;设所述焊缝左边缘区域L1第m行像素点的列坐标值组成的集合为Q1m,所述焊缝右边缘区域L2第m行像素点的列坐标值组成的集合为Q2m,其中m为大于零且小于或等于所述焊缝表面灰度图像总行数的正整数;逐行扫描所述焊缝左边缘区域L1和焊缝右边缘区域L2,计算第m行焊缝左边缘点的列坐标Y1m和右边缘点的列坐标Y2mlike Then the connected domain R 1 is recorded as the left edge area of the weld, and the connected domain R 2 is recorded as the right edge area of the weld; if Then the connected domain R1 is recorded as the right edge area of the weld, and the connected domain R2 is recorded as the left edge area of the weld; the left edge area of the weld is recorded as L1 , and the right edge area of the weld is L2 ; Assume that the set of column coordinate values of the pixel points in the mth row of the left edge area L of the weld is Q 1m , and the set of column coordinate values of the pixel points in the mth row of the right edge area of the weld L2 is Q 2m , where m is a positive integer greater than zero and less than or equal to the total number of lines of the weld surface grayscale image; scan the weld left edge area L 1 and weld right edge area L 2 line by line, and calculate the mth line of weld Sew the column coordinate Y 1m of the left edge point and the column coordinate Y 2m of the right edge point:

Y1m=max(Q1m)Y 1m =max(Q 1m )

Y2m=min(Q2m)Y 2m =min(Q 2m )

其中,max(Q1m)表示集合Q1m的最大元素,min(Q2m)表示集合Q2m的最小元素;Among them, max(Q 1m ) represents the largest element of the set Q 1m , and min(Q 2m ) represents the smallest element of the set Q 2m ;

b)若焊缝轨迹与焊缝表面灰度图像列坐标轴夹角小于或等于45°,则计算连通域R1和R2所有像素点的平均行坐标 b) If the angle between the weld trajectory and the column coordinate axis of the weld surface gray image is less than or equal to 45°, calculate the average row coordinates of all pixels in the connected domains R 1 and R 2 and

xx ‾‾ 11 == ΣΣ ii == 11 ## RR 11 xx 11 ii ## RR 11 xx ‾‾ 22 == ΣΣ jj == 11 ## RR 22 xx 22 jj ## RR 22

则将连通域R1记为焊缝上边缘区域,将连通域R2记为焊缝下边缘区域;若则将连通域R1记为焊缝下边缘区域,将连通域R2记为焊缝上边缘区域;记所述焊缝上边缘区域为U1,所述焊缝下边缘区域为U2;设所述焊缝上边缘区域U1第k列像素点的行坐标值组成的集合为P1k,所述焊缝下边缘区域U2第k列像素点的行坐标值组成的集合为P2k-,其中k为大于零且小于或等于所述焊缝表面灰度图像总列数的正整数;逐列扫描所述焊缝上边缘区域U1和焊缝下边缘区域U2,计算第k列焊缝上边缘点的行坐标X1k和下边缘点的行坐标X2klike Then the connected domain R 1 is recorded as the upper edge area of the weld, and the connected domain R 2 is recorded as the lower edge area of the weld; if Then the connected domain R 1 is recorded as the lower edge region of the weld, and the connected domain R 2 is recorded as the upper edge region of the weld; the upper edge region of the weld is recorded as U 1 , and the lower edge region of the weld is U 2 ; Assume that the set of row coordinate values of the pixel points in the kth column of the upper edge area U1 of the weld is P 1k , and the set of row coordinate values of the pixel points in the kth column of the lower edge area of the weld seam U2 is P 2k -, where k is a positive integer greater than zero and less than or equal to the total number of columns of the weld surface gray image; scan the weld upper edge area U 1 and weld lower edge area U 2 column by column, and calculate the kth The row coordinate X 1k of the upper edge point of the column weld and the row coordinate X 2k of the lower edge point:

X1k=max(P1k)X 1k =max(P 1k )

X2k=min(P2k)X 2k =min(P 2k )

其中,max(P1k)表示集合P1k的最大元素,min(P2k)表示集合P2k的最小元素。Wherein, max(P 1k ) represents the largest element of the set P 1k , and min(P 2k ) represents the smallest element of the set P 2k .

本发明与已有技术相比,本发明不过分依赖于焊缝表面的宏观几何结构特征,其构建的侧向光照条件能有效凸显焊缝边缘特征信息,坡口侧壁灰度接近饱和,便于快速、准确地提取焊缝轨迹位置;检测精度可达0.04mm甚至更高,系统结构简单,成本低,实时性好,适用于焊缝与母材表面高度差低至1mm甚至更低的盖面焊前焊缝轨迹检测场合。Compared with the prior art, the present invention does not rely too much on the macroscopic geometric structure characteristics of the weld surface, and the side lighting conditions constructed by it can effectively highlight the feature information of the weld edge, and the gray scale of the side wall of the groove is close to saturation, which is convenient Quickly and accurately extract the position of the weld trajectory; the detection accuracy can reach 0.04mm or even higher, the system structure is simple, the cost is low, and the real-time performance is good. It is suitable for the cover surface where the height difference between the weld seam and the base metal surface is as low as 1mm or even lower The occasion of weld track detection before welding.

附图说明Description of drawings

图1为本发明提出的一种使用侧向光构建光影特征的盖面焊前焊缝检测装置实施例的结构原理示意图。FIG. 1 is a schematic diagram of the structure and principle of an embodiment of a welding seam detection device for cover surface before welding using side light to construct light and shadow features proposed by the present invention.

图2为本发明提出的一种使用侧向光构建光影特征的盖面焊前焊缝检测装置实施例中第一面光源光线的主轴光线在工件表面的反射状况示意图。Fig. 2 is a schematic diagram of the reflection of the main axis ray of the first surface light source ray on the surface of the workpiece in the embodiment of the welding seam inspection device before welding of the cover surface using side light to construct the light and shadow feature proposed by the present invention.

图3为本发明提出的一种使用侧向光构建光影特征的盖面焊前焊缝检测方法第一个实施例和第二个实施例的流程图。Fig. 3 is a flow chart of the first embodiment and the second embodiment of a welding seam inspection method for cover surface before welding using side light to construct light and shadow features proposed by the present invention.

图4为本发明提出的一种使用侧向光构建光影特征的盖面焊前焊缝检测方法第一个实施例中所有面光源同时点亮时成像元件采集的焊缝表面灰度图像。Fig. 4 is a grayscale image of the weld surface collected by the imaging element when all the surface light sources are turned on simultaneously in the first embodiment of the method for detecting the weld seam before welding using side light to construct light and shadow features proposed by the present invention.

图5为本发明提出的一种使用侧向光构建光影特征的盖面焊前焊缝检测方法第一个实施例中提取二值图像最大连通域的处理结果。Fig. 5 is a processing result of extracting the maximum connected domain of a binary image in the first embodiment of a method for detecting a pre-weld weld seam on a cover surface using side light to construct light and shadow features proposed by the present invention.

图6为本发明提出的一种使用侧向光构建光影特征的盖面焊前焊缝检测方法第一个实施例中焊缝轨迹最终提取结果。Fig. 6 is the final extraction result of the weld track in the first embodiment of the method for detecting the weld seam on the cover surface before welding using side light to construct light and shadow features proposed by the present invention.

图7为本发明提出的一种使用侧向光构建光影特征的盖面焊前焊缝检测方法第二个实施例中第一面光源点亮时成像元件采集的焊缝表面灰度图像。Fig. 7 is a grayscale image of the weld surface collected by the imaging element when the first surface light source is turned on in the second embodiment of the method for detecting the weld seam before welding on the cover surface using side light to construct light and shadow features proposed by the present invention.

图8为本发明提出的一种使用侧向光构建光影特征的盖面焊前焊缝检测方法第二个实施例中第二面光源点亮时成像元件采集的焊缝表面灰度图像。Fig. 8 is a grayscale image of the weld surface collected by the imaging element when the second surface light source is turned on in the second embodiment of the method for detecting a weld seam before welding using side light to construct light and shadow features proposed by the present invention.

图9为本发明提出的一种使用侧向光构建光影特征的盖面焊前焊缝检测方法第二个实施例中提取二值图像最大连通域的处理结果。Fig. 9 is a processing result of extracting the maximum connected domain of a binary image in the second embodiment of a method for detecting a pre-weld weld seam on a cover surface using side light to construct light and shadow features proposed by the present invention.

图10为本发明提出的一种使用侧向光构建光影特征的盖面焊前焊缝检测方法第二个实施例中焊缝轨迹最终提取结果。Fig. 10 is the final extraction result of the weld track in the second embodiment of the method for detecting the weld seam before welding on the cover surface using side light to construct light and shadow features proposed by the present invention.

在图1至图10中:In Figures 1 to 10:

1—面光源阵列;11—第一面光源;12—第二面光源;2—成像元件;3—处理控制单元;4—待检测焊缝;α—在第一面光源投射的焊缝与母材边缘处坡口侧壁与母材表面的夹角;β—第一面光源的主轴光线与母材表面的夹角;R1,R2—二值图像中面积最大的两个连通域。1—surface light source array; 11—first surface light source; 12—second surface light source; 2—imaging element; 3—processing control unit; 4—weld seam to be detected; The angle between the side wall of the groove at the edge of the base metal and the surface of the base metal; β—the angle between the main axis ray of the first surface light source and the surface of the base metal; R 1 , R 2 —the two connected domains with the largest areas in the binary image .

具体实施方式Detailed ways

下面结合附图对本发明的结构、原理和工作过程作进一步说明。The structure, principle and working process of the present invention will be further described below in conjunction with the accompanying drawings.

图1为本发明提出的一种使用侧向光构建光影特征的盖面焊前焊缝检测装置实施例的结构原理示意图,包括面光源阵列1、成像元件2和处理控制单元3;所述面光源阵列1包含两个面光源,分别称为第一面光源11和第二面光源12;所述第一面光源11和第二面光源12使用发光二极管阵列条形光源,发光功率5.7W,发光波长位于可见光波长范围内,分别放置在待检测焊缝4两侧,同侧的面光源发出的光线投射在另一侧的待检测焊缝4与母材的边缘处;成像元件2采用千兆以太网互补金属氧化物半导体成像器件,敏感波长范围大于可见光波长范围,图像大小为1600×1200,视场范围约为55.5mm×41.0mm,检测精度可达0.04mm,图像灰度范围为0至255;待检测焊缝4为盖面焊前焊缝,焊缝与母材表面高度差约1mm,熔宽约14mm;处理控制单元3使用CPU主频为2.3GHz、内存4GB的工业计算机;面光源阵列1与处理控制单元3通过导线连接;成像元件2与处理控制单元3通过导线连接;处理控制单元3处理成像元件2采集的图像。Fig. 1 is a schematic diagram of the structure and principle of an embodiment of a pre-weld weld detection device using side light to construct light and shadow features proposed by the present invention, including a surface light source array 1, an imaging element 2 and a processing control unit 3; The light source array 1 includes two surface light sources, which are respectively called the first surface light source 11 and the second surface light source 12; the first surface light source 11 and the second surface light source 12 use LED array strip light sources with a luminous power of 5.7W. The luminous wavelength is within the visible light wavelength range, and they are respectively placed on both sides of the weld 4 to be detected, and the light emitted by the surface light source on the same side is projected on the edge of the weld 4 to be detected on the other side and the base material; Mega Ethernet complementary metal oxide semiconductor imaging device, the sensitive wavelength range is greater than the visible light wavelength range, the image size is 1600×1200, the field of view is about 55.5mm×41.0mm, the detection accuracy can reach 0.04mm, and the image grayscale range is 0 to 255; the weld 4 to be detected is the weld before the cover welding, the height difference between the weld and the base metal surface is about 1mm, and the melting width is about 14mm; the processing control unit 3 uses an industrial computer with a CPU frequency of 2.3GHz and a memory of 4GB; The surface light source array 1 is connected to the processing control unit 3 through a wire; the imaging element 2 is connected to the processing control unit 3 through a wire; the processing control unit 3 processes the image collected by the imaging element 2 .

图2为本发明提出的一种使用侧向光构建光影特征的盖面焊前焊缝检测装置实施例中第一面光源11的主轴光线在工件表面的反射状况示意图。以第一面光源11为例,设第一面光源11的主轴光线与母材表面的夹角为β,在第一面光源11投射的焊缝与母材边缘处坡口侧壁与母材表面的夹角为α。根据光的反射定律,第一面光源11的主轴光线经坡口侧壁的镜面反射光与母材表面的夹角为β+2α;第一面光源11的主轴光线经母材表面的镜面反射光与母材表面的夹角为β;由于焊缝表面一般较为平缓,第一面光源11的主轴光线经焊缝表面的镜面反射光与母材表面的夹角也近似为β。为突出焊缝边缘特征,应使成像元件2能采集坡口侧壁的镜面反射光,且尽量避开母材和焊缝表面的镜面反射光,因此应使第一面光源11的主轴光线经坡口侧壁的镜面反射光与母材表面的夹角β+2α尽可能接近90°,且经母材和焊缝表面的镜面反射光与母材表面的夹角β尽可能接近0°。在本发明实施例中,在第一面光源11投射的焊缝与母材边缘处坡口侧壁与母材表面的夹角为α=60°,因此第一面光源11的主轴光线与母材表面的夹角β应尽可能接近-30°,且尽可能接近0°。考虑到第一面光源11的主轴光线必须要投射在焊缝与母材边缘处,β应大于或等于零度。在本实施例中,β取10°。同理,第二面光源12的布置方式亦应使得成像元件2采集坡口侧壁处的镜面反射光,且成像元件2不采集母材和焊缝表面的镜面反射光。Fig. 2 is a schematic diagram of the reflection of the main axis light of the first surface light source 11 on the surface of the workpiece in the embodiment of the welding seam inspection device before welding of the cover surface using side light to construct the light and shadow features proposed by the present invention. Taking the first surface light source 11 as an example, assuming that the angle between the main axis ray of the first surface light source 11 and the surface of the base material is β, the groove side wall and the base material edge at the edge of the weld projected by the first surface light source 11 and the base material The angle between the surfaces is α. According to the law of light reflection, the angle between the main axis ray of the first surface light source 11 and the surface of the base material through the specular reflection of the groove side wall is β+2α; the main axis ray of the first surface light source 11 is reflected by the mirror surface of the base material surface The angle between the light and the surface of the base metal is β; since the surface of the weld is generally flat, the angle between the specularly reflected light of the main axis light of the first surface light source 11 and the surface of the base metal is also approximately β. In order to highlight the edge features of the weld, the imaging element 2 should be able to collect the specular reflection light of the side wall of the groove, and try to avoid the specular reflection light of the base material and the surface of the weld seam. Therefore, the main axis light of the first surface light source 11 should pass through The angle β+2α between the specular reflection light on the side wall of the groove and the surface of the base metal is as close to 90° as possible, and the angle β between the specular reflection light on the surface of the base metal and the weld surface and the surface of the base metal is as close to 0° as possible. In the embodiment of the present invention, the angle between the groove side wall and the surface of the base material at the edge of the weld projected by the first surface light source 11 and the base material is α=60°, so the main axis ray of the first surface light source 11 and the base material The angle β on the surface of the material should be as close to -30° as possible and as close to 0° as possible. Considering that the main axis ray of the first surface light source 11 must be projected on the edge of the weld seam and the base material, β should be greater than or equal to zero degrees. In this embodiment, β is set to be 10°. Similarly, the arrangement of the second surface light source 12 should also make the imaging element 2 collect the specularly reflected light at the sidewall of the groove, and the imaging element 2 does not collect the specularly reflected light on the base material and the weld seam surface.

图3为本发明提出的一种使用侧向光构建光影特征的盖面焊前焊缝检测方法第一个实施例和第二个实施例的流程图。在第一个实施例中,位于待检测焊缝4两侧的所有面光源同时点亮;在第二个实施例中,位于待检测焊缝4两侧的第一面光源11和第二面光源12以60Hz的频率交替点亮。Fig. 3 is a flow chart of the first embodiment and the second embodiment of a welding seam inspection method for cover surface before welding using side light to construct light and shadow features proposed by the present invention. In the first embodiment, all the surface light sources located on both sides of the weld seam 4 to be detected are turned on at the same time; The light source 12 lights up alternately at a frequency of 60 Hz.

对于本发明提出的一种使用侧向光构建光影特征的盖面焊前焊缝检测方法第一个实施例,首先将位于待检测焊缝4两侧的所有面光源同时点亮,然后处理控制单元3控制成像元件2在面光源阵列1点亮时采集焊缝表面灰度图像I(x,y),其中x,y分别是焊缝表面灰度图像的行坐标值和列坐标值,成像元件2将焊缝表面灰度图像I(x,y)传输至处理控制单元3。图4为本发明提出的一种使用侧向光构建光影特征的盖面焊前焊缝检测方法第一个实施例中所有面光源同时点亮时成像元件2采集的焊缝表面灰度图像I(x,y)。由图4可知,坡口侧壁呈现高亮区域,母材和焊缝表面的灰度值明显低于坡口侧壁,与图2中的光路分析结果一致,有望快速、准确地检测焊缝边缘。获得焊缝表面灰度图像I(x,y)后,处理控制单元3使用阈值分割方法,将焊缝表面灰度图像I(x,y)转换为二值图像B(x,y),此处使用的分割阈值为焊缝表面灰度图像最大灰度值255的0.75倍。处理控制单元3提取二值图像B(x,y)中面积最大的两个连通域R1和R2For the first embodiment of the method for detecting a weld seam before welding using side light to construct light and shadow features proposed by the present invention, firstly, all the surface light sources located on both sides of the weld seam 4 to be inspected are simultaneously lit, and then the processing control Unit 3 controls the imaging element 2 to collect the weld surface grayscale image I(x, y) when the surface light source array 1 is turned on, where x, y are the row coordinate values and column coordinate values of the weld surface grayscale image respectively, and the imaging Component 2 transmits the weld seam surface grayscale image I(x,y) to processing control unit 3 . Fig. 4 is the weld surface grayscale image I collected by the imaging element 2 when all the surface light sources are turned on simultaneously in the first embodiment of the method for detecting the weld seam before welding using side light to construct light and shadow features proposed by the present invention. (x,y). It can be seen from Figure 4 that the side wall of the groove presents a bright area, and the gray value of the base metal and the surface of the weld is significantly lower than that of the side wall of the groove, which is consistent with the optical path analysis results in Figure 2, and it is expected to detect the weld quickly and accurately edge. After obtaining the grayscale image I(x,y) of the weld surface, the processing control unit 3 converts the grayscale image I(x,y) of the weld surface into a binary image B(x,y) using a threshold segmentation method. The segmentation threshold used here is 0.75 times the maximum gray value of 255 in the gray image of the weld surface. The processing control unit 3 extracts the two connected domains R 1 and R 2 with the largest areas in the binary image B(x,y).

图5为本发明提出的一种使用侧向光构建光影特征的盖面焊前焊缝检测方法第一个实施例中提取二值图像B(x,y)最大连通域R1和R2的处理结果,其中图5左侧的连通域为R1,右侧的连通域为R2。设连通域R1和R2包含的像素点个数分别为#R1和#R2,连通域R1中的第i个像素点坐标为(x1i,y1i),连通域R2中的第j个像素点坐标为(x2j,y2j),其中#R1和#R2均是正整数,i为大于零且小于或等于#R1的正整数,j为大于零且小于或等于#R2的正整数。在本实施例中,焊缝轨迹与焊缝表面灰度图像I(x,y)列坐标轴的夹角大于45°。为区分焊缝左边缘区域和右边缘区域,计算连通域R1和R2的平均列坐标:Fig. 5 is the maximum connected region R 1 and R 2 of the binary image B(x, y) extracted in the first embodiment of a method for detecting a pre-weld weld seam using side light to construct light and shadow features proposed by the present invention. Processing results, where the connected domain on the left side of Figure 5 is R 1 , and the connected domain on the right side is R 2 . Let the number of pixels contained in the connected domain R 1 and R 2 be respectively #R 1 and #R 2 , the i-th pixel coordinate in the connected domain R 1 is (x 1i , y 1i ), in the connected domain R 2 The coordinates of the jth pixel of is (x 2j , y 2j ), where #R 1 and #R 2 are both positive integers, i is a positive integer greater than zero and less than or equal to #R 1 , and j is greater than zero and less than or A positive integer equal to #R 2 . In this embodiment, the included angle between the weld track and the coordinate axis of the weld surface grayscale image I(x, y) is greater than 45°. In order to distinguish the left edge region and the right edge region of the weld, the average column coordinates of the connected domains R1 and R2 are calculated:

ythe y ‾‾ 11 == ΣΣ ii == 11 ## RR 11 ythe y 11 ii ## RR 11 ythe y ‾‾ 22 == ΣΣ jj == 11 ## RR 22 ythe y 22 jj ## RR 22 -- -- -- (( 11 ))

焊缝左边缘区域的平均列坐标应小于焊缝右边缘区域的平均列坐标,因此若则将连通域R1记为焊缝左边缘区域,将连通域R2记为焊缝右边缘区域;若则将连通域R1记为焊缝右边缘区域,将连通域R2记为焊缝左边缘区域。在本实施例中,连通域R1为焊缝左边缘区域,连通域R2为焊缝右边缘区域。The average column coordinates of the region at the left edge of the weld should be smaller than the average column coordinates of the region at the right edge of the weld, so if Then the connected domain R 1 is recorded as the left edge area of the weld, and the connected domain R 2 is recorded as the right edge area of the weld; if Then the connected domain R1 is recorded as the right edge area of the weld, and the connected domain R2 is recorded as the left edge area of the weld. In this embodiment, the connected domain R 1 is the region of the left edge of the weld, and the connected domain R 2 is the region of the right edge of the weld.

记所述焊缝左边缘区域为L1,所述焊缝右边缘区域为L2;设所述焊缝左边缘区域L1第m行像素点的列坐标值组成的集合为Q1m,所述焊缝右边缘区域L2第m行像素点的列坐标值组成的集合为Q2m,其中m为大于零且小于或等于所述焊缝表面灰度图像总行数的正整数;逐行扫描所述焊缝左边缘区域L1和焊缝右边缘区域L2,计算第m行焊缝左边缘点的列坐标Y1m和右边缘点的列坐标Y2mNote that the left edge area of the weld is L 1 , and the right edge area of the weld is L 2 ; let the set of column coordinate values of the pixel points in the mth row of the left edge area L 1 be Q 1m , so The set of column coordinate values of the pixel points in the mth row of the right edge area L2 of the weld is Q 2m , where m is a positive integer greater than zero and less than or equal to the total number of rows of the grayscale image of the weld surface; line by line scanning For the left edge area L 1 of the weld and the right edge area L 2 of the weld, calculate the column coordinate Y 1m of the left edge point of the m-th row of the weld and the column coordinate Y 2m of the right edge point:

Y1m=max(Q1m)(2)Y 1m =max(Q 1m )(2)

Y2m=min(Q2m)Y 2m =min(Q 2m )

其中,max(Q1m)表示集合Q1m的最大元素,min(Q2m)表示集合Q2m的最小元素。图6为本发明提出的一种使用侧向光构建光影特征的盖面焊前焊缝检测方法第一个实施例中焊缝轨迹最终提取结果。可见,焊缝边缘被准确地提取出来。Wherein, max(Q 1m ) represents the largest element of the set Q 1m , and min(Q 2m ) represents the smallest element of the set Q 2m . Fig. 6 is the final extraction result of the weld track in the first embodiment of the method for detecting the weld seam on the cover surface before welding using side light to construct light and shadow features proposed by the present invention. It can be seen that the weld edge is accurately extracted.

对于本发明提出的一种使用侧向光构建光影特征的盖面焊前焊缝检测方法第二个实施例,位于待检测焊缝4两侧的第一面光源11和第二面光源12以60Hz的频率交替点亮。首先,处理控制单元3发出触发信号,使第一面光源11点亮,第二面光源12熄灭,并使成像元件2同步采集焊缝表面灰度图像I1(x,y);然后,处理控制单元3发出触发信号,使第二面光源12点亮,第一面光源11熄灭,并使成像元件3同步采集焊缝表面灰度图像I2(x,y);成像元件2将焊缝表面灰度图像I1(x,y)和I2(x,y)传输至处理控制单元3,其中x,y分别是焊缝表面灰度图像的行坐标值和列坐标值。图7和图8分别为本发明提出的一种使用侧向光构建光影特征的盖面焊前焊缝检测方法第二个实施例中第一面光源11和第二面光源12点亮时成像元件2采集的焊缝表面灰度图像。由图7和图8可知,坡口侧壁呈现高亮区域,母材和焊缝表面的灰度值明显低于坡口侧壁,与图2中的光路分析结果一致,有望快速、准确地检测焊缝边缘。获得焊缝表面灰度图像I1(x,y)和I2(x,y)后,处理控制单元3使用阈值分割方法,分别将焊缝表面灰度图像I1(x,y)和I2(x,y)转换为二值图像B1(x,y)和B2(x,y),此处使用的分割阈值为焊缝表面灰度图像最大灰度值255的0.75倍。处理控制单元3分别提取二值图像B1(x,y)和B2(x,y)中面积最大的连通域R1和R2For the second embodiment of the method for detecting a pre-weld weld seam on a cover surface using side light to construct light and shadow features proposed by the present invention, the first surface light source 11 and the second surface light source 12 located on both sides of the weld seam 4 to be inspected are as follows: The frequency of 60Hz lights up alternately. First, the processing control unit 3 sends a trigger signal to turn on the first surface light source 11, turn off the second surface light source 12, and make the imaging element 2 synchronously collect the grayscale image I 1 (x, y) of the weld surface; then, the processing The control unit 3 sends a trigger signal to turn on the second surface light source 12, turn off the first surface light source 11, and make the imaging element 3 synchronously collect the grayscale image I 2 (x, y) of the weld surface; The surface grayscale images I 1 (x, y) and I 2 (x, y) are transmitted to the processing control unit 3, where x, y are row coordinate values and column coordinate values of the weld surface grayscale image respectively. Fig. 7 and Fig. 8 respectively show the images when the first surface light source 11 and the second surface light source 12 are turned on in the second embodiment of a method for detecting weld seams before welding on top surface using side light to construct light and shadow features proposed by the present invention. The grayscale image of the weld surface collected by component 2. From Figure 7 and Figure 8, it can be seen that the side wall of the groove presents a bright area, and the gray value of the base metal and the surface of the weld is significantly lower than that of the side wall of the groove, which is consistent with the optical path analysis results in Figure 2, and it is expected to quickly and accurately Detect weld edges. After obtaining the weld surface grayscale images I 1 (x, y) and I 2 (x, y), the processing control unit 3 uses the threshold segmentation method to respectively convert the weld surface grayscale images I 1 (x, y) and I 2 (x, y) is converted into binary images B 1 (x, y) and B 2 (x, y), and the segmentation threshold used here is 0.75 times the maximum gray value of 255 in the gray image of the weld surface. The processing control unit 3 extracts the connected domains R 1 and R 2 with the largest areas in the binary images B 1 (x,y) and B 2 (x,y) respectively.

图9为本发明提出的一种使用侧向光构建光影特征的盖面焊前焊缝检测方法第二个实施例中提取二值图像B1(x,y)和B2(x,y)最大连通域R1和R2的处理结果,其中图9下方的连通域为R1,上方的连通域为R2。设连通域R1和R2包含的像素点个数分别为#R1和#R2,连通域R1中的第i个像素点坐标为(x1i,y1i),连通域R2中的第j个像素点坐标为(x2j,y2j),其中#R1和#R2均是正整数,i为大于零且小于或等于#R1的正整数,j为大于零且小于或等于#R2的正整数。在本实施例中,焊缝轨迹与焊缝表面灰度图像I1(x,y)和I2(x,y)列坐标轴的夹角小于45°,为区分焊缝上边缘区域和下边缘区域,计算连通域R1和R2的平均行坐标:Fig. 9 is the extraction of binary images B 1 (x, y) and B 2 (x, y) in the second embodiment of a method for detecting a pre-weld weld seam before welding using side light to construct light and shadow features proposed by the present invention Processing results of the largest connected domains R 1 and R 2 , where the lower connected domain in Figure 9 is R 1 , and the upper connected domain is R 2 . Let the number of pixels contained in the connected domain R 1 and R 2 be respectively #R 1 and #R 2 , the i-th pixel coordinate in the connected domain R 1 is (x 1i , y 1i ), in the connected domain R 2 The coordinates of the jth pixel of is (x 2j , y 2j ), where #R 1 and #R 2 are both positive integers, i is a positive integer greater than zero and less than or equal to #R 1 , and j is greater than zero and less than or A positive integer equal to #R 2 . In this embodiment, the included angle between the welding seam track and the coordinate axes of the weld surface grayscale images I 1 (x, y) and I 2 (x, y) is less than 45°, in order to distinguish the upper edge area of the weld seam from the lower one. For edge regions, calculate the average row coordinates of connected domains R1 and R2 :

xx ‾‾ 11 == ΣΣ ii == 11 ## RR 11 xx 11 ii ## RR 11 xx ‾‾ 22 == ΣΣ jj == 11 ## RR 22 xx 22 jj ## RR 22 -- -- -- (( 33 ))

焊缝上边缘区域的平均行坐标应小于焊缝下边缘区域的平均行坐标,因此若则将连通域R1记为焊缝上边缘区域,将连通域R2记为焊缝下边缘区域;若则将连通域R1记为焊缝下边缘区域,将连通域R2记为焊缝上边缘区域。在本实施例中,连通域R1为焊缝下边缘区域,连通域R2为焊缝上边缘区域。The average row coordinate of the upper edge area of the weld should be smaller than the average row coordinate of the lower edge area of the weld, so if Then the connected domain R 1 is recorded as the upper edge area of the weld, and the connected domain R 2 is recorded as the lower edge area of the weld; if Then the connected domain R1 is recorded as the lower edge region of the weld, and the connected domain R2 is recorded as the upper edge region of the weld. In this embodiment, the connected domain R 1 is the lower edge region of the weld, and the connected domain R 2 is the upper edge region of the weld.

记所述焊缝上边缘区域为U1,所述焊缝下边缘区域为U2;设所述焊缝上边缘区域U1第k列像素点的行坐标值组成的集合为P1k,所述焊缝下边缘区域U2第k列像素点的行坐标值组成的集合为P2k,其中k为大于零且小于或等于所述焊缝表面灰度图像总列数的正整数;逐列扫描所述焊缝上边缘区域U1和焊缝下边缘区域U2,计算第k列焊缝上边缘点的行坐标X1k和下边缘点的行坐标X2kNote that the upper edge area of the weld is U 1 , and the lower edge area of the weld is U 2 ; let the set of the row coordinate values of the pixel points in the kth column of the upper edge area U 1 be P 1k , so The set of row coordinate values of the pixel points in the kth column of the weld lower edge area U 2 is P 2k , where k is a positive integer greater than zero and less than or equal to the total number of columns of the weld surface grayscale image; column by column Scan the upper edge area U 1 of the weld and the lower edge area U 2 of the weld, and calculate the row coordinate X 1k of the upper edge point of the k-th column of the weld and the row coordinate X 2k of the lower edge point of the kth column:

X1k=max(P1k)(4)X 1k =max(P 1k )(4)

X2k=min(P2k)X 2k =min(P 2k )

其中,max(P1k)表示集合P1k的最大元素,min(P2k)表示集合P2k的最小元素。图10为本发明提出的一种使用侧向光构建光影特征的盖面焊前焊缝检测方法第二个实施例中焊缝轨迹最终提取结果。可见,焊缝边缘也被准确地提取出来。Wherein, max(P 1k ) represents the largest element of the set P 1k , and min(P 2k ) represents the smallest element of the set P 2k . Fig. 10 is the final extraction result of the weld track in the second embodiment of the method for detecting the weld seam before welding on the cover surface using side light to construct light and shadow features proposed by the present invention. It can be seen that the weld edge is also accurately extracted.

实验结果表明,在本发明的实施例中,本发明装置和方法的检测误差不超过0.04mm,且单张图像处理时间不超过15ms,满足高精度和高实时性要求。Experimental results show that, in the embodiment of the present invention, the detection error of the device and method of the present invention does not exceed 0.04 mm, and the processing time of a single image does not exceed 15 ms, meeting the requirements of high precision and high real-time performance.

应当说明的是,以上实施例仅用于说明本发明而并非限制本发明描述的方案;因此,尽管本说明书参照以上的实施例对本发明进行了详细的说明,但是本领域的普通技术人员应该理解,仍然可以对本发明进行修改或等同替换,如使用的面光源数量可为3个甚至更多、处理控制单元和成像元件可采用无线传输方式进行通讯等;而一切不脱离本发明的精神和范围的技术方案及其改进,其均应涵盖在本发明的权利要求范围当中。It should be noted that the above embodiments are only used to illustrate the present invention rather than limit the solution described in the present invention; therefore, although the specification has described the present invention in detail with reference to the above embodiments, those of ordinary skill in the art should understand , the present invention can still be modified or equivalently replaced, such as the number of surface light sources used can be 3 or more, the processing control unit and imaging elements can communicate with wireless transmission, etc.; and everything does not depart from the spirit and scope of the present invention The technical solutions and their improvements shall be included in the scope of the claims of the present invention.

本发明采用面光源阵列、成像元件、处理控制单元实现对盖面焊前焊缝轨迹自动检测;本发明构造的侧向光照条件可有效构建焊缝边缘处的光影特征,成像元件放置在坡口侧壁的镜面反射光轴附近,并避开母材和焊缝表面的镜面反射光轴,采集焊缝表面的灰度图像,经处理控制单元进行图像处理后准确提取焊缝轨迹。与传统的结构光检测方法相比,本发明提出的装置和方法不过分依赖于焊缝的宏观几何结构特征,焊缝边缘处的灰度特征明显,便于快速、准确检测焊缝轨迹位置,检测精度可达0.04mm;系统结构简单,成本低,实时性好,适用于焊缝与母材表面高度差低至1mm甚至更低的盖面焊前焊缝轨迹自动检测场合。The present invention adopts a surface light source array, an imaging element, and a processing control unit to realize the automatic detection of the weld track before the cover surface welding; the side illumination condition constructed by the present invention can effectively construct the light and shadow features at the edge of the weld, and the imaging element is placed on the groove The optical axis of the specular reflection of the side wall is near, and the optical axis of the specular reflection of the base material and the weld surface is avoided, the grayscale image of the weld surface is collected, and the weld track is accurately extracted after image processing by the processing control unit. Compared with the traditional structured light detection method, the device and method proposed by the present invention do not rely too much on the macro-geometric structural characteristics of the weld, and the gray features at the edge of the weld are obvious, which is convenient for fast and accurate detection of the position of the weld track, and detection The accuracy can reach 0.04mm; the system has simple structure, low cost, and good real-time performance. It is suitable for the automatic detection of the welding seam trajectory before the welding seam and the base metal surface height difference as low as 1mm or even lower.

Claims (3)

1. use lateral light to build a detection device before the cosmetic welding of shadow feature, it is characterized in that: comprise area source array (1), image-forming component (2) and processing and control element (PCE) (3); Described area source array (1) comprises at least two area sources, described area source is placed on weld seam to be detected (4) both sides respectively, the to be detected weld seam (4) of ray cast at opposite side that the area source of homonymy sends and the edge of mother metal; The relative position of described area source, weld seam to be detected and described image-forming component (2) meets: image-forming component (2) gathers the specular light of axial principal ray through groove sidewall of each area source, and image-forming component (2) axial principal ray that do not gather each area source is through the specular light on mother metal and weld seam to be detected (4) surface; Described area source array (1) is connected by wire with processing and control element (PCE); Described image-forming component (2) is connected by wire with processing and control element (PCE) (3), or by wireless transmission method communication; The image that described processing and control element (PCE) (3) process image-forming component (2) gathers.
2. a kind of lateral light that uses as claimed in claim 1 builds detection device before the cosmetic welding of shadow feature, it is characterized in that: described image-forming component is charge-coupled image sensor, complementary metal oxide semiconductor (CMOS) image device, position sensitive detector or charge injection device; The sensitive wave length scope of described image-forming component is more than or equal to the emission wavelength range of described area source.
3. a kind of lateral light that uses adopting device as claimed in claim 1 or 2 builds weld inspection method before the cosmetic welding of shadow feature, it is characterized in that the method comprises the following steps:
1) all area sources being positioned at weld seam both sides to be detected are lighted simultaneously, or the area source being positioned at weld seam to be detected not homonymy is alternately lighted;
2) ray cast that sends of described area source is at weld edge place to be detected, described processing and control element (PCE) controls described image-forming component and gathers image, the face of weld gray level image of collection is transferred to described processing and control element (PCE) by described image-forming component, and processing and control element (PCE) carries out pre-service to described face of weld gray level image:
If a) all area sources being positioned at weld seam both sides to be detected are lighted simultaneously, described processing and control element (PCE) controls image-forming component and gathers face of weld gray level image when described area source array is lighted, be designated as I (x, y), wherein x, y is row-coordinate value and the row coordinate figure of face of weld gray level image respectively, and face of weld gray level image is transferred to described processing and control element (PCE) by described image-forming component; Processing and control element (PCE) uses threshold segmentation method, and described face of weld gray level image I (x, y) is converted to bianry image B (x, y); Processing and control element (PCE) extracts two connected domains that in described bianry image B (x, y), area is maximum, is designated as R 1and R 2;
If the area source b) being positioned at weld seam to be detected not homonymy is alternately lighted, described processing and control element (PCE) sends trigger pip, makes image-forming component gather face of weld gray level image when the area source of not homonymy is lighted respectively, is designated as I respectively 1(x, y) and I 2(x, y), wherein x, y are row-coordinate value and the row coordinate figure of face of weld gray level image respectively, and face of weld gray level image is transferred to described processing and control element (PCE) by described image-forming component; Processing and control element (PCE) uses threshold segmentation method, respectively by described face of weld gray level image I 1(x, y) and I 2(x, y) is converted to bianry image B 1(x, y) and B 2(x, y); Described processing and control element (PCE) extracts described bianry image B respectively 1(x, y) and B 2the connected domain that in (x, y), area is maximum, is designated as R 1and R 2;
3) connected domain R is established 1and R 2the pixel number comprised is respectively #R 1and #R 2, connected domain R 1in i-th pixel coordinate be (x 1i, y 1i), connected domain R 2in a jth pixel coordinate be (x 2j, y 2j), wherein #R 1and #R 2are all positive integers, i is for being greater than zero and being less than or equal to #R 1positive integer, j is for being greater than zero and being less than or equal to #R 2positive integer; Described processing and control element (PCE) is to described connected domain R 1and R 2process, extract the edge coordinate of weld seam and mother metal:
If a) seam track and face of weld gray level image row coordinate axis angle are greater than 45 °, then calculate connected domain R 1and R 2the average row coordinate of all pixels with
y ‾ 1 = Σ i = 1 # R 1 y 1 i # R 1
y ‾ 2 = Σ j = 1 # R 2 y 2 j # R 2
If then by connected domain R 1be designated as weld seam left hand edge region, by connected domain R 2be designated as weld seam right hand edge region; If then by connected domain R 1be designated as weld seam right hand edge region, by connected domain R 2be designated as weld seam left hand edge region; Remember that described weld seam left hand edge region is L 1, described weld seam right hand edge region is L 2; If described weld seam left hand edge region L 1the set of the row coordinate figure composition of the capable pixel of m is Q 1m, described weld seam right hand edge region L 2the set of the row coordinate figure composition of the capable pixel of m is Q 2m, wherein m is the positive integer being greater than zero and being less than or equal to the total line number of described face of weld gray level image; Line by line scan described weld seam left hand edge region L 1with weld seam right hand edge region L 2, calculate the row coordinate Y of the capable weld seam left hand edge point of m 1mwith the row coordinate Y of right hand edge point 2m:
Y 1m=max(Q 1m)
Y 2m=min(Q 2m)
Wherein, max (Q 1m) represent set Q 1mgreatest member, min (Q 2m) represent set Q 2mleast member;
If b) seam track and face of weld gray level image row coordinate axis angle are less than or equal to 45 °, then calculate connected domain R 1and R 2the average row coordinate of all pixels with
x ‾ 1 = Σ i = 1 # R 1 x 1 i # R 1
x ‾ 2 = Σ j = 1 # R 2 x 2 j # R 2
If then by connected domain R 1be designated as weld seam upper edge region, by connected domain R 2be designated as weld seam lower edge margin; If then by connected domain R 1be designated as weld seam lower edge margin, by connected domain R 2be designated as weld seam upper edge region; Remember that described weld seam upper edge region is U 1, described weld seam lower edge margin is U 2; If described weld seam upper edge region U 1the set of the row-coordinate value composition of kth row pixel is P 1k, described weld seam lower edge margin U 2the set of the row-coordinate value composition of kth row pixel is P 2k, wherein k is the positive integer being greater than zero and being less than or equal to the total columns of described face of weld gray level image; Scan by column described weld seam upper edge region U 1with weld seam lower edge margin U 2, calculate the row-coordinate X of kth row weld seam up contour point 1kwith the row-coordinate X of down contour point 2k:
X 1k=max(P 1k)
X 2k=min(P 2k)
Wherein, max (P 1k) represent set P 1kgreatest member, min (P 2k) represent set P 2kleast member.
CN201510170038.8A 2015-04-10 2015-04-10 Detection device and method before the cosmetic welding of shadow feature are built using lateral light Active CN104776799B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510170038.8A CN104776799B (en) 2015-04-10 2015-04-10 Detection device and method before the cosmetic welding of shadow feature are built using lateral light

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510170038.8A CN104776799B (en) 2015-04-10 2015-04-10 Detection device and method before the cosmetic welding of shadow feature are built using lateral light

Publications (2)

Publication Number Publication Date
CN104776799A true CN104776799A (en) 2015-07-15
CN104776799B CN104776799B (en) 2017-06-13

Family

ID=53618415

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510170038.8A Active CN104776799B (en) 2015-04-10 2015-04-10 Detection device and method before the cosmetic welding of shadow feature are built using lateral light

Country Status (1)

Country Link
CN (1) CN104776799B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106990112A (en) * 2017-03-14 2017-07-28 清华大学 The multi-layer multi-pass welding track detection device and method merged based on multi-visual information
CN108662980A (en) * 2018-05-11 2018-10-16 易思维(天津)科技有限公司 Welding stud position detection device and method based on silhouette technology
CN110057289A (en) * 2019-04-25 2019-07-26 江苏理工学院 Multiple light courcess locating and detecting device and its control method before a kind of lithium battery pole slice welds
CN112894133A (en) * 2021-01-27 2021-06-04 浙江广合智能科技有限公司 Laser welding system and welding point position extraction method
CN116106980A (en) * 2023-04-13 2023-05-12 江苏时代新能源科技有限公司 Gap detection device and gap detection method

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE3134202A1 (en) * 1981-08-27 1983-03-31 Mannesmann AG, 4000 Düsseldorf Method for centring the deburring device and/or welding jig in the HF longitudinal welding of pipes
CN101334264A (en) * 2008-07-25 2008-12-31 华中科技大学 Method and device for measuring narrow butt welds in laser welding
CN101927395A (en) * 2010-07-26 2010-12-29 清华大学 Weld seam tracking detection equipment and method
CN102155920A (en) * 2011-03-22 2011-08-17 华中科技大学 Welding seam measuring method based on micro field depth
CN102495078A (en) * 2011-12-07 2012-06-13 天津理工大学 Method for detecting welding seam on basis of quantum dot infrared fluorescence display technology
CN102645219A (en) * 2012-05-16 2012-08-22 航天科工哈尔滨风华有限公司 Visual navigation system of wall climbing robot for weld inspection, welding and locating method of welding seam and method of obtaining welding seam offset
CN102780845A (en) * 2012-06-14 2012-11-14 清华大学 Light source alternate strobe synchronous camera shooting method and vision detection system
CN104748698A (en) * 2015-04-10 2015-07-01 清华大学 Device and method for detecting cap weld seams by means of constructing light and shadow features by aid of lateral light

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE3134202A1 (en) * 1981-08-27 1983-03-31 Mannesmann AG, 4000 Düsseldorf Method for centring the deburring device and/or welding jig in the HF longitudinal welding of pipes
CN101334264A (en) * 2008-07-25 2008-12-31 华中科技大学 Method and device for measuring narrow butt welds in laser welding
CN101927395A (en) * 2010-07-26 2010-12-29 清华大学 Weld seam tracking detection equipment and method
CN102155920A (en) * 2011-03-22 2011-08-17 华中科技大学 Welding seam measuring method based on micro field depth
CN102495078A (en) * 2011-12-07 2012-06-13 天津理工大学 Method for detecting welding seam on basis of quantum dot infrared fluorescence display technology
CN102645219A (en) * 2012-05-16 2012-08-22 航天科工哈尔滨风华有限公司 Visual navigation system of wall climbing robot for weld inspection, welding and locating method of welding seam and method of obtaining welding seam offset
CN102780845A (en) * 2012-06-14 2012-11-14 清华大学 Light source alternate strobe synchronous camera shooting method and vision detection system
CN104748698A (en) * 2015-04-10 2015-07-01 清华大学 Device and method for detecting cap weld seams by means of constructing light and shadow features by aid of lateral light

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106990112A (en) * 2017-03-14 2017-07-28 清华大学 The multi-layer multi-pass welding track detection device and method merged based on multi-visual information
CN106990112B (en) * 2017-03-14 2019-07-26 清华大学 Multi-layer and multi-pass welding track detection device and method based on multi-visual information fusion
CN108662980A (en) * 2018-05-11 2018-10-16 易思维(天津)科技有限公司 Welding stud position detection device and method based on silhouette technology
CN108662980B (en) * 2018-05-11 2019-07-02 易思维(天津)科技有限公司 Welding stud position detection device and method based on silhouette technology
CN110057289A (en) * 2019-04-25 2019-07-26 江苏理工学院 Multiple light courcess locating and detecting device and its control method before a kind of lithium battery pole slice welds
CN112894133A (en) * 2021-01-27 2021-06-04 浙江广合智能科技有限公司 Laser welding system and welding point position extraction method
CN112894133B (en) * 2021-01-27 2023-08-04 浙江广合智能科技有限公司 Laser welding system and welding spot position extraction method
CN116106980A (en) * 2023-04-13 2023-05-12 江苏时代新能源科技有限公司 Gap detection device and gap detection method
CN116106980B (en) * 2023-04-13 2024-02-20 江苏时代新能源科技有限公司 Gap detection device and gap detection method

Also Published As

Publication number Publication date
CN104776799B (en) 2017-06-13

Similar Documents

Publication Publication Date Title
CN104776799B (en) Detection device and method before the cosmetic welding of shadow feature are built using lateral light
CN103499585B (en) Based on noncontinuity lithium battery film defect inspection method and the device thereof of machine vision
CN110490847A (en) The LED chip quality determining method of view-based access control model
CN102288613B (en) Surface defect detecting method for fusing grey and depth information
CN103884720B (en) FPGA (Field Programmable Gate Array)-based real-time PET (Polyethylene Terephthalate) bottle cover defect detection system and method
CN106824806B (en) The detection method of low module plastic gear based on machine vision
CN106053479A (en) System for visually detecting workpiece appearance defects based on image processing
Jadhav et al. A fruit quality management system based on image processing
CN105865570A (en) Machine vision-based glass bottle liquid level detection method
CN201935873U (en) Online image detection system for bottle cap
CN103675588A (en) Printed circuit element polarity machine vision detection method and device
CN104748698B (en) A kind of cap weld using lateral light to build shadow feature detection device and method
CN103357672B (en) Strip steel boundary online detection method
CN201707305U (en) Inspection system for inspecting quality of container caps
CN104949998A (en) Online visual inspection device and method for surface dirt of group origin eggs
CN107169491A (en) A kind of ring gear die number detection method
CN102842034A (en) Device for laser scanning and automatically identifying carved character and identification method
CN103954216B (en) Strong specular reflection workpiece thin and narrow groove detection device and method based on spherical surface light sources
CN102331430A (en) Irregularly shaped meat foreign matter detection system
CN102073872A (en) Image-based method for identifying shape of parasite egg
CN107891012A (en) Pearl size and circularity sorting equipment based on equivalent algorithm
CN105510339A (en) Beverage bottle fullness detection method based on machine vision
CN105092589B (en) A kind of capsule head defect inspection method
CN114839197A (en) Rice damage detection device and detection method
CN117274209B (en) Bottle body defect detection method, system, medium and electronic equipment

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
EXSB Decision made by sipo to initiate substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant