Weld seam extraction and fitting method based on 3D point cloud
Through the 3D point cloud-based weld extraction method, using line structured light cameras and point cloud processing technology, high-precision and fast weld trajectory acquisition is achieved, solving the problems of low efficiency and manual reliance on accuracy in existing welding technologies. It is suitable for the automated welding of fillet and lap welds.
Patent Information
- Application Number
- CN202310405726.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-17
- Publication Date
- 2025-09-05
- Estimated Expiration
- 2043-04-17
AI Technical Summary
In existing welding technologies, the automated extraction and fitting of welds are inefficient, rely heavily on manual experience for accuracy, and are greatly affected by two-dimensional vision, making it difficult to achieve high-precision and fast weld trajectory acquisition.
A weld extraction method based on 3D point cloud is adopted. Point cloud data is acquired through a line structured light camera. Point cloud stitching, filtering, sampling and curvature feature recognition are performed. Combined with ICP registration and B-spline fitting, automatic extraction and fitting of welds are achieved.
It achieves high-precision and fast weld trajectory acquisition, reduces the manual teaching process, and improves the degree of welding automation and production efficiency.
Smart Images

Figure CN116542914B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of automated welding, and in particular relates to a weld extraction and fitting method based on 3D point clouds. Background Art
[0002] Welding is a crucial step in industrial manufacturing. Because welding is a demanding, demanding job involving harsh working environments and high technical skills, welding automation technology plays a significant role in improving production efficiency and protecting worker health.
[0003] Today, most welding robots used on production lines operate using a teach pendant. This method involves the operator manually controlling the robot's joints through a teach pendant, moving the robot to a predetermined position. This position is recorded and transmitted to the robot controller, allowing the robot to automatically repeat the task based on instructions. However, the online teach pendant process is cumbersome and inefficient. Accuracy relies entirely on the instructor's visual inspection. A small number of welding robots currently utilize offline programming. This method uses computer simulation, but accuracy cannot be guaranteed and requires certain corrections to the teach pendant.
[0004] In actual production, the welds on workpieces are often complex. For welding with teaching programming, if the weld shape is complex, multiple teaching operations are required, which increases the workload and seriously reduces the factory's production efficiency. In order to improve the degree of automation in welding, improve production efficiency, and shorten production time, automatic weld extraction technology has been developed. By automatically extracting spatial welds, it provides support for automated programming and avoids the tedious and time-consuming teaching process. When the shape of a three-dimensional curved weld is complex and irregular, if manual teaching programming is used, more path points need to be taught, and the teaching accuracy depends largely on the operator's experience and level, which is inefficient and the welding quality cannot be guaranteed. At this time, the advantages of automatic extraction and fitting of welds are particularly prominent.
[0005] Traditional weld seam extraction techniques have benefited from the development of two-dimensional machine vision technology. However, these technologies are significantly affected by the background environment, and the degree of oxidation on the workpiece surface, light intensity, and angle all have a certain impact on weld seam extraction. Furthermore, the positioning accuracy of two-dimensional vision is significantly affected by the calibration accuracy of the camera. Using structured light cameras to acquire point cloud data can produce high-precision three-dimensional spatial coordinate data, effectively characterizing the workpiece surface and shape, and providing a strong foundation for obtaining high-precision weld seams. Researching the use of structured light cameras to acquire point cloud data and combining it with robots for application in the welding field is an important and promising research direction in welding robotics. Summary of the Invention
[0006] In response to the problems and areas for improvement in the existing technology, the present invention provides a weld extraction and fitting method based on 3D point clouds, which involves weld extraction for fillet welds and lap welds. It can achieve high-precision and rapid extraction of weld trajectories, and accurately locate the starting and ending points of the welds, which is difficult to accomplish based on two-dimensional visual methods. The present invention can extract fillet welds and lap welds with high precision and speed. It only needs to provide a three-dimensional model of the welding workpiece to quickly obtain the weld trajectory, which can improve the efficiency of industrial production and manufacturing, and has the advantages of accurate recognition, high degree of automation, and fast calculation.
[0007] The basic scheme includes: acquiring a point cloud based on a line structured light camera; performing preprocessing operations on the point cloud data, including point cloud stitching, statistical filtering, straight-through interception, and uniform sampling, to extract the point cloud data of the welded workpiece; fitting a third-order surface to the workpiece point cloud using the moving least squares method to calculate the principal curvature of each point; identifying potential weld point clouds whose curvature values meet the requirements by setting a threshold; performing ICP alignment with the standard point cloud derived from the CAD model, eliminating points of other contour lines, and extracting the required weld point cloud; converting the weld point cloud coordinates to the robot's base coordinate system and performing B-spline fitting to obtain the weld trajectory. The method of the present invention can obtain the spatial trajectory of complex welds without manual teaching, and has the advantages of fast extraction speed and accurate trajectory, making it suitable for weld types such as fillet joints and lap joints.
[0008] The technical solution specifically adopted by the present invention to solve the technical problem is:
[0009] A weld extraction and fitting method based on 3D point cloud includes the following steps:
[0010] Step S1: Get the transformation matrix T from the camera coordinate system to the robot base coordinate system ctob ;
[0011] Step S2: Acquire point cloud data through multi-pose shooting;
[0012] Step S3: performing point cloud preprocessing on the point cloud data: extracting the point cloud data of the welding workpiece through point cloud splicing, statistical filtering, straight-through interception, and uniform sampling;
[0013] Step S4: Identification of potential weld points: Use curvature features to filter the point cloud, use the moving least squares method to fit the third-order surface to calculate the principal curvature of each point, and identify potential weld points by adjusting and setting the threshold;
[0014] Step S5: Weld seam extraction: performing ICP registration of the point cloud obtained in step S4 with the point cloud obtained by sampling the workpiece weld seam 3D model to determine the actual weld seam point cloud;
[0015] Step S6: Welding seam trajectory fitting: The weld point cloud is converted to the robot's coordinate system through the conversion matrix, and the point cloud data is fitted with B-spline to obtain the weld trajectory.
[0016] Furthermore, in step S1, the transformation matrix from the camera coordinate system to the robot base coordinate system is obtained through line structured light camera hand-eye calibration.
[0017] Specifically, the camera is fixed to the end of the robotic arm using the eye-on-hand installation method, and the calibration plate is fixed to the welding table. The camera takes pictures of the calibration plate in multiple different postures of the robotic arm. By inputting the posture of the robotic arm end, the posture transformation matrix R from the camera coordinate system to the robotic arm base coordinate system is calculated. ctob ,Then multi-pose shooting is used to obtain point cloud data, and the ,pose matrix during shooting is recorded for subsequent pre-processing ,stitching operations.
[0018] Furthermore, in step S2, point cloud data is acquired from a line structured light camera through multi-pose shooting.
[0019] Furthermore, step S3 specifically includes the following steps:
[0020] Step S31: perform point cloud stitching: record the pose matrix of the robot arm when acquiring point cloud data in multiple poses, calculate the pose transformation matrix, multiply the point cloud data by the pose transformation matrix, and obtain the complete point cloud of the welding workpiece obtained by shooting from multiple angles in the same coordinate system:
[0021]
[0022] Among them D i is the average distance of the k nearest neighbors of the i-th point, S max is the distance threshold;
[0023] Step S32: Perform statistical filtering: Construct a kd-tree for nearest neighbor search, set the number of points in the nearest neighbor search to k, calculate the global distance average and standard deviation of the entire point cloud, calculate the average distance of the k nearest neighbors of any point, mark the points whose average distance value of the k nearest neighbors is not within the distance threshold formed by the global distance average and standard deviation as outliers, and then remove the outliers to achieve the effect of removing system noise;
[0024] Step S33: Perform through-interception: Set the distance range between the camera on the robot and the welding workpiece on the welding table, remove points with coordinate values outside the range, and obtain the point cloud of the welding workpiece:
[0025]
[0026] where X l 、X h 、Y l 、Yh 、Z l 、Z h Respectively represent the minimum and maximum values of the range in the X, Y, and Z directions, x i 、y i 、z i Represents the x, y, and z coordinates of the i-th point in the point cloud;
[0027] Step S34: Perform uniform sampling: set the radius r, divide the point cloud space into spheres with the radius r, and select the point closest to the center of the sphere from all the points in the current sphere to replace all the points in the sphere.
[0028] This step uses point cloud stitching to stitch multiple incomplete original point clouds containing workpieces and backgrounds into a point cloud containing the complete workpiece; statistical filtering is used to remove system noise outliers; through straight-through interception, the background and welding station are removed to obtain the workpiece point cloud; and uniform sampling is used to reduce the point cloud density without changing the point cloud data.
[0029] Furthermore, step S4 uses curvature as a feature to identify potential weld points, and uses the moving least squares method to fit a local third-order surface to calculate the curvature value of the point, which specifically includes the following steps:
[0030] Step S41: construct a kd-tree, perform a k-nearest neighbor search for each point, use the search results to calculate the normal vector of the point, and construct a local coordinate system with the vector as the z-axis;
[0031] Step S42: Fit a third-order surface to the points obtained by the k-nearest neighbor search in the local coordinate system. After fitting the third-order surface, project the current point onto the surface and calculate the curvature value of the projected point. The curvature calculation method is shown in the following formula:
[0032]
[0033]
[0034]
[0035] where h u 、h v 、h uu 、h vv 、h uv Represent the partial differentials of the surface polynomial in the u and v directions respectively;
[0036] Step S43: Execute steps S41 and S42 for each point to obtain the curvature of each point, and identify potential weld points by setting a curvature threshold.
[0037] Furthermore, step S5 specifically includes the following steps:
[0038] Step S51: sampling the ideal three-dimensional model of the welded workpiece and the three-dimensional model of the marked weld respectively to obtain the ideal workpiece point cloud MC1 and the weld model point cloud MC2;
[0039] Step S52: Perform ICP registration on the actual weld workpiece point cloud C0 and the ideal 3D model point cloud MC1 of the weld workpiece to obtain a coordinate transformation matrix T. Use the transformation matrix T to transform the weld model point cloud MC2 to the coordinate system of the actual weld workpiece point cloud to obtain a new weld model point cloud MC. 2’ ;
[0040] Step S53: Set the distance threshold, and calculate the distance between each potential weld point and the new weld model point cloud MC by traversing the potential weld points C4 obtained in step S4. 2’ The distance between the nearest points in the weld point cloud is calculated, and the potential weld points with a distance less than the threshold are retained. The remaining points are removed to obtain the actual weld point cloud C5.
[0041] Furthermore, step S6 performs cubic B-spline fitting on the weld point cloud C5, specifically including the following steps:
[0042] Step S61: Use the transformation matrix T obtained in step S1 ctob Convert the weld point cloud C5 to the robot's coordinate system to obtain point cloud C6. Reorder point cloud C6 by X coordinate and determine the basis function of the third-order B-spline:
[0043]
[0044] Step S62: performing segmented fitting of a cubic B-spline curve on the reordered C6 point cloud, and finally completing the extraction and fitting of the weld.
[0045] Compared with the existing technology, the present invention and its preferred solution use a structured light camera to acquire point cloud data for fully automatic weld extraction and fitting. Specifically, multiple incomplete original point clouds containing workpieces and backgrounds are spliced into a point cloud containing the complete workpiece through point cloud stitching, system noise outliers are removed through statistical filtering, and the background and welding station are removed through straight-through interception to obtain the workpiece point cloud. The point cloud density is reduced without changing the point cloud data through uniform sampling, the curvature of each point is calculated by fitting a third-order surface through the moving least squares method, and a curvature threshold is set to screen potential points. The weld points are automatically extracted by performing ICP alignment with the standard point cloud of the three-dimensional model, and the weld points are converted to the robot base coordinate system through a transformation matrix. Then, third-order B-spline fitting is performed to complete the identification, extraction and trajectory fitting of the weld.
[0046] The entire process does not require manual teaching. The weld trajectory can be extracted by simply taking a picture of the welding workpiece with a structured light camera, which provides a good foundation for the subsequent trajectory planning of the welding robot and omits the extremely time-consuming process of manual teaching. It is suitable for application in industrial production lines and has the advantages of high efficiency, high precision, and speed. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] The present invention is further described in detail below with reference to the accompanying drawings and specific embodiments:
[0048] Figure 1 is an overall flow chart of an embodiment of the present invention;
[0049] Figure 2 A schematic diagram of point cloud data acquisition according to an embodiment of the present invention;
[0050] Figure 3 A three-dimensional model diagram of a workpiece used in an embodiment of the present invention;
[0051] Figure 4 This is a detailed flow chart of the weld extraction and fitting method according to an embodiment of the present invention. DETAILED DESCRIPTION
[0052] To make the features and advantages of this patent more clearly understood, the following embodiments are specifically described in detail as follows:
[0053] It should be noted that the following detailed description is illustrative and is intended to provide further explanation of the present application. Unless otherwise specified, all technical and scientific terms used in this specification have the same meaning as commonly understood by those skilled in the art to which this application belongs.
[0054] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit the exemplary embodiments according to the present application. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that when the terms "comprise" and / or "include" are used in this specification, they indicate the presence of features, steps, operations, devices, components and / or combinations thereof.
[0055] This embodiment provides a weld extraction and fitting method based on 3D point cloud, and its processing process is as follows: Figure 1 、 Figure 4 As shown, the following steps are included:
[0056] Step S1: Hand-eye calibration of the line structured light camera (such as RVX series camera) to obtain the transformation matrix T from the camera coordinate system to the robot base coordinate system ctob ;
[0057] Step S2: Figure 2As shown, multi-pose shooting is performed to obtain point cloud data from the line structured light camera;
[0058] Step S3: performing point cloud preprocessing on the point cloud data, obtaining point cloud data of the welding workpiece through point cloud splicing, statistical filtering, direct interception, and uniform sampling;
[0059] Step S4: Identification of potential weld points: using curvature features to filter the point cloud, using the moving least squares method to fit the third-order surface to calculate the principal curvature of each point, and identifying potential weld points by setting an appropriate threshold;
[0060] Step S5: Weld seam extraction, by comparing the point cloud obtained in step S4 with the Figure 3 The point cloud obtained by sampling the 3D model of the workpiece weld is shown, and the two are subjected to point cloud ICP registration to determine the actual weld point cloud;
[0061] Step S6: Welding seam trajectory fitting: the weld point cloud is converted to the robot's coordinate system through the conversion matrix, and the point cloud data is fitted with B-spline to obtain the weld trajectory.
[0062] In this embodiment, for step S1, the camera is fixed to the end of the robot arm using the eye-on-hand installation method, and the calibration plate is fixed to the welding table. The camera takes pictures of the calibration plate in multiple different postures of the robot arm. By inputting the posture of the end of the robot arm, the posture transformation matrix R from the camera coordinate system to the robot arm base coordinate system is calculated. ctob ,Then multi-pose shooting is performed to obtain point cloud data, and the pose matrix during shooting is recorded, which will be used for subsequent pre-processing stitching operations.
[0063] For step S3, the point cloud data is preprocessed, and the point cloud data of the welding workpiece is obtained from the original multiple point clouds through point cloud stitching, statistical filtering, straight-through interception, and uniform sampling. Specifically, multiple incomplete original point clouds containing the workpiece and background are stitched into a point cloud containing the complete workpiece through point cloud stitching; system noise outliers are removed through statistical filtering; background and welding station are removed through straight-through interception to obtain the workpiece point cloud; and the point cloud density is reduced without changing the point cloud data through uniform sampling.
[0064] The implementation of step S3 specifically includes the following steps:
[0065] Step S31: perform point cloud stitching, record the pose matrix of the robot arm when acquiring point cloud data in multiple poses, calculate the pose transformation matrix, multiply the point cloud data by the pose transformation matrix, and obtain the complete point cloud C0 of the welding workpiece obtained by shooting from multiple angles in the same coordinate system.
[0066] Step S32: Perform statistical filtering, introduce C0, and obtain the point cloud C1 with system noise outliers removed: Construct a kd-tree for neighbor search, set the number of points for neighbor search to k, and set k to 50 in this embodiment. Calculate the global distance average and standard deviation of the entire point cloud, calculate the average distance of the k nearest neighbors of any point, mark the points whose average distance values of the k nearest neighbors are not within the distance threshold composed of the global distance average and standard deviation as outliers, and remove the outliers to achieve the effect of removing system noise.
[0067]
[0068] Among them D i is the average distance of the k nearest neighbors of the i-th point, S max is the distance threshold.
[0069] Step S33: Perform straight-through interception, introduce C1, and obtain the welding workpiece point cloud C2: Set the approximate distance range between the camera on the robot and the welding workpiece on the welding table, eliminate points with coordinate values outside the range, and obtain the welding workpiece point cloud. l 、X h 、Y l 、Y h , Z l , Z h Set to 50mm, 200mm, 350mm, 420mm, 0mm, and 200mm respectively.
[0070]
[0071] where X l 、X h 、Y l 、Y h , Z l , Z h Respectively represent the minimum and maximum values of the range in the X, Y, and Z directions, x i 、y i 、z i Represents the x, y, and z coordinates of the i-th point in the point cloud.
[0072] Step S34: Perform uniform sampling and introduce C2 to obtain C3 after reducing the point cloud density: Set the radius r. In this embodiment, r is set to 1.5 mm. Divide the point cloud space by a sphere with a radius of r. Select the point closest to the center of the sphere from all points in the current sphere to replace all points in the sphere. While maintaining the structure of the point cloud itself and without changing the point cloud coordinate values, the number of points is greatly reduced.
[0073] Preferably, the implementation of step S4 specifically includes the following steps:
[0074] Step S41: Construct a kd-tree, introduce C3, and perform a k-nearest neighbor search for each point. In this embodiment, k in step S4 is set to 20. The normal vector of the point is calculated using the search result, and the local coordinate system is constructed with this vector as the z-axis.
[0075] Step S42: Fit a third-order surface to the points found by the k-nearest neighbor search in the local coordinate system. After fitting the third-order surface, project the current point onto the surface and calculate the curvature value of the projected point. The curvature calculation method is shown in the following formula:
[0076]
[0077]
[0078]
[0079] where h u 、h v 、h uu 、h vv 、h uv Represents the partial differentials of the surface polynomial in the u and v directions respectively
[0080] Step S43: Perform steps S41 and S42 on each point to obtain the curvature of each point. By setting a curvature threshold, a potential weld point C4 is identified. In this embodiment, the curvature threshold is set to 0.8.
[0081] Preferably, the implementation of step S5 specifically includes the following steps:
[0082] Step S51: sampling the ideal three-dimensional model of the welded workpiece and the three-dimensional model of the marked weld to obtain the ideal workpiece point cloud MC1 and the weld model point cloud MC2.
[0083] Step S52: Introduce C0, perform ICP registration on the actual weld workpiece point cloud C0 and the ideal 3D model point cloud MC1 of the weld workpiece to obtain a coordinate transformation matrix T. Use this transformation matrix T to transform the weld model point cloud MC2 to the coordinate system of the actual weld workpiece point cloud to obtain a new weld model point cloud MC 2’ .
[0084] Step S53: Set the distance threshold, introduce C4, traverse the potential weld points C4 obtained in step S4, and calculate the distance between each potential weld point and the new weld model point cloud MC. 2’ The distance between the nearest points is calculated, potential weld points with a distance less than a threshold are retained, and the remaining points are removed to obtain the actual weld point cloud C5. In this embodiment, the distance threshold is set to 2 mm.
[0085] Preferably, step S6 performs cubic B-spline fitting on the weld point cloud C5, and the specific implementation includes the following steps:
[0086] Step S61: Introduce C5 and use the matrix T obtained in step S1 ctob The weld point cloud C5 is converted to the robot's coordinate system to obtain point cloud C6. The point cloud C6 is reordered according to the X coordinate and the basis function of the third-order B-spline is determined. The basis function is as follows:
[0087]
[0088] Step S62: Perform segmented fitting of a cubic B-spline curve on the reordered C6 point cloud, and finally complete the extraction and fitting of the weld.
[0089] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0090] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the steps in the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0091] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.
[0092] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 The steps for the function specified in one or more boxes.
[0093] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention in any other manner. Any person skilled in the art may utilize the above-disclosed technical content to modify or modify the present invention into equivalent embodiments. However, any simple modifications, equivalent variations, and modifications to the above embodiments that do not depart from the technical content of the present invention and are based on the technical essence of the present invention remain within the scope of protection of the present invention.
[0094] This patent is not limited to the above-mentioned optimal implementation method. Anyone can derive various other forms of weld extraction and fitting methods based on 3D point clouds under the inspiration of this patent. All equal changes and modifications made according to the scope of the patent application of this invention should be covered by this patent.
Claims
1. A weld extraction and fitting method based on 3D point cloud, characterized in that: The following steps are involved: Step S1: Get the transformation matrix T from the camera coordinate system to the robot base coordinate system ctob ; Step S2: Acquire point cloud data through multi-pose shooting; Step S3: performing point cloud preprocessing on the point cloud data: extracting the point cloud data of the welding workpiece through point cloud splicing, statistical filtering, straight-through interception, and uniform sampling; Step S4: Identification of potential weld points: Use curvature features to filter the point cloud, use the moving least squares method to fit the third-order surface to calculate the principal curvature of each point, and identify potential weld points by adjusting and setting the threshold; Step S5: Weld seam extraction: performing ICP registration of the point cloud obtained in step S4 with the point cloud obtained by sampling the workpiece weld seam 3D model to determine the actual weld seam point cloud; Step S6: Welding seam trajectory fitting: The weld point cloud is converted to the robot's coordinate system through the conversion matrix, and the point cloud data is fitted with B-spline to obtain the weld trajectory; Step S4 uses curvature as a feature to identify potential weld points, and uses the moving least squares method to fit a local third-order surface to calculate the curvature value of the point, specifically including the following steps: Step S41: construct a kd-tree, perform a k-nearest neighbor search for each point, use the search results to calculate the normal vector of the point, and construct a local coordinate system with the vector as the z-axis; Step S42: Fit a third-order surface to the points obtained by the k-nearest neighbor search in the local coordinate system. After fitting the third-order surface, project the current point onto the surface and calculate the curvature value of the projected point. The curvature calculation method is shown in the following formula: where h u 、h v 、h uu 、h vv 、h uv Represent the partial differentials of the surface polynomial in the u and v directions respectively; Step S43: Execute steps S41 and S42 for each point to obtain the curvature of each point, and identify potential weld points by setting a curvature threshold; Step S5 specifically includes the following steps: Step S51: sampling the ideal three-dimensional model of the welded workpiece and the three-dimensional model of the marked weld respectively to obtain the ideal workpiece point cloud MC1 and the weld model point cloud MC2; Step S52: Perform ICP registration on the actual weld workpiece point cloud C0 and the ideal 3D model point cloud MC1 of the weld workpiece to obtain a coordinate transformation matrix T. Use the transformation matrix T to transform the weld model point cloud MC2 to the coordinate system of the actual weld workpiece point cloud to obtain a new weld model point cloud MC2. , ; Step S53: Set the distance threshold, and calculate the distance between each potential weld point and the new weld model point cloud MC2 by traversing the potential weld points C4 obtained in step S4. , The distance between the nearest points is calculated, and the potential weld points with a distance less than the threshold are retained. The remaining points are removed to obtain the actual weld point cloud C5; Step S6 performs cubic B-spline fitting on the weld point cloud C5, specifically including the following steps: Step S61: Use the transformation matrix T obtained in step S1 ctob Convert the weld point cloud C5 to the robot's coordinate system to obtain point cloud C6. Reorder point cloud C6 by X coordinate and determine the basis function of the third-order B-spline: Formula 6; Step S62: performing segmented fitting of a cubic B-spline curve on the reordered C6 point cloud, and finally completing the extraction and fitting of the weld.
2. The weld seam extraction and fitting method based on 3D point cloud according to claim 1, characterized in that: In step S1, the transformation matrix from the camera coordinate system to the robot base coordinate system is obtained through line structured light camera hand-eye calibration.
3. The weld extraction and fitting method based on 3D point cloud according to claim 1, characterized in that: In step S2, point cloud data is acquired from a line structured light camera through multi-pose shooting.
4. The weld extraction and fitting method based on 3D point cloud according to claim 1, characterized in that: Step S3 specifically includes the following steps: Step S31: perform point cloud stitching: record the pose matrix of the robot arm when acquiring point cloud data in multiple poses, calculate the pose transformation matrix, multiply the point cloud data by the pose transformation matrix, and obtain the complete point cloud of the welding workpiece obtained by shooting from multiple angles in the same coordinate system: Formula 1; in is the average distance of the k nearest neighbors of the i-th point, is the distance threshold; Step S32: Perform statistical filtering: Construct a kd-tree for nearest neighbor search, set the number of points in the nearest neighbor search to k, calculate the global distance average and standard deviation of the entire point cloud, calculate the average distance of the k nearest neighbors of any point, mark the points whose average distance value of the k nearest neighbors is not within the distance threshold formed by the global distance average and standard deviation as outliers, and then remove the outliers to achieve the effect of removing system noise; Step S33: Perform through-interception: Set the distance range between the camera on the robot and the welding workpiece on the welding table, remove points with coordinate values outside the range, and obtain the point cloud of the welding workpiece: Formula 2; in 、 、 、 、 、 Respectively represent the minimum and maximum values of the range in the X, Y, and Z axis directions. 、 、 Represents the x, y, and z coordinates of the i-th point in the point cloud; Step S34: Perform uniform sampling: set the radius r, divide the point cloud space into spheres with the radius r, and select the point closest to the center of the sphere from all the points in the current sphere to replace all the points in the sphere.
Citation Information
Patent Citations
Point Cloud Registration Method Based on Geometric Surface Description of Feature Points
CN109544612A
Weld joint identification method based on deep learning and 3D point cloud
CN115965960A