[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN100507937C - A Vision Method for Automatic Weld Seam Recognition Based on Local Image Texture Feature Matching - Google Patents

A Vision Method for Automatic Weld Seam Recognition Based on Local Image Texture Feature Matching Download PDF

Info

Publication number
CN100507937C
CN100507937C CNB2007101781376A CN200710178137A CN100507937C CN 100507937 C CN100507937 C CN 100507937C CN B2007101781376 A CNB2007101781376 A CN B2007101781376A CN 200710178137 A CN200710178137 A CN 200710178137A CN 100507937 C CN100507937 C CN 100507937C
Authority
CN
China
Prior art keywords
weld
image
texture feature
edge
weld seam
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.)
Expired - Fee Related
Application number
CNB2007101781376A
Other languages
Chinese (zh)
Other versions
CN101159017A (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 CNB2007101781376A priority Critical patent/CN100507937C/en
Publication of CN101159017A publication Critical patent/CN101159017A/en
Application granted granted Critical
Publication of CN100507937C publication Critical patent/CN100507937C/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Image Analysis (AREA)

Abstract

The invention discloses a weld seam automatic recognition visual method based on the match of texture feature of regional images, applied to weld seam detection and tracking and pertaining to the advanced manufacture and automation field. In the invention, firstly using a camera to shoot and obtain a weld seam region image which is taken to include the two edge regions of the weld seam; then, extracting a left template image and a right template image including the left and the right edges of the weld seam respectively in the weld seam image of the initial position of the weld seam, and automatically giving a left-and-right edge region image which includes the two weld seam edges and is wider than the template image in the image of the subsequent weld seam according to the known edge position of the weld seam; thereafter, executing the identical texture feature analysis simultaneously on the template image and the edge region image, and extracting the texture feature; correlatively matching the texture feature matrix of the edge regions with the texture feature template, and determining the edge position of the weld seam. The invention realizes weld seam recognition, in particular to the weld seam recognition of filling weld and cosmetic weld in multi-layer weld, and compared with the structural optical method and the normal passive optical visual method, the invention has obvious advantages and strong adaptability.

Description

基于局部图像纹理特征匹配的焊缝自动识别视觉方法 A Vision Method for Automatic Weld Seam Recognition Based on Local Image Texture Feature Matching

技术领域 technical field

本发明涉及一种基于局部图像纹理特征匹配的焊缝自动识别视觉方法,可广泛应用于待焊区检测和焊缝自动跟踪等焊接自动化、智能化方面,属于先进制造与自动化领域。The invention relates to a visual method for automatic welding seam recognition based on local image texture feature matching, which can be widely used in welding automation and intelligent aspects such as detection of areas to be welded and automatic welding seam tracking, and belongs to the field of advanced manufacturing and automation.

背景技术 Background technique

焊缝识别和焊缝自动跟踪在焊接自动化、智能化发展中具有重要地位。而常用并且比较实用的是通过视觉来实现,主要包括两种方法:主动视觉和被动视觉。主动视觉采用激光扫描、结构光等主动发光装置在焊缝坡口上形成一条包含坡口形状信息的光亮条纹,该方法系统较复杂、成本较高。被动视觉是依靠自然光或弧光条件下,取得包含焊缝的图像,通过图像处理,获得焊缝的边缘,这种方法常常需要焊缝图像具有明显的灰度突变特征。Weld seam recognition and automatic seam tracking play an important role in the development of welding automation and intelligence. The commonly used and more practical is to achieve through vision, mainly including two methods: active vision and passive vision. Active vision uses active light-emitting devices such as laser scanning and structured light to form a bright stripe containing groove shape information on the weld groove. This method is more complicated and costly. Passive vision relies on natural light or arc light to obtain images containing welds, and obtains the edges of welds through image processing. This method often requires weld images to have obvious gray-scale mutation characteristics.

对于厚板焊接,常常采用多层焊、多道焊方法,焊接时首先在坡口中进行打底焊,然后采用填充焊填充坡口,在填充焊时根据需要可采用多道焊,最后再进行盖面焊。打底焊后,随着焊接过程的进行,焊缝坡口的特征越来越不明显,即不利于结构光视觉方法和一般的被动视觉方法:坡口的三维结构特征不明显,使得结构光在坡口上不能形成具有明显转折光亮条纹,从而不易确定焊缝中心,并极易受焊缝旁边飞溅、油污等影响;焊缝图像上焊缝边缘没有明显的灰度梯度,不能通过简单的图像处理方法(如边缘提取、灰度阈值分割)来实现确定焊缝边缘。For thick plate welding, multi-layer welding and multi-pass welding methods are often used. When welding, firstly perform root welding in the groove, and then use filling welding to fill the groove. During filling welding, multi-pass welding can be used as needed, and finally Cover welding. After rooting welding, as the welding process progresses, the characteristics of the weld groove become less and less obvious, which is not conducive to the structured light vision method and the general passive vision method: the three-dimensional structural characteristics of the groove are not obvious, making the structured light Bright stripes with obvious transitions cannot be formed on the groove, so it is not easy to determine the center of the weld, and it is easily affected by splashes, oil stains, etc. beside the weld; there is no obvious gray gradient at the edge of the weld on the weld image, and it cannot be passed through a simple image. Processing methods (such as edge extraction, gray threshold segmentation) to determine the edge of the weld.

而由于焊缝图像沿焊接方向具有一定的相似性,因此可以采用模板匹配的方法来实现焊缝的跟踪,即在焊缝初始位置选定一个已知焊缝中心位置的模板图像,用这个模板图像在后续的焊缝图像上进行相关匹配,从而获得后续焊缝图像上的焊缝中心位置。且由于焊缝图像常常没有明显的灰度突变特征,故直接采用灰度图像或二值化图像匹配的效果不好,往往要先对焊缝图像进行一定的处理,获得一个焊缝区域和母材区域差异明显的特征,再进行匹配。文献[黄军芬,殷树言,蒋力培.管道多层自动焊焊缝记忆跟踪系统研究.电焊机.2005,35(1):45-47]采用小波变换对模板图像和后续焊缝图像进行处理并进行二值化,再进行匹配,从而获得多层焊的焊缝中心。但对图像进行小波变换较复杂,且采用了一个包含整个焊缝的模板图像,使得该方法只能适应等宽度的焊缝,同时必须确保摄像机与焊缝的距离保持不变,导致适用性较差。Since the weld seam image has a certain similarity along the welding direction, a template matching method can be used to track the weld seam, that is, select a template image with a known weld center position at the initial position of the weld seam, and use this template The images are correlated and matched on subsequent weld seam images, so as to obtain the weld seam center position on the subsequent weld seam images. And because the weld image often has no obvious gray-scale mutation features, the effect of directly matching the gray-scale image or binarized image is not good. It is often necessary to process the weld image first to obtain a weld area and parent image. The features with obvious differences in the material area are used for matching. Literature [Huang Junfen, Yin Shuyan, Jiang Lipei. Research on Seam Memory Tracking System for Pipeline Multilayer Automatic Welding. Electric Welding Machine. 2005, 35(1): 45-47] using wavelet transform to process template image and follow-up weld image and perform two value, and then match, so as to obtain the weld center of multi-layer welding. However, it is more complicated to perform wavelet transform on the image, and a template image containing the entire weld is used, which makes the method only suitable for welds of equal width. At the same time, the distance between the camera and the weld must be kept constant, resulting in poor applicability. Difference.

发明内容 Contents of the invention

本发明的目的在于克服现有技术不足,提出了基于局部图像纹理特征匹配的焊缝自动识别视觉方法,以便实现待焊区检测(如多层焊的焊缝识别)问题。The purpose of the present invention is to overcome the deficiencies of the prior art, and proposes a welding seam automatic recognition visual method based on local image texture feature matching, so as to realize the problem of detection of the area to be welded (such as the weld seam recognition of multi-layer welding).

为了实现这一目的,本发明的技术方案中,首先使用摄像机拍摄焊缝区域图像,拍摄时使该图像包含焊缝的边缘区域,然后在焊缝起始位置的图像中分别提取出包含焊缝左右边缘在内的模板,并且在后续焊缝图像中根据已知焊缝边缘位置自动给出包含两个焊缝边缘在内、且比模板宽的左右边缘区域,之后同时对模板图像和边缘区域图像进行相同的纹理特征分析,提取纹理特征,再用得到的纹理特征模板和边缘区域纹理特征矩阵进行相关匹配,从而在焊缝边缘区域内确定焊缝边缘位置。In order to achieve this goal, in the technical solution of the present invention, a camera is first used to take an image of the weld area, and the image is made to include the edge area of the weld when shooting, and then the images containing the weld seam are respectively extracted from the image of the start position of the weld seam. The template including the left and right edges, and the left and right edge areas including the two weld edges and wider than the template are automatically given in the subsequent weld image according to the known weld edge position, and then the template image and the edge area are simultaneously The same texture feature analysis is performed on the image, the texture features are extracted, and then the obtained texture feature template and the edge area texture feature matrix are used for correlation matching, so as to determine the edge position of the weld in the edge area of the weld.

本发明的基于局部图像纹理特征匹配的焊缝识别方法主要包括以下几个步骤。The welding seam recognition method based on local image texture feature matching of the present invention mainly includes the following steps.

1、图像获取。使用摄像机拍摄焊缝区域图像,拍摄时使该图像包括焊缝的边缘区域。1. Image acquisition. A camera is used to capture an image of the weld seam region such that the image includes the edge region of the weld seam.

2、模板图像提取。在焊缝起始位置图像中分别提取出包含焊缝左右边缘在内的图像区域作为模板图像,模板图像中的焊缝位置尽可能处于居中(焊缝横向)位置,见图2中左模板图像21和右模板图像23。2. Template image extraction. The image area including the left and right edges of the weld is extracted from the image of the starting position of the weld as the template image, and the position of the weld in the template image is as centered (horizontal to the weld) as possible, as shown in the left template image in Figure 2 21 and right template image 23.

3、模板图像纹理特征分析。对两个模板图像进行相同的纹理特征分析,计算纹理特征值,形成两个纹理特征模板,如图4所示,包括左纹理特征模板41和右纹理特征模板42;在对模板进行子图像划分时,为了提高焊缝识别的位置准确性,可以使子图像具有一定的位置重叠,如图3中左模板图像上的子图像划分,子图像31和子图像32之间有一个重叠区域33。但也可以不重叠,子图像具有一定的位置重叠只是优化方案。3. Analysis of template image texture features. Carry out identical texture feature analysis to two template images, calculate texture feature value, form two texture feature templates, as shown in Figure 4, comprise left texture feature template 41 and right texture feature template 42; Carry out sub-image division to template , in order to improve the position accuracy of weld seam recognition, the sub-images can be overlapped to a certain extent, as shown in the sub-image division on the left template image in FIG. However, it is also possible not to overlap, and it is only an optimization scheme that the sub-images have a certain overlapping position.

纹理特征值采用基于共生矩阵的纹理特征描述符「章毓晋编著,图像工程(中册)——图像分析.第2版,北京:清华大学出版社,2005.10],常用的描述符有能量(二阶矩)WM、对比度WC、熵WE、逆差矩WH等,如式(1)~(4)所示。The texture feature value adopts the texture feature descriptor based on the co-occurrence matrix [Edited by Zhang Yujin, Image Engineering (Volume 2)——Image Analysis. 2nd Edition, Beijing: Tsinghua University Press, 2005.10], the commonly used descriptor has energy (second-order Moment) W M , contrast W C , entropy W E , reverse difference W H , etc., as shown in formulas (1) to (4).

WW Mm == ΣΣ hh ΣΣ kk Mm 22 (( hh ,, kk )) ,, -- -- -- (( 11 ))

WW CC == ΣΣ hh ΣΣ kk || hh -- kk || Mm (( hh ,, kk )) ,, -- -- -- (( 22 ))

WW EE. == -- ΣΣ hh ΣΣ kk Mm (( hh ,, kk )) loglog Mm (( hh ,, kk )) ,, -- -- -- (( 33 ))

WW Hh == ΣΣ hh ΣΣ kk Mm (( hh ,, kk )) 11 ++ || hh -- kk || .. -- -- -- (( 44 ))

其中,

Figure C200710178137D00055
in,
Figure C200710178137D00055

是(子)图像f(x,y)的共生矩阵,h,k图像f(x,y)中像素的灰度值,#代表像素的数量。is the co-occurrence matrix of the (sub)image f(x,y), h,k is the gray value of the pixel in the image f(x,y), and # represents the number of pixels.

4、焊缝边缘区域图像自动确定。在后续焊缝图像中,根据已知焊缝边缘自动确定一个包含焊缝边缘在内、且比模板图像宽的局部图像确定为当前的焊缝边缘区域,该区域沿焊缝方向与模板同样长度,如图2中的左焊缝边缘区域22,右焊缝边缘区域24。在自动确定焊缝区域时,根据已知的焊缝边缘位置调整焊缝边缘区域位置,使已知的焊缝边缘位置在待识别的焊缝边缘区域的中部,从而在一般情况下使焊缝边缘区域包含当前的焊缝边缘位置。4. The image of the weld edge area is automatically determined. In the subsequent weld seam image, a partial image including the weld seam edge and wider than the template image is automatically determined according to the known weld seam edge as the current weld seam edge area, which has the same length as the template along the weld seam direction , as shown in Fig. 2 in the left weld seam edge area 22 and the right weld seam edge area 24. When automatically determining the weld seam area, the position of the weld seam edge area is adjusted according to the known weld seam edge position, so that the known weld seam edge position is in the middle of the weld seam edge area to be identified, so that the weld seam The edge area contains the current weld edge position.

5、边缘区域图像纹理特征分析。对两个边缘区域进行与模板图像相同的纹理特征分析,计算纹理特征值,形成边缘区域纹理特征矩阵,具体纹理分析方法同步骤3。5. Analysis of image texture features in the edge area. Perform the same texture feature analysis on the two edge areas as the template image, calculate the texture feature value, and form the edge area texture feature matrix. The specific texture analysis method is the same as step 3.

6、模板匹配与焊缝边缘位置确定。分别用两个纹理特征模板在对应的边缘区域纹理特征矩阵内进行相关匹配,当相关系数最大时,焊缝边缘区域上对应于模板图像中的焊缝边缘位置的像素点即为该段焊缝边缘位置,图5显示了左纹理特征模板与左焊缝边缘区域纹理特征矩阵的匹配结果。6. Template matching and weld edge position determination. Use two texture feature templates to perform correlation matching in the corresponding edge area texture feature matrix. When the correlation coefficient is the largest, the pixel point corresponding to the weld edge position in the template image on the edge area of the weld is the weld Edge position, Figure 5 shows the matching result of the left texture feature template and the texture feature matrix of the left weld edge area.

7、重复步骤4)、5)和6),即可得到整条焊缝的边缘位置,分别连接上述的左、右焊缝边缘位置即可获得焊缝的左、右边缘,图6中显示了焊缝左边缘的模板最佳匹配的模板中心在图像上的位置61和识别得到的焊缝右边缘62。7. Repeat steps 4), 5) and 6) to obtain the edge position of the entire weld, connect the above-mentioned left and right edge positions of the weld respectively to obtain the left and right edges of the weld, as shown in Figure 6 The position 61 of the template center on the image that best matches the template of the left edge of the weld and the recognized right edge 62 of the weld.

本发明提出的基于局部图像纹理特征匹配的焊缝自动识别视觉方法,利用焊缝图像纹理特征从焊缝区域到母材区域的分布特点,通过局部图像纹理特征模板匹配的方法分别确定焊缝的两个边缘位置,能够实现焊缝识别问题,特别是对于多层焊中的填充焊和盖面焊的焊缝识别较结构光方法和一般被动光视觉方法具有明显优势,并且具有较强的适用性。The welding seam automatic recognition visual method based on local image texture feature matching proposed by the present invention uses the distribution characteristics of the weld seam image texture features from the weld area to the base metal area, and determines the weld seam respectively through the method of local image texture feature template matching. Two edge positions can realize the problem of weld identification, especially for the weld identification of filling welding and cover welding in multi-layer welding, which has obvious advantages compared with structured light method and general passive light vision method, and has strong application sex.

附图说明 Description of drawings

图1基于局部图像纹理特征匹配的焊缝自动识别视觉方法流程Fig. 1 Flow chart of the visual method for automatic weld recognition based on local image texture feature matching

图2焊缝图像中的模板图像与焊缝边缘区域图像Figure 2 The template image and the edge area image of the weld in the weld image

图3左模板图像及其子图像划分(放大)示意Figure 3 Schematic diagram of the division (enlargement) of the left template image and its sub-images

图4左、右纹理特征模板Figure 4 Left and right texture feature templates

图5左纹理特征模板与左边缘焊缝纹理特征矩阵的匹配结果Fig.5 Matching results of the left texture feature template and the left edge weld texture feature matrix

图6最佳匹配的模板中心在图像上位置和识别的焊缝边缘Figure 6 The position of the best matching template center on the image and the identified weld edge

具体实施方式 Detailed ways

为了更好地讲解本发明的技术方案,以下结合实施例作进一步的详细描述。In order to better explain the technical solutions of the present invention, further detailed descriptions will be given below in conjunction with examples.

图1所示为本发明的焊缝识别方法流程,包括以下几个步骤。Fig. 1 shows the process flow of the welding seam identification method of the present invention, which includes the following steps.

1、图像获取。使用摄像机拍摄焊缝区域图像,拍摄时使该图像包括焊缝的边缘区域。1. Image acquisition. A camera is used to capture an image of the weld seam region such that the image includes the edge region of the weld seam.

2、模板图像提取。在焊缝起始位置图像中分别提取出包含焊缝左、右边缘在内的图像区域作为模板图像,模板图像中的焊缝位置尽量处于居中(在焊缝横向)位置,如图2中左模板图像21和右模板图像23,其中模板尺寸在焊缝纵向和焊缝横向分别为48像素和60像素,左右模板大小相同,并且使已知焊缝边缘位置在模板中部,本实例的焊缝边缘位置在模板图像中各行的列值j0i=30,(i=1,2,…48)(焊缝横向的位置为列,焊缝纵向的位置为行,下同)。如果焊缝边缘在图像中与图像纵向有一定夹角,可使焊缝边缘通过模板的中心,实现焊缝边缘位置处于模板中部。2. Template image extraction. The image area including the left and right edges of the weld is extracted from the image of the starting position of the weld as the template image, and the position of the weld in the template image should be in the center (in the transverse direction of the weld) as much as possible, as shown in Figure 2 on the left Template image 21 and right template image 23, where the size of the template is 48 pixels and 60 pixels in the longitudinal direction of the weld and 60 pixels in the transverse direction of the weld, the size of the left and right templates is the same, and the edge position of the known weld is in the middle of the template, the weld of this example The column values of edge positions in each row in the template image j0 i =30, (i=1, 2, ... 48) (the horizontal position of the weld is the column, and the vertical position of the weld is the row, the same below). If there is a certain angle between the edge of the weld seam and the vertical direction of the image, the edge of the weld seam can pass through the center of the template, so that the position of the edge of the weld seam is in the middle of the template.

3、模板图像纹理特征分析。对两个模板图像进行相同的纹理特征分析,计算纹理特征值,形成两个纹理特征模板。在模板划分时,为了提高焊缝识别的位置准确性,使子图像具有一定的位置重叠,如图3中左模板图像上的子图像划分,子图像31和子图像32之间有一个重叠区域33,其中子图像尺寸为24×10(焊缝纵向像素数×焊缝横向像素数),重叠部分宽度为5像素,从而在左右模板图像中各获得2行、每行11个子图像。计算每个子图像的共生矩阵时计算参数为灰度级32、灰度步长1、方向0度,即先将子图像f(x,y)变换为灰度级为32的图像,计算M(h,k)时令公式(5)中的像素点(x1,y1)、(x2,y2)满足(x2=x1+1,y2=y1);再基于该共生矩阵M(h,k)用公式(3)计算各个子图像的纹理特征值——熵WE,得到如图4所示的左、右纹理特征模板。3. Analysis of template image texture features. The same texture feature analysis is performed on the two template images, and the texture feature values are calculated to form two texture feature templates. When the template is divided, in order to improve the position accuracy of the weld seam recognition, the sub-images have a certain position overlap, as shown in the sub-image division on the left template image in Figure 3, there is an overlapping area 33 between the sub-image 31 and the sub-image 32 , where the size of the sub-image is 24×10 (the number of pixels in the vertical direction of the weld × the number of pixels in the horizontal direction of the weld), and the width of the overlapping part is 5 pixels, so that 2 rows of 11 sub-images are obtained in each of the left and right template images. When calculating the co-occurrence matrix of each sub-image, the calculation parameters are gray level 32, gray step size 1, and direction 0 degrees, that is, the sub-image f(x, y) is first transformed into an image with gray level 32, and M( h, k) when the pixel points (x 1 , y 1 ) and (x 2 , y 2 ) in formula (5) satisfy (x 2 =x 1 +1, y 2 =y 1 ); then based on the co-occurrence matrix M(h, k) uses the formula (3) to calculate the texture feature value of each sub-image—the entropy W E , and obtain the left and right texture feature templates as shown in Figure 4.

4、焊缝边缘区域图像自动确定。在后续焊缝图像中,根据已知焊缝边缘自动确定一个包含焊缝边缘在内、且比模板图像宽的局部图像确定为当前的焊缝边缘区域,该区域沿焊缝方向与模板同样长度,即焊缝边缘区域尺寸为48×100(焊缝纵向像素数×焊缝横向像素数);在自动确定焊缝区域时,根据已知的焊缝边缘位置调整焊缝边缘区域位置,使得已知的焊缝边缘位置在待识别焊缝边缘区域的中部,在本实例中令焊缝边缘区域的第50列与前一次相关匹配中得到最佳匹配时模板中心在图像上的横向位置(初始时采用取模板的位置)对齐,然后确定待识别的焊缝边缘区域图像的范围,如图2中的左焊缝边缘区域22、右焊缝边缘区域24所示,其中左焊缝边缘区域22中心在焊缝图像上的列值jLz=70,右焊缝边缘区域24中心在原图上的列值为jRz=270。4. The image of the weld edge area is automatically determined. In the subsequent weld seam image, a partial image including the weld seam edge and wider than the template image is automatically determined according to the known weld seam edge as the current weld seam edge area, which has the same length as the template along the weld seam direction , that is, the size of the weld edge area is 48×100 (the number of pixels in the vertical direction of the weld × the number of pixels in the horizontal direction of the weld); when automatically determining the weld area, the position of the weld edge area is adjusted according to the known position of the weld edge, so that The known weld edge position is in the middle of the weld edge area to be identified. In this example, the horizontal position of the template center on the image when the 50th column of the weld edge area is best matched with the previous correlation matching (initial When using the position of the template) to align, then determine the range of the weld edge area image to be identified, as shown in the left weld edge area 22 and the right weld edge area 24 in Figure 2, wherein the left weld edge area 22 The column value j Lz =70 for the center on the weld seam image, and j Rz =270 for the center of the right weld edge region 24 on the original image.

5、边缘区域图像纹理特征分析。对两个边缘区域进行与模板图像相同的纹理特征分析,即采用同样的子图像划分方法,同样的计算共生矩阵参数,同样计算纹理特征值——熵WE,形成边缘区域纹理特征矩阵。由于焊缝边缘区域宽度有100像素,故获得的左、右边缘区域纹理特征矩阵均为2行19列。5. Analysis of image texture features in the edge area. Perform the same texture feature analysis on the two edge areas as the template image, that is, use the same sub-image division method, calculate the co-occurrence matrix parameters, and calculate the texture feature value—entropy W E , to form the edge area texture feature matrix. Since the width of the weld edge area is 100 pixels, the obtained texture feature matrix of the left and right edge areas is both 2 rows and 19 columns.

6、模板匹配与焊缝边缘位置确定。分别用两个纹理特征模板在对应的边缘区域纹理特征矩阵内进行相关匹配,当相关系数最大时,焊缝边缘区域上对应于模板图像中的焊缝边缘位置的像素点即为该段焊缝边缘位置。图5显示了本实例中左纹理特征模板与左焊缝边缘区域纹理特征矩阵的匹配结果,其中第5次匹配结果的相关系数最大,从而此时模板图像在焊缝边缘区域的位置(横向位置)可用模板图像中心距离的焊缝边缘区域左边缘的距离d(像素)来表示:d可通过下式计算:d=(相关匹配次序-1)×(子图像宽度-重叠像素数)+模板中心在模板上的列值.(6)代入相关匹配次序(值为5)、子图像宽度(值为10)、重叠像素数(值为5)和模板中心在模板上的列值(值为30),计算得到d=(5-1)×(10-5)+30=50;再根据模板中的焊缝边缘的各行列值j0i和式(7)可以确定当前焊缝边缘区域中的各行图像上焊缝边缘的列值ji6. Template matching and weld edge position determination. Use two texture feature templates to perform correlation matching in the texture feature matrix of the corresponding edge area. When the correlation coefficient is the largest, the pixel point corresponding to the edge position of the weld in the template image on the edge area of the weld is the weld edge position. Figure 5 shows the matching results of the left texture feature template and the texture feature matrix of the left weld edge area in this example, and the correlation coefficient of the fifth matching result is the largest, so the position of the template image in the weld edge area at this time (horizontal position ) can be represented by the distance d (pixels) from the left edge of the weld edge area from the center of the template image: d can be calculated by the following formula: d=(correlation matching order-1)×(sub-image width-number of overlapping pixels)+template The column value of the center on the template. (6) Substitute the relevant matching order (value is 5), sub-image width (value is 10), the number of overlapping pixels (value is 5) and the column value of the template center on the template (value is 30), calculated to get d=(5-1)×(10-5)+30=50; then according to the values j0 i of each row and column of the weld edge in the template and formula (7), it can be determined that in the current weld edge region The column values j i of the weld edge on each row image of :

ji=d-模板中心在模板上的列值+j0i           (7)j i =d-the column value of the center of the template on the template+j0 i (7)

代入j0i=30,(i=1,2,…48)和模板中心在模板上的列值(值为30)、d=50,可得ji=50-30+j0i=20+30=50;Substituting j0 i = 30, (i = 1, 2, ... 48) and the column value of the template center on the template (value 30), d = 50, can get j i = 50-30+j0 i = 20+30 = 50;

进一步的,根据左焊缝边缘区域中心在焊缝图像上的列值jLz和式(8),可获得焊缝图像上的各行的焊缝边缘列值jSiFurther, according to the column value j Lz of the center of the left weld edge area on the weld image and formula (8), the weld edge column value j Si of each row on the weld image can be obtained:

jSi=jLz-焊缝边缘区域半宽+ji.              (8)j Si = j Lz - half width of weld edge area + j i . (8)

代入jLz(值为70)、左焊缝边缘区域半宽(值为50)和ji=50,可得jSi=70-50+ji=20+50=70。Substituting j Lz (value 70), the half-width of the left weld edge region (value 50) and j i =50, it can be obtained that j Si =70-50+ji i =20+50=70.

7、重复步骤4)、5)和6),即可得到整条焊缝的边缘位置,分别连接上述的左、右焊缝边缘位置即可获得焊缝的左、右边缘,图6中显示了焊缝左边缘的模板最佳匹配的模板中心在图像上的位置61和识别得到的焊缝右边缘62。7. Repeat steps 4), 5) and 6) to obtain the edge position of the entire weld, connect the above-mentioned left and right edge positions of the weld respectively to obtain the left and right edges of the weld, as shown in Figure 6 The position 61 of the template center on the image that best matches the template of the left edge of the weld and the recognized right edge 62 of the weld.

最后应说明的是:以上实施例仅用以说明本发明而并非限制本发明所描述的技术方案;因此,尽管本说明书参照上述的各个实施例对本发明已进行了详细的说明,但是,本领域的普通技术人员应当理解,仍然可以对本发明进行修改或等同替换;而一切不脱离发明的精神和范围的技术方案及其改进,其均应涵盖在本发明的权利要求范围当中。Finally, it should be noted that: the above embodiments are only used to illustrate the present invention rather than limit the technical solutions described in the present invention; Those of ordinary skill in the art should understand that the present invention can still be modified or equivalently replaced; and all technical solutions and improvements that do not depart from the spirit and scope of the invention should be covered by the claims of the present invention.

Claims (3)

1、基于局部图像纹理特征匹配的焊缝自动识别视觉方法,其特征在于,包括以下步骤:1. The welding seam automatic identification visual method based on local image texture feature matching, is characterized in that, comprises the following steps: 1)、图像获取:使用摄像机拍摄焊缝区域图像,拍摄时使该图像包含焊缝的左右边缘区域;1), image acquisition: use a camera to take images of the weld area, and make the image include the left and right edge areas of the weld when shooting; 2)、模板图像提取:在焊缝起始位置图像中分别提取出包含焊缝左右边缘在内的图像区域作为模板图像,包括左模板图像和右模板图像,在模板图像中已知焊缝的左右边缘位置;模板图像中的焊缝位置尽量处于居中位置;2), template image extraction: extract the image area including the left and right edges of the weld from the image of the starting position of the weld as the template image, including the left template image and the right template image, and the weld seam is known in the template image The left and right edge positions; the position of the weld seam in the template image should be in the center as much as possible; 3)、模板图像纹理特征分析:对左模板图像和右模板图像进行相同的纹理特征分析,计算纹理特征值,形成两个纹理特征模板;3), template image texture feature analysis: carry out the same texture feature analysis on the left template image and the right template image, calculate the texture feature value, and form two texture feature templates; 4)、焊缝边缘区域图像自动确定:在后续焊缝图像中,根据已知焊缝边缘位置自动确定一个包含待识别焊缝边缘在内、且比模板图像宽的局部图像作为当前的焊缝边缘区域,该焊缝边缘区域沿焊缝方向与模板同样长度;自动确定待识别焊缝边缘区域时,使待识别焊缝边缘区域图像的中心位置在焊缝横向与已知的焊缝边缘位置对齐;4) Automatically determine the image of the weld edge area: in the subsequent weld image, automatically determine a partial image that includes the edge of the weld to be identified and is wider than the template image as the current weld according to the known weld edge position Edge area, the edge area of the weld seam has the same length as the template along the direction of the weld seam; when automatically determining the edge area of the weld seam to be identified, the center position of the image of the edge area of the weld seam to be identified is in the horizontal direction of the weld seam and the known position of the weld seam edge alignment; 5)、边缘区域图像纹理特征分析:对两个边缘区域进行与模板图像相同的纹理特征分析,计算纹理特征值,形成边缘区域图像的纹理特征矩阵;5), edge area image texture feature analysis: carry out the same texture feature analysis as template image to two edge areas, calculate texture feature value, form the texture feature matrix of edge area image; 6)、模板匹配与焊缝边缘位置确定:分别用两个纹理特征模板分别在对应的边缘区域纹理特征矩阵内进行相关匹配,且根据匹配结果确定焊缝两个边缘的位置:当相关系数最大时,焊缝边缘区域图像上对应于模板图像中的焊缝边缘位置的像素点即为一段焊缝的边缘位置;进而依据焊缝边缘区域图像在焊缝图像上的位置确定焊缝边缘位置;6) Template matching and weld edge position determination: Use two texture feature templates to perform correlation matching in the corresponding edge area texture feature matrix, and determine the positions of the two edges of the weld according to the matching results: when the correlation coefficient is the largest When , the pixel point corresponding to the weld edge position in the template image on the weld edge area image is the edge position of a segment of the weld; then determine the weld edge position according to the position of the weld edge area image on the weld image; 7)、重复步骤4)、5)和6),即可得到整条焊缝的边缘位置,分别连接左、右焊缝边缘位置即可获得焊缝的左、右边缘。7), repeating steps 4), 5) and 6), the edge position of the entire weld can be obtained, and the left and right edges of the weld can be obtained by connecting the edge positions of the left and right welds respectively. 2、如权利要求1所述的基于局部图像纹理特征匹配的焊缝自动识别视觉方法,其特征在于,所述的步骤3)或步骤5)纹理特征分析,其方法是先将所述的步骤2)的模板图像和步骤4)的焊缝边缘区域局部图像进行子图像划分,然后计算各个子图像的共生矩阵,再用共生矩阵的纹理特征描述符表征纹理特征。2. The welding seam automatic recognition visual method based on local image texture feature matching as claimed in claim 1, characterized in that, in the step 3) or step 5) texture feature analysis, the method is to firstly describe the step The template image of 2) and the partial image of the weld edge area in step 4) are divided into sub-images, and then the co-occurrence matrix of each sub-image is calculated, and the texture feature is represented by the texture feature descriptor of the co-occurrence matrix. 3、如权利要求2所述的基于局部图像纹理特征匹配的焊缝自动识别视觉方法,其特征在于,在子图像划分时,使子图像具有一定重叠。3. The visual method for automatic weld seam recognition based on local image texture feature matching according to claim 2, characterized in that when sub-images are divided, the sub-images are overlapped to a certain extent.
CNB2007101781376A 2007-11-27 2007-11-27 A Vision Method for Automatic Weld Seam Recognition Based on Local Image Texture Feature Matching Expired - Fee Related CN100507937C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB2007101781376A CN100507937C (en) 2007-11-27 2007-11-27 A Vision Method for Automatic Weld Seam Recognition Based on Local Image Texture Feature Matching

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB2007101781376A CN100507937C (en) 2007-11-27 2007-11-27 A Vision Method for Automatic Weld Seam Recognition Based on Local Image Texture Feature Matching

Publications (2)

Publication Number Publication Date
CN101159017A CN101159017A (en) 2008-04-09
CN100507937C true CN100507937C (en) 2009-07-01

Family

ID=39307107

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB2007101781376A Expired - Fee Related CN100507937C (en) 2007-11-27 2007-11-27 A Vision Method for Automatic Weld Seam Recognition Based on Local Image Texture Feature Matching

Country Status (1)

Country Link
CN (1) CN100507937C (en)

Families Citing this family (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103810459A (en) * 2012-11-07 2014-05-21 上海航天设备制造总厂 Image recognition device and solar array welding system by using same
CN103810458A (en) * 2012-11-07 2014-05-21 上海航天设备制造总厂 Image recognition method
GB201304798D0 (en) * 2013-03-15 2013-05-01 Univ Dundee Medical apparatus visualisation
CN104331693B (en) * 2014-10-28 2017-06-27 武汉大学 A printed matter symmetry detection method and system
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
CN107392240B (en) * 2017-07-14 2021-04-06 歌尔光学科技有限公司 Image detection method and device
CN110823090B (en) * 2018-08-14 2021-07-20 中车唐山机车车辆有限公司 Welding groove detection method
CN109492688B (en) * 2018-11-05 2021-07-30 深圳一步智造科技有限公司 Weld joint tracking method and device and computer readable storage medium
CN109332966A (en) * 2018-11-28 2019-02-15 合肥常青机械股份有限公司 A rail-less all-position welding system and method
CN109317871A (en) * 2018-11-29 2019-02-12 合肥常青机械股份有限公司 A welding robot welding trajectory control method
CN112489010A (en) * 2020-11-27 2021-03-12 桂林电子科技大学 Method and device for quickly identifying welding line and storage medium
CN113240629B (en) * 2021-04-15 2023-09-19 广东工业大学 Edge-based image matching narrow-gap weld initial point positioning device and method
CN116735613B (en) * 2023-08-16 2023-10-13 昆山龙雨智能科技有限公司 CCD camera-based product positioning and measuring system and use method

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
基于二维小波变换及模式识别的焊缝坡口识别. 蒋力培,黄军芬,殷树言.第十一次全国焊接会议论文集. 2005
基于二维小波变换及模式识别的焊缝坡口识别. 蒋力培,黄军芬,殷树言.第十一次全国焊接会议论文集. 2005 *

Also Published As

Publication number Publication date
CN101159017A (en) 2008-04-09

Similar Documents

Publication Publication Date Title
CN100507937C (en) A Vision Method for Automatic Weld Seam Recognition Based on Local Image Texture Feature Matching
CN111223088B (en) A casting surface defect recognition method based on deep convolutional neural network
CN101135652B (en) Weld Seam Recognition Method Based on Texture Segmentation
Zhang et al. Ripple-GAN: Lane line detection with ripple lane line detection network and Wasserstein GAN
CN105046271A (en) MELF (Metal Electrode Leadless Face) component positioning and detecting method based on match template
CN101673338B (en) Fuzzy license plate identification method based on multi-angle projection
CN102541954B (en) Method and system for searching trademarks
CN106127137A (en) A kind of target detection recognizer based on 3D trajectory analysis
CN106952281A (en) A method for weld profile feature recognition and real-time planning of weld bead
CN108009591A (en) A kind of contact network key component identification method based on deep learning
CN103593832A (en) Method for image mosaic based on feature detection operator of second order difference of Gaussian
CN101470807A (en) Accurate detection method for highroad lane marker line
CN102184544A (en) Method for correcting deformity and identifying image of go notation
CN104400265A (en) Feature extraction method applicable to corner weld of laser vision guided welding robot
CN105023013B (en) The object detection method converted based on Local standard deviation and Radon
CN104299009A (en) Plate number character recognition method based on multi-feature fusion
CN104809433A (en) Zebra stripe detection method based on maximum stable region and random sampling
CN116664478A (en) A deep learning-based steel surface defect detection algorithm
CN106709499A (en) SIFT image feature point extraction method based on Canny operator and Hilbert-Huang transform
CN109509181A (en) A kind of cladding pond shape visible detection method based on serial Contour searching
CN113902792A (en) Building height detection method and system based on improved RetinaNet network and electronic equipment
CN102073872A (en) Image-based method for identifying shape of parasite egg
CN103679699B (en) A kind of based on notable figure translation and the solid matching method of combined measure
CN110728269B (en) High-speed rail contact net support pole number plate identification method based on C2 detection data
CN108492306A (en) A kind of X-type Angular Point Extracting Method based on image outline

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20090701

Termination date: 20161127

CF01 Termination of patent right due to non-payment of annual fee