A method for detecting the edge of a weld
Weld point cloud data is obtained through a single-line structured light sensor, a graph network is constructed, and the Digestella algorithm is used to solve the problem that the existing weld edge detection method has high requirements for picture quality and the inability to obtain depth information, and weld edge detection is achieved with stable and robust.
Patent Information
- Application Number
- CN202111208525.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-10-18
- Publication Date
- 2025-06-03
- Estimated Expiration
- 2041-10-18
AI Technical Summary
The existing weld edge detection methods require high image quality when acquiring images, and cannot obtain the depth information of the weld, resulting in limited environment; while the method based on structured light sensor assumes that the base material is fixed, and the actual weld edge changes angle due to different materials, resulting in inaccurate segmentation.
A single-line structured light sensor is used to obtain the weld point cloud data, and by screening the outline point cloud data, obtaining the second-order derivative nodes, building a graph network, calculating the similarity sum, and finally using the Digestella algorithm to obtain the weld edge.
This method takes into account both local and global point cloud features, is not affected by the deformation of the base material, the test results are stable and robust, and accurately detects the weld edges.
Smart Images

Figure CN113963012B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of machine vision inspection, and particularly to a method for detecting weld edges. Background Art
[0002] Common methods for weld edge detection mainly include: (1) an image-based matching method; (2) a base material contour fitting method based on the type of base material. For method (1), a camera is required to collect images, which are then matched with a template image to obtain the weld edge. This method has high requirements for the quality of the pictures, but the actually obtained images often do not meet the requirements due to the influence of brightness and environment. At the same time, since the camera can only obtain 2D images and cannot obtain the depth information of the weld, the application environment is limited. For method (2), a structured light sensor is used to scan the weld to obtain point cloud data. When segmenting the point cloud of the weld edge, it is assumed that the angle of the base material is fixed and known. However, in actuality, the angle of the weld edge often varies due to different materials, resulting in inaccurate segmentation of the weld edge. Summary of the Invention
[0003] In order to solve the above technical problems, the present invention provides a method for detecting weld edges, which takes into account both local and global point cloud features, is not affected by the deformation of the base material, and the test results have stability and robustness.
[0004] Therefore, the technical solution of the present invention is as follows:
[0005] A method for detecting weld edges, using a single-line structured light sensor to obtain weld point cloud data along the length direction of the weld, and recording the weld point cloud data obtained once as a single-frame data;
[0006] Process the single-frame data respectively, and screen out the contour point cloud data suspected of being the weld edge;
[0007] Then perform the following steps:
[0008] 1) Calculate the second derivative of each point in the contour point cloud data, and use the points whose results approach zero as nodes;
[0009] 2) Connect the nodes in adjacent single-frame data, and do not connect the nodes belonging to the same single-frame data to obtain a graph network;
[0010] 3) Process the graph network to obtain the similarity between two connected nodes;
[0011] Sum up the Euclidean distances between the two connected nodes to obtain the similarity;
[0012] Wherein the Euclidean distance is adjusted based on the abnormal shape of the base material;
[0013] 4) Starting from any node in the first-frame data obtained when collecting the image, along the edges of the graph network to any node in the last-frame data, calculate the sum of similarities of the same path;
[0014] Take the two paths with the minimum sum of similarities as the two edges of the weld.
[0015] Further, the method used in step 4) to obtain the two paths with the minimum sum of similarities is optimal path search.
[0016] Further, the method used in step 4) to obtain the two paths with the minimum sum of similarities is Dijkstra's algorithm.
[0017] Further, the method for screening the contour point cloud data is as follows:
[0018] ① Extract the sub-pixel center points of the laser stripe from the collected laser stripe contour image of the weld;
[0019] ② Calculate the gradient of each extracted sub-pixel center point along the normal direction, find the two laser stripe edge points corresponding to each sub-pixel center point, calculate the distance between the two edge points, and delete the points that exceed the preset value;
[0020] ③ Solve the three-dimensional coordinates of the center point of the light stripe in the camera coordinate system and convert it to the light plane coordinate system to obtain the two-dimensional contour point cloud. After filtering, the contour point cloud data is obtained.
[0021] Even further, in step ①, the Steger method is used to obtain the sub-pixel center points of the laser stripe.
[0022] Even further, in step ③, median filtering is used for filtering.
[0023] This weld edge detection method takes into account both local and global point cloud features, is not affected by the deformation of the base material, and the test results have stability and robustness. Description of the Drawings
[0024] Figure 1a It is a schematic diagram of the principle for a single-line structured light sensor to obtain point cloud data;
[0025] Figure 1b It is a schematic diagram of the single-line structured light sensor to obtain the point cloud data of the entire object to be measured;
[0026] Figure 2 It is a schematic diagram of the weld detection result of a single-frame data; the lines in the figure are the contour point cloud, and the highlighted points are the nodes;
[0027] Figure 3 It is a schematic diagram of the graph network;
[0028] Figure 4 It is a display diagram of the visual detection result of the existing method (without using the graph network);
[0029] Figure 5 It is a display diagram of the weld edge detection result obtained by the method provided by the present invention. Specific embodiments
[0030] The technical solution of the present invention will be described in detail below in conjunction with the accompanying drawings and specific embodiments.
[0031] A weld edge detection method uses a single-line structured light sensor to obtain weld point cloud data along the length direction of the weld (as shown in Figure 1a 、 1b ), and the weld point cloud data obtained once is recorded as single-frame data;
[0032] Process the single-frame data respectively, and screen out the contour point cloud data of the suspected weld edge; then perform the following steps:
[0033] 1) Calculate the second derivative of each point in the contour point cloud data, and use the point with the result approaching zero as the node (as shown in Figure 2 );
[0034] 2) Connect the nodes in adjacent single-frame data, and do not connect the nodes in the same single-frame data to obtain a graph network (as shown in Figure 3 );
[0035] 3) Process the graph network to obtain the similarity between two connected nodes;
[0036] Sum the Euclidean distances of two connected nodes to obtain the similarity;
[0037] Among them, the Euclidean distance is adjusted based on the shape of the base material;
[0038] 4) Starting from any node in the first-frame data obtained when collecting the image, along the edge of the graph network to any node in the last-frame data, calculate the sum of similarities of the same path;
[0039] Take the two paths with the smallest sum of similarities as the two edges of the weld. The method for obtaining the two paths with the smallest sum of similarities is optimal path search, specifically the Dijkstra algorithm (detailed explanation of the Dijkstra algorithm).
[0040] Specifically, the method for screening the contour point cloud data of the suspected weld edge is:
[0041] ① Extract the sub-pixel center points of the laser stripe from the collected laser stripe contour image of the weld. The Steger method can be used to obtain the sub-pixel center points of the laser stripe, or other methods for extracting the center points can also be used;
[0042] ② Calculate the gradient of each extracted sub-pixel center point along the normal direction, find the two laser stripe edge points corresponding to each sub-pixel center point, calculate the distance between the two edge points, and delete the points that exceed the preset value;
[0043] ③ Solve the three-dimensional coordinates of the center point of the light stripe in the camera coordinate system, and convert it to the light plane coordinate system to obtain the two-dimensional contour point cloud. After filtering, the contour point cloud data is obtained. Median filtering or other filtering methods can be used for filtering.
[0044] The present invention focuses on protecting the method of collecting weld images by a single-line structured light sensor, and this method can also be applied to the case of collecting weld images by a multi-line structured light sensor.
[0045] This weld edge detection method takes into account both local (single-frame data) and global point cloud features (graph network), is not affected by the deformation of the base material, and the test results have stability and robustness. As Figure 4 、 5 shown, Figure 4 is the result of processing the weld image by the existing processing method, which only considers the point cloud data in a single-frame image, and the obtained edge error is relatively large. This is because ① the weld edge points in the single-frame contour point cloud are easily affected by defects such as pores and welding slag, resulting in misdetection of edge points, and ② the anisotropy of the base material (the base material is a gradually changing or abruptly changing curved surface) leads to misdetection of edge points; while Figure 5 is the result of processing the weld image by the processing method provided by the present invention. This is because the interference points mentioned above can be excluded by the global continuity and consistency constraint of the weld edge points, so the weld edge result is accurate.
[0046] The previous description of the specific exemplary embodiments of the present invention is for the purpose of illustration and description. The previous description is not intended to be exhaustive or to limit the present invention to the precise form disclosed. Obviously, many changes and variations are possible in light of the above teachings. The exemplary embodiments are chosen and described in order to explain the specific principles of the present invention and its practical application, so that other technicians in the art can implement and utilize the various exemplary embodiments of the present invention and their different alternative forms and modifications. The scope of the present invention is intended to be defined by the appended claims and their equivalents.
Claims
1. A weld edge detection method uses a single-line structured light sensor to obtain weld point cloud data along the length direction of the weld, and the weld point cloud data obtained once is recorded as single-frame data; Perform steps ① to ③ on the single-frame data respectively to screen out the contour point cloud data of the suspected weld edge: ① Extract the sub-pixel center points of the laser stripe from the collected laser stripe contour image of the weld; ② Calculate the gradient of each extracted sub-pixel center point along the normal direction, find the two laser stripe edge points corresponding to each sub-pixel center point, calculate the distance between the two edge points, and delete the points exceeding the preset value; ③ Solve the three-dimensional coordinates of the center point of the light stripe in the camera coordinate system and convert it to the light plane coordinate system to obtain the two-dimensional contour point cloud. After filtering, obtain the contour point cloud data; It is characterized in that Then perform the following steps: 1) Calculate the second derivative of each point in the contour point cloud data, and use the points with the result approaching zero as nodes; 2) Connect the nodes in adjacent single-frame data. The nodes in the same single-frame data are not connected to obtain a graph network; 3) Process the graph network to obtain the similarity between two connected nodes; Sum the Euclidean distances of the two connected nodes to obtain the similarity; Where the Euclidean distance is adjusted based on the shape of the base material; 4) Starting from any node in the first-frame data obtained when collecting the image, follow the edges of the graph network to any node in the last-frame data, and calculate the sum of the similarities of the same path; Take the two paths with the smallest sum of similarities as the two edges of the weld.
2. The weld edge detection method according to claim 1, It is characterized in that: The method used in step 4) to obtain the two paths with the smallest sum of similarities is the optimal path search.
3. The weld edge detection method according to claim 1, It is characterized in that: The method used in step 4) to obtain the two paths with the smallest sum of similarities is the Dijkstra algorithm.
4. The weld edge detection method according to claim 1, It is characterized in that: Step ① uses the Steger method to obtain the sub-pixel center points of the laser stripe.
5. The weld edge detection method according to claim 1, It is characterized in that: In step ③, median filtering is used for filtering.
Citation Information
Patent Citations
Edge detection model and method based on target detection and storage medium
CN110176017A
Welding robot vision assembly and measuring method thereof
CN110524580A