A 3D vision point cloud-based flat weld joint identification method and system

By preprocessing and segmenting the initial 3D point cloud of the workpiece, and using the RANSAC algorithm to fit the plane and direction vector rotation technique, the problems of low efficiency and poor accuracy of weld seam recognition in the existing technology are solved, and efficient and accurate weld seam recognition is achieved.

CN121391891BActive Publication Date: 2026-04-21HUNAN UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
HUNAN UNIV
Filing Date
2025-12-24
Publication Date
2026-04-21

AI Technical Summary

Technical Problem

Existing planar weld seam recognition methods based on 3D vision have high requirements for the shooting environment, poor efficiency and robustness, difficulty in accurately identifying weld seam positions, and low recognition efficiency.

Method used

The initial 3D point cloud of the workpiece is preprocessed, denoised, and then segmented. The RANSAC algorithm is used to fit the plane, and the denoised 3D point cloud of the workpiece is clustered to obtain the centroid and direction vector. The direction vector is rotated step by step to segment the point cloud. Finally, weld detection and fitting are performed.

Benefits of technology

It improves the efficiency and accuracy of point cloud segmentation, and can automatically adjust to the optimal segmentation position under initial positioning deviation, ensuring the accuracy and robustness of segmentation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121391891B_ABST
    Figure CN121391891B_ABST
Patent Text Reader

Abstract

The application discloses a kind of plane weld identification method and system based on 3D vision point cloud, it is related to welding seam identification technical field, including steps: to initial workpiece three-dimensional point cloud is preprocessed to obtain denoising workpiece three-dimensional point cloud;Two welding point cloud clusters are obtained by carrying out point cloud segmentation to denoising three-dimensional point cloud;Two welding point cloud clusters are respectively carried out point cloud edge point detection to obtain cluster edge point cloud set;Weld detection and weld line fitting are carried out based on two cluster edge point cloud sets, and fitted weld center line and fitted weld start and end point are obtained.The method provided by the application, when two welding point cloud clusters are obtained by carrying out point cloud segmentation to denoising three-dimensional point cloud, point cloud segmentation is carried out based on centroid direction vector, unlike the method that traditional needs to carry out clustering to a large number of point clouds, greatly improves the segmentation efficiency;Bias mechanism is introduced, in the case where there is deviation in the initial positioning of segmentation center, it can be automatically adjusted to the best segmentation position, guarantee the accuracy and robustness of segmentation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of weld seam recognition technology, and in particular to a planar weld seam recognition method and system based on 3D visual point clouds. Background Technology

[0002] With the rapid development of industry and manufacturing, the demand for steel plate welding in processing stages such as automobile manufacturing, construction, transportation, and aerospace continues to increase. Currently, planar weld recognition methods based on 3D vision generally have high requirements for the shooting environment. For example, during image acquisition, it is necessary to ensure that the camera is perpendicular to the workpiece surface, and the shooting environment needs to be bright and clean to minimize the interference of image noise. Existing methods often rely on complex algorithms such as cluster analysis and eigenvalue decomposition when dealing with image interference, and need to traverse and calculate every point in the point cloud, resulting in poor efficiency and robustness.

[0003] Therefore, it is necessary to propose a planar weld seam recognition method and system based on 3D visual point cloud to solve or at least alleviate some of the above-mentioned defects. Summary of the Invention

[0004] The main objective of this invention is to provide a planar weld seam recognition method and system based on 3D visual point clouds, aiming to solve the technical problems of difficulty in accurately identifying weld seam positions and low weld seam recognition efficiency in planar welding scenarios based on 3D visual point clouds.

[0005] To achieve the above objectives, the present invention provides a planar weld seam recognition method based on 3D visual point clouds, comprising the following steps:

[0006] S10, preprocess the initial 3D point cloud of the workpiece to obtain a denoised 3D point cloud of the workpiece. ;

[0007] S20, for denoising 3D point clouds Two point cloud clusters to be welded are obtained by segmenting the point cloud.

[0008] Specifically, step S20 includes:

[0009] S21, Obtain the 3D point cloud of the denoised workpiece. The corresponding fitting plane has a normal vector. ;

[0010] S22, Clustering-based noise reduction of 3D point cloud of workpiece The initial range center is the initial point cloud centroid. ;

[0011] S23, with the initial point cloud centroid Centered on, initial radius Determine the experimental range circle for the radius range Select the experimental range circle The corresponding experimental point cloud , where the initial radius The range is 5 to 50 millimeters;

[0012] S24, for the experimental range circle Experimental point clouds Perform clustering to obtain a set of clusters. And obtain experimental point clouds. The number of cluster types detected, k;

[0013] S25, based on the initial point cloud centroid The ideal segmentation center is determined by detecting the number of cluster types k and the number of point clouds in each cluster type;

[0014] S26, Initialization and establishment of normal vector Vertical direction vector , direction vector With normal vector Using the ideal segmentation center as the rotation axis, the direction vector is rotated according to a preset rotation step size. Rotate gradually until based on the direction vector The corresponding direction vector is determined when the number of corresponding detection associated point clouds is not greater than the cluster separation threshold. Divide the weld seam into linear vectors and determine the direction vector. The point cloud whose current distance is not greater than the first preset distance is the detected associated point cloud; wherein, the preset rotation step size ranges from 0.5 degrees to 6 degrees, the cluster separation threshold ranges from 8 to 25 points, and the first preset distance ranges from 0.5 to 4 millimeters;

[0015] S27, point cloud segmentation is performed by dividing the weld seam into straight line vectors, thus enabling the denoising of the workpiece's three-dimensional points. The cloud segmentation forms two clusters of cloud clusters with points to be welded together;

[0016] Acquire 3D point cloud of denoised workpiece The point cloud is connected to the ideal segmentation center to form a discrimination direction vector. Based on the discrimination direction vector and the weld segmentation line vector, the denoised workpiece 3D point cloud is segmented into two clusters of point clouds to be welded.

[0017] S30, perform point cloud edge point detection on the two clusters of point clouds to be welded to obtain cluster edge point cloud sets;

[0018] S40, based on the cloud set of two cluster edge points, performs weld detection and weld line fitting, and obtains the fitted weld centerline and the fitted weld start and end points.

[0019] Further, step S10 includes:

[0020] S11, remove abnormal and erroneous data from the initial 3D point cloud of the workpiece;

[0021] S12, perform downsampling to obtain the sparse workpiece 3D point cloud S;

[0022] S13, remove outliers from the sparse workpiece 3D point cloud S;

[0023] S14, remove parallax calculation anomalies to obtain the initial filter workpiece 3D point cloud;

[0024] S15, Remove the background point cloud from the initial filtered workpiece 3D point cloud to obtain the denoised workpiece 3D point cloud. .

[0025] Further, step S14 includes:

[0026] S141, the RANSAC algorithm is used to fit the sparse workpiece 3D point cloud S after removing outliers to obtain a planar model. The mathematical expression of the planar model is: The mathematical expression for the normal vector of the planar model is: ;

[0027] S142, Calculate the projection points of the sparse workpiece 3D point cloud S along the normal vector n direction after removing outliers. , , For points in the sparse workpiece 3D point cloud S, simultaneously obtain points in the sparse workpiece 3D point cloud S. Coordinates along the normal vector n ;

[0028] S143, based on coordinate values Define a detection plane parallel to the planar model. The mathematical expression for the detection plane is: , yes The z-coordinate value in the text;

[0029] S145, Determine the current detection plane Below, points in the 3D point cloud S of the sparse workpiece To the current detection plane Point clouds whose distance is not greater than the detection distance threshold are considered the current detection point cloud, and the number of points in the current detection point cloud is not less than the detection plane corresponding to the preset point cloud threshold. For effective detection, the detection distance threshold ranges from 0.3 mm to 1.5 mm, and the preset point cloud threshold ranges from 300 to 700.

[0030] S146 combines the point clouds within all effective detection surfaces to form a three-dimensional point cloud of the initial filter workpiece.

[0031] Further, step S145 includes:

[0032] S1451, calculate and obtain each detection plane Points in the 3D point cloud S of the sparse workpiece To the current detection plane Spacing distance , ;

[0033] S1452, in each detection plane Determine the spacing distance to meet the requirements. The point cloud is considered a valid point cloud if the detection plane... If the number of points in the current detection point cloud is not less than the preset point cloud threshold, then the detection plane is determined. For effective detection of surfaces.

[0034] Furthermore, step S15 specifically includes:

[0035] The detection plane corresponding to the top of the 3D point cloud of the initial filter workpiece. The workpiece's base plane is used as the basis for obtaining a filtered 3D point cloud of the workpiece by cutting downwards based on a height threshold, which ranges from 3 to 8 millimeters.

[0036] Furthermore, step S20 specifically includes the following steps:

[0037] S251, in detecting the number of cluster types =2, and , When using the formula Calculate the discriminant ratio of the difference in the number of points between two clusters to the sum of the number of points. ,in, This represents the total number of point clouds in one of the clusters. This represents the total number of point clouds in another cluster. Experimental point cloud within the experimental range circle The total number of point clouds, To preset the discrimination coefficient, The value range is from 0.03 to 0.08.

[0038] S252, if the discriminant ratio is determined Then the initial point cloud centroid is determined. For the ideal partition center, To preset the discrimination ratio parameters, The value range is from 0.02 to 0.09;

[0039] S253, if the discriminant ratio is determined Then obtain the cluster with more point cloud data. and clusters with fewer point clouds And obtain the centroids of the two clusters respectively. and :

[0040] S254, Calculate the centroids of two clusters. and Cluster centroid difference and normalized direction of movement :

[0041] S255, based on cluster centroid difference and normalized direction of movement Calculation determines the new iterative center. ;

[0042] S256, the new iteration center Update to the initial point cloud centroid And re-enter step S23;

[0043] Repeat steps S23 to S256 until the ideal segmentation center is obtained.

[0044] Furthermore, it also includes step S257, which involves detecting the number of cluster types. When ≠2, or At that time, or At that time, based on the first preset step size and initial radius The sum is used to obtain the iteration radius, and the iteration radius is updated to the initial radius. Then, re-enter step S23, wherein the value of the first preset step size ranges from 5 mm to 25 mm;

[0045] Repeat steps S23 to S256 until the ideal segmentation center is obtained.

[0046] Furthermore, step S26 specifically includes:

[0047] S261, Initialization and establishment of normal vector Vertical direction vector ;

[0048] S262, Determine the direction vector Does it pass through the ideal partition center?

[0049] S263, if the direction vector Obtain the direction vector when passing through the ideal segmentation center. To detect line L; if the direction vector If it does not pass through the ideal dividing center, then the current direction vector will be... Rotate the preset rotation step size and update it, then proceed to step S262, where the preset rotation step size is 0.8° to 5°;

[0050] S264, obtain the number of detection associated point clouds of the detection line L, wherein the point clouds whose current distance to the detection line L is less than a first preset distance are the detection associated point clouds;

[0051] S265, if the number of detected associated point clouds is less than the preset associated threshold, then the detection line L is determined to be the weld seam segmentation line vector;

[0052] If the number of detected associated point clouds exceeds a preset association threshold, then the current direction vector will be... Rotate the preset rotation step size and update it, then proceed to step S262.

[0053] Furthermore, step S27 specifically includes:

[0054] S271, Obtain each point cloud in the 3D point cloud of the denoised workpiece. With the ideal partition center The discriminant direction vector formed by the connection , ;

[0055] S272, based on the direction vector discrimination and weld seam segmentation linear vector The sign of the dot product determines whether the denoised workpiece's 3D point cloud is divided into two clusters of point clouds to be welded.

[0056] Furthermore, step S30 specifically includes:

[0057] S31, Obtain the centroid of the two cloud clusters to be welded. ;

[0058] S32, Initialization and establishment of normal vector Vertical direction vector , direction vector With normal vector The axis of rotation is the centroid of the part to be welded. Using the center of rotation as the rotation point, rotate the direction vector by a preset angular step. The preset angle step size ranges from 1° to 10°.

[0059] S33, obtain the orientation vector at each rotation. The point cloud on the surface corresponds to the workpiece, from which a straight line vector is extracted.

[0060] S34: Obtain the pair of points with the largest mutual distance on the workpiece intercepting straight line vector. The corresponding two point clouds are the edge point clouds. Traverse all workpiece intercepting straight line vectors to obtain all edge point clouds in the point cloud cluster to be welded.

[0061] Furthermore, step S40 specifically includes:

[0062] S41, respectively obtain the set of relative distances between the edge points of one cloud cluster to be welded and the edge points of the other cloud cluster to be welded;

[0063] S42, determine the estimated weld width based on the minimum Euclidean distance in two sets of relative distances;

[0064] S43, determine all point clouds corresponding to the distance values ​​within the estimated weld width range in the two relative distance sets as the two weld-related point cloud sets;

[0065] S44, perform linear fitting on the point cloud set of weld-related point cloud to obtain two fitted weld edge lines;

[0066] The center line of the fitted weld is determined based on two fitted weld edge lines;

[0067] S45, determine the two point clouds with the largest point-to-point distance on the fitted weld centerline as the welding start point and welding end point, respectively.

[0068] The present invention also provides a planar weld seam recognition system based on 3D visual point cloud, including a point cloud acquisition device and a processing device. The point cloud acquisition device is used to acquire an initial three-dimensional point cloud of the workpiece, and the processing device is used to implement the steps of the planar weld seam recognition method based on 3D visual point cloud described above.

[0069] Compared with existing technologies, the planar weld seam recognition method based on 3D visual point clouds provided by this invention has the following beneficial effects:

[0070] The present invention provides a planar weld seam recognition method based on 3D visual point clouds. First, the initial 3D point cloud of the workpiece is preprocessed to obtain a denoised 3D point cloud. Then, based on the point cloud characteristics of the planar weld seam, the denoised 3D point cloud is segmented to obtain two point cloud clusters to be welded. Specifically, this includes: fitting the denoised 3D point cloud of the workpiece using the RANSAC algorithm to obtain a fitting plane, wherein the fitting plane has a normal vector. ;

[0071] The initial range center of the clustered denoising workpiece 3D point cloud is the initial point cloud centroid. ; with the initial point cloud centroid Centered at, initial radius Determine the experimental range circle for the radius range And select the experimental range circle Experimental point cloud The Euclidean clustering algorithm was used to analyze the experimental area circle. Experimental point clouds Perform clustering to obtain a set of clusters. Obtain the number of cluster types k; based on the initial point cloud centroid... The ideal segmentation center is determined by the number of cluster types and the number of point clouds in each cluster type; the normal vector is initialized. Vertical direction vector , direction vector With normal vector Using the ideal segmentation center as the rotation axis, rotate gradually with a preset rotation step size until the rotation is based on the direction vector. When the number of corresponding detected point clouds meets the cluster separation threshold, the weld seam segmentation line vector is determined. The discrimination direction vector of the denoised workpiece's 3D point cloud relative to the ideal segmentation center is obtained. Based on the discrimination direction vector and the weld seam segmentation line vector, the denoised workpiece's 3D point cloud is segmented into two clusters of point clouds to be welded. Then, point cloud edge point detection is performed on each cluster of point clouds to be welded to obtain cluster edge point sets. Finally, weld seam detection and weld seam line fitting are performed based on the two cluster edge point sets to obtain the fitted weld seam centerline and the fitted weld seam start and end points. The planar weld seam recognition method based on 3D visual point clouds proposed in this invention, when segmenting the denoised 3D point cloud into two clusters of point clouds to be welded, performs point cloud segmentation based on the centroid direction vector. Unlike traditional methods that require clustering a large number of point clouds, this greatly improves segmentation efficiency. Simultaneously, a correction mechanism is introduced, which can automatically adjust to the optimal segmentation position if there is an initial deviation in the segmentation center positioning, ensuring the accuracy and robustness of the segmentation. Attached Figure Description

[0072] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the structures shown in these drawings without creative effort.

[0073] Figure 1 This is a flowchart illustrating a planar weld seam recognition method based on 3D visual point clouds according to one embodiment of the present invention.

[0074] Figure 2 This is a point cloud diagram of a type I bevel workpiece in one embodiment of the present invention;

[0075] Figure 3 The diagram illustrates defects in weld seam identification using existing technologies. In this diagram, a represents anomalies caused by parallax calculation errors in a binocular structured light camera; b represents clustering failure due to a large shooting angle when the DBSCAN density clustering algorithm separates workpieces; and c represents the edge detection effect.

[0076] Figure 4This is a schematic diagram of a denoised workpiece 3D point cloud obtained by a filtering method based on a detection plane in one embodiment of the present invention;

[0077] Figure 5 This is a schematic diagram illustrating the segmentation principle of a segmentation method based on the centroid direction vector in one embodiment of the present invention; wherein, a is a schematic diagram where the center of the circle is located at the weld; b is a schematic diagram where the center of the circle is misaligned at the weld; c is... A schematic diagram showing only one cluster within a circular region;

[0078] Figure 6 This is a schematic diagram of two weld point cloud clusters obtained by a segmentation method based on the centroid direction vector in one embodiment of the present invention, wherein a is a schematic diagram of two weld point cloud clusters corresponding to two asymmetrical workpieces; b is a schematic diagram of two weld point cloud clusters corresponding to two symmetrical workpieces.

[0079] Figure 7 This is a schematic diagram of a cluster edge point cloud obtained by an edge detection method based on centroid edge point pairs in one embodiment of the present invention.

[0080] Figure 8 This is a schematic diagram of two fitted weld edge lines in one embodiment of the present invention.

[0081] The objectives, features, and advantages of this invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0082] It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.

[0083] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present invention.

[0084] It should be noted that all directional indications (such as up, down, left, right, front, back, etc.) in the embodiments of the present invention are only used to explain the relative positional relationship and movement of each component in a certain specific posture (as shown in the figure). If the specific posture changes, the directional indication will also change accordingly.

[0085] Furthermore, the use of terms such as "first" and "second" in this invention is for descriptive purposes only and should not be construed as indicating or implying their relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined with "first" or "second" may explicitly or implicitly include at least one of that feature. Additionally, the technical solutions of the various embodiments can be combined with each other, but only on the basis of being achievable by those skilled in the art. When the combination of technical solutions is contradictory or impossible to implement, such a combination of technical solutions should be considered non-existent and not within the scope of protection claimed by this invention.

[0086] Please refer to the appendix. Figure 1 , Figure 2 , Figure 3 , Figure 4 , Figure 5 , Figure 6 , Figure 7 as well as Figure 8 This invention provides a planar weld seam recognition method based on 3D visual point clouds, comprising the following steps:

[0087] S10, preprocess the initial 3D point cloud of the workpiece to obtain a denoised 3D point cloud of the workpiece. ;

[0088] S20, perform point cloud segmentation on the denoised 3D point cloud to obtain two point cloud clusters to be welded. ;

[0089] Specifically, step S20 includes:

[0090] S21, Obtain the 3D point cloud of the denoised workpiece. The corresponding fitting plane has a normal vector. ;

[0091] S22, Clustering-based noise reduction of 3D point cloud of workpiece The initial range center is the initial point cloud centroid. ;

[0092] S23, with the initial point cloud centroid Centered at, initial radius Determine the experimental range circle for the radius range Select the experimental range circle The corresponding experimental point cloud ;

[0093] S24, for the experimental range circle Experimental point clouds Perform clustering to obtain a set of clusters. , And obtain experimental point clouds. The number of cluster types detected, k;

[0094] S25, based on the initial point cloud centroid The ideal segmentation center is determined by detecting the number of cluster types k and the number of point clouds in each cluster type;

[0095] S26, Initialization and establishment of normal vector Vertical direction vector , direction vector With normal vector Using the ideal segmentation center as the rotation axis, the direction vector is rotated according to a preset rotation step size. Rotate gradually until based on the direction vector The corresponding direction vector is determined when the number of corresponding detection associated point clouds is not greater than the cluster separation threshold. The weld seam is divided into linear vectors, where the direction vector is... The point cloud whose current distance is less than the first preset distance is the detected associated point cloud;

[0096] S27, point cloud segmentation is performed by dividing the weld seam into straight line vectors, thus enabling the denoising of the workpiece's three-dimensional points. The cloud segmentation forms two clusters of cloud clusters with points to be welded together;

[0097] S30, perform point cloud edge point detection on the two point cloud clusters to be welded to obtain cluster edge point cloud sets;

[0098] S40, based on the cloud set of two cluster edge points, performs weld detection and weld line fitting, and obtains the fitted weld centerline and the fitted weld start and end points.

[0099] Optionally, in step S21, the RANSAC algorithm is used to fit the denoised workpiece's 3D point cloud to obtain the fitting plane; in step S24, the Euclidean clustering algorithm is used to cluster the experimental range circle. Experimental point clouds Perform clustering. Optionally, initial radius... The range is 15 to 25 mm; the preset rotation step size ranges from 0.5 degrees to 6 degrees; the cluster separation threshold ranges from 8 to 25; the first preset distance ranges from 0.5 to 4 mm. Preferably, the initial radius... The range of values ​​is 5 to 50 mm; the range of preset rotation step size is 0.8 degrees to 1.5 degrees; the range of the first preset distance is 0.5 mm to 2 mm. In other embodiments of the present invention, the initial radius... The value can be 18, 20, 25, or 28, or other values; the cluster separation threshold can be 8, 10, or 13, or other values; the first preset distance can be 1 mm, 1.5 mm, or 2 mm; the specific setting depends on the actual situation.

[0100] In a preferred embodiment of the present invention, when used for Type I interface welds, the width is 3mm-8mm. To fully cover the weld area and reduce the number of calculations, an initial radius is selected. The preset rotation step size is 1 degree, the cluster separation threshold is 10, and the first preset distance is 1 mm. In other embodiments of the present invention, the various thresholds can be other values, as long as they can achieve the effect of the present invention.

[0101] The present invention provides a planar weld seam recognition method based on 3D visual point clouds. First, the initial 3D point cloud of the workpiece is preprocessed to obtain a denoised 3D point cloud of the workpiece. Then, based on the point cloud characteristics of the planar weld, the denoised 3D point cloud is processed. The process involves segmenting the workpiece into two point cloud clusters to be welded. Specifically, this includes fitting the denoised workpiece's 3D point cloud using the RANSAC algorithm to obtain a fitting plane, which has a normal vector. The initial range center of the 3D point cloud of the clustered and denoised workpiece is the initial point cloud centroid. ; with the initial point cloud centroid Centered on, initial radius Determine the experimental range circle for the radius range And select the experimental range circle Experimental point cloud The Euclidean clustering algorithm was used to analyze the experimental area circle. Experimental point clouds Perform clustering to obtain a set of clusters. Obtain the number of cluster types k; based on the initial point cloud centroid... The ideal segmentation center is determined by the number of cluster types and the number of point clouds in each cluster type; the normal vector is initialized. Vertical direction vector , direction vector With normal vector Using the ideal segmentation center as the rotation axis, rotate gradually with a preset rotation step size until the rotation is based on the direction vector. When the number of corresponding detected point clouds meets the cluster separation threshold, the weld seam segmentation line vector is determined. The discrimination direction vector of the denoised workpiece's 3D point cloud relative to the ideal segmentation center is obtained. Based on the discrimination direction vector and the weld seam segmentation line vector, the denoised workpiece's 3D point cloud is segmented into two clusters of point clouds to be welded. Then, point cloud edge point detection is performed on each cluster of point clouds to be welded to obtain cluster edge point cloud sets. Finally, weld seam detection and weld seam line fitting are performed based on the two cluster edge point cloud sets to obtain the fitted weld seam centerline and the fitted weld seam start and end points. The planar weld seam recognition method based on 3D visual point clouds proposed in this invention, when segmenting the denoised 3D point cloud into two clusters of point clouds to be welded, performs point cloud segmentation based on the centroid direction vector. Unlike traditional methods that require clustering a large number of point clouds, this greatly improves segmentation efficiency. Simultaneously, a correction mechanism is introduced, which, at the initial point cloud centroid... If there is a deviation in the initial positioning, it can automatically adjust to the optimal segmentation position to obtain the ideal segmentation center, ensuring the accuracy and robustness of the segmentation.

[0102] Understandably, in single-sided welding (single-sided welding refers to welding only one side of the workpiece's weld seam), type I joint welds, lap joint welds, and V-groove welds are common weld types in welding processes. The specifications of the weldments that can be processed by the solution of this invention include: type I joint welds with a weld gap of 3mm-8mm and a weld thickness of 3mm-8mm; lap joint welds with a weld gap ≤2mm and a weld thickness >2mm; and V-groove welds with a weld gap ≤4mm, a weld thickness of 3mm-10mm, and a groove angle of 40°-60°. In 3D vision, after acquiring the weldment point cloud information through vision devices (such as binocular cameras, depth cameras, etc.), the point cloud is processed and information is extracted.

[0103] In existing point cloud preprocessing techniques, the filtering methods commonly used for processing planar point clouds mainly fall into three categories: First, statistical filtering, which effectively removes outliers by analyzing the local statistical characteristics of the point cloud; second, pass-through filtering, which filters points located within a specified region by setting the range of values ​​on coordinate axes (such as X, Y, and Z axes); and third, voxel filtering, which effectively reduces the amount of point cloud data while preserving the geometric features of the workpiece by uniformly downsampling the original point cloud. To improve acquisition efficiency, the 3D camera is usually set at a high position to achieve a single, complete capture of the entire workpiece. However, if the baseline length and depth range of the 3D camera do not match the workpiece size, errors may be introduced during parallax calculation, especially in areas of abrupt depth changes (such as edges and holes), where outliers (such as…) are easily generated. Figure 3(As shown in a). These outliers not only interfere with subsequent background point cloud removal operations based on pass-through filtering (because the coordinate threshold of the background point cloud cannot be determined), but also, due to their proximity to the workpiece and similar density characteristics to the effective point cloud, traditional statistical filtering methods struggle to effectively identify and remove them.

[0104] In existing point cloud segmentation processes, traditional methods typically employ the RANSAC algorithm to fit multiple planes and output the parametric equations for each plane during workpiece point cloud segmentation. This method is suitable for lap joint welds and corner joint welds (workpieces on different planes). However, for I-groove welds and V-groove welds (workpieces on the same plane), traditional plane fitting methods struggle to effectively distinguish between two adjacent workpieces, leading to a significant decrease in segmentation accuracy. Currently, common point cloud segmentation methods are mainly divided into two categories and their improved versions: one is the DBSCAN clustering algorithm based on point cloud density, and the other is the Euclidean distance clustering algorithm based on geometric distance. The DBSCAN algorithm does not require a pre-set number of clusters and can identify point cloud structures of arbitrary shapes. However, this method relies on the local density of the point cloud and is sensitive to the shooting angle. When the camera is not perpendicular to the viewfinder, the point cloud density within the same plane may be uneven, leading to clustering failure (e.g., ...). Figure 3 (As shown in b). In contrast, Euclidean distance-based clustering methods are more adaptable and accurate in handling planar welds (such as V-joints, I-joints, and lap joints). However, this method relies on spatial distance for clustering and segmentation, which places high demands on the stability of the experimental equipment and the integrity of the shooting background.

[0105] In existing point cloud edge detection technology, commonly used 3D planar point cloud edge detection methods are mainly divided into two categories: one is to reduce the 3D point cloud to 2D for edge detection and then map it back to 3D space; the other is to perform edge detection directly in 3D space. The first type of method projects the 3D point cloud onto a 2D plane (such as the XY plane, ignoring the Z coordinate), then applies classic edge detection algorithms (such as Sobel, Canny, and other gray-level gradient-based algorithms) to the 2D image, and finally maps the detected edge information back to the 3D coordinate system. This method is suitable for 3D point cloud data with obvious 2D features (such as 3D planar workpiece point clouds), and by selecting appropriate projection methods and edge detection algorithms, high-quality edge information can be extracted. However, this method loses depth information of the image during dimensionality reduction (such as weld seams), and the reverse mapping may produce falsely identified edges. Furthermore, the dimensionality reduction process may amplify image noise, thereby reducing the accuracy of edge detection. The second type of method directly performs edge detection in 3D space, determining whether a point is an edge point based on its local geometric features (such as local covariance matrix, local density, etc.). This method offers high accuracy and effectively preserves the spatial information of the point cloud. However, it requires traversing and calculating every single point, resulting in relatively low processing efficiency. Furthermore, it may filter out a large number of edge points unrelated to the weld, increasing the computational load for subsequent weld point detection.

[0106] In existing point cloud weld detection and weld line fitting processes, traditional weld point fitting methods primarily use the RANSAC algorithm to perform linear fitting on the detected workpiece edge point cloud, combined with a certain screening strategy, to extract two edge lines representing the weld. However, this method has strict requirements on the selection of RANSAC parameters and is prone to fitting multiple straight lines. Furthermore, due to the large number and low accuracy of the detected edge points, the fitted straight lines may deviate from the steel plate plane (e.g., ...). Figure 3 (As shown in c).

[0107] Further, step S10 includes:

[0108] S11, remove abnormal and erroneous data from the initial 3D point cloud of the workpiece;

[0109] S12, perform downsampling to obtain the sparse workpiece 3D point cloud S;

[0110] S13, remove outliers from the sparse workpiece 3D point cloud S;

[0111] S14, remove parallax calculation anomalies to obtain the initial filter workpiece 3D point cloud;

[0112] S15, Remove the background point cloud from the initial filtered workpiece 3D point cloud to obtain the denoised workpiece 3D point cloud. .

[0113] Optionally, in step S12, voxel filtering is used to downsample and obtain a sparse workpiece 3D point cloud; in step S13, statistical filtering is used to remove outliers from the sparse workpiece 3D point cloud; in step S14, a detection plane-based filtering method is used to remove disparity calculation anomalies and obtain a preliminary filtered workpiece 3D point cloud; in step S15, pass-through filtering is used to remove background point clouds from the preliminary filtered workpiece 3D point cloud and obtain a denoised workpiece 3D point cloud.

[0114] Further, step S14 includes:

[0115] S141, the RANSAC algorithm is used to fit the sparse workpiece 3D point cloud S after removing outliers to obtain a planar model. The mathematical expression of the planar model is: The mathematical expression for the normal vector of the planar model is: ;

[0116] S142, Calculate the projection points of the sparse workpiece 3D point cloud S along the normal vector n direction after removing outliers. , , For points in the sparse workpiece 3D point cloud S, simultaneously obtain points in the sparse workpiece 3D point cloud S. Coordinates along the normal vector n ;

[0117] S143, based on coordinate values Define a detection plane parallel to the planar model. The mathematical expression for the detection plane is: , yes The z-coordinate value in the text;

[0118] S145, Determine the current detection plane Below, points in the 3D point cloud S of the sparse workpiece To the current detection plane The point cloud with a distance not greater than the detection distance threshold (0.5mm) is the current detection point cloud, and the detection plane is obtained with a number of current detection point clouds not less than the preset point cloud threshold (500 points). For effective detection, the detection distance threshold ranges from 0.3 mm to 1.5 mm (0.8 mm to 1.2 mm, with 1 mm being preferable), and the preset point cloud threshold ranges from 300 to 700 (with 500 being preferable).

[0119] Optionally, the detection distance threshold ranges from 0.3 mm to 1.5 mm, and the preset point cloud threshold ranges from 300 to 700 points. In other embodiments of the present invention, the detection distance threshold can be 0.3, 0.8, or 0.9, or other values; the preset point cloud threshold can be 400, 480, or 550, or other values, depending on the actual situation. In a preferred embodiment of the present invention, when used for type I interface welds, the detection distance threshold is 0.5 mm, and the preset point cloud threshold is 500 points. In other embodiments of the present invention, the various thresholds can also be other values, as long as the effect of the present invention can be achieved.

[0120] Further, step S145 includes:

[0121] S1451, calculate and obtain each detection plane Points in the 3D point cloud S of the sparse workpiece To the current detection plane Spacing distance , ;

[0122] S1452, in each detection plane Determine the spacing distance to meet the requirements. The point cloud is considered a valid point cloud if the detection plane... If the number of points in the current detection point cloud is not less than the preset point cloud threshold, then the detection plane is determined. To effectively detect the surface, the preset point cloud threshold is 300 to 700 points.

[0123] Step S15 specifically includes:

[0124] The detection plane corresponding to the top of the 3D point cloud of the initial filter workpiece. The workpiece's base plane is used as the basis for obtaining a filtered 3D point cloud of the workpiece by cutting downwards based on a height threshold, which ranges from 3 to 8 millimeters.

[0125] Optionally, the height threshold ranges from 3 mm to 8 mm. Understandably, the height threshold can be 3 mm, 5 mm, or 6 mm. In a preferred embodiment of the present invention, when used for type I interface welds, the height threshold is 6 mm.

[0126] Specifically, in an optional embodiment of the present invention, when identifying weld seams for type I interface weld seams, the preset rotation step size is 1 degree, the cluster separation threshold is 10, the detection distance threshold is 0.5 mm, the preset point cloud threshold is 500, and the height threshold is 20 mm.

[0127] Understandably, in step S14, the projection value of the sparse workpiece's 3D point cloud S along the normal vector n direction is calculated to obtain the point. Coordinate range , ,point The range of extreme values ​​of the z-coordinate along the normal vector direction is , ; Retain those that meet the valid threshold Points with a height ≤ a certain threshold are considered valid point clouds. Their number is checked to ensure it exceeds a preset point cloud threshold. The point clouds are then filtered to obtain the initial filtered 3D point cloud of the workpiece. .

[0128] In one specific embodiment of the present invention, invalid points in the initial workpiece 3D point cloud are first removed, i.e., outliers and erroneous data in the initial workpiece 3D point cloud are eliminated; then voxel filtering is used for downsampling; next, statistical filtering is used to remove outliers; then, a detection plane-based filtering method is used to remove anomalies caused by the parallax calculation error of the structured light camera that cannot be removed by statistical filtering (i.e., removing floating points); finally, pass-through filtering is used to remove the background point cloud, i.e., after obtaining the highest point of the point cloud, the range of the workpiece point cloud is determined according to the planar butt weld specification, and the background point cloud is removed.

[0129] Please refer to Figure 5 and Figure 6 Furthermore, step S20 specifically includes the following steps:

[0130] S251, in detecting the number of cluster types =2, and , When using the formula Calculate the discriminant ratio of the difference in the number of points between two clusters to the sum of the number of points. ,in, This represents the total number of point clouds in one of the clusters. This represents the total number of point clouds in another cluster. Experimental point cloud within the experimental range circle The total number of point clouds, To preset the discrimination coefficient, The value range is from 0.03 to 0.08.

[0131] S252, if the discriminant ratio is determined Then the initial point cloud centroid is determined. For the ideal partition center, To preset the discrimination ratio parameters, The value range is from 0.02 to 0.09;

[0132] S253, if the discriminant ratio is determined Then obtain the cluster with more point cloud data. and clusters with fewer point clouds And obtain the centroids of the two clusters respectively. and :

[0133] S254, Calculate the centroids of two clusters. and Cluster centroid difference and normalized direction of movement :

[0134] S255, based on cluster centroid difference and normalized direction of movement Calculation determines the new iterative center. ;

[0135] S256, the new iteration center Update to the initial point cloud centroid And re-enter step S23;

[0136] Repeat steps S23 to S256 until the ideal segmentation center is obtained.

[0137] Understandably, The value can be 0.03, 0.05, 0.07, or other values. The value can be 0.02, 0.04, 0.08, or other values. In a preferred embodiment of the present invention, when used for type I interface welds, based on experimental recommendations, the value is set as follows: The value is set to 0.05; The value is 0.05.

[0138] Furthermore, it also includes step S257, which involves detecting the number of cluster types. When ≠2, or At that time, or At that time, based on the first preset step size and initial radius The sum is used to obtain the iteration radius, and the iteration radius is updated to the initial radius. Then, re-enter step S23, wherein the value of the first preset step length is in the range of 5 mm to 25 mm, preferably 20 mm;

[0139] Repeat steps S23 to S256 until the ideal segmentation center is obtained.

[0140] In practical implementation, the current initial radius will be... The first preset step size is expanded and updated. Specifically, in an optional embodiment of the present invention, when identifying weld seams for type I interface weld seams, the first preset step size is 10 mm or 20 mm.

[0141] Furthermore, step S26 specifically includes:

[0142] S261, Initialization and establishment of normal vector Vertical direction vector ;

[0143] S262, Determine the direction vector Does it pass through the ideal partition center?

[0144] S263, if the direction vector Obtain the direction vector when passing through the ideal segmentation center. To detect line L; if the direction vector If it does not pass through the ideal dividing center, then the current direction vector will be... Rotate the preset rotation step size and update it, then proceed to step S262, where the preset rotation step size is 0.8° to 5°;

[0145] S264, obtain the number of detection associated point clouds of the detection line L, wherein the point clouds whose current distance from the detection line L is less than the first preset distance (1mm) are the detection associated point clouds;

[0146] S265, if the number of detected associated point clouds is less than the preset association threshold, then the detected line L is determined to be the weld seam segmentation line vector. ;

[0147] If the number of detected associated point clouds exceeds a preset association threshold, then the current direction vector will be... Rotate the preset rotation step size and update it, then proceed to step S262.

[0148] Understandably, the preset rotation step size is 0.8° to 5°, and can be 1 degree, 1.5 degrees, 2 degrees, or other values. In a preferred embodiment of the present invention, the preset rotation step size is 1 degree, and the direction vector... Update every 1 degree clockwise. If the condition is met, obtain the number of detected associated point clouds at the current rotation angle; the first preset distance is 1 mm.

[0149] Furthermore, step S27 specifically includes:

[0150] Step S27 specifically includes:

[0151] S271, Obtain each point cloud in the 3D point cloud of the denoised workpiece. With the ideal partition center The discriminant direction vector formed by the connection , ;

[0152] S272, based on the direction vector discrimination and weld seam segmentation linear vector The sign of the dot product determines whether the denoised workpiece's 3D point cloud is divided into two clusters of point clouds to be welded.

[0153] Optionally, in specific implementation, ; , 3D point cloud of a noise-reducing workpiece A single point cloud , For one (first) cloud cluster to be welded, For another (second) cloud cluster to be welded.

[0154] In an optional embodiment of the present invention, a preset discrimination coefficient is used. The value is 0.1, which determines whether the threshold of 10% has been reached; the preset comparison parameter is... The value is 0.05, which is the discrimination ratio R. diff If the value is less than 0.05, no movement is required. The center of the circle; 0.05 indicates The center of the circle is not at the weld; according to the planar weld specification, the width is 3mm-8mm when used for Type I interface welds. To cover the entire weld area and reduce the number of calculations, an initial radius is selected. It is 20mm.

[0155] Furthermore, step S30 specifically includes:

[0156] S31, Obtain the centroid of the two cloud clusters to be welded. ;

[0157] S32, Initialization and establishment of normal vector Vertical direction vector , direction vector With normal vector The axis of rotation is the centroid of the part to be welded. Using the center of rotation as the rotation point, rotate the direction vector by a preset angular step. The preset angle step size ranges from 1° to 10°.

[0158] S33, obtain the orientation vector at each rotation. The point cloud on the surface corresponds to the workpiece, from which a straight line vector is extracted.

[0159] S34: Obtain the pair of points with the largest mutual distance on the workpiece intercepting straight line vector. The corresponding two point clouds are the edge point clouds. Traverse all workpiece intercepting straight line vectors to obtain all edge point clouds in the point cloud cluster to be welded.

[0160] Among them, the edge point cloud lies on the centroid plane, and the centroid plane is perpendicular to the normal vector. The points of the two workpiece point clouds are respectively oriented towards the direction vector. Directional projection.

[0161] Optionally, the preset angle step size is 2 degrees, 3 degrees, or 6 degrees, or other values. In a preferred embodiment of the present invention, when used for type I interface welds, the preset angle step size is 5 degrees.

[0162] Furthermore, in step S31, the centroid of the cloud cluster of points to be welded is calculated and obtained respectively. ;in,

[0163]

[0164]

[0165] in and These are the point cloud counts of the two point cloud clusters to be welded, respectively;

[0166] In step S33, the point direction vectors of the two cloud clusters to be welded are obtained respectively. Directional projection, , cloud clusters for welding points The points in, among which =1,2;

[0167] Then calculate the points. to its projection point distance :

[0168]

[0169] like If the value is less than the given tolerance T, then the point is considered... In direction vector Above, thus filtering out those in the direction vector The point on top.

[0170] Please refer to Figure 7 and Figure 8 Furthermore, step S40 specifically includes:

[0171] S41, respectively obtain the set of relative distances between the edge points of one cloud cluster to be welded and the edge points of the other cloud cluster to be welded;

[0172] S42, determine the estimated weld width based on the minimum Euclidean distance in two sets of relative distances;

[0173] S43, determine all point clouds corresponding to the distance values ​​within the estimated weld width range in the two relative distance sets as the two weld-related point cloud sets;

[0174] S44, perform linear fitting on the point cloud set of weld-related point cloud to obtain two fitted weld edge lines; determine the fitted weld center line based on the two fitted weld edge lines.

[0175] S45, determine the two point clouds with the largest point-to-point distance on the fitted weld centerline as the welding start point and welding end point, respectively.

[0176] Optionally, in step S44, the RANSAC algorithm is used to perform linear fitting on the point cloud in the weld-related point cloud set to obtain two fitted weld edge lines.

[0177] In one specific embodiment of the present invention, after extracting the edge points of the two workpiece point clouds, it is necessary to further screen out the weld points and determine the starting and ending weld points. The specific steps are as follows:

[0178] To accurately identify weld edge points on two workpieces, a set-constraint-based filtering method is proposed: First, a KD-Tree is constructed to accelerate nearest neighbor search, and the minimum Euclidean distance between edge points from the two workpieces is calculated to estimate the weld width. Then, using this width as a distance constraint, points within the edge points of one workpiece whose distance to the edge points of the other workpiece is within the weld width range are searched, thereby determining the corresponding weld edge point sets on each of the two workpieces. The specific filtering process is as follows:

[0179] For the edge point set of workpiece 1 and the edge point set of workpiece 2 Each constructs its own KD-Tree.

[0180] for Each point in ,exist Querying and in KD-Tree Distance less than threshold point set Similarly, for Each point in ,exist Query in KDTree ;

[0181] The set of points W at the weld edge is the union of all pairs of points that satisfy the above distance condition, i.e.:

[0182]

[0183] The planar weld seam recognition method based on 3D visual point cloud provided by this invention has the following beneficial effects:

[0184] A detection plane-based filtering method is proposed for the point cloud preprocessing stage, using a pass-through filter to remove background point clouds. Compared to traditional clustering methods, this method demonstrates higher efficiency, accuracy, and adaptability when handling discontinuous and porous background point clouds (which traditional clustering methods struggle to remove). Furthermore, a detection plane-based filtering method is proposed for the first time: by analyzing the number of points passing through the detection plane, floating noise points and non-target surface points are effectively removed. This method significantly improves the purity and usability of the point cloud image while preserving key weld features. This approach has significant advantages in computational efficiency, original information retention, and robustness, making it particularly suitable for industrial scenes with tilted shooting angles or high environmental noise.

[0185] A centroid-based segmentation method is proposed for the workpiece point cloud segmentation stage. Unlike traditional methods that require clustering a large number of points, this method only needs to cluster 40-200 points to complete the segmentation, significantly improving efficiency. Furthermore, a correction mechanism is introduced to automatically adjust to the optimal segmentation position if there is an initial deviation in the segmentation center location, ensuring accuracy and robustness.

[0186] In the workpiece edge point detection stage, a three-dimensional edge detection method based on centroid edge point pairs is proposed. Unlike traditional image processing algorithms (such as Sobel and Canny) that rely on two-dimensional grayscale gradients, this method directly calculates edge information based on three-dimensional point cloud coordinates, avoiding distortion and information loss introduced by image projection and more completely preserving the true geometric features of the workpiece. Compared with other three-dimensional edge detection methods, this method does not require traversing the entire point cloud, effectively improving detection efficiency. The detected edge points are all coplanar with the workpiece centroid, avoiding errors introduced by edge tilt. Simultaneously, this method can effectively represent the workpiece contour shape with fewer edge points, significantly improving the efficiency and accuracy of weld point screening.

[0187] A geometrically constrained weld point detection method is proposed for the weld point detection stage. In this stage, the minimum distance between two sets of edge points is used as the weld width to filter weld edge points on two workpieces. This method is simple in principle and can efficiently and quickly filter weld edge points from workpiece edge points.

[0188] The present invention also provides a planar weld seam recognition system based on 3D visual point cloud, including a point cloud acquisition device and a processing device. The point cloud acquisition device is used to acquire an initial three-dimensional point cloud of the workpiece, and the processing device is used to implement the steps of the planar weld seam recognition method based on 3D visual point cloud as described above.

[0189] Although the steps are described in the claims and specification using S-numbers such as S10, S20, S30, etc., those skilled in the art should understand that, unless otherwise expressly stated, these numbers are for ease of description only and do not constitute a mandatory limitation on the order of execution of the steps. In some embodiments, some steps may be performed in parallel, in a different order, or omitted without departing from the core technical solution of the present invention, as long as the technical effects of the present invention can be achieved.

[0190] The above embodiments are merely illustrative of several implementation methods of this application, and their descriptions are relatively specific and detailed. However, they should not be construed as limiting the scope of this application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. A planar weld seam recognition method based on 3D visual point clouds, characterized in that, Includes the following steps: S10, preprocess the initial 3D point cloud of the workpiece to obtain a denoised 3D point cloud of the workpiece. ; S20, process the three-dimensional point cloud of the denoised workpiece. Two point cloud clusters to be welded are obtained by segmenting the point cloud. Specifically, step S20 includes: S21, Obtain the three-dimensional point cloud of the denoised workpiece. The corresponding fitting plane, the fitting plane having a normal vector ; S22, Clustering the denoised workpiece 3D point cloud The initial range center is the initial point cloud centroid. ; S23, with the initial point cloud centroid Centered at, initial radius Determine the experimental range circle for the radius range Select the experimental range circle The corresponding experimental point cloud , where the initial radius The range is 5 to 50 millimeters; S24, regarding the experimental range circle The experimental point cloud described in Perform clustering to obtain a set of clusters. And obtain the experimental point cloud. Number of cluster types detected ; S25, based on the initial point cloud centroid and the number of cluster types detected The ideal segmentation center is determined by the number of cluster point clouds for each cluster type; S26, Initialization and establishment of normal vector Vertical direction vector , direction vector With normal vector Using the ideal segmentation center as the rotation axis, the direction vector is rotated according to a preset rotation step size. Rotate gradually until based on the direction vector The corresponding direction vector is determined when the number of corresponding detection associated point clouds is not greater than the cluster separation threshold. Divide the weld seam into linear vectors and determine the direction vector. The point cloud whose current distance is not greater than the first preset distance is the detected associated point cloud, wherein the preset rotation step size ranges from 0.5 degrees to 6 degrees, the cluster separation threshold ranges from 8 to 25 points, and the first preset distance ranges from 0.5 to 4 millimeters; S27, point cloud segmentation is performed using the weld seam segmentation straight line vector, resulting in the 3D points of the noise-reduced workpiece. The cloud segmentation forms two clusters of cloud clusters with points to be welded together; Obtain the 3D point cloud of the denoised workpiece The point cloud is connected to the ideal segmentation center to form a discrimination direction vector. Based on the discrimination direction vector and the weld seam segmentation line vector, the denoised workpiece three-dimensional point cloud is segmented into two clusters of point clouds to be welded. S30, perform point cloud edge point detection on the two clusters of point clouds to be welded to obtain cluster edge point cloud sets; S40, based on the two cluster edge point sets, perform weld detection and weld line fitting to obtain the fitted weld center line and the fitted weld start and end points.

2. The planar weld seam recognition method based on 3D visual point cloud according to claim 1, characterized in that, Step S10 includes: S11, Remove abnormal and erroneous data from the initial workpiece 3D point cloud; S12, perform downsampling to obtain the sparse workpiece 3D point cloud S; S13, Remove outliers from the sparse workpiece 3D point cloud S; S14, remove parallax calculation anomalies to obtain the initial filter workpiece 3D point cloud; S15, remove the background point cloud from the initial filtered workpiece 3D point cloud to obtain the denoised workpiece 3D point cloud. .

3. The planar weld seam recognition method based on 3D visual point cloud according to claim 2, characterized in that, Step S14 includes: S141, the sparse workpiece 3D point cloud S after outlier removal is fitted using the RANSAC algorithm to obtain a planar model. The mathematical expression for the normal vector of the planar model is: ; S142, Calculate the projection points of the sparse workpiece 3D point cloud S along the normal vector n direction after removing outliers. , , For points in the sparse workpiece 3D point cloud S, simultaneously obtain points in the sparse workpiece 3D point cloud S. Coordinates along the normal vector n ; S143, based on coordinate values Define a detection plane parallel to the planar model. The mathematical expression for the detection plane is: , yes The z-coordinate value in the text; S145, Determine the current detection plane Below, each point in the sparse workpiece 3D point cloud S To the current detection plane Point clouds whose distance is not greater than a detection distance threshold are designated as the current detection point cloud, and the number of the current detection point clouds obtained is not less than the detection plane corresponding to a preset point cloud threshold. For effective detection, the detection distance threshold ranges from 0.3 mm to 1.5 mm, and the preset point cloud threshold ranges from 300 to 700. S146, combine all the point clouds in the effective detection surfaces to form a three-dimensional point cloud of the initial filter workpiece.

4. The planar weld seam recognition method based on 3D visual point cloud according to claim 3, characterized in that, Step S145 includes: Calculate and obtain each of the detection planes The following describes the point clouds of the sparse workpiece 3D point cloud S. To the current detection plane Spacing distance ; In each of the detection planes Determine the spacing distance to meet the requirements. The point cloud is considered a valid point cloud if the detection plane... If the number of points in the current detection point cloud is not less than a preset point cloud threshold, then the detection plane is determined. This refers to the effective detection surface.

5. The planar weld seam recognition method based on 3D visual point cloud according to claim 2, characterized in that, Step S15 specifically includes: The detection plane corresponding to the top of the 3D point cloud of the initial filter workpiece. The workpiece's base plane is used as the basis for obtaining a filtered 3D point cloud of the workpiece by cutting downwards based on a height threshold, which ranges from 3 to 8 millimeters.

6. The planar weld seam recognition method based on 3D visual point clouds according to any one of claims 1 to 5, characterized in that, Step S25 specifically includes: Detecting the number of cluster types =2, and , When using the formula Calculate the discriminant ratio between the difference in the number of points and the sum of the number of points of the two clusters. ,in, This represents the total number of point clouds in one of the clusters. This represents the total number of point clouds in another cluster. The experimental point cloud within the experimental range circle. The total number of point clouds, To preset the discrimination coefficient, The value range is from 0.03 to 0.

08. If the discriminant ratio Then the initial point cloud centroid is determined. For the ideal partition center, To preset the discrimination ratio parameters, The value range is from 0.02 to 0.09; If the discriminant ratio Then obtain the cluster with more point cloud data. and clusters with fewer point clouds And obtain the centroids of the two clusters respectively. and : Calculate the centroids of the two clusters. and Cluster centroid difference and normalized direction of movement : Based on cluster centroid difference and normalized direction of movement Calculation determines the new iterative center. ; The new iterative center Updated to the initial point cloud centroid. And re-enter step S23; Repeat the above steps until the ideal segmentation center is obtained.

7. The planar weld seam recognition method based on 3D visual point cloud according to claim 6, characterized in that, It also includes the step of detecting the number of cluster types. When ≠2, or At that time, or At that time, based on the first preset step size and initial radius The sum is used to obtain the iteration radius, and the iteration radius is updated to the initial radius. Then, re-enter step S23, wherein the value of the first preset step size ranges from 5 mm to 25 mm; Repeat the above steps until the ideal segmentation center is obtained.

8. The planar weld seam recognition method based on 3D visual point clouds according to any one of claims 1 to 5, characterized in that, Step S26 specifically includes: initializing and establishing the normal vector. The perpendicular direction vector Determine the direction vector Whether it passes through the ideal segmentation center; if the direction vector Obtain the direction vector when passing through the ideal segmentation center. To detect a straight line L; if the direction vector If the current direction vector does not pass through the ideal segmentation center, then... Rotate by a preset rotation step size and update, then proceed to determine the direction vector. The step of determining whether the line passes through the ideal segmentation center includes a preset rotation step size of 0.8° to 5°; obtaining the number of detection associated point clouds of the detection line L, wherein point clouds whose current distance to the detection line L is less than a first preset distance are considered as detection associated point clouds; if the number of detection associated point clouds is less than a preset association threshold, then the detection line L is determined to be a weld segmentation line vector; if the number of detection associated point clouds is greater than the preset association threshold, then the current direction vector is... Rotate by a preset rotation step size and update, then proceed to determine the direction vector. Whether the step of passing through the ideal segmentation center has been completed; and / or Step S27 specifically includes: acquiring each point cloud in the 3D point cloud of the denoised workpiece. With the ideal segmentation center The discriminant direction vector formed by the connection , According to the discriminant direction vector The sign of the dot product of the weld seam segmentation line vector and the denoised workpiece 3D point cloud is used to divide the workpiece into two clusters of point clouds to be welded.

9. The planar weld seam recognition method based on 3D visual point clouds according to any one of claims 1 to 3, characterized in that, Step S30 specifically includes: obtaining the centroids of the two cloud clusters of points to be welded. Initialization and establishment of normal vector Vertical direction vector , the direction vector With normal vector As the axis of rotation, with the centroid to be welded as the axis of rotation The direction vector is rotated by a preset angular step, with the rotation center as the center. The preset angle step size ranges from 1° to 10°; the direction vector at each rotation is obtained. The point cloud on the workpiece is used to construct a workpiece cut-off line vector; the two point clouds corresponding to the pair of points with the largest mutual distance on the workpiece cut-off line vector are obtained as edge point clouds; all the workpiece cut-off line vectors are traversed to obtain all the edge point clouds in the point cloud cluster to be welded, and / or Step S40 specifically includes: obtaining the relative distance set between the edge points of one of the weldable point cloud clusters and the edge points of the other weldable point cloud cluster; determining the estimated weld width based on the minimum Euclidean distance in the two relative distance sets; determining all point clouds in the two relative distance sets whose distance values ​​are within the range of the estimated weld width as two weld-related point cloud sets; performing linear fitting on the point clouds in the weld-related point cloud sets to obtain two fitted weld edge lines; determining the fitted weld center line based on the two fitted weld edge lines; and determining the two point clouds with the largest point-to-point distance on the fitted weld center line as the welding start point and welding end point, respectively.

10. A planar weld seam recognition system based on 3D visual point clouds, characterized in that, The device includes a point cloud acquisition device and a processing device. The point cloud acquisition device is used to acquire an initial three-dimensional point cloud of the workpiece, and the processing device is used to implement the steps of the planar weld seam recognition method based on 3D visual point cloud as described in any one of claims 1 to 9.

Citation Information

Patent Citations

  • Method for detecting weld of box workpiece based on three-dimensional vision

    CN110455187A

  • Point cloud identification method, device and equipment for automatic welding of fillet weld of lifting lug workpiece

    CN120783331A