# A 3D Vision-Based Weld Seam Extraction Method for Arbitrarily Placed Spatial Planar Weldments
## 1 Introduction
[PERSON], [PERSON], [PERSON], [PERSON] and [PERSON] (2018) use a neural network to perform semantic segmentation on the 2D image of a narrow butt joint and extract the weld seam with an average position error of 0.207 mm. As for 3D-vision-based applications, most researchers choose to identify geometric elements from the point clouds. Some accomplish it through edge extraction. [PERSON], [PERSON], [PERSON], [PERSON], [PERSON] and [PERSON] (2018) use K-Means clustering to separate boundary points identified by a new feature descriptor. This method's advantage is its strong adaptability (it can be used for free surfaces). However, its 78.57% corner recognition rate for planar weldments is still insufficient for practical use. More studies choose to segment planes from the point cloud first. [PERSON], [PERSON], [PERSON], [PERSON], [PERSON] and [PERSON] (2018) study three cases of weldments composed of two parallel planes and use vanilla RANSAC to detect and remove the edge points of the two planes, and then use least squares fitting to calculate the weld seams as the center lines of the two plane point clouds. [PERSON], [PERSON], [PERSON], [PERSON] and [PERSON] (2018) use the least squares method to fit the common plane of the two butted workpieces. The weld seams are calculated by polynomial fitting on the points farthest from the plane. The RMSE error of the fitted weld seams is less than 0.7 mm. [PERSON] et al. (2018) apply vanilla RANSAC on the point clouds to fit TEE joints and lap joints in simple weldments. [PERSON] et al. (2018) undertake similar work with more complex planar weldments, optimizing RANSAC to enhance the computational efficiency and fitting accuracy compared to vanilla RANSAC. The successful implementation of these methods all has a common prerequisite, that is, either the structure of the weldment is simple enough for the weld seams to be extracted through a single frame of image or the weldments must be fixed with a certain accuracy in advance and the camera must be located (at least roughly) in a position where the weld features can be captured. In addition, since the research objects are all single weld seams or multiple weld seams in a frame of a point cloud, only local weld seams can be obtained in the end rather than all global weld seams. Further research is warranted to address the global welding path planning challenge for spatial planar weldments. Hence, this paper is dedicated to proposing a WSE method for arbitrarily placed spatial planar weldments, i.e., weldments with spatial structures comprised of plate-like materials commonly observed in construction machinery, steel structures, carriage plates, and container plate manufacturing applications ([PERSON] et al., 2018). In this paper, we propose a new approach that uses an improved RANSAC algorithm based on Euclidean clustering to carry out plane segmentation, and a novel weld seam extraction algorithm leveraging the half-edge data structure is developed to compute weld seams from the segmented planes efficiently. Due to the difference in weldment sizes and types, equipment types and accuracy levels, and error evaluation methods in the existing literature, we cannot create a unified benchmark for various methods for comparison. However, the process in this paper successfully solves the problem of WSE in a scenario that is more complex than similar articles and greatly improves the accuracy compared to traditional feature extraction methods. It provides an effective reference for applying robot automatic welding of complex planar welded parts without precise clamping. The structure of this paper is as follows: Section 1 introduces the research background and briefly reviews the literature. Section 2 presents the 3D reconstruction method for point cloud registration and proposes an improved RANSAC algorithm tailored for consecutive plane segmentation. Section 3 introduces a WSE method based on the results of plane segmentation. Section 4 describes several experiments conducted to practice and validate the proposed methods.