Improved RANSAC Point Cloud Spherical Target Detection and Parameter Estimation Method Based on Principal Curvature Constraint

Spherical targets are widely used in coordinate unification of large-scale combined measurements. Through its central coordinates, scanned point cloud data from different locations can be converted into a unified coordinate reference system. However, point cloud sphere detection has the disadvantages of errors and slow detection time. For this reason, a novel method of spherical object detection and parameter estimation based on an improved random sample consensus (RANSAC) algorithm is proposed. The method is based on the RANSAC algorithm. Firstly, the principal curvature of point cloud data is calculated. Combined with the k-d nearest neighbor search algorithm, the principal curvature constraint of random sampling points is implemented to improve the quality of sample points selected by RANSAC and increase the detection speed. Secondly, the RANSAC method is combined with the total least squares method. The total least squares method is used to estimate the inner point set of spherical objects obtained by the RANSAC algorithm. The experimental results demonstrate that the method outperforms the conventional RANSAC algorithm in terms of accuracy and detection speed in estimating sphere parameters.


Introduction
During the maintenance of aircraft landing gear, it is necessary to detect assembly errors, such as parallelism of the front and rear axles of the frame and axiality between the shock absorber prop and sleeve. Because of the sizeable measurement space range and the complex structure of measured parts, they need to be measured by a combined measurement method. Combined measurement is a method to select a measurement method with large-scale precision characteristics to achieve global measurement and control and to select a precise and an efficient morphology measurement method as the terminal measurement to collect high-density point clouds [1,2]. Its key principle is to transform the terminal scan data from different locations into a unified global coordinate reference system with the help of auxiliary targets [3]. Three-dimensional structured light scanning technology is often used as the terminal measurement device in combined measurements due to its good collimation, non-contact mode, high accuracy, and fast measurement [4,5].
Because the sphere is used as the target of detection, any error of the sphere center that it determines will be propagated as an error in the coordinate system transformation. In order to improve the efficiency and accuracy of coordinate system unification during measurement, many studies have been devoted to improving the sphere detection accuracy and shortening the calculation time. Three-dimensional point cloud sphere detection includes the 3D Hough transform [6], registration [7], random sample consensus (RANSAC) [8], region growing [9], and other methods. For example, Schnabel et al. [10] proposed the RANSAC method for 3D sphere detection. This method can effectively detect spherical regions in a point cloud. It has high detection accuracy and can suppress the effect of noise. However, the traditional RANSAC has high computational complexity and relatively high time consumption [11]. Other researchers [12,13] have put forward some improved RANSAC methods. These improved RANSAC algorithms can effectively segment targets, but they do not delve into precise target fitting. Camurri et al. [14] applied the 3D Hough transform of three-dimensional space for sphere identification and the detection of point cloud data. It can calculate sphere parameter values from point clouds containing noise and suppress noise points. However, in practical application, the 3D Hough transform is more complicated in three-dimensional space, with large computation and high time consumption. Abizaina et al. [15] proposed a method based on the 3D Hough transform to detect spherical point clouds in 3D point cloud data generated by the Kinect sensor, and it has higher computational efficiency than traditional algorithms. Other researchers [16,17] also proposed methods to improve the sphere detection efficiency and robustness of 3D Hough detection. These methods based on the 3D Hough transform can effectively detect the sphere in the point cloud and suppress noise. However, their detection accuracy is based on the resolution of discrete space, so the calculation cost will increase sharply with the improvement of accuracy. In many improved methods, the sphere's radius in the point cloud needs to be determined in advance, and the spherical point cloud must reach the hemisphere to be feasible. Anh-vu et al. [18] applied the region growing method for sphere detection, selected seed points to expand according to the criteria of surface membership, and divided point clouds into different surfaces through iteration. Nurunnabi et al. [19] improved the region growing method. This method sets the selection region of seed points to the area near the artificial filter edge and selects the points with the least curvature in the region as seed points. The method can detect the spherical model in the point cloud quickly, but the accuracy of detection depends mainly on the pre-selected seed points. When the scene contains many noise point clouds, it is challenging to select seed points, and the detection accuracy is low. Wang et al. [20] proposed an automatic method of laser point cloud registration based on spherical target detection, which can quickly detect spherical targets in the point cloud. Huang et al. [21] proposed a registration method based on an auxiliary spherical target combined with the ICP algorithm, and the spherical target is used to provide spherical constraints for registration. These registration methods can quickly detect spherical objects after scene segmentation, but they lack a noise suppression mechanism after scene segmentation with noise.
When 3D structured light scanning is used as a large-scale combined measurement terminal, the scanned point cloud data contain the spherical point cloud below but close to the hemisphere, environmental point, outlier point and regular point clouds of the measured object. That is, non-spherical point clouds account for a relatively high proportion of point clouds. The RANSAC algorithm can suppress the influence of point cloud noise on spherical feature recognition, and it has high robustness and efficiency. Therefore, it is suitable for large-scale measurement coordinate unification scenarios.
However, due to the random selection of sample points in the detection process of traditional RANSAC, the model established by the random selection of sample points in the presence of a lot of noise point clouds is often an error model, and the error model can only be determined after calculating the inner point set every time, which wastes a lot of time. To address this problem, Shuyang Shang et al. [22] proposed an improved RANSAC point cloud sphere detection method based on irrelevant point markers. Triangulation and statistics are used to mark irrelevant points of spherical shapes according to point cloud spacing, which cannot be regarded as sample points, thus improving the iteration efficiency. However, this method is suitable for scenes where noise only disperses the clutter. In addition to discrete outliers, there are also measured points with regular point cloud n large-scale combined measurement point cloud data, so this method is unstable for detection. There is another problem with the traditional RANSAC. The algorithm uses the least squares method to correct the parameters of the spherical model, which considers the coefficient matrix to be constant. There are errors in point cloud data, and the coefficient matrix is also affected by errors [23]. Therefore, a better-fitting result cannot be obtained when the threshold value is large. This paper proposes an improved RANSAC method based on principal curvature constraint (PC-RANSAC) point cloud spherical target detection and parameter estimation to solve the above problems. It mainly improves the traditional RANSAC algorithm by first adding a constraint condition based on the principal curvature of the point cloud. Four points of random nearest neighbors are searched according to the k-d nearest neighbor algorithm and then constrained according to their principal curvatures to improve the sample quality. Secondly, the traditional RANSAC algorithm only considers the error in the Z direction but ignores the errors in the X and Y directions. This improved method uses the total least squares method to optimize the estimation of spherical target parameters.

System Design
As shown in Figure 1, the hardware of the combined measurement system includes a flexible joint arm, a 3D scanner, a manipulator, and two sets of spherical targets. The spherical target consists of multiple (at least three) ceramic standard spheres fixed in relative positions. The flexible joint arm is the global measurement coordinate system in the combined measurement system. The manipulator drives the 3D scanner as the measurement terminal to obtain the point cloud on the measured object's surface. The two groups of spherical targets are placed in measurement areas 1 and 2 of the measured object, respectively. The position of the spherical target in the global measurement coordinate system can be measured by the flexible joint arm. During the measurement, the 3D scanner at the end of the manipulator is controlled to scan the two measurement areas. The measured element point clouds and target point clouds in the two regions are each obtained. In this way, the coordinates of the target in the global measurement coordinate system and the coordinates of the 3D scanner measurement terminal are known. Then, the point cloud data of the measured elements in the region where the spherical target is located can be converted to the global measurement coordinate system. Finally, coordinate unification of the measured elements is achieved. The key factors affecting the measurement accuracy of the system are the detection of spherical targets and the estimation of parameters. This paper elaborates on this.

PC-RANSAC Point Cloud Sphere Detection Algorithm
The process based on the fast, robust PC-RANSAC point cloud sphere detection algorithm is shown in Figure 2. It is divided into two parts: sphere detection and sphere parameter estimation. In spherical target detection, four random neighboring points are searched as the current sample points by the K-D nearest neighbor search algorithm. Point selection is constrained by the principal curvature of the sample point. If the condition is not satisfied, a sample point is selected again to improve the quality of the sample point.

PC-RANSAC Point Cloud Sphere Detection Algorithm
The process based on the fast, robust PC-RANSAC point cloud sphere detection algorithm is shown in Figure 2. It is divided into two parts: sphere detection and sphere parameter estimation. In spherical target detection, four random neighboring points are searched as the current sample points by the K-D nearest neighbor search algorithm. Point selection is constrained by the principal curvature of the sample point. If the condition is not satisfied, a sample point is selected again to improve the quality of the sample point. In sphere parameter estimation, it considers point cloud data coefficient matrix errors and the observation vector. The total least squares algorithm optimizes the estimation of the spherical target center coordinates.

PC-RANSAC Point Cloud Sphere Detection Algorithm
The process based on the fast, robust PC-RANSAC point cloud sphere detection algorithm is shown in Figure 2. It is divided into two parts: sphere detection and sphere parameter estimation. In spherical target detection, four random neighboring points are searched as the current sample points by the K-D nearest neighbor search algorithm. Point selection is constrained by the principal curvature of the sample point. If the condition is not satisfied, a sample point is selected again to improve the quality of the sample point. In sphere parameter estimation, it considers point cloud data coefficient matrix errors and the observation vector. The total least squares algorithm optimizes the estimation of the spherical target center coordinates.

Principal curvature constraint for sample point selection
At any point P on a continuous smooth surface S, there exist an infinite number of regular curves passing through that point that have different normal curvatures at point P [24,25]. The two maximum and minimum extreme values K 1 and K 2 are called the principal curvature of the point. If all points of continuous surface S satisfy K 1 = K 2 = 0, surface S must belong to the same sphere, and the normal curvature of all points is equal to the sphere's radius [26,27]. If adjacent points with the same principal curvature are found, the surface constructed by these field points is the sphere in the point cloud. Let its normal unit vector at point P be N for each point P in the point cloud. The method to estimate the normal curvature at point P using point coordinates and normal phase vectors is as follows.
Let us assume that there are m neighboring points near P, q i is the ith nearest neighbor point of point P, and the normal vector of q i is M i . Let the orthogonal coordinate system (X, Y, Z) be the local coordinate system L with point P as the origin, and let N denote the normal vector of point P. In L, X and Y are orthogonal unit vectors, and the coordinates of P are (x, y, z), those of q i are (x i , y i , z i ), and those of M i are n xi , n yi , n zi . Let point P have a normal vector N = (n xp , n yp , n zp ). Suppose that the three axes X, Y, Z are X = (− sin φ, cos φ, 0), Y = (cos ϕ cos φ, cos ϕ sin φ, − sin ϕ), and Z = N = (n xp , n yp , n zp ), where φ = arctan(n xp /n xp )φ = arc cos(n zp ).
Then, the normal curvature k i n of point P can be estimated by constructing approximate triangles using each point P and its normal vector, the nearest neighbor, and the normal vector of the nearest neighbor. Figure 3 shows the geometric relationships of these variables. Then, the normal curvature i n k of point P can be estimated by constructing approximate triangles using each point P and its normal vector, the nearest neighbor, and the normal vector of the nearest neighbor. Figure 3 shows the geometric relationships of these variables. Then, the normal curvature of P with respect to i q is estimated as follows: where α is the angle between vectors N and  Then, the normal curvature of P with respect to q i is estimated as follows: where α is the angle between vectors N and pq i , β is the angle between vectors N and M i , and k i n denotes the normal curvature of the normal intercept line corresponding to the ith nearest neighbor point.
The following equation gives the approximation of Equation (1): where n xy = As shown in Figure 3, let e 1 and e 2 be the principal directions corresponding to the principal curvature of point P. Supposed that θ is the angle between the X-axis in the local coordinate system and the principal direction corresponding to the maximum principal curvature e 1 , Q i is the projection point of the nearest neighbor q i on the tangent plane S, and θ i is the angle between vector Pθ i and the X-axis in the local coordinate system.
According to the Euler Equation, the normal curvature and the principal curvature are related as follows: The task can be written as an optimization problem: Equation (4) can be translated into the following least squares problem.
In Equation (5):  After the least squares fit of Equation (5), estimates of µ can be obtained accordingly, and using the derived values of A, B, and C, the Weingarten matrix can be inferred as follows: It can be concluded that the principal curvature points k 1 and k 2 are the eigenvalues of the matrix W.
From the above, it can be seen that the points satisfying k 1 = k 2 = 0 are identified as spherical points, but due to the measurement error of the point cloud, the spherical spacing error, and the existence of local fitting error, the derived principal curvature value will deviate from the actual value. The values of k 1 and k 2 are rarely guaranteed to be exactly equal. Therefore, when the absolute value of their difference ∆ does not exceed some limit ξ, the point can be recognized as a spherical point. However, differences in the radii of different target spheres will lead to differences in the curvatures of the respective spherical points. In the case that the radii of target spheres in the scene are unknown and different, it is not suitable to choose a constant value of ξ.
This paper is designed to identify spherical points by the relative deviation of the principal curvature ∂∆ = ∆ H , where H is the mean curvature, H = k 1 +k 2 2 , and ∆ =|k 1 − k 2 |. A point in the point cloud is identified as a spherical point when it satisfies the following two conditions. Condition 1: ∂∆ < α, where α is the critical value, which is set to 0.4 in the experiments described in this paper.
Condition 2: k 1 = k 2 > 0, and it is possible to exclude plane points and hyperbolic points.

Total Least Squares Algorithm-Corrected Sphere Parameters
The set of interior points corresponding to the optimal model parameters M* is obtained: (x i , y i , z i ), i = 1, 2, · · · , n, and the spatial spherical equation is established as: where a 0 , b 0 , and c 0 are the coordinates of the center of the sphere, and r is the radius of the sphere. Considering that there are errors in the three directions x, y, and z, let v x , v y , and v z be the error correction numbers in the three directions x, y, z, respectively. We can rewrite the spherical equation as follows: After rearranging Equation (7), the following equation is obtained.
E A and e y in Equation (8) denote the errors of the coefficient matrix A and the observation matrix y, respectively.
It is generally solved by the singular value decomposition of the matrix. Firstly, singular value decomposition of the augmented matrix A y is performed: The resulting model parameter estimation is obtained as: According to Equation (10), the spherical target parameter T is the optimal target estimate.
The PC-RANSAC point cloud sphere detection algorithm exploits the properties of the differential geometry of spherical point clouds. It uses point cloud principal curvature constraints to improve the quality of RANSAC sample points. The current optimal set of interior points obtained at the termination of the iteration is also corrected by the total least squares algorithm. This method reduces the influence of point cloud data coefficient matrix and observation vector errors on the fitted spherical surface results. The following experiments illustrate the effectiveness and practicality of the method.

Experimental Results and Analysis
The experimental operating environment was an Intel Core 2.4 GHz CPU and MAT-LAB 2020 platform. Numerous experiments with synthetic and real data were performed to validate the proposed method. Efficiency and accuracy comparisons and large-scale measurement experiments were carried out. The detection efficiency and accuracy comparisons were divided into a simulation data experiment and an actual acquisition standard ball experiment.

Simulation Experiments
Because the spherical target captured by the surface structured light camera is usually below but close to the hemisphere, a standard hemispherical surface point cloud of 3000 points was generated by MATLAB. The coordinates of the center of the sphere were (20,30,40), and the radius of the sphere was 15. The noise in the point cloud was randomly generated, and the ratio of the number of spherical model point clouds to the number of noise points was set as W. Point clouds with W = 10% to W = 40% (with an interval of 10%) were generated respectively, which are called noisy spherical point clouds. The noise-laden spherical point cloud is shown in Figure 4. ally below but close to the hemisphere, a standard hemispherical surface point cloud of 3000 points was generated by MATLAB. The coordinates of the center of the sphere were (20,30,40), and the radius of the sphere was 15. The noise in the point cloud was randomly generated, and the ratio of the number of spherical model point clouds to the number of noise points was set as W. Point clouds with W = 10% to W = 40% (with an interval of 10%) were generated respectively, which are called noisy spherical point clouds. The noiseladen spherical point cloud is shown in Figure 4.  Spherical point detection was performed on the simulated point cloud data by the RANSAC algorithm, 3D Hough algorithm, and PC-RANSAC algorithm. The experimental results are given as the mean and standard deviation of the sphere center coordinates and sphere radius after repeating 20 independent experiments. In this paper, the standard deviations of the detected center coordinates and radius of the spherical model from the actual values are used to represent the accuracy of the algorithm. The standard deviation is a measurement concept of the degree of dispersion of a set of values from the mean value. The standard deviation represents the magnitude of the calculated accuracy. The standard deviation calculation formula is shown in Equation (11), and the experimental results are shown in Table 1 and Figure 5.
where (x, y, z) and r are the estimated sphere center coordinates and radius of the spherical surface, respectively. x x y y z z r r − + − + − + − = (11) where ) , , ( z y x and r are the estimated sphere center coordinates and radius of the spherical surface, respectively.   Table 1 shows that the detection time of the three algorithms starts to increase as the proportion of noise in the point cloud increases. The detection time of the 3D Hough  Table 1 shows that the detection time of the three algorithms starts to increase as the proportion of noise in the point cloud increases. The detection time of the 3D Hough algorithm increases more, the RANSAC algorithm is better than the 3D Hough algorithm in terms of speed, and the detection time of the PC-RANSAC algorithm is always less than that of the traditional RANSAC algorithm. Figure 5 shows that when the noise is low, the accuracy of the three methods in detecting the spherical model is not much different. However, as the noise increases, the accuracy of the RANSAC algorithm becomes better than that of 3D Hough. The accuracy of the RANSAC algorithm is better than that of the 3D Hough algorithm in detecting spherical targets in point clouds containing noise, and the results of the PC-RANSAC algorithm are closer to the real values and are always much better than those of the RANSAC algorithm and 3D Hough algorithm. The experimental results show that the PC-RANSAC algorithm can improve the efficiency and accuracy of the traditional RANSAC algorithm for detecting spherical surfaces with better robustness and accuracy.

Standard Ball Experiment
In this experiment, the point cloud data of standard ball and shaft parts were obtained by a XUNHENG 3D scanner, as shown in Figure 6a. The scanner performs photographic smooth surface scanning of the structure, and its adaptive range is from 40 mm to 2000 mm. Its scanning range is 200 mm, and its accuracy is 0.04 mm. In the original point cloud data, there are two ceramic standard balls and a shaft part. The diameter of the two standard balls is 30 mm, and the center distance of the two balls is 60 mm, as shown in Figure 6b. The original number of point clouds was 1 million, and after voxel downsampling, the number dropped to 82,340. The standard balls were measured using a global classic SR 05-07-05 CMM from HEXAGON. The diameters of the two standard balls were measured to be 30.004 mm and 30.005 mm, respectively, and the center distance of the two standard balls was 60.010 mm. Since the above experiment confirmed that the RANSAC algorithm outperforms the 3D Hough algorithm in detecting spherical surfaces in point clouds containing noise, a comparison experiment was conducted using RANSAC and PC-RANSAC to detect spherical surfaces.

Standard Ball Experiment
In this experiment, the point cloud data of standard ball and shaft parts were obtained by a XUNHENG 3D scanner, as shown in Figure 6a. The scanner performs photographic smooth surface scanning of the structure, and its adaptive range is from 40 mm to 2000 mm. Its scanning range is 200 mm, and its accuracy is 0.04 mm. In the original point cloud data, there are two ceramic standard balls and a shaft part. The diameter of the two standard balls is 30 mm, and the center distance of the two balls is 60 mm, as shown in Figure 6b. The original number of point clouds was 1 million, and after voxel downsampling, the number dropped to 82,340. The standard balls were measured using a global classic SR 05-07-05 CMM from HEXAGON. The diameters of the two standard balls were measured to be 30.004 mm and 30.005 mm, respectively, and the center distance of the two standard balls was 60.010 mm. Since the above experiment confirmed that the RANSAC algorithm outperforms the 3D Hough algorithm in detecting spherical surfaces in point clouds containing noise, a comparison experiment was conducted using RAN-SAC and PC-RANSAC to detect spherical surfaces. To verify the robustness of this algorithm, a more relaxed threshold was chosen. The number of iterations in the experiment was set at k = 20,000, and the distance threshold was chosen to be 0.4. The experimental results were obtained after repeating 20 independent experiments to detect the spherical surface, as shown in Table 2; the sphere center distance between the two spherical surfaces, as shown in Table 3; and the average radius difference between the spherical surfaces, as shown in Figure 7. The total time required to detect the spherical surface is shown in Table 4. To verify the robustness of this algorithm, a more relaxed threshold was chosen. The number of iterations in the experiment was set at k = 20,000, and the distance threshold was chosen to be 0.4. The experimental results were obtained after repeating 20 independent experiments to detect the spherical surface, as shown in Table 2; the sphere center distance between the two spherical surfaces, as shown in Table 3; and the average radius difference between the spherical surfaces, as shown in Figure 7. The total time required to detect the spherical surface is shown in Table 4.    As shown in Figure 7 and Tables 3 and 4, the PC-RANSAC algorithm detected the average sphere center distance of the standard ball as 59.990 mm with a detection time of 4.62 s. The RANSAC algorithm detected the average sphere center distance of the standard ball as 59.587 mm with a detection time of 8.58 s. The experimental results show that the PC-RANSAC algorithm can effectively detect the spherical surface in the point cloud model, and the detection accuracy and speed are improved compared to the traditional RANSAC. The experimental results fully demonstrate the effectiveness and feasibility of the method.

Large-Scale Measurement Experiment
In order to verify the practicality of the proposed algorithm in large-scale coordinate conversion, the experiment used a spherical target and a robotic arm-driven 3D scanner as the measurement tool and a standard rod as the measurement object. A standard sphere fixed the standard rod fitting at both ends of the aluminum profile, and the sphere center distance measured by the articulated arm was used as the standard value. The sphere center distance of the two ends of the standard rod was obtained as 861.890 ± 0.008 mm, and the two sphere diameters were 30.007 ± 0.025 mm and 29.990 ± 0.025 mm, respectively.
The experimental procedure was as follows: (1) The positions of the two sets of targets were calibrated with the articulated arm before the measurement; the target positions  As shown in Figure 7 and Tables 3 and 4

Large-Scale Measurement Experiment
In order to verify the practicality of the proposed algorithm in large-scale coordinate conversion, the experiment used a spherical target and a robotic arm-driven 3D scanner as the measurement tool and a standard rod as the measurement object. A standard sphere fixed the standard rod fitting at both ends of the aluminum profile, and the sphere center distance measured by the articulated arm was used as the standard value. The sphere center distance of the two ends of the standard rod was obtained as 861.890 ± 0.008 mm, and the two sphere diameters were 30.007 ± 0.025 mm and 29.990 ± 0.025 mm, respectively.
The experimental procedure was as follows: (1) The positions of the two sets of targets were calibrated with the articulated arm before the measurement; the target positions are shown in the boxed parts in Figure 8a, and their measurement data are shown in Table 5. are shown in the boxed parts in Figure 8a, and their measurement data are shown in Table  5.
(a) (b)    (2) The standard rod fitting was placed on the horizontal surface of the adjacent target and fixed. Standard rod sphere 1 and target 1 and standard rod sphere 2 and target 2 were each scanned by operating the 3D scanner driven by the robotic arm, as shown in the square boxed area in Figure 8b. The improved RANSAC algorithm was used to automatically detect the target sphere point cloud and standard rod sphere point cloud in the point cloud data and fit them to obtain each sphere parameter. The measured data are shown in Table 6.  (4) The rotation translation matrix of the point cloud data of targets 1 and 2 derived from step (3) converted and unified the two parts of the point cloud data into the joint arm coordinate system. The unified point cloud data are shown in Table 7, and the unified effect is shown in Figure 9.
(4) The rotation translation matrix of the point cloud data of targets 1 and 2 derived from step (3) converted and unified the two parts of the point cloud data into the joint arm coordinate system. The unified point cloud data are shown in Table 7, and the unified effect is shown in Figure 9.  (5) As shown in Table 7, the spherical surface was detected by the improved RAN-SAC algorithm, and the length of the sphere distance between the two ends of the standard rod obtained by coordinate unification is 861.865 mm. The experiment was repeated ten times with the mobile robot, and the measured value of the joint contact arm was used as the real value of the sphere distance. The single measurement result was compared with the real value, and the experimental results and data are shown in Table 8.  (5) As shown in Table 7, the spherical surface was detected by the improved RANSAC algorithm, and the length of the sphere distance between the two ends of the standard rod obtained by coordinate unification is 861.865 mm. The experiment was repeated ten times with the mobile robot, and the measured value of the joint contact arm was used as the real value of the sphere distance. The single measurement result was compared with the real value, and the experimental results and data are shown in Table 8. After the point cloud data coordinates were unified, the sphere distance data between the two ends of the standard rod were obtained, as shown in Table 8. The maximum deviation was 0.097 mm, the minimum deviation was 0.018 mm, and the average was 861.876 mm. The standard deviation was 0.0481 mm, and the standard uncertainty of the measurement mean was 0. 01521 mm. With degrees of freedom v = 9 and confidence probability p = 95%, querying the t-distribution table yielded k = 2.821, so the mean extended uncertainty U = 0.045 mm. Then, the measurement result of the ball center distance after coordinate unification was 861.876 ± 0.045 mm. The results show the practicality of the proposed algorithm in large-scale coordinate unification.
According to the above experiments, the PC-RANSAC algorithm is better than the traditional algorithm and 3D Hough algorithm in terms of detection accuracy and speed.
The PC-RANSAC algorithm uses the point cloud principal curvature to constrain the selection of sample points. The efficiency of the traditional RANSAC algorithm is improved, so the algorithm running time can be shortened. The PC-RANSAC algorithm also uses the total least squares algorithm to optimize the interior point set of the current optimal sphere obtained by fitting. It can reduce the influence of the coefficient matrix and observation vector error of the point cloud data on the sphere fitting result so that it can improve the accuracy of fitting sphere parameters.

Conclusions
This paper proposes a novel method to automatically detect sphere targets in point clouds and improve the accuracy of estimating sphere parameters. The main contributions and novelty of this paper are as follows: (1) We propose an improved RANSAC point cloud spherical target detection and parameter estimation method based on principal curvature constraint. The method applies to the automatic extraction of spherical targets when the coordinates of large-scale combined measurements are unified. The algorithm improves the iteration efficiency by constraining the sample point quality through the principal curvature. Considering the errors in both the coefficient matrix and observation matrix when fitting the point cloud data, the method uses the total least squares algorithm to optimally estimate the sphere parameters.
(2) Experimental results show that this method can automatically detect spherical objects in point clouds. The experimental results show that the proposed method has better detection accuracy and detection speed than the traditional RANSAC algorithm. The method was also applied to the coordinate unification of large-scale combined measurements. The practicability of the proposed algorithm is proved.