Weld seam trajectory generation method, system, device and medium based on three-dimensional point cloud
By using a weld trajectory generation method based on 3D point clouds, the problems of long time consumption and low accuracy in traditional weld trajectory generation are solved, and high-precision weld extraction and welding quality improvement are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- FOSHAN INST OF INTELLIGENT EQUIP TECH
- Filing Date
- 2026-04-13
- Publication Date
- 2026-07-14
AI Technical Summary
Traditional weld trajectory generation methods rely on manual teaching or offline programming, which are time-consuming and have low accuracy. In particular, when the workpiece has thermal deformation, processing errors, or assembly errors, there will be deviations between the actual workpiece and the theoretical digital model.
The method for generating weld trajectories based on 3D point clouds preprocesses the original point cloud of the workpiece to remove background information, extracts key feature point clouds and segments them to generate the weld spatial trajectory. The workpiece point cloud is separated using random sampling consistency and region growing algorithms, and weld feature points are segmented by combining density clustering and principal direction growing algorithms.
It improves the accuracy and quality of weld seam extraction, enhances welding efficiency and quality, reduces computational complexity and noise interference, and strengthens the robustness and adaptability of the algorithm.
Smart Images

Figure CN122391481A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of workpiece welding technology, and in particular to a method, system, equipment and medium for generating weld trajectories based on three-dimensional point clouds. Background Technology
[0002] Traditional methods for generating weld seam trajectories mainly rely on manual teaching or offline programming. Manual teaching requires operators to manually guide the robot's end effector to move along the weld seam, which is time-consuming. Offline programming relies on a precise 3D digital model of the workpiece. However, in actual production, workpieces often have problems such as thermal deformation, processing errors, or assembly errors, which cause deviations between the actual workpiece and the theoretical digital model, resulting in low accuracy of the offline-generated weld seam trajectory. Summary of the Invention
[0003] The main purpose of this application is to propose a method, system, equipment and medium for generating weld trajectories based on three-dimensional point clouds, with the aim of improving the accuracy of weld trajectory generation.
[0004] To achieve the above objectives, one aspect of this application proposes a method for generating weld trajectories based on three-dimensional point clouds, the method comprising: The original point cloud of the workpiece to be welded is obtained and preprocessed to obtain the target point cloud; Background removal is performed on the target point cloud to obtain the workpiece point cloud; Key feature point cloud is extracted from the workpiece point cloud, and the key feature point cloud is used to characterize the position and geometry of several welds appearing on the workpiece to be welded; The key feature point cloud is segmented to obtain several weld feature point clouds; Based on the aforementioned weld feature point clouds, several corresponding weld spatial trajectories are generated.
[0005] Further, the step of background removal from the target point cloud to obtain the workpiece point cloud includes: Obtain input information, which is used to characterize the placement state of the workpiece to be welded; When the input information indicates that the workpiece to be welded is placed on a plane, the workpiece point cloud is separated from the target point cloud using a random sampling consensus algorithm; When the input information indicates that the workpiece to be welded is placed on the support structure, the workpiece point cloud is separated from the target point cloud using a region growing algorithm.
[0006] Furthermore, the extraction of key feature point cloud from the workpiece point cloud includes: Determine the neighborhood point set and normal vector of each workpiece point contained in the workpiece point cloud; For each workpiece point in the workpiece point cloud: Calculate the average normal vector based on the normal vectors of all neighboring workpiece points in the neighboring point set of the workpiece point; calculate and sort the angles between the normal vectors of all neighboring workpiece points and the average normal vector; calculate the difference between every two adjacent angles after sorting; and divide all neighboring workpiece points into multiple clusters based on the criteria that two neighboring workpiece points associated with the difference satisfying the first preset condition fall into the same cluster and two neighboring workpiece points associated with the difference not satisfying the first preset condition fall into different clusters; count the number of neighboring workpiece points contained in each cluster and select the largest number, then calculate the proportion of the largest number to the total number of neighboring workpiece points; when the proportion does not exceed a preset proportion threshold, the workpiece point is used as a key feature point; wherein, the first preset condition is used to limit the difference from not exceeding a preset angle jump threshold. All key feature points selected from the workpiece point cloud are merged to obtain the key feature point cloud.
[0007] Furthermore, the segmentation of the key feature point cloud to obtain several weld feature point clouds includes: The key feature point cloud is initially segmented using a density-based noisy spatial clustering algorithm to obtain multiple initial clusters; For each initial cluster that has been segmented, a region growing algorithm based on the main direction is used to further segment the initial cluster to obtain all final clusters; For the several final clusters that are segmented out, all the key feature points contained in each final cluster are taken as weld feature points and merged to obtain the weld feature point cloud.
[0008] Furthermore, the initial clusters are further segmented using a region growing algorithm based on the main direction, resulting in all final clusters including: Determine the neighborhood point set and main direction vector of each key feature point contained in the initial cluster; Randomly select multiple key feature points that have not been clustered from the initial cluster; Select the key feature point with the highest linearity from the multiple key feature points as the seed point, then establish a new cluster, and determine the growth direction vector according to the main direction vector of the seed point; Based on the growth direction vector, region growth is performed simultaneously in both positive and negative directions. During the region growth process, key feature points that meet the second preset condition and contained in the initial cluster are added to the new cluster. For each key feature point added, the latest growth direction vector is fine-tuned according to the main direction vector of the added key feature point. After the region growth is completed, the current new cluster is taken as the final cluster. The second preset condition is used to limit the added key feature points to fall within the neighborhood point set of the seed point, and the angle between the main direction vector of the added key feature point and the latest growth direction vector does not exceed a preset angle threshold. Determine whether the number of un-clustered key feature points contained in the initial cluster exceeds a preset threshold; if yes, return to the step of randomly selecting multiple un-clustered key feature points from the initial cluster; if no, use a neighborhood voting method to allocate the un-clustered key feature points contained in the initial cluster to the corresponding final cluster.
[0009] Furthermore, generating corresponding spatial trajectories of welds based on the plurality of weld feature point clouds includes: For each weld feature point cloud: The weld feature point cloud is preprocessed to obtain the first weld feature point cloud; Centroid calculation is performed on the first weld feature point cloud to obtain all key weld feature points; Curve fitting is performed on all the key weld feature points to obtain the weld space trajectory.
[0010] Furthermore, the centroid calculation of the first weld feature point cloud to obtain all key weld feature points includes: Determine the neighborhood point set of each first weld feature point contained in the first weld feature point cloud; For each first weld feature point contained in the first weld feature point cloud: calculate the average distance between the first weld feature point and its neighboring point set to determine the search range; filter out all first weld feature points falling within the search range from the first weld feature point cloud and form the current search point set; determine the maximum overlap value between the current search point set and the historical search point set formed based on other first weld feature points contained in the first weld feature point cloud; when the maximum overlap value does not exceed a preset overlap threshold, perform centroid calculation on the current search point set to obtain the key weld feature points.
[0011] To achieve the above objectives, another aspect of this application proposes a weld trajectory generation system based on three-dimensional point clouds, the system comprising: The acquisition and preprocessing module is used to acquire the original point cloud of the workpiece to be welded and perform preprocessing to obtain the target point cloud; The background removal module is used to remove the background from the target point cloud to obtain the workpiece point cloud; An extraction module is used to extract key feature point clouds from the workpiece point cloud, and the key feature point clouds are used to characterize the position and geometry of several welds appearing on the workpiece to be welded. The segmentation module is used to segment the key feature point cloud to obtain several weld feature point clouds; The generation module is used to generate several corresponding weld space trajectories based on the several weld feature point clouds.
[0012] To achieve the above objectives, another aspect of this application proposes an electronic device, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the above-described method for generating weld trajectories based on three-dimensional point clouds.
[0013] To achieve the above objectives, another aspect of this application proposes a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described method for generating weld trajectories based on three-dimensional point clouds.
[0014] This application includes at least the following beneficial effects: by first acquiring the original point cloud of the workpiece to be welded and preprocessing it to obtain the target point cloud, the quality of the point cloud can be improved. Then, after background removal of the target point cloud, key feature point clouds are extracted from it and segmented. These key feature point clouds mainly represent the position and geometry of several weld seams appearing on the workpiece to be welded, which can improve the accuracy and quality of weld seam extraction. Subsequently, based on the more reliable weld seam feature point clouds obtained from the segmentation, several corresponding weld seam spatial trajectories are generated, which is beneficial to improving the subsequent welding efficiency and welding quality. Attached Figure Description
[0015] Figure 1 This is a flowchart illustrating a method for generating weld trajectories based on three-dimensional point clouds, as provided in an embodiment of this application. Figure 2 This is a schematic diagram of the composition of a weld trajectory generation system based on three-dimensional point cloud provided in an embodiment of this application; Figure 3 This is a schematic diagram of the hardware structure of the electronic device provided in the embodiments of this application. Detailed Implementation
[0016] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of this application and are not intended to limit it. In the following description, when referring to the accompanying drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with those of this application; they are merely examples of systems and methods consistent with some aspects of the embodiments of this application as detailed in the appended claims.
[0017] It is understood that the terms “first,” “second,” etc., used in this application may be used herein to describe various concepts, but unless otherwise stated, these concepts are not limited by these terms. These terms are only used to distinguish one concept from another. For example, without departing from the scope of the embodiments of this application, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the words “if,” “when,” or “in response to a determination” as used herein may be interpreted as “when…” or “when…” or “in response to a determination.”
[0018] As used in this application, the terms "at least one", "multiple", "each", "any", etc., "at least one" includes one, two or more, "multiple" includes two or more, "each" refers to each of the corresponding multiples, and "any" refers to any one of the multiples.
[0019] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit this application.
[0020] Welding is a critical process in manufacturing, with applications spanning numerous aspects of modern industry and civilian society. Considering the difficulty in ensuring personnel safety and process stability under complex conditions during manual welding, robotic automated welding technology has gradually gained widespread application to improve production efficiency and welding quality. In robotic automated welding technology, trajectory planning of the welding robot is a crucial step in ensuring welding quality and efficiency. Traditional weld trajectory generation methods mainly rely on manual teaching or offline programming; however, both methods have certain drawbacks: manual teaching requires operators to manually guide the robot's end effector along the weld seam, which is time-consuming; offline programming relies on a precise three-dimensional digital model of the workpiece, but in actual production, workpieces often experience thermal deformation, machining errors, or assembly errors, causing deviations between the actual workpiece and the theoretical digital model, resulting in low accuracy of the offline-generated weld trajectory.
[0021] With the development of computer vision, in order to further improve the efficiency of automated robotic welding, vision-guided robotic welding technology has become a research hotspot. Since two-dimensional images are difficult to accurately describe the geometric information of welds, researchers have proposed a weld trajectory generation technology based on three-dimensional point clouds. This technology mainly emphasizes first using a random sampling consensus algorithm to segment the collected workpiece point cloud into planes, and then extracting weld feature points by calculating the nearest distance between points on the planes to generate the weld trajectory. When the workpiece has a complex planar geometry, presenting an irregular free-form surface, and may have local concavity, folds, or bends, the existing planar segmentation method is not robust enough. When the workpiece has more than two intersecting planes, that is, when the workpiece has multiple planes or complex intersecting surfaces, it will undoubtedly increase the difficulty of extracting weld feature points and the computational cost.
[0022] In view of this, embodiments of this application provide a method, system, device, and medium for generating weld trajectories based on three-dimensional point clouds. This solution proposes to first acquire the original point cloud of the workpiece to be welded and preprocess it to obtain the target point cloud, which can improve the quality of the point cloud. Then, after background removal from the target point cloud, key feature point clouds are extracted and segmented. These key feature point clouds mainly represent the position and geometry of several welds appearing on the workpiece to be welded, which can improve the accuracy and quality of weld extraction. Subsequently, several corresponding weld spatial trajectories are generated based on the more reliable weld feature point clouds obtained from the segmentation, which is beneficial to improving the subsequent welding efficiency and welding quality.
[0023] This application provides a method for generating weld seam trajectories based on three-dimensional point clouds, relating to the field of workpiece welding technology. It can be applied to terminals, servers, or software running on either a terminal or server. In some embodiments, the terminal can be a smartphone, tablet, laptop, desktop computer, etc., but is not limited to these. The server can be configured as an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. The server can also be a node server in a blockchain network. The software can be an application implementing the above method, but is not limited to these forms.
[0024] Please see Figure 1 , Figure 1 This is an optional flowchart illustrating a method for generating weld trajectories based on three-dimensional point clouds, provided in an embodiment of this application. The method may include, but is not limited to, the following steps S101 to S105: Step S101: Obtain the original point cloud of the workpiece to be welded and perform preprocessing to obtain the target point cloud; Step S102: Remove the background from the target point cloud to obtain the workpiece point cloud; Step S103: Extract key feature point cloud from workpiece point cloud. Key feature point cloud is used to characterize the position and geometry of several welds on the workpiece to be welded. Step S104: Segment the key feature point cloud to obtain several weld feature point clouds; Step S105: Generate several corresponding weld space trajectories based on several weld feature point clouds.
[0025] Steps S101 to S105 shown in the embodiments of this application improve the accuracy of weld trajectory generation by performing preliminary screening and extraction of workpiece point clouds before segmentation.
[0026] In step S101 of some embodiments, the original point cloud of the workpiece to be welded is used to characterize the three-dimensional geometry, size features and surface detail information of the workpiece to be welded. It can be acquired by a structured light camera installed at the end of the robotic arm. The corresponding implementation may include, but is not limited to, controlling the robotic arm to move quickly and position itself above the workpiece to be welded by a teach pendant, and then dragging the end of the robotic arm with a manual control button set on the robotic arm so that the structured light camera is aligned with the workpiece to be welded for acquisition.
[0027] In step S101 of some embodiments, the preprocessing of the original point cloud of the workpiece to be welded to obtain the target point cloud can be implemented in ways that include, but are not limited to: first, voxel filtering downsampling of the original point cloud of the workpiece to be welded to obtain an initial point cloud. Specifically, this involves creating a three-dimensional voxel mesh, dividing the point cloud space formed by the original point cloud of the workpiece to be welded into multiple voxel units, calculating the centroid of all points contained in each voxel unit and approximating it as the other points contained in that voxel unit, thereby reducing the resolution of the original point cloud of the workpiece to be welded and reducing the computational burden in the subsequent steps; then, radius filtering of the initial point cloud to obtain the target point cloud. Specifically, this involves setting a filtering radius, and for each point contained in the initial point cloud, counting the number of other points falling within the filtering radius of that point. If the counted number is less than a preset threshold, the point is filtered out; otherwise, it is retained. This process filters out outliers in the initial point cloud caused by noise or sensor errors.
[0028] In step S102 of some embodiments, the content regarding background culling of the target point cloud to obtain the workpiece point cloud can be implemented in ways that include, but are not limited to: acquiring input information, which characterizes the placement state of the workpiece to be welded. This input information should be understood as the placement state of the workpiece to be welded before point cloud acquisition. This input information is generally set and entered by the operator before point cloud acquisition. Then, based on the input information, a suitable algorithm is selected to separate the workpiece point cloud from the target point cloud. This can be divided into two cases: First, when the input information indicates that the workpiece to be welded is placed on a plane, the existing RANSAC (Random Sample Consensus) algorithm is used to separate the workpiece point cloud from the target point cloud; second, when the input information indicates that the workpiece to be welded is placed on a support structure, the existing region growing algorithm is used to separate the workpiece point cloud from the target point cloud. The support structure can be a simple shelf composed of multiple pipes or a shelf of other shapes, generally placed on a plane.
[0029] Furthermore, regarding the use of the existing RANSAC algorithm to separate the workpiece point cloud from the target point cloud, the corresponding implementation method may include, but is not limited to, the following steps S201 to S203: Step S201: Randomly select three non-collinear points from the target point cloud, and then fit a plane equation based on the selected three points. Step S202: Use the fitted plane equation to check other points contained in the target point cloud, and take the points whose distance from the current fitted plane is less than the first set distance threshold as the interior points of the current fitted plane. Repeat steps S201 to S202 multiple times to obtain multiple plane equations, and then select the target plane equation with the most interior points. The target fitting plane referred to by the target plane equation can be understood as the plane on which the workpiece to be welded is placed. Step S203: Use the target plane equation to traverse all points contained in the target point cloud, classify the points whose distance from the target fitting plane is less than the first set distance threshold as planar point clouds and remove them, that is, classify the points whose distance from the target fitting plane is greater than or equal to the first set distance threshold as workpiece point clouds and retain them, thereby separating the workpiece point cloud from the target point cloud.
[0030] Furthermore, region growing algorithms are clustering methods based on local features of point cloud data, often used to extract target regions from complex environments. Since the area occupied by the workpiece to be welded in the target point cloud is usually large, region growing algorithms can segment the target point cloud into multiple regions by analyzing the features of neighboring points and finding the largest region representing the workpiece to be welded. Regarding the use of existing region growing algorithms to separate the workpiece point cloud from the target point cloud, corresponding implementation methods may include, but are not limited to, the following: Select an unselected point from the target point cloud as the seed point for the current region growth. Start a neighborhood search from the seed point to expand the current region. Add points that meet the similarity criteria to the current region. Then, use the added points as new seed points and continue to expand. The similarity criteria mainly limit the spatial distance between the current search point and the points obtained by searching its neighborhood to be less than a second set distance threshold. After growing multiple candidate regions, the largest target region is selected as the region of the workpiece to be welded. The largest target region refers to the target region containing the most points. Then, all points that do not fall within the target region are removed from the target point cloud to obtain the workpiece point cloud.
[0031] Considering that the target point cloud usually contains complete information about the scene, including the background, the workpiece to be welded, and other possible objects or noise, separating the workpiece point cloud from the target point cloud can remove the background and other interference, which is beneficial to improving the accuracy of subsequent weld extraction. In addition, this application proposes to select an appropriate algorithm based on the placement state of the workpiece to be welded, which can improve the robustness and adaptability of background removal.
[0032] In some embodiments, step S103, regarding the extraction of key feature point clouds from the workpiece point cloud, may include, but is not limited to, the following steps S301 to S303: Step S301: Determine the neighborhood point set and normal vector of each workpiece point contained in the workpiece point cloud; Step S302: For each workpiece point in the workpiece point cloud: Calculate the average normal vector based on the normal vectors of all neighboring workpiece points in the workpiece point's neighborhood point set; calculate the angle between the normal vectors of all neighboring workpiece points in the workpiece point's neighborhood point set and the average normal vector, and sort them (either in descending or ascending order); calculate the difference between any two adjacent angles after sorting, and then, based on the criteria that two neighboring workpiece points whose difference relationship meets the first preset condition fall into the same cluster and two neighboring workpiece points whose difference relationship does not meet the first preset condition fall into different clusters (the first preset condition is used to limit the difference from not exceeding a preset angle jump threshold), divide all neighboring workpiece points in the workpiece point's neighborhood point set into multiple clusters; count the number of neighboring workpiece points in each cluster and select the largest number, then calculate the proportion of the largest number to the total number of neighboring workpiece points in the workpiece point's neighborhood point set; when the proportion does not exceed a preset proportion threshold, the workpiece point is considered a key feature point. Step S303: All key feature points selected from the workpiece point cloud are directly merged to obtain the key feature point cloud.
[0033] In step S301 above, for each workpiece point contained in the workpiece point cloud, the method for determining the neighborhood point set of that workpiece point may include, but is not limited to, the following: First, calculate the distance between the workpiece point and other candidate workpiece points contained in the workpiece point cloud. This can be achieved using the following mathematical expression: ; In the formula, For the workpiece point and the other points contained in the workpiece point cloud The distance between candidate workpiece points, and , This represents the three-dimensional coordinate position of the workpiece point. For other The three-dimensional coordinates of each candidate workpiece point; Then, from the other candidate workpiece points contained in the workpiece point cloud, select those whose distance does not exceed the third set distance threshold. All target workpiece points are included as neighboring workpiece points, thus forming the neighborhood point set of that workpiece point. It can be described as .
[0034] In step S301 above, for each workpiece point contained in the workpiece point cloud, the normal vector of the workpiece point is mainly determined by the local neighborhood principal component analysis method. The corresponding implementation may include, but is not limited to, the following steps S401 to S404: Step S401: Calculate the average position based on the neighborhood point set of the workpiece point using the following mathematical expression: ; In the formula, For average position, This represents the number of all neighboring workpiece points contained in the neighborhood point set of the given workpiece point. The neighborhood set of the workpiece point contains the first... The three-dimensional coordinates of a neighboring workpiece point; Step S402: Based on the neighborhood point set of the workpiece point and the average position, calculate the covariance matrix using the following mathematical expression: ; In the formula, The covariance matrix is a 3x3 matrix that can be used to describe the distribution of the neighborhood points of the workpiece point. It is the transpose symbol; Step S403: Perform eigenvalue decomposition on the covariance matrix to obtain three eigenvalues and their corresponding three eigenvectors; the existing SVD (Singular Value Decomposition) algorithm can be used to perform the eigenvalue decomposition. Step S404: Select the smallest eigenvalue from the three eigenvalues obtained from the decomposition, and then use the eigenvector corresponding to the smallest eigenvalue as the normal vector of the workpiece point. It can be understood that the data change is the smallest in the direction indicated by the normal vector of the workpiece point, and this direction is the normal direction of the local surface where the neighborhood point set of the workpiece point is located.
[0035] In step S302 above, the average normal vector can be calculated using the following mathematical expression based on the normal vectors of all neighboring workpiece points contained in the neighborhood point set of the workpiece point: ; In the formula, The neighborhood set of the workpiece point contains the first... The normal vector of each neighboring workpiece point This is the average normal vector.
[0036] In step S302 above, the angle between the normal vector of each neighboring workpiece point in the neighborhood point set of the workpiece point and the average normal vector can be calculated using the following mathematical expression: , , ; In the formula, For about The normalization result, The norm symbol, For about The normalization result, The neighborhood set of the workpiece point contains the first... The angle between the normalized result of the normal vector of the neighboring workpiece points and the normalized result of the average normal vector.
[0037] In step S302 above, when the proportion exceeds the preset percentage threshold, it indicates that the neighborhood normal vector distribution of the workpiece point is relatively concentrated, meaning that the workpiece point is more likely to fall in areas with relatively smooth surfaces or no obvious geometric features. In this case, the workpiece point is determined to be unsuitable as a key feature point. The preset percentage threshold is preferably set to 70%, which can reduce the risk of misclassification caused by noise and abnormal data, making the algorithm more robust.
[0038] For example, the key feature point discrimination method proposed in step S302 above is explained as follows: Suppose that the neighborhood set of a certain workpiece point contains eight neighboring workpiece points, denoted as follows: , , , , , , and The average normal vector is calculated based on the normal vectors of these eight neighboring workpiece points; Calculate the neighboring workpiece points respectively The angle between the normal vector and the average normal vector Neighboring workpiece points The angle between the normal vector and the average normal vector Neighboring workpiece points The angle between the normal vector and the average normal vector Neighboring workpiece points The angle between the normal vector and the average normal vector Neighboring workpiece points The angle between the normal vector and the average normal vector Neighboring workpiece points The angle between the normal vector and the average normal vector Neighboring workpiece points The angle between the normal vector and the average normal vector and neighboring workpiece points The angle between the normal vector and the average normal vector ; In identification When calculating the difference between any two adjacent angles after sorting, record them as follows: , , , , , and ; In judgment , , , , , and hour, For the preset angle jump threshold, determine the neighboring workpiece points. and neighboring workpiece points Points falling in the same cluster or neighboring areas and neighboring workpiece points Points falling in the same cluster or neighboring areas and neighboring workpiece points Points falling in the same cluster or neighboring areas and neighboring workpiece points Workpiece points falling in different clusters and neighborhoods and neighboring workpiece points Workpiece points falling in different clusters and neighborhoods and neighboring workpiece points Points falling in the same cluster and neighboring areas and neighboring workpiece points Those falling into the same cluster can be integrated into three clusters, where: the first cluster is... The second cluster is The third cluster is ; Statistical comparison shows that the first cluster has the largest size. Further calculations show that the proportion of neighboring workpiece points contained in the first cluster to the total number of neighboring workpiece points in the set of neighboring workpiece points is... Since the proportion does not exceed the preset proportion threshold, the workpiece point is determined to be a key feature point.
[0039] A normal vector is a vector perpendicular to a surface and can effectively characterize the spatial orientation of the surface. Considering that the normal vector usually changes significantly in the area to be welded (such as fillet welds, lap welds, etc.), especially at the expected location of the weld, this application proposes to use the normal vector to initially extract suspected weld feature points, which can improve the accuracy and efficiency of subsequent point cloud segmentation. In this application, the processing flow of the workpiece point cloud is simplified, eliminating the need for workpiece point cloud surface segmentation and bypassing the complex process of locating weld feature points by calculating intersection lines. Instead, key feature points are extracted directly on the workpiece point cloud. Furthermore, when dealing with complex geometric structures, the computational load generated by the intersection line-based method is large and requires additional judgment of conditions such as whether there are adjacent relationships. In this application, a method of normal vector clustering and angle change analysis is proposed to screen key feature points, which can improve computational efficiency.
[0040] In some embodiments, step S104, regarding the segmentation of the key feature point cloud to obtain several weld feature point clouds, may include, but is not limited to, the following steps S501 to S503: Step S501: Use the existing DBSCAN (Density-Based Spatial Clustering of Applications with Noise) algorithm to perform preliminary segmentation of the key feature point cloud, obtain multiple initial clusters, and each initial cluster contains at least one feature point of a weld seam; Step S502: For each initial cluster that has been segmented, the initial cluster is further segmented using a region growing algorithm based on the main direction to obtain all final clusters, and each final cluster contains only the feature points of a weld seam. Step S503: For the several final clusters that have been segmented out: take all the key feature points contained in each final cluster as weld feature points and merge them to obtain weld feature point cloud; it should be noted that the several final clusters mentioned here should include all the final clusters segmented from multiple initial clusters, and one final cluster corresponds to one weld feature point cloud.
[0041] In step S501 above, regarding the use of the existing DBSCAN algorithm to perform preliminary segmentation of the key feature point cloud to obtain multiple initial clusters, the corresponding implementation may include, but is not limited to, the following steps S601 to S603: Step S601: Determine the neighborhood point set of each key feature point contained in the key feature point cloud, and count the number of neighborhood points of each key feature point contained in the key feature point cloud. The number of neighborhood points of a key feature point refers to the total number of key feature points contained in the neighborhood point set of the key feature point. Then mark the key feature points whose number of neighborhood points is greater than or equal to the preset minimum number of points threshold as core points. Step S602: Randomly select a core point that has not been clustered from the key feature point cloud, create an initial cluster for the selected core point, and then add all key feature points contained in the selected core point and its neighborhood point set to the initial cluster. Each time a key feature point is added, an identification and supplement is performed. If the added key feature point is identified and marked as a core point, then all key feature points contained in the neighborhood point set of the added key feature point are added to the initial cluster. If no more key feature points can be added to the initial cluster, then proceed to step S603. Step S603: Determine whether the key feature point cloud still contains core points that have not been clustered; if yes, return to execute step S602 above; if no, output all the initial clusters obtained by the preliminary segmentation.
[0042] In step S502 above, the region growing algorithm based on the main direction is mainly used to segment linear feature points. Regarding the use of the region growing algorithm based on the main direction to further segment the initial cluster to obtain all final clusters, the corresponding implementation may include, but is not limited to, the following steps S701 to S706: Step S701: Determine the neighborhood point set and main direction vector of each key feature point contained in the initial cluster; Step S702: Randomly select multiple key feature points that have not been clustered from the initial cluster; Step S703: Select the key feature point with the highest linearity from the selected key feature points as the seed point, then establish a new cluster, and determine the growth direction vector according to the main direction vector of the seed point. Step S704: Perform region growth in both forward and reverse directions simultaneously based on the growth direction vector. During the region growth process, add key feature points that meet the second preset condition contained in the initial cluster to the new cluster. For each key feature point added, fine-tune the latest growth direction vector according to the main direction vector of the added key feature point. After the region growth ends, the current new cluster is taken as the final cluster. The second preset condition is used to limit the added key feature points to fall within the neighborhood point set of the seed point, and the angle between the main direction vector of the added key feature point and the latest growth direction vector does not exceed a preset angle threshold. It should be noted that the determination condition for ending the region growth may be that no more un-clustered key feature points contained in the initial cluster are added to the new cluster. Step S705: Determine whether the number of un-clustered key feature points contained in the initial cluster exceeds a preset threshold; if yes, return to step S702 above; if no, proceed to step S706. Step S706: Use neighborhood voting to assign the key feature points that were not clustered in the initial cluster to the corresponding final cluster.
[0043] In step S701 above, for each key feature point contained in the initial cluster, the principal component analysis method of local neighborhood is also used to determine the principal direction vector of the key feature point. The corresponding implementation method may include, but is not limited to, calculating the three eigenvalues associated with the key feature point and their corresponding three eigenvectors according to the implementation principle of steps S401 to S403 above, then selecting the largest eigenvalue from the three eigenvalues, and taking the eigenvector corresponding to the largest eigenvalue as the principal direction vector of the key feature point; it can be understood that the data change is greatest in the direction indicated by the principal direction vector of the key feature point.
[0044] Based on this, the linearity of the key feature points mentioned in step S703 above can be calculated using the following mathematical expression: ; In the formula, For the linearity of key feature points, The larger the value, the greater the geometric distribution of key feature points in its principal direction, indicating that it is much larger than in the other two directions, exhibiting a clear linear structure. , and Three eigenvalues associated with key feature points, satisfying the following conditions: .
[0045] In step S703 above, based on the principal direction vector of the seed point, the growth direction vector can be calculated using the following mathematical expression: ; In the formula, Let be the principal direction vector of the seed point. Let be the growth direction vector, which is about The normalized result.
[0046] In step S704 above, based on the main direction vector of the added key feature points, the latest growth direction vector can be fine-tuned using the exponential smoothing method, specifically implemented using the following mathematical expression: , , ; In the formula, This is the growth direction vector after initial fine-tuning. This is the latest growth direction vector. Update the smoothing hyperparameters for the preset spindle. The main direction vector of the added key feature points, For about The normalization result, This is the final fine-tuned growth direction vector, which is about... The normalized result.
[0047] In step S704 above, the angle between the main direction vector of the added key feature point and the latest growth direction vector can be calculated using the following mathematical expression: ; In the formula, The angle between the normalized result of the main direction vector of the added key feature point and the latest growth direction vector.
[0048] In step S706 above, regarding the allocation of un-clustered key feature points contained in the initial cluster to the corresponding final cluster using a neighborhood voting method, the corresponding implementation may include, but is not limited to, the following: For each un-clustered key feature point contained in the initial cluster, it is recorded as a target key feature point. The neighborhood range of the target key feature point is determined with the target key feature point as the center and combined with a preset radius. It is generally a spherical region. Then, all key feature points falling within the neighborhood range of the target key feature point are selected from the initial cluster. If the number of all selected key feature points is less than a preset neighbor point threshold, the preset radius is gradually increased and the selection is performed again until the number of all selected key feature points is greater than or equal to the preset neighbor point threshold. Then, the target key feature point is allocated to the final cluster containing the largest number of the final selected key feature points.
[0049] For example, the preset radius is defined as Amplification step size is And the preset neighbor point threshold is For the key feature points that were not clustered in the initial cluster First, use key feature points Centered on and combined with a preset radius Determine key feature points The first neighborhood range is then selected from the initial cluster, and those falling within the first neighborhood range are further filtered out. Key feature points; if judged Then, based on key feature points Centered on and combined with the updated radius Determine key feature points The second neighborhood range is then selected from the initial cluster, and those falling within this second neighborhood range are further filtered out. Key feature points; if judged Then, based on key feature points Centered on and combined with the updated radius Determine key feature points The third neighborhood range is then selected from the initial cluster, and those falling within this third neighborhood range are further filtered out. Key feature points; if judged Then stop filtering and perform statistics. The distribution of key feature points is determined at this point. The key feature points fall within the final cluster 1. The key feature points fall within the final cluster 2 and The key feature points fall within the final cluster 3 and satisfy the following conditions: ,from , and The maximum value is selected from the data, and key feature points are identified. It is assigned to the final cluster corresponding to the maximum value.
[0050] This application proposes to perform coarse segmentation and fine segmentation on key feature point clouds in sequence. The coarse segmentation method can quickly segment discontinuous weld features, while the fine segmentation method can accurately segment closely adjacent weld features. This not only improves the accuracy of weld extraction but also enhances the algorithm's adaptability to complex workpieces to be welded.
[0051] In step S105 of some embodiments, regarding the generation of several corresponding weld space trajectories based on several weld feature point clouds, the corresponding implementation methods may include, but are not limited to, the following: For each weld feature point cloud: first, preprocess the weld feature point cloud to obtain the first weld feature point cloud; then calculate the centroid of the first weld feature point cloud to obtain all key weld feature points; then perform curve fitting on all the calculated key weld feature points to obtain the weld space trajectory.
[0052] Furthermore, regarding the preprocessing of the weld feature point cloud to obtain the first weld feature point cloud, the corresponding implementation may include, but is not limited to, performing radius filtering and minimum spanning tree-based pruning on the weld feature point cloud in sequence to remove noise points and outliers that may appear in the weld feature point cloud, thereby obtaining the first weld feature point cloud.
[0053] The pruning process based on the minimum spanning tree can include: constructing a minimum spanning tree based on the weld feature point cloud after radius filtering; calculating the degree of each weld feature point contained in the weld feature point cloud after radius filtering using the minimum spanning tree; and then removing weld feature points with a degree less than a preset threshold. Weld feature points with low degree are usually located at the edge of the weld segment or far away from the weld segment.
[0054] Furthermore, regarding the centroid calculation of the first weld feature point cloud to obtain all key weld feature points, the corresponding implementation may include, but is not limited to, the following steps S801 to S802: Step S801: Determine the neighborhood point set of each first weld feature point contained in the first weld feature point cloud; Step S802: For each first weld feature point contained in the first weld feature point cloud: calculate the average distance between the first weld feature point and its neighboring point set to determine the search range; select all first weld feature points falling within the search range from the first weld feature point cloud and form the current search point set; determine the maximum overlap value between the current search point set and the historical search point set formed based on other first weld feature points contained in the first weld feature point cloud; when the maximum overlap value does not exceed the preset overlap threshold, perform centroid calculation on the current search point set to obtain the key weld feature points.
[0055] In step S802 above, the method for calculating the average distance between the first weld feature point and its neighboring point set to determine the search range can be implemented, but is not limited to, the following: The average distance between the first weld feature point and its neighborhood point set is calculated using the following mathematical expression: ; In the formula, The average distance between the first weld feature point and its neighborhood point set. The three-dimensional coordinates of the feature point of the first weld are given. The first weld feature point is the first point contained in the neighborhood point set of the first weld feature point. The three-dimensional coordinates of the feature points of the neighboring weld seam Refers to the set of neighborhood points of the first weld feature point. This indicates the distance from the first weld feature point to the... Euclidean distance of neighboring weld feature points This represents the number of all neighboring weld feature points contained within the neighborhood point set of the first weld feature point. The search radius is then obtained by adjusting the average distance between the feature point of the first weld and its neighborhood point set using the following mathematical expression: ; In the formula, For the search radius, The adjustment coefficient is preferred to be within the range of [1,2]. Then, the search range is determined by taking the first weld feature point as the center and combining it with the search radius. This search range is generally a spherical region.
[0056] In step S802 above, determining the maximum overlap value between the current search point set and the historical search point sets formed based on other first weld feature points contained in the first weld feature point cloud can be understood as follows: For the T historical search point sets formed based on the T other first weld feature points contained in the first weld feature point cloud, determine the overlap value between the current search point set and each historical search point set. This overlap value can be the number of identical first weld feature points contained in the current search point set and the historical search point set. Then, select the maximum overlap value from the calculated T overlap values. It should be noted that when T is zero, the centroid is calculated directly on the current search point set by default.
[0057] In step S802 above, the centroid of the current search point set can be calculated using the following mathematical expression to obtain the key weld feature points: ; In the formula, The three-dimensional coordinates of the key weld feature points determined based on the first weld feature point are as follows: Refers to the current search point set of the first weld feature point. This indicates the number of all first weld feature points contained in the current search point set. The first weld feature point is the first one contained in the current search point set. The three-dimensional coordinates of the first weld feature point.
[0058] This application proposes to perform appropriate centroid calculation on the preprocessed weld feature point cloud to determine all key weld feature points that are representative of the local area. This can effectively reduce the computational complexity of subsequent curve fitting and improve the effect of subsequent curve fitting.
[0059] Furthermore, existing MLS (Moving Least Squares) methods can be used to perform curve fitting on all calculated key weld feature points to obtain the weld spatial trajectory. Corresponding implementation methods may include, but are not limited to, the following: Set a parameter for each key weld feature point. This parameter The objective function is set to describe the order or position of the corresponding key weld feature points on the fitted curve. ; In the formula, Referring to the objective function, the algorithm aims to minimize the weighted sum of squared residuals in the local neighborhood of each key weld feature point, thereby obtaining a smooth curve by making the fitted function as close as possible to each key weld feature point. The number of all critical weld feature points. For the first The three-dimensional coordinates of key weld feature points Represents the fitting function exist The value at the point is the desired three-dimensional coordinate position for fitting. Indicates the first Key weld feature points Point residuals, Refers to the weighting function, which is usually a Gaussian kernel. It controls the weight of different key weld feature points and limits the distance. Key weld feature points that are closer together have a larger weight, and those that are farther apart have a larger weight. The weight of key weld feature points that are farther away is smaller; Wherein, the fitting function It is a polynomial function, which can be represented as: ; In the formula, A basis function can be understood as containing parameters. The basis function vector, for example, is set as follows for a cubic polynomial. , Let be the coefficient matrix to be solved; Constructing a weighted design matrix and weight matrix as follows: , ; Based on the weighted design matrix and weight matrix The objective function described above can be transformed into: ; In the formula, Refers to the three-dimensional coordinate positions of all key weld feature points; Based on the transformed objective function, set the parameters related to the coefficient matrix. The solution formula is: ; By solving the coefficient matrix This will give us the final required equation for the weld space trajectory.
[0060] Please see Figure 2 , Figure 2 This is an optional schematic diagram of a weld trajectory generation system based on three-dimensional point clouds provided in an embodiment of this application. This system can implement the aforementioned weld trajectory generation method based on three-dimensional point clouds, and may include, but is not limited to, the following: The acquisition and preprocessing module 901 is used to acquire the original point cloud of the workpiece to be welded and perform preprocessing to obtain the target point cloud; The background removal module 902 is used to remove the background from the target point cloud to obtain the workpiece point cloud; Extraction module 903 is used to extract key feature point cloud from workpiece point cloud. The key feature point cloud is used to characterize the position and geometry of several welds appearing on the workpiece to be welded. The segmentation module 904 is used to segment the key feature point cloud to obtain several weld feature point clouds; The generation module 905 is used to generate several corresponding weld space trajectories based on several weld feature point clouds.
[0061] It is understood that the content of the above method embodiments is applicable to this system embodiment. The specific functions implemented in this system embodiment are the same as those implemented in the above method embodiments, and the beneficial effects achieved by this system embodiment are also the same as those achieved by the above method embodiments.
[0062] This application also provides an electronic device, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the above-described method for generating weld trajectories based on three-dimensional point clouds. This electronic device can include any smart terminal such as a tablet computer or desktop computer.
[0063] It is understood that the content of the above method embodiments is applicable to the present device embodiments. The specific functions implemented by the present device embodiments are the same as those implemented by the above method embodiments, and the beneficial effects achieved by the present device embodiments are also the same as those achieved by the above method embodiments.
[0064] Please see Figure 3 , Figure 3 This is a schematic diagram illustrating the hardware structure of an electronic device according to another embodiment. The electronic device includes: The processor 1001 can be implemented using a general-purpose CPU (Central Processing Unit), microprocessor, application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this application. The memory 1002 can be implemented in the form of read-only memory (ROM), static storage device, dynamic storage device, or random access memory (RAM). The memory 1002 can store the operating system and other applications. When the technical solutions provided in the embodiments of this application are implemented through software or firmware, the relevant program code is stored in the memory 1002 and is called and executed by the processor 1001. Input / output interface 1003 is used to implement information input and output; The communication interface 1004 is used to enable communication and interaction between this device and other devices. Communication can be achieved through wired means (such as USB, network cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.). Bus 1005 transmits information between various components of the device (e.g., processor 1001, memory 1002, input / output interface 1003, and communication interface 1004); The processor 1001, memory 1002, input / output interface 1003 and communication interface 1004 are connected to each other within the device via bus 1005.
[0065] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described method for generating weld trajectories based on three-dimensional point clouds.
[0066] It is understood that the content of the above method embodiments is applicable to this storage medium embodiment. The specific functions implemented by this storage medium embodiment are the same as those implemented by the above method embodiments, and the beneficial effects achieved by this storage medium embodiment are also the same as those achieved by the above method embodiments.
[0067] Memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer-executable programs. Furthermore, memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, memory may optionally include memory remotely located relative to the processor, and these remote memories can be connected to the processor via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
[0068] The embodiments described in this application are for the purpose of more clearly illustrating the technical solutions of the embodiments of this application, and do not constitute a limitation on the technical solutions provided by the embodiments of this application. As those skilled in the art will know, with the evolution of technology and the emergence of new application scenarios, the technical solutions provided by the embodiments of this application are also applicable to similar technical problems.
[0069] Those skilled in the art will understand that the technical solutions shown in the figures do not constitute a limitation on the embodiments of this application, and may include more or fewer steps than shown, or combine certain steps, or different steps.
[0070] The system embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.
[0071] Those skilled in the art will understand that all or some of the steps in the methods disclosed above, as well as the functional modules / units in the systems and devices, can be implemented as software, firmware, hardware, or suitable combinations thereof.
[0072] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms “comprising” and “having,” and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0073] It should be understood that in this application, "at least one (item)" means one or more, and "more than" means two or more. "And / or" is used to describe the relationship between related objects, indicating that three relationships can exist. For example, "A and / or B" can represent three cases: only A exists, only B exists, and both A and B exist simultaneously, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one (item) of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one (item) of a, b, or c can represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.
[0074] In the embodiments provided in this application, it should be understood that the disclosed systems and methods can be implemented in other ways. For example, the system embodiments described above are merely illustrative; for instance, the division of the units described above is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between systems or units may be electrical, mechanical, or other forms.
[0075] The units described above as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0076] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0077] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes multiple instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing programs, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0078] The preferred embodiments of the present application have been described above with reference to the accompanying drawings, but this does not limit the scope of the claims of the present application. Any modifications, equivalent substitutions, and improvements made by those skilled in the art without departing from the scope and substance of the embodiments of the present application shall be within the scope of the claims of the present application.
Claims
1. A method for generating weld trajectories based on three-dimensional point clouds, characterized in that, The method includes: The original point cloud of the workpiece to be welded is obtained and preprocessed to obtain the target point cloud; Background removal is performed on the target point cloud to obtain the workpiece point cloud; Key feature point cloud is extracted from the workpiece point cloud, and the key feature point cloud is used to characterize the position and geometry of several welds appearing on the workpiece to be welded; The key feature point cloud is segmented to obtain several weld feature point clouds; Based on the aforementioned weld feature point clouds, several corresponding weld spatial trajectories are generated.
2. The weld trajectory generation method based on three-dimensional point cloud according to claim 1, characterized in that, The process of removing the background from the target point cloud to obtain the workpiece point cloud includes: Obtain input information, which is used to characterize the placement state of the workpiece to be welded; When the input information indicates that the workpiece to be welded is placed on a plane, the workpiece point cloud is separated from the target point cloud using a random sampling consensus algorithm; When the input information indicates that the workpiece to be welded is placed on the support structure, the workpiece point cloud is separated from the target point cloud using a region growing algorithm.
3. The weld trajectory generation method based on three-dimensional point cloud according to claim 1, characterized in that, The extraction of key feature point cloud from the workpiece point cloud includes: Determine the neighborhood point set and normal vector of each workpiece point contained in the workpiece point cloud; For each workpiece point in the workpiece point cloud: Calculate the average normal vector based on the normal vectors of all neighboring workpiece points in the neighboring point set of the workpiece point; calculate and sort the angles between the normal vectors of all neighboring workpiece points and the average normal vector; calculate the difference between every two adjacent angles after sorting; and divide all neighboring workpiece points into multiple clusters based on the criteria that two neighboring workpiece points associated with the difference satisfying the first preset condition fall into the same cluster and two neighboring workpiece points associated with the difference not satisfying the first preset condition fall into different clusters; count the number of neighboring workpiece points contained in each cluster and select the largest number, then calculate the proportion of the largest number to the total number of neighboring workpiece points; when the proportion does not exceed a preset proportion threshold, the workpiece point is used as a key feature point; wherein, the first preset condition is used to limit the difference from not exceeding a preset angle jump threshold. All key feature points selected from the workpiece point cloud are merged to obtain the key feature point cloud.
4. The weld trajectory generation method based on three-dimensional point cloud according to claim 1, characterized in that, The segmentation of the key feature point cloud to obtain several weld feature point clouds includes: The key feature point cloud is initially segmented using a density-based noisy spatial clustering algorithm to obtain multiple initial clusters; For each initial cluster that has been segmented, a region growing algorithm based on the main direction is used to further segment the initial cluster to obtain all final clusters; For the several final clusters that are segmented out, all the key feature points contained in each final cluster are taken as weld feature points and merged to obtain the weld feature point cloud.
5. The weld trajectory generation method based on three-dimensional point cloud according to claim 4, characterized in that, The initial clusters are further segmented using a region growing algorithm based on the main direction, resulting in all final clusters including: Determine the neighborhood point set and main direction vector of each key feature point contained in the initial cluster; Randomly select multiple key feature points that have not been clustered from the initial cluster; Select the key feature point with the highest linearity from the multiple key feature points as the seed point, then establish a new cluster, and determine the growth direction vector according to the main direction vector of the seed point; Based on the growth direction vector, region growth is performed simultaneously in both positive and negative directions. During the region growth process, key feature points that meet the second preset condition and contained in the initial cluster are added to the new cluster. For each key feature point added, the latest growth direction vector is fine-tuned according to the main direction vector of the added key feature point. After the region growth is completed, the current new cluster is taken as the final cluster. The second preset condition is used to limit the added key feature points to fall within the neighborhood point set of the seed point, and the angle between the main direction vector of the added key feature point and the latest growth direction vector does not exceed a preset angle threshold. Determine whether the number of un-clustered key feature points contained in the initial cluster exceeds a preset threshold; if yes, return to the step of randomly selecting multiple un-clustered key feature points from the initial cluster; if no, use a neighborhood voting method to allocate the un-clustered key feature points contained in the initial cluster to the corresponding final cluster.
6. The weld trajectory generation method based on three-dimensional point cloud according to claim 1, characterized in that, The step of generating a plurality of corresponding weld space trajectories based on the plurality of weld feature point clouds includes: For each weld feature point cloud: The weld feature point cloud is preprocessed to obtain the first weld feature point cloud; Centroid calculation is performed on the first weld feature point cloud to obtain all key weld feature points; Curve fitting is performed on all the key weld feature points to obtain the weld space trajectory.
7. The weld trajectory generation method based on three-dimensional point cloud according to claim 6, characterized in that, The centroid calculation of the first weld feature point cloud yields all key weld feature points, including: Determine the neighborhood point set of each first weld feature point contained in the first weld feature point cloud; For each first weld feature point contained in the first weld feature point cloud: calculate the average distance between the first weld feature point and its neighboring point set to determine the search range; filter out all first weld feature points falling within the search range from the first weld feature point cloud and form the current search point set; determine the maximum overlap value between the current search point set and the historical search point set formed based on other first weld feature points contained in the first weld feature point cloud; when the maximum overlap value does not exceed a preset overlap threshold, perform centroid calculation on the current search point set to obtain the key weld feature points.
8. A weld trajectory generation system based on three-dimensional point clouds, characterized in that, The system includes: The acquisition and preprocessing module is used to acquire the original point cloud of the workpiece to be welded and perform preprocessing to obtain the target point cloud; The background removal module is used to remove the background from the target point cloud to obtain the workpiece point cloud; An extraction module is used to extract key feature point clouds from the workpiece point cloud, and the key feature point clouds are used to characterize the position and geometry of several welds appearing on the workpiece to be welded. The segmentation module is used to segment the key feature point cloud to obtain several weld feature point clouds; The generation module is used to generate several corresponding weld space trajectories based on the several weld feature point clouds.
9. An electronic device, characterized in that, The electronic device includes a memory and a processor. The memory stores a computer program, and when the processor executes the computer program, it implements the weld trajectory generation method based on three-dimensional point cloud as described in any one of claims 1 to 7.
10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the weld trajectory generation method based on three-dimensional point cloud as described in any one of claims 1 to 7.