A method for extracting multi-type welding groove features based on 3D point cloud

Through the welding bevel feature extraction method based on three-dimensional point cloud, the linear laser camera, statistical filter and density clustering algorithm are used to solve the problems of low efficiency and poor accuracy of traditional welding bevel detection, and efficient and accurate bevel feature extraction and welding process optimization are achieved.

CN117058404BActive Publication Date: 2025-07-25HUNAN UNIV +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311213263.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-09-20
Publication Date
2025-07-25
Estimated Expiration
2043-09-20

AI Technical Summary

Technical Problem

The existing welding bevel detection technology has problems such as low efficiency, poor accuracy, high requirements for operator quality and large demand for computing resources, especially in complex environments that are unstable in effects.

Method used

A multi-type welding bevel feature extraction method based on three-dimensional point clouds is adopted, and the three-dimensional point cloud data is obtained through linear laser camera scanning, and the data processing is performed using statistical filters and density clustering algorithms. A piecewise linear regression error function is constructed and the error function is minimized to extract welding bevel features.

Benefits of technology

It improves the efficiency and accuracy of welding bevel feature extraction, reduces the labor intensity of operators, adapts to different types of welding bevels, has high robustness and visualization capabilities, can promptly detect welding defects, and optimizes welding process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117058404B_ABST
    Figure CN117058404B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of welding groove detection, and specifically provides a method for extracting multi-type welding groove features based on three-dimensional point clouds, including: 1. Measuring the three-dimensional point cloud data of the workpiece; 2. Filtering the three-dimensional point cloud data; 3. Constructing, clustering, merging, and classifying to obtain a clustering result; 4. Constructing a piecewise linear regression error function err(r) for each clustering cluster; 5. Minimizing the error function err(r) to search for the optimal r; 6. Comparing the information criterion value under the current number of segments with the previous value to determine whether to update the number of segments. If necessary, save the current optimal r and loop through steps 4 to 6; otherwise, return the optimal r to obtain a fitted curve; 7. Calculating the groove feature points. The present invention evaluates the quality of the model by using the AIC and BIC methods, defines a method for extracting multi-type welding groove features, and can obtain relatively accurate feature results for each type of welding groove.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field, and particularly to a method for extracting multi-type welding groove features based on 3D point clouds. Background Art

[0002] Welding grooves are an important part of welding and are widely used in fields such as aviation, shipbuilding, automobiles, and construction. Traditional welding grooves usually rely on manual operations, which have problems such as low efficiency and poor accuracy. Moreover, manual operations are easily affected by factors such as the environment and psychology, resulting in certain errors in groove detection. In addition, traditional welding groove methods require a large amount of manpower and material resources, with high costs, and also require certain professional skills, having relatively high requirements for the quality of operators. To solve the problems existing in traditional welding grooves, in recent years, some automated and intelligent welding groove detection technologies have gradually been applied. Most of these technologies rely on technical means such as computer vision and machine learning, and can achieve automatic detection and feature extraction of welding grooves. However, current automated welding groove detection technologies still have some problems, such as slow detection speed and low detection accuracy. Especially in complex environments, the effect is more unstable. Automatically obtaining welding groove features through a measurement system and then having a robot perform welding groove-related operations has become a new idea for groove operations.

[0003] Welding groove feature extraction is a key technology that can perform automated detection and evaluation of welding grooves. The following are several commonly used welding groove feature extraction methods:

[0004] 1. Method based on shape descriptors: This method transforms the welding groove into a shape descriptor and uses this descriptor to extract features. The advantage of this method is that it can well capture the geometric shape and topological structure of the groove. The disadvantage is that the selection and design of the descriptor may affect the accuracy and stability of feature extraction.

[0005] 2. Method based on image processing: This method regards the welding groove as an image and uses image processing technology to extract features. The advantage of this method is that it can well capture the texture and color features of the welding groove. The disadvantage is that the image processing process is affected by factors such as noise and light.

[0006] 3. Method based on machine learning: This method uses machine learning algorithms to learn the features of welding grooves and then uses the learned model to extract features from new welding grooves. The advantage of this method is that it can adaptively learn the features of different types of welding grooves. The disadvantage is that it requires a large amount of training data and relatively high computing resources.

[0007] 4. Deep learning-based method: This method uses deep neural networks to learn the features of welding grooves and can obtain higher-quality feature representations through multi-level feature extraction. The advantage of this method is that it can adaptively learn the features of different types of welding grooves and can process large-scale data. The disadvantage is that it requires a large amount of training data and high computing resources. Summary of the Invention

[0008] The present invention provides a method for extracting multi-type welding groove features based on three-dimensional point clouds to solve technical problems such as the need for a large amount of training data and high computing resources in existing welding groove algorithms.

[0009] To achieve the above object, the technical solution of the present invention is realized as follows:

[0010] The present invention provides a method for extracting multi-type welding groove features based on three-dimensional point clouds, including the following steps:

[0011] S1. Scan and measure the three-dimensional point cloud data of the workpiece;

[0012] S2. Construct a statistical filter and use the statistical filter to filter the three-dimensional point cloud data;

[0013] S3. Use the filtered three-dimensional point cloud data to construct a clustering cluster set. The clustering cluster set includes multiple clustering clusters, and then classify the clustering cluster set to obtain a clustering result C;

[0014] S4. Segment each clustering cluster and construct a piecewise linear regression error function err(r) for each clustering cluster, where r = {X, Y, Z}, and X, Y, and Z are the coordinate sets of the initialized segment in the x direction, y direction, and z direction respectively; construct a piecewise fitting curve, and then calculate the mean square error between the piecewise fitting curve and the original data; the original data is the three-dimensional point cloud data before segmentation;

[0015] S5. Use the Nelder-Mead algorithm to minimize the mean square error to search for the optimal parameter r;

[0016] S6. According to the information criteria AIC and BIC, compare the information criterion values under the current segmentation number with the information criterion values of the previous segmentation number. According to the comparison result, judge whether to update the segmentation number count. If necessary, save the current optimal parameter r, update the information criterion value and the segmentation number, and loop S4 to S6 until the segmentation number reaches the specified number; if there is no need to increase the segmentation number, exit the loop, return the result of the optimal parameter r, and obtain the fitting curves of each class after the final segmentation;

[0017] S7. Calculate the groove feature points through the clustering result C and the fitting curves of each class after the final segmentation.

[0018] Further, S1 specifically includes the following steps:

[0019] Use a line laser camera to scan the welded workpiece to obtain the three-dimensional point cloud data P = {p1, p2,..., p i ,..., p n}, p i = {x i , y i , z i} This three-dimensional data is the three-dimensional point cloud data for feature detection, including n points, and each point is a 3×1 vector.

[0020] Further, S2 specifically includes the following steps:

[0021] S21. For each point p i in the three-dimensional point cloud data P, define the distance d i as the average distance of the n i points closest to the point p d , and accordingly establish the distance set D(p) = {d1, d2,..., d i ,..., d n} corresponding to the three-dimensional point cloud data P. n is the number of measurement data points, and then calculate the mean D mean and the standard deviation D std of the distance set D(p);

[0022] S22. Define the parameter ratio1, and determine the threshold Td according to the parameter ratio1, where the threshold Td = D mean + ratio1×D std ;

[0023] S23. Perform filtering processing on the distance set D(p), where the points d i less than or equal to the threshold Td will be retained, and the remaining points will be regarded as outliers and deleted, that is, the new three-dimensional point cloud data P1 = {p ∈ P|D(p) < T d} is obtained.

[0024] Further, the parameter ratio1 in S22 satisfies the relationship: 0.5 ≤ ratio1 ≤ 2.0.

[0025] Further, S3 specifically includes the following steps:

[0026] S31. Determine the neighborhood radius ε and the minimum number of points minPts in the cluster;

[0027] S32. Arbitrarily select a core point p iStart by continuously searching for other points within its neighborhood radius ε to construct the cluster c i , by recursively performing this process, the cluster c i = {p ci1 , p ci2 ,..., p cij}, where p c1j ∈ P1, and traverse all points in the three-dimensional point cloud data P1 to obtain the set of clusters;

[0028] S33. For each cluster c i in the set of clusters, consider the clusters with the number of points less than minPts as noise and delete them, and other clusters are used as valid outputs. Use the valid outputs to construct the clustering result C, and the clustering result C = {c1, c2,..., c m}, where m represents the number of clusters.

[0029] Further, the number of clusters m in S33 and the number of points n of the measurement data in S21 satisfy the relationship: 5m ≥ n, and m ≤ 2.

[0030] Further, the S4 specifically includes the following steps:

[0031] S41. For each cluster c i which all contain x input , y input , z input , set the maximum number of segments maxCount, where x input , y input , z input respectively represent the coordinate value sets of the cluster c i in the x, y, and z directions, that is, the original data of the cluster. Initialize the number of fitting segments count = 1 and calculate the segment length seg;

[0032] S42. According to the segment length seg, initialize the coordinate set X in the x direction of the segment as X = {x min , x min + seg,..., x min + (count - 1) × seg, x max}, the number of elements in the coordinate set X is count + 1, and the coordinate set X represents the x coordinate values of the endpoints of each segment of the fitting line segment;

[0033] S43. Initialize the coordinate set X in the x direction and its corresponding coordinate sets Y and Z in the y and z directions, where the calculation methods of Y and Z are as follows. For x init ∈ X, define the parameter ratio2, and select the distance from x init to d init= the data points within rati02 * Δx, calculate the average value of these data points as x init The corresponding y and z coordinates and save them in the coordinate set Y and the coordinate set Z;

[0034] S44. Define the function func(r), where r = {X, Y, Z}. The function of func(r) is to calculate the endpoint coordinate points of each segment of the piecewise fitting curve according to the input parameter r, and pass the endpoints to the error function err(r);

[0035] S45. Define the error function where j represents the number in this cluster, y interp 、z interp are the one-dimensional linear interpolations of x input in the xoy plane and the xoz plane respectively, y interp = interp(x input , X, Y), z interp = interp(x input , X, Z), where X, Y, and Z represent the coordinate set X, the coordinate set Y, and the coordinate set Z respectively;

[0036] S46. The error function err(r) obtains the endpoint coordinate values of the current parameter r through the function func(r); constructs the fitting curves of each segment using the endpoint coordinate values of the current parameter r, and then calculates the mean square error between the fitting curves of each segment and the original data; the original data is the three-dimensional point cloud data before segmentation.

[0037] Furthermore, the parameter ratio2 in S43 satisfies the relationship: 0 ≤ ratio2 ≤ 1.0.

[0038] Furthermore, the calculation of the segment length seg in S41 specifically includes the following steps:

[0039] Traverse the cluster c i = {p ci1 , p ci2 ,..., p cij}, search for the maximum value x max and the minimum value x min of the x coordinate in the cluster ci, obtain Δx = x max - X min , divide Δx into count segments on average, and the segment length seg = Δx / count.

[0040] Furthermore, S7 specifically includes the following steps:

[0041] In S33, when the number of clustering clusters m of the clustering result C is 1, and in step S6, when the number of segments is 1, at this time, the multi-type welding groove feature points based on the 3D point cloud are the end points close to the workpiece edge;

[0042] Or, in S33, when the number of clustering clusters m of the point clustering result C is 2, at this time, the intersection point of the fitted curves after segmentation returned by the two clustering clusters in S6 is the welding point of the groove.

[0043] Advantages of the present invention:

[0044] 1. High efficiency

[0045] Traditional welding groove operations usually require manual operation, which is very time-consuming and laborious. The present invention uses a line laser camera to scan the welded workpiece to directly obtain 3D point cloud data for 3D measurement without manual intervention, reducing the labor intensity of operators. At the same time, the present invention classifies and processes the 3D point cloud data through a statistical filter and a density clustering algorithm, greatly improving the efficiency of welding groove feature extraction.

[0046] 2. High precision

[0047] By constructing the piecewise linear regression error function err(r) for each clustering cluster, the present invention can effectively reduce the computational cost of groove feature extraction while ensuring the accuracy. At the same time, by minimizing the error function err(r) to solve the welding groove feature points and update the optimal parameters, more accurate welding groove feature point information can be obtained. The experimental results show that the welding groove feature extraction method of the present invention can achieve high accuracy and reliability.

[0048] 3. Strong adaptability

[0049] The welding groove feature extraction method of the present invention can be applied to different types of welding grooves, including fillet welds, butt welds, T-shaped welds, lap welds, etc., with wide adaptability. First, this method is an adaptive segmentation method that can automatically adjust the number of segments according to the characteristics of the data, avoiding the problem of manually determining the number of segments in traditional segmentation methods. This makes the method simpler, faster, and does not require too much prior knowledge and experience from users. Second, this method uses an information criterion to evaluate the fitting degree of the model, making the model more accurate and reliable. Compared with traditional segmentation methods, this method pays more attention to the fitting degree and prediction ability of the model, rather than simply dividing the data into several segments for interpolation fitting. In addition, this method also has a certain robustness and can effectively process some outlier points and noise data. During the segmentation process, this method will automatically exclude those unreasonable segmentation points through the information criterion, thus avoiding the influence of outlier points and noise on the model.

[0050] 4. High visualization degree

[0051] The welding groove feature extraction method of the present invention processes and classifies three-dimensional point cloud data, and can obtain more intuitive groove feature information. At the same time, the method of the present invention can also further visually display the shape and distribution of the groove features by drawing the image of the piecewise fitting curve.

[0052] 5. Strong practicability

[0053] The welding groove feature extraction method of the present invention can be widely applied to the quality control of welding processes and the optimization of welding procedures. By accurately extracting the welding groove features, welding defects and quality problems can be detected in a timely manner, thus ensuring the quality and safety of welding processes. At the same time, the method of the present invention can also be used for the optimization of welding processes, helping welding engineers select appropriate welding parameters and procedures, and improving welding efficiency and quality. Description of the drawings

[0054] Figure 1 is a flow chart of the present invention;

[0055] Figure 2 is the effect diagram of theoretical groove point extraction in Embodiment 1;

[0056] Figure 3 is the effect diagram of the straight line where the groove is located in Embodiment 2. Detailed implementation manners

[0057] The present invention will be further described in detail below with reference to the drawings and specific embodiments.

[0058] Embodiment 1:

[0059] In this embodiment, the large-piece groove operation of a pump truck is selected, and the three-dimensional measurement data is obtained by a line laser scanner in a robot measurement system. The ultimate goal of the welding groove feature extraction method is to obtain the theoretical groove points of the workpiece and complete the groove operation in cooperation with the robotic arm.

[0060] Refer to Figure 1 , this application embodiment provides a multi-type welding groove feature extraction method based on three-dimensional point cloud, including the following steps:

[0061] S1. Use a line laser scanner to scan the measured workpiece to obtain the three-dimensional point cloud data of the measured workpiece;

[0062] In this embodiment, the specific steps of S1 are as follows:

[0063] Use a line laser camera to scan the welding workpiece to obtain the three-dimensional point cloud data P = {p1, p2,..., p i ,..., pn}, p i = {x i , y i , z i}} The three-dimensional data is three-dimensional point cloud data for feature detection, including n points, each point being a 3×1 vector. Preferably, n is 714, and the distance of the three-dimensional data point cloud is 0.15 mm.

[0064] S2. Construct a statistical filter and use the statistical filter to filter the three-dimensional point cloud data; the statistical filter helps to improve the quality and accuracy of the point cloud data while retaining the detailed information of the point cloud data.

[0065] In this embodiment, S2 specifically includes the following steps:

[0066] S21. For each point p in the three-dimensional point cloud data P i , define the distance d i as the average distance of the n i points closest to the point p d , where n d = 20, and accordingly establish the distance set D(p) = {d1, d2,..., d i ,..., d n} corresponding to the three-dimensional point cloud data P. n is the number of measurement data points, and then calculate the mean D mean and the standard deviation D std ;

[0067] S22. Define the parameter ratio1 and determine the threshold T d according to the parameter ratio1, where the threshold T d = D mean + ratio1 × D std ;

[0068] S23. Filter the distance set D(p), where the points d d less than or equal to the threshold T i will be retained, and the remaining points will be regarded as outliers and deleted, that is, the new three-dimensional point cloud data P1 = {p ∈ P|D(p) < T d} is obtained.

[0069] In this embodiment, the parameter ratio1 in S22 satisfies the relationship: 0.5 ≤ ratio1 ≤ 2.0. Preferably, ratio1 = 2.0.

[0070] S3. Use the filtered three-dimensional point cloud data to construct a clustering cluster set. The clustering cluster set includes multiple clustering clusters, and then classify the clustering cluster set to obtain the clustering result C;

[0071] In this embodiment, S3 specifically includes the following steps:

[0072] S31. Determine the neighborhood radius ε and the minimum number of points minPts in a cluster; preferably, the neighborhood radius ε = 0.5 mm, and the minimum number of points in a cluster is minPts = 0.2×n = 143;

[0073] S32. Starting from any core point p in the three-dimensional point cloud data P1 i to construct a cluster c by continuously finding other points within its neighborhood radius ε. i By recursively performing this process, the cluster c i ={p ci1 , p ci2 ,..., p cij} can be obtained, where p c1j ∈P1. By traversing all points in the three-dimensional point cloud data P1, a set of clusters can be obtained;

[0074] S33. For each cluster c in the set of clusters i , consider the clusters with the number of points less than minPts as noise and delete them. Other clusters are used as valid outputs. Use the valid outputs to construct the clustering result C, where the clustering result C = {c1, c2,..., c m}, and m represents the number of clusters. Points without a category are classified as noise points, and finally, the classification result of the three-dimensional point cloud data is obtained. The clustering result of the measurement data P is 1 cluster.

[0075] In this embodiment, the number m of clusters in S33 and the number n of points in the measurement data in S21 satisfy the relationship: 5m≥n, and m≤2.

[0076] S4. Segment each cluster and construct the piecewise linear regression error function err(r) for each cluster, where r = {X, Y, Z}, and X, Y, Z are the coordinate sets of the initialized segments in the x, y, and z directions respectively; construct the fitting curve for each segment, and then calculate the mean square error between the fitting curve of each segment and the original data; the original data is the three-dimensional point cloud data before segmentation;

[0077] Specifically, set the maximum number of segments maxCount = 3. Initialize count = 1, perform piecewise linear fitting on this cluster, and in each piecewise fitting calculation, set ratio2 = 0.1 to initialize the segmentation situation, and obtain the optimal fitting line segment by minimizing the error function .

[0078] In this embodiment, S4 specifically includes the following steps:

[0079] S41. For each cluster c i all contain x input , y input , z input . Set the maximum number of segments maxCount, where x input , y input , z input respectively represent the coordinate value sets of the cluster c i in the x, y, and z directions, that is, the original data of the cluster. Initialize the number of fitting segments count = 1 and calculate the segment length seg; preferably, set the maximum number of segments maxCount = 3;

[0080] S42. According to the segment length seg, initialize the coordinate set X in the x direction of the segment as X = {x min , x min +seg,..., x min +(count - 1)×seg, x max}, the number of elements in the coordinate set X is count + 1, and the coordinate set X represents the x coordinate values of the endpoints of each segment of the fitting line segment;

[0081] S43. Initialize the coordinate set X in the x direction, its corresponding y coordinate set Y, and z coordinate set Z. The calculation methods of Y and Z are as follows: for x init ∈X, define the parameter ratio2, select the data points within d init =ratio2*Δx from x init , and calculate the average value of these data points as the y and z coordinates corresponding to x init and save them in the coordinate set Y and the coordinate set Z;

[0082] S44. Define the function func(r), where r = {X, Y, Z}. The function func(r) is used to calculate the endpoint coordinate points of each segment of the piecewise fitting curve according to the input parameter r and pass the endpoints to the error function err(r);

[0083] S45. Define the error function where j represents the quantity in the cluster, y interp , z interp are the one-dimensional linear interpolations of x input in the xoy plane and xoz plane respectively, y interp =interp(x input , X, Y), z interp =interp(x input , X, Z), where X, Y, and Z represent the coordinate set X, the coordinate set Y, and the coordinate set Z respectively;

[0084] S46. The error function err(r) obtains the endpoint coordinate values of the current parameter r through the function func(r); uses the endpoint coordinate values of the current parameter r to construct the fitting curves for each segment, and then calculates the mean square error between the fitting curves of each segment and the original data; the original data is the three-dimensional point cloud data before segmentation.

[0085] In this embodiment, the parameter ratio2 in S43 satisfies the relationship: 0 ≤ ratio2 ≤ 1.0.

[0086] In this embodiment, the calculation of the segmentation length seg in S41 specifically includes the following steps:

[0087] Traverse the clustering cluster c i ={p ci1 , p ci2 ,..., p cij}, search for the maximum value x i and the minimum value x max of the x coordinate in the clustering cluster c min , obtain Δx = x max - x min , divide Δx evenly into count segments, and the segmentation length seg = Δx / count.

[0088] S5. Use the Nelder-Mead algorithm to minimize the mean square error to search for the optimal parameter r;

[0089] S6. According to the information criteria AIC and BIC, compare the information criterion values under the current segmentation number with the information criterion values of the previous segmentation number, and judge whether to update the segmentation number count according to the comparison result. If necessary, save the current optimal parameter r, update the information criterion values and the segmentation number, and loop S4 to S6 until the number of segments reaches the specified number; if it is not necessary to increase the segmentation number, exit the loop, return the result of the optimal parameter r, and obtain the fitting curves of each class after final segmentation;

[0090] Specifically, calculate the fitting results and their AIC and BIC values under the current count, update the count value and loop to calculate steps S4 and S6 until count == maxCount, and calculate the AIC and BIC values of the new fitting results, and judge whether to update the segmentation number count. If necessary, save the current optimal parameter r, update the information criterion values and the segmentation number, and continue to loop. If it is not necessary to increase the segmentation number, exit the loop. Return the result of the optimal parameter r. The optimal fitting number of segments for the measurement data P is one segment, and the result is as Figure 2 shown.

[0091] S7. Calculate the groove feature points based on the number of clusters in the clustering result C and the fitting curves of each class after final segmentation.

[0092] In this embodiment, the S7 specifically includes the following steps:

[0093] In the S33, when the number m of clustering clusters in the clustering result C is 1, and in the step S6, when the number of segmentation segments is 1, at this time, the multi-type welding groove feature points based on the three-dimensional point cloud are the end points close to the workpiece edge;

[0094] Or, in the S33, when the number m of clustering clusters in the point clustering result C is 2, at this time, the intersection point of the fitting curves after segmentation returned by the two clustering clusters in the S6 is the welding point of the groove.

[0095] The present invention realizes the automatic detection and feature extraction of the welding groove through the way of robotic arm guidance, avoiding the problem of inaccurate manual operation existing in the traditional welding groove detection. At the same time, the present invention also proposes a method for point cloud filtering and clustering processing, which can effectively remove interference points, reduce errors and improve the detection accuracy. In addition, the present invention also proposes a method for constructing and solving the objective function, which can detect various types of groove features. Using the three-dimensional point cloud data, only less computing resources are required to ensure the detection speed while improving the detection accuracy.

[0096] Embodiment 2:

[0097] In this embodiment, the large-piece groove operation of the pump truck is selected, and the three-dimensional measurement data P2 is obtained through the line laser scanner in the robot measurement system. The ultimate goal of the groove feature extraction algorithm is to obtain the theoretical welding points of the workpiece and cooperate with the robotic arm to complete the groove welding operation.

[0098] S1 - S2: The processes are respectively as shown in S1 and S2 in Embodiment 1.

[0099] S3: The process is as shown in S3 in Embodiment 1, and the clustering result C of the measurement data P2 is 2 clusters.

[0100] S4: The process is as shown in S4 in Embodiment 1.

[0101] S5: The process is as shown in S5 in Embodiment 1.

[0102] S6: The process is as shown in S6 in Embodiment 1, and the fitting result of one cluster is 2 segments. As Figure 3 shown.

[0103] S7: From the clustering result and the number of fitting segments obtained in S3 and S5, it can be seen that the feature points calculated by the algorithm at this time are the welding coordinates of the robotic arm, which are the intersection points of the two groove surfaces.

[0104] As described above, it is only the specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art within the technical scope disclosed by the present invention can easily think of changes or substitutions, which should all be covered within the protection scope of the present invention. Moreover, the technical solutions between various embodiments of the present invention can be combined with each other, but it must be based on the ability of those of ordinary skill in the art to implement. When the combination of technical solutions appears to be contradictory or unable to be implemented, it should be considered that such a combination of technical solutions does not exist and is not within the protection scope required by the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims described above.

Claims

1. A method for extracting multi-type welding groove features based on 3D point cloud, characterized in that: It includes the following steps: S1. Measure the three-dimensional point cloud data of the workpiece; S2. Construct a statistical filter and use the statistical filter to filter the three-dimensional point cloud data; S3. Use the filtered three-dimensional point cloud data to construct a clustering cluster set, the clustering cluster set includes multiple clustering clusters, and then classify the clustering cluster set to obtain a clustering result C; S4. Segment each clustering cluster and construct a piecewise linear regression error function err(r) for each clustering cluster, where r = {X, Y, Z}, and X, Y, Z are the coordinate sets in the x-direction, y-direction, and z-direction of the initialized segment respectively; construct a fitting curve for each segment, and then calculate the mean square error between the fitting curve of each segment and the original data; the original data is the three-dimensional point cloud data before segmentation; S5. Use the Nelder-Mead algorithm to minimize the mean square error to search for the optimal parameter r; S6. According to the information criteria AIC and BIC, compare the information criterion values under the current number of segments with the information criterion values of the previous number of segments, and judge whether to update the number of segments count according to the comparison result. If necessary, save the current optimal parameter r, update the information criterion values and the number of segments, and loop S4 to S6 until the number of segments reaches the specified number; If it is not necessary to increase the number of segments, exit the loop, return the result of the optimal parameter r, and obtain the fitting curves of each class after the final segmentation; S7. Calculate the groove feature points through the number of clusters in the clustering result C and the fitting curves of each class after the final segmentation.

2. The method for extracting multi-type welding groove features according to claim 1, wherein The specific steps of S1 are as follows: Use a line laser camera to scan the welded workpiece to obtain the three-dimensional point cloud data P = {p1, p2,..., p i ,..., p n}, p i = {x i , y i , z i} This three-dimensional data is the three-dimensional point cloud data for feature detection, containing n points, and each point is a 3×1 vector.

3. The multi-type welding groove feature extraction method according to claim 2, wherein The specific steps of S2 are as follows: S21. For each point p in the 3D point cloud data P i , define the distance d i as the average distance of the n i points closest to the point p d . Accordingly, establish the distance set D(P) = {d1, d2,..., d i ,..., d n} corresponding to the 3D point cloud data P, where n is the number of points in the 3D point cloud data. Then calculate the mean D mean and the standard deviation D std of the distance set D(p); S22. Define a parameter ratio1 and determine a threshold T based on the parameter ratio1 d , where the threshold T d = D mean + ratio1 × D std ; S23. Filter the distance set D(p), where points d d less than or equal to the threshold T i will be retained, and the remaining points will be regarded as outliers and deleted, that is, a new three-dimensional point cloud data P1 = {p ∈ P|D(p) < T} d is obtained.

4. The multi-type welding groove feature extraction method according to claim 3, wherein, The parameter ratio1 in S22 satisfies the relationship: 0.5 ≤ ratio1 ≤ 2.

0.

5. The method for extracting multi-type welding groove features according to claim 3, wherein The specific steps of S3 are as follows: S31. Determine the neighborhood radius ε and the minimum number of points minPts for the clustering cluster; S32. Starting from any core point p in the three-dimensional point cloud data P1 i and continuously searching for other points within its neighborhood radius ε to construct the clustering cluster c i , by recursively performing this process, the clustering cluster c i ={p ci1 , p ci2 ,..., p cij} can be obtained, where p c1j ∈P1. By traversing all points in the three-dimensional point cloud data P1, the clustering cluster set is obtained; S33. For each cluster c in the cluster set i , consider the clusters with the number of points less than minPts as noise and delete them. Other clusters are used as valid outputs. Use the valid outputs to construct the clustering result C. The clustering result C = {c1, c2,..., c m}, where m represents the number of valid clusters.

6. The method for extracting multi-type welding groove features according to claim 5, wherein The number of clustering clusters m in S33 and the number of points n of the measurement data in S21 satisfy the relationship: 5m ≥ n, and m ≤ 2.

7. The multi-type welding groove feature extraction method according to claim 6, wherein The specific steps of S4 are as follows: S41. For each cluster c i All contain x input , y input , z input . Set the maximum number of segments maxCount, where x input , y input , z input respectively represent the coordinate value sets of the cluster c i in the x, y, and z directions. Initialize the number of fitting segments count = 1 and calculate the segment length seg; S42. Initialize the set of x - coordinates X = {x min , x min +seg,..., x min +(count - 1)×seg, x max} according to the segment length seg. The number of elements in the coordinate set X is count + 1, and the elements in the coordinate set X represent the x - coordinate values of the endpoints of each segment of the fitted line segment; S43. Initialize the coordinate sets X in the x - direction, and their corresponding y - coordinate set Y and z - coordinate set Z. The calculation methods for Y and Z are as follows: for x init ∈X, define the parameter ratio2, and select the data points within a distance d init at d init = ratio2 * Δx. Calculate the average value of these data points as the y and z coordinates corresponding to x init and save them in the coordinate sets Y and Z; S44. Define a function func(r), where r = {X, Y, Z}, and the function of func(r) is to calculate the endpoint coordinate points of each segment of the piecewise fitting curve according to the input parameter r, and pass the endpoints to the error function err(r); S45. Define the error function where j represents the number in the cluster, y interp , z interp are respectively the one-dimensional linear interpolations of x input in the xoy plane and the xoz plane, y interp = interp(x input , X, Y), z interp = interp(x input , X, Z), where X, Y, and Z respectively represent the coordinate set X, the coordinate set Y, and the coordinate set Z; S46. The error function err(r) obtains the endpoint coordinate values of the current parameter r through the function func(r); uses the endpoint coordinate values of the current parameter r to construct a fitting curve for each segment, and then calculates the mean square error between the fitting curve of each segment and the original data; the original data is the three-dimensional point cloud data before segmentation.

8. The multi-type welding groove feature extraction method according to claim 7, wherein The parameter ratio2 in S43 satisfies the relationship: 0 ≤ ratio2 ≤ 1.

0.

9. The multi-type welding groove feature extraction method according to claim 7, wherein The specific steps of calculating the segment length seg in S41 are as follows: Traverse the clustering cluster c i = {p ci1 , p ci2 ,..., p cij}, search for the maximum value x i of the x coordinate in the clustering cluster c max and the minimum value x min , obtain Δx = x max - x min , divide Δx evenly into count segments, and the segment length seg = Δx / count.

10. The method for extracting multi-type welding groove features according to claim 9, characterized in that, The specific steps of S7 are as follows: In S33, if the number of clustering clusters m in the clustering result C = 1, and in step S6, the number of segments is 1 segment, at this time, the multi-type welding groove feature points based on the three-dimensional point cloud are the endpoints close to the edge of the workpiece; Or, in the step S33, when the number m of the clustering clusters of the point clustering result C is 2, at this time, the intersection point of the segmented fitting curves returned by the two clustering clusters in the step S6 is the welding point of the groove.

Citation Information

Patent Citations

  • Railway contact network extraction and classification method based on vehicle-mounted LiDAR

    CN112529044A

  • Three-dimensional target detection method and system based on point cloud weighted channel feature

    WO2020151109A1