Next Article in Journal
Area-Efficient Mixed-Signal Time-to-Digital Converter Integration for Time-Resolved Photon Counting
Previous Article in Journal
DRA-UNet for Coal Mining Ground Surface Crack Delineation with UAV High-Resolution Images
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Target Fitting Method for Spherical Point Clouds Based on Projection Filtering and K-Means Clustered Voxelization

1
Key Laboratory of In-Situ Metrology, Ministry of Education, China Jiliang University, Hangzhou 310018, China
2
National Institute of Metrology, Beijing 102200, China
*
Author to whom correspondence should be addressed.
Submission received: 27 July 2024 / Revised: 30 August 2024 / Accepted: 3 September 2024 / Published: 4 September 2024
(This article belongs to the Section Sensing and Imaging)

Abstract

:
Industrial computed tomography (CT) is widely used in the measurement field owing to its advantages such as non-contact and high precision. To obtain accurate size parameters, fitting parameters can be obtained rapidly by processing volume data in the form of point clouds. However, due to factors such as artifacts in the CT reconstruction process, many abnormal interference points exist in the point clouds obtained after segmentation. The classic least squares algorithm is easily affected by these points, resulting in significant deviation of the solution of linear equations from the normal value and poor robustness, while the random sample consensus (RANSAC) approach has insufficient fitting accuracy within a limited timeframe and the number of iterations. To address these shortcomings, we propose a spherical point cloud fitting algorithm based on projection filtering and K-Means clustering (PK-RANSAC), which strategically integrates and enhances these two methods to achieve excellent accuracy and robustness. The proposed method first uses RANSAC for rough parameter estimation, then corrects the deviation of the spherical center coordinates through two-dimensional projection, and finally obtains the spherical center point set by sampling and performing K-Means clustering. The largest cluster is weighted to obtain accurate fitting parameters. We conducted a comparative experiment using a three-dimensional ball-plate standard. The sphere center fitting deviation of PK-RANSAC was 1.91 μm, which is significantly better than RANSAC’s value of 25.41 μm. The experimental results demonstrate that PK-RANSAC has higher accuracy and stronger robustness for fitting geometric parameters.

1. Introduction

Computed tomography (CT), derived from X-ray imaging technology, emerged in the 1970s. CT is an imaging technology that uses high-energy rays to penetrate objects to obtain projections and reconstruct multi-angle projections, using various algorithms to obtain object tomographic information [1]. CT has the advantages of high spatial resolution and easy visualization and plays a significant role in the medical field. From the late 1970s to the 1990s, with the rapid development of digital image processing technology and microcomputer systems, CT technology has expanded from the medical field to industrial fields such as non-destructive testing, reverse engineering, and material organization analysis, has been widely used in agriculture, forestry, and geophysics [2], and remains a popular research topic.
Especially in the field of industrial measurement, CT has developed rapidly, owing to its non-contact and penetrable measurement characteristics, avoiding contact deformation in three-dimensional coordinate measuring machines [3] and enabling the measurement of the internal information of objects [4]. Spherical objects represent an important type of object in CT measurement as they are often used to construct ball-plate standards to trace and calibrate industrial CT instruments, as well as in point cloud registration and other tasks. The spherical radius and spherical center coordinates are key measurement parameters, and the measurement process of CT for spherical objects is relatively intuitive. A spherical object can be placed at the rotation center of the CT turntable to obtain projection data. After processing with a three-dimensional reconstruction algorithm and gridding algorithm, the point cloud data of the spherical object can be obtained. Then, point cloud data processing can be performed to obtain measurement parameters such as spherical coordinates and radius. Researchers have proposed a variety of fitting methods for point cloud targets, which can largely be divided into two categories, namely, the least squares (LS) and numerical optimization (NO) methods [5].
LS is a mathematical optimization modeling method that searches for the best function match for given data by minimizing the sum of squared errors to achieve optimal parameter estimation. In 2005, Reshetyuk [6] used the definition formula of a sphere in three-dimensional space combined with the LS method to construct a linear equation system and obtained fitting parameters by solving this equation system. Subsequently, Lu [7] applied the total LS (TLS) algorithm to spherical point cloud fitting. In addition to minimizing the sum of the perpendicular distances from the point to the surface of the sphere, the TLS algorithm also attempts to minimize the sum of the squared residuals of each point. Le [8] used the truncated LS method to solve the robustness problem of data fitting. The truncated LS method introduces a truncation function to handle outliers, thereby improving the robustness of fitting. In 2015, Bektas [9] used the orthogonal distance LS method to fit an ellipsoid, accounting for the actual distance from the sample point to the fitting surface, rather than simply summing the squared errors of all points. Subsequently, Liu [10] proposed an algorithm combining nonlinear LS (NLS) and AD-random sample consensus (RANSAC) to detect spherical targets and achieve rapid fitting of such targets in mobile terrestrial laser scanning point cloud data. Wu [11] combined RANSAC with the LS method and proposed PC-RANSAC, which first calculates the principal curvature of point cloud data to implement a principal curvature constraint on random sampling points, and then uses the LS method to estimate geometric parameters. Tao [12] proposed a constrained weighted LS algorithm to search for the best plane to achieve iterative close point registration, diversifying the application of fitting methods in the field of point cloud registration. Fei [13] proposed a five-parameter constrained LS method for small-angle spherical surface fragments. In this method, even if the segment angle approaches 1°, a certain degree of accuracy is guaranteed. In recent research, Li [14] proposed an adaptive cylindrical fitting algorithm based on Robust Principal Component Analysis (RPCA). This algorithm was experimentally validated for its effectiveness and robustness across various datasets, demonstrating superior performance in handling noisy data. Zong [15] introduced a three-dimensional line fitting algorithm based on recursive weighted LS, aimed at significantly reducing the impact of boundary noise on the fitting results. Meanwhile, Zheng [16] developed a point cloud data processing method based on iterative residual fitting. This method first performs LS fitting on all points to calculate the residual values after the initial fitting, and then selects the points with residuals below a specified threshold to form a new point cloud. Subsequently, the remaining point cloud undergoes a second LS fitting, and the residual values from this second fitting are calculated. This process is repeated until the conditions for terminating the iteration are met, thereby achieving precise processing of the point cloud data. In short, the goal of the LS method and its variants is to minimize the error between model prediction values and observation values to obtain a more accurate geometric parameter solution.
The NO approach aims to maximize or minimize a specific evaluation criterion by identifying optimal model parameters [17]. Many estimation algorithms can be used to solve the spherical target fitting (STF) problem. Based on whether there are feature constraints in the estimation algorithm, NO approaches can be divided into two categories: ordinary NO and feature-constrained NO [5]. Three-dimensional point cloud models typically contain a large amount of point information, and performing three-dimensional Hough transformation consumes significant computing resources and time. Additionally, owing to the sensitivity of the Hough transform to noise and poor robustness [18,19], it is not widely used in three-dimensional point cloud fitting. In 2007, Schnabel [20] used RANSAC to detect the shapes of unorganized point clouds. Specifically, RANSAC was used to derive a geometric model by sampling within a set number of iterations and using a predefined threshold to judge whether points meet certain requirements to extract an optimal model [21,22]. Subsequently, Schnabel [23,24] used the MELSAC and MSAC algorithms to detect point clouds of various shapes. MSAC is a model based on M-estimation that aims to obtain the best fit in each iteration, whereas MLESAC is based on maximum likelihood estimation. Kang [25] used threshold-independent Bayesian sampling (BAYSAC) to implement plane detection. Specifically, they used point cloud downsampling to retain feature boundaries and BAYSAC to fit planes [26,27]. Shi [28] proposed a limited random search algorithm based on point cloud data and the geometric features of spherical targets. Using parameter estimation, this method realizes SFT from a probabilistic statistical perspective. Additionally, Shi [29] proposed an adaptive grid search algorithm that fully leverages the geometric features of spherical targets and obtains the best fitting parameters through a limited number of iterative optimizations. Bin [30] proposed a nonlinear Gauss–Helmert (NGH) model to describe the mathematical model of point cloud formation and then proposed a novel point cloud fitting method based on the robust NGH model. Unlike previous approaches, this fitting method accounts for all random errors in various linear and nonlinear fitting problems, which can effectively reduce the influence of interference points. Shu [31] proposed an improved RANSAC algorithm that integrates Newton’s iterative method for precise cylindrical fitting of rebar and corrugated pipes. This method enhances the convergence speed and fitting accuracy by introducing adaptive thresholds and constraints on the minimum number of inliers. Zhang [32] developed a curvature consistency sphere detection (CCSD) algorithm for sphere recognition in light detection and ranging (LiDAR) point clouds. The CCSD employs RANSAC for sphere fitting during the final detection stage. It also introduces a mixed voting mechanism to calculate the observation error of candidate spheres based on curvature consistency, inlier support rate, and size deviation. This improves the accuracy of sphere fitting. Singh [33] utilized an enhanced progressive sample consensus (PROSAC) algorithm for plane fitting of point cloud data to assess terrain complexity. PROSAC is an improved version of RANSAC that enhances the efficiency of the algorithm by incorporating prior knowledge to guide the sampling process. Furthermore, Li [34] proposed a method for extracting pavement cracks based on three-dimensional laser point clouds. This method combines the M-estimator sample consensus (MSAC) algorithm with the K-nearest neighbor (KNN) algorithm. Initially, the MSAC algorithm fits the preprocessed point cloud to a plane. Then, based on the characteristic that crack points are primarily located below the pavement, it separates the crack point cloud from the pavement texture points. In summary, the main goal of the NO approach is to vary the sampling method or searching mode within a limited number of iterations to obtain an optimal solution.
Additionally, Simon Burkhard [35] proposed a method for fitting the projected centers of spheres in cone beam X-ray imaging. To model the edge of the sphere with sub-pixel resolution, the tangent circle of the sphere was decomposed three times. Compared with elliptical target fitting, this method reduces the number of unknown variables and has advantages for numerical calculation. Hong [36] combined the random forest model with machine learning, and this method demonstrated excellent performance in terms of fitting accuracy and generalization capability.
In summary, LS and its variants and NO algorithms are all effective ways to fit point clouds. However, these algorithms still have shortcomings in terms of further improving accuracy and robustness. LS obtains fitting parameters by solving a system of linear equations. When abnormal points are present, the solution obtained will deviate significantly from the actual value. Additionally, when an equation takes the x and y coordinates of point cloud data as independent variables, it only considers the error of the observation vector (i.e., vector z), implying that it ignores the error in the x and y coordinates in the coefficient matrix. The main shortcoming of the NO approach is that some algorithms are sampled within a certain number of iterations. If a more accurate model is to be obtained, an exact threshold and a larger number of iterations are required. RANSAC is a robust and commonly used algorithm; however, owing to the randomness of sampling, it is difficult to guarantee the accuracy of results.
To overcome the limitations described above, this paper proposes a spherical point cloud fitting algorithm (PK-RANSAC) based on projection filtering and K-means clustering. We selected several existing algorithms for comparison with PK-RANSAC. Experimental results demonstrate that the proposed algorithm combines the advantages of LS and NO algorithms, can improve both robustness and accuracy, and yields better fitting parameters.

2. Materials and Methods

This section introduces the implementation process of PK-RANSAC, which is mainly divided into three steps: RANSAC rough fitting, projection filter correction, and precise determination of fitting parameters. In the RANSAC rough fitting process, preliminary fitting of the sphere parameters is performed. In the projection correction process, the correction value is obtained by considering two projections in opposite directions. In the process of accurately obtaining fitting parameters, fitting results are obtained through K-means clustering and a weighting function. The algorithm solution flow is illustrated in Figure 1.

2.1. RANSAC Rough Estimation

RANSAC is widely used for fitting geometric objects such as planes, spheres, and cylinders. Its speed and robustness represent significant advantages over the LS method. In three-dimensional space, four non-coplanar points define a sphere. The formula for defining a sphere with four points in three-dimensional space is presented in Equation (1). Random sampling is performed on point cloud data, and the four non-coplanar points selected are denoted as A ( A X , A Y , A Z ) , B ( B X , B Y , B Z ) C ( C X , C Y , C Z ) , and D ( D x , D y , D z ) . Substituting these four points into Equation (1) yields a system of linear equations.
( X S p h e r e X ) 2 + ( Y S p h e r e Y ) 2 + ( Z S p h e r e Z ) 2 = R S p h e r e 2
After solving these equations, the following related parameters D (Equation (2)), P (Equation (3)), Q (Equation (3)), and R (Equation (3)) can be obtained. Then, DX (Equation (4)), DY (Equation (5)), and DZ (Equation (6)) can be obtained based on these parameters.
D = ( A x B x ) ( A y B y ) ( A z B z ) ( C x D x ) ( C y D y ) ( C z D z ) ( B x C x ) ( B y C y ) ( B z C z )
P = 1 2 ( A x 2 B x 2 + A y 2 B y 2 + A z 2 B z 2 ) Q = 1 2 ( C x 2 D x 2 + C y 2 D y 2 + C z 2 D z 2 ) R = 1 2 ( B x 2 C x 2 + B y 2 C y 2 + B z 2 C z 2 )
D X = P ( A y B y ) ( A z B z ) Q ( C y D y ) ( C z D z ) R ( B y C y ) ( B z C z )
D Y = ( A x B x ) P ( A z B z ) ( C x D x ) Q ( C z D z ) ( B x C x ) R ( B z C z )
D Z = ( A x B x ) ( A y B y ) P ( C x D x ) ( C y D y ) Q ( B x C x ) ( B y C y ) R
According to Cramer’s rule, the sphere radius R and the three coordinate parameters X S p h e r e , Y S p h e r e , and Z S p h e r e are obtained as shown in Equation (7).
X S p h e r e = D X / D Y S p h e r e = D Y / D Z S p h e r e = D Z / D R = d i s ( C e n t r e S p h e r e , A )
The main concept of RANSAC is to determine an appropriate threshold within a limited number of iterations and use four non-coplanar points to obtain the parameters of the sphere model as described earlier. Then, it is determined whether each point meets the threshold requirements. If so, a point is called an inlier; otherwise, it is called an outlier. The sphere model with the most inliers is identified as the optimal model within the maximum number of iterations, and a filtering algorithm is used to remove abnormal points. The main goal of the first step is to obtain preliminary fitting parameters.

2.2. Projection Correction

The center of the sphere in the rough fitting results deviates from the real center of the sphere in space. Let the rough estimated center of the sphere be S b e s t and the actual center of the sphere be S c o r r e c t . Two coordinate systems that can be translated and overlapped are established, with the two centers of the sphere acting as the origins. The corresponding spatial distribution is presented in Figure 2. The black system is the XYZ coordinate system of the actual center of the sphere S b e s t while the blue system is the XYZ coordinate system of S c o r r e c t . For the coordinate system containing S b e s t , a plane composed of any two coordinate axes is used as the interface, and projections are performed in two directions to obtain two two-dimensional circular point clouds.
The spatial positions of the two two-dimensional projected circles are shown in Figure 3a. The red circle, circle2, is the projection formed by the point whose Z-axis value is less than the actual Z-axis value. The red arrow represents the upward projection process. The same is true for the blue circle, circle1. The upper part of the projection can be recorded as circle1 with a radius of R b e s t , while the lower part can be recorded as circle2 with a radius of R c o r r e c t . Figure 3b presents a side view of Figure 3a, which more clearly shows the geometric relationships. The correction value Z in the Z-axis direction can be obtained based on the geometric relationship in Equation (8).
Δ Z = a b s ( R b e s t 2 R c o r r e c t 2 )
To obtain the circumscribed contour points of the two projected two-dimensional circles, we first select the point furthest from the rough estimate as the outer contour start point, which is denoted as A 1 . The furthest point from the center of the rough estimate sphere S b e s t must be on the outer contour. The vector pointing to the point A 1 from the center of the sphere is denoted as I S 1 . In these circular point cloud data, we consider the initial direction to each point to be a vector I 12 and determine the point A 2 that minimizes the angle between the vectors I S 1 and I 12 . We denote this angle as θ 12 , which can be derived from the angle between the two vectors, as shown in Equation (9).
θ 12 = a c o s ( I S 1 I 12 / I S 1 I 12 )
The outer contour points are then searched in addition to A 2 to find A 1 , A 2 , A 2 …, A i . Using these points to fit a circle, we can derive the fitting radius values R b e s t and R c o r r e c t of the two-dimensional point cloud. This process is illustrated in Figure 4.
The correction values X and Y in the X-axis and Y-axis directions can be obtained similarly. Then, the correction value c o r r e c t for all rough fitting sphere center coordinates can be obtained as shown in Equation (10).
Δ c o r r e c t = Δ X ,   Δ Y ,   Δ Z
The coordinates of the center of the sphere after the rough fitting of RANSAC are added to the correction value c o r r e c t to obtain the corrected coordinates of the center of the sphere after fitting and are recorded as S O . The radius value is calculated using the LS algorithm based on the obtained correction value. The distance from each point in the spherical point cloud to the corrected center of the sphere S O is then calculated, and the distance is subtracted from the radius to obtain the residual. If the absolute value of the residual is too large for a given point, then the point is considered an interference point and removed. The main purpose of this step is to correct the coordinates and radius of the center of the sphere after the rough fitting to minimize the deviation between the center of the sphere fitted by RANSAC in the first step and the actual center of the sphere. The implementation of this process is presented in Algorithm 1.
Algorithm 1 Projection correction algorithm
Input: T: percentage of the number of rejected point clouds; P i n : input point cloud;
Output: fitted parameters after spherical center correction; R c o r r e c t : Radius of the corrected model;
S p h e r e c o r r e c t : coordinates of the corrected model; p o u t : Point cloud after removal of interference points;
1: set T ,   P i n   put in;
2: for    i = 0 ;   i   < 3 ;   i   + +    do
3:  the point cloud data is projected on the plane to get two circles,   c i r c l e 1 , c i r c l e   2 ;
4:  calculate the angle to get the outer contour, denoted by the set A i ;
5:  calculate the radii of the upper and lower circular projections, denoted   R 1   , R 2 ;
6:  calculate the correction in the direction perpendicular to the plane;
7: end for
8: calculate R c o r r e c t ;
9: output the best model, R c o r r e c t ,   S p h e r e c o r r e c t ,   P c o r r e c t   ;

2.3. Accurate Fitting of Parameters

The coordinates of the sphere center after projection filtering are closer to the actual value than the rough fitting parameters of RANSAC. To obtain fitting parameters accurately, we first set the minimum voxel value d V o x e l . Because there are too many options for selecting samples from the point cloud, recursive RANSAC is applied to sample the point cloud model after removing interference points to obtain the fitting sphere center point set. Recursive RANSAC introduces the repeated use of random sampling, as well as the continuous updating and resampling of the internal point set, making the model fitting more robust.
After sampling, owing to the location of the points and the existence of interference points, multiple clusters deviating from the actual center of the sphere were formed, so the K-means clustering algorithm was applied to find the largest cluster. The K-means clustering algorithm minimizes the objective function J in Equation (11). The specific calculation process is defined in Equations (12) and (13).
J = n = 1 N k = 1 K r n k X n μ k 2
r n k = 1 if   k = arg min j X n μ j 2 0 otherwise
u k = n r n k X n n r n k
The concept of K-means clustering is to select K samples from a set of clustered samples, and then traverse all samples and calculate the distance between each sample and the K samples. The sample is classified into the category with the smallest distance. In this manner, all samples are assigned to their respective categories. The centroids of the samples in the K categories are then recalculated and the algorithm returns to the first step to continue iteration, repeating the above steps until the centroids of the samples in the K categories no longer move or move very little. Figure 5 illustrates the implementation process of this clustering algorithm.
The distribution of the point cloud in the largest cluster is still dense in the center. Therefore, we process the largest cluster. Specifically, we predefine the parameter d V o x e l , divide the coordinate value of each point by the minimum voxel value and round it, multiply it by the parameter value, and then add one to the value of the voxel to which the point belongs. A conceptual visualization of this process is presented in Figure 6. The closer the voxel value is to the actual center of the sphere, the larger the voxel value and the more voxels have non-zero values. Therefore, we select the voxel with the largest value as the maximum-intensity voxel, set the distance weight W in Equation (16), and weight the voxel according to the distance weighting function. The parameter d represents the Euclidean distance from each point to the center of the maximum-intensity voxel. In this manner, both the weight of the dense area and the influence of the coordinates of the surrounding sparse points are considered.
a = 5 3 2 σ 2 76 0.25
b = 0.5 5 3 σ 2 76 0.25
W = b + R 2 ( σ a ) 2 i f   d < 5 3 d V o x e l ( σ 38 ) 0 e l s e
In the formulas above, the parameter σ is used to control the attenuation rate. Combined with the information in Figure 7, one can see that the larger the value of σ , the faster the weight decays. After the corrected sphere center coordinate value is obtained according to the distance-weighted formula, the sphere radius is obtained as shown in Figure 8. The steps are to set the interval width d and start from the point closest to the fitting sphere center coordinate and move outward from the sphere until the number of points in the interval is maximized, and the distance is recorded as r 1 . When the number of point clouds in the red interval in the figure decreases, the distance is recorded as r 2 . The radius r calculation formula is defined in Equation (17). The purpose of this step is to obtain accurate fitting parameters. The corresponding pseudo-code is presented in Algorithm 2.
r = r 1 + r 2 2 + d
Algorithm 2 Accurate fitting of parameters
Input:  P i n : input point cloud; σ : attenuation factor; k: number of K-Means clustering clusters;
d V o e x l : minimum voxel resolution set;
Output: accurately fitting the parameters of the ball; R c o r r e c t : precisely fitted radius;
S p h e r e c o r r e c t : precisely fitted coordinates;
1: set   P i n   put in;
2: RRANSAC sampling grouping to obtain the set of fitted spherical center points;
3: K-Means clustering to find maximal clusters;
4: somatization of the largest clusters based on d V o e x l ;
5. correction with distance weighting function;
6: output the best model, R c o r r e c t ,   S p h e r e c o r r e c t ;

3. Results

This section verifies the feasibility of our method by combining random spherical point clouds generated through simulation experiments with two CT datasets to derive the two important parameters of sphere fitting, namely the sphere center coordinates and sphere radius. For the sphere center coordinate fitting, we initially conducted simulation experiments and verified the results using CT cylinder-ball reference object experiments. The sphere radius fitting was verified through simulation experiments and CT ball-plate standard experiments. During our experiments, the fitting data from algorithms such as RANSAC and PC-RANSAC were measured at the same time to facilitate data comparison.

3.1. Simulation Data Experiment

We first generated a spherical point cloud through simulation and then used the point cloud data to perform geometric parameter fitting experiments. The spherical point cloud consisted of 25,000 points, of which 2000 were interference points. The deviation between the Euclidean distance from other points and the center of the sphere, and the set radius was within 0.005%. The preset center coordinates and the positions of all points were randomly generated, and the deviation from the points to the preset sphere surface followed a normal distribution, as shown in Figure 9. The blue curve in the figure is a normal distribution curve, and the orange bars form a distribution histogram of the deviation.
Figure 10 presents the changes in the point cloud model before and after RANSAC fitting using statistical outlier removal filtering, where one can see that the number of outliers was reduced.
Through the projection filtering operation in the second step, the sphere center correction distance was obtained. Then, the distance residual from each point to the corrected sphere center was calculated, and 0.27% of the points were eliminated according to the residual size and three-sigma rule. The value of 0.27% was obtained according to the normal distribution. After sampling fitting, the fitted sphere center point set was obtained. Through K-means clustering, the fitted sphere center points were improved and divided into five categories. Figure 11 presents the clustering results, where the blue cluster is the largest cluster identified through clustering.
In the simulation experiments, the true value was the set value of the simulated data, and the average value of multiple measurements was calculated as the final value. Comparisons of the fitted value and true value after each step of PK-RANSAC are presented in Table 1. Step 1, Step 2, and Step 3 in the table correspond to the three steps of PK-RANSAC. Each step yields improvements compared with the previous step and PK-RANSAC improves upon RANSAC, yielding values closer to the true value. Table 2 presents the reduction in deviation in each step.
To evaluate the repeatability and feasibility of the PK-RANSAC fitting algorithm, 20 spherical point clouds were fitted by changing the coordinates of the spherical center, radius, and random normal distribution of spherical surface points. The deviation between the Euclidean distances of all points and the center of the sphere, and the set radius was within 0.005%. The value of the sphere radius was randomly set to 10 or 20 and the fitting experimental results are presented in Table 3. Because the deviation was within 0.005%, for the spherical point cloud with a preset radius of 10, the deviations of the two geometric parameters (fitting radius and coordinate values) should be less than 0.05. Similarly, for a radius of 20, the deviations should be less than 0.1. As shown in Table 3, the fitting parameters obtained by the RANSAC algorithm deviate too far from the true value, whereas the fitting of the PK-RANSAC algorithm is significantly improved.

3.2. Actual Measurement of CT Data Experiment

The true values of the geometric parameters for the real CT experiment were measured using a high-precision CMM F25 instrument from the China Academy of Metrology and Science, which has a measurement accuracy of 0.25 μm. The actual raw projection data were obtained using a high-precision X-ray tomography machine. The principle of CT measurement is based on the different attenuation coefficients of materials for X-rays, and images are reconstructed using multiple projection images of X-rays passing through the detector from different angles of the object under test. The first measured CT dataset was collected from a cylinder-ball reference object, where the ball was made of a different material than the cylinder. The main purpose of this experiment was to evaluate the performance advantages and disadvantages of the PK-RANSAC fitting algorithm for determining the radius. The second CT dataset consisted of a stepped ball-plate standard, comprising a black carbon brazed dimensional sphere plate with 15 white ceramic spheres. This experiment aimed to evaluate the merits of PK-RANSAC in terms of fitting spherical coordinates by optimizing the fitting of the spherical centroid distance parameter. The stepped ball-plate standard was fixed to the instrument as shown in Figure 12. The radii and coordinates of the spheres, as well as the sphero-centric distances between spheres, were obtained by fitting the geometrical parameters of the 15 spheres.
For the cylinder-ball reference object experiment, the projection data were reconstructed, and the reconstructed volume data slices are presented in Figure 13. All voxel values of the reconstructed volume data are in the grayscale range of 0~65,535. Figure 14 presents a logarithmic intensity histogram of the volume data voxels. The horizontal axis represents the grayscale value, and the vertical axis is the logarithm of the number of voxels corresponding to the grayscale value. The first peak area represents the grayscale value of the cylinder, while the second represents the grayscale value of the sphere. Based on ios50, threshold segmentation was performed to derive the median of the grayscale values corresponding to the two peaks and use this value as the segmentation threshold. The mesh model and point cloud were obtained using the gridding algorithm. Because the adhesion of the lower half of the sphere to the cylinder affects the fitting process of the sphere, the cropbox filter was used to remove the adhesion area. The experimental results are presented in Table 4, according to which the PK-RANSAC fitting value is closer to the true value compared to the RANSAC fitting value.
To verify the performance of PK-RANSAC further, the deviation from each point to the surface of the fitting sphere was calculated after fitting. The formula for the sphere center deviation is defined in Equation (18), and a distribution histogram of the deviation and percentage accumulation diagram of the deviation are presented in Figure 15. Figure 15a reveals that the distribution of the deviation is somewhat similar to the normal distribution in shape, and the smaller the absolute value of the deviation, the more points are distributed. In Figure 15b, one can see that points with a deviation within 10 μm account for 90.204% of all points.
Δ D = a b s ( R f i t R r e a l )
Mean squared error (MSE) refers to the average value of the sum of squared errors. This evaluation index is sensitive to outliers, and considering square values further increases the impact of errors. The MSE calculation formula for a single cylinder-ball reference object point cloud is defined in Equation (19), and an MSE value comparison between the two methods is presented in Table 5. One can see that the MSE value of PK-RANSAC is significantly smaller than that of RANSAC.
d i = s q r t ( ( x i x r e a l ) 2 + ( y i y r e a l ) 2 + ( z i z r e a l ) 2 ) r r e a l M S E = 1 n i = 1 n ( d i ) 2
The test object in the second CT experiment was a three-layer stepped ball-plate standard with a total of 15 spheres, and we measured 30 sphere center distances. Figure 16 presents the spatial distribution of the 15 spheres on the stepped standard. The lines in the figure represent the 30 measured sphere center distances. The measured parameters of the 30 sphere distances were divided into six values according to their magnitude. Each value had five directions, and different colors represented different values. The experimental results are presented in Table 6, where sphere pairs are represented by numerical labels connected by underscores. We used RANSAC, PC-RANSAC, and PK-RANSAC to fit the 30 sphere center distances and compare them with the true values. PK-RANSAC significantly outperformed RANSAC. The average deviation of RANSAC was 25.41 μm, that of PC-RANSAC was 11.20 μm, and that of PK-RANSAC was 1.91 μm.

4. Discussion

In this section, we consider five different algorithms to present a comparative analysis based on the three experiments described in the previous section. These algorithms include the LS method, RANSAC, improved RANSAC (PC-RANSAC), TLS, and the proposed PK-RANSAC. The LS algorithm minimizes total error by constructing a linear equation system to obtain fitting parameters. Although this approach is simple and easy to implement, it is easily affected by outliers and noise, resulting in poor fitting results. RANSAC is an efficient iterative method that can effectively fit model parameters under conditions with more noise and outliers. PC-RANSAC combines the advantages of LS and RANSAC to improve fitting accuracy further. TLS introduces a truncation function based on LS and enhances robustness by effectively handling outliers.
The fitting results for the simulation data are presented in Figure 17. To show the performance differences between different algorithms clearly, the deviation values are presented in the form of logarithmic absolute values as the ordinate. This visualization amplifies differences in deviation, highlighting slight differences in algorithm performance. The larger the value of the ordinate, the closer it is to the set true value. PK-RANSAC provides significant advantages for fitting the two key parameters of the sphere center coordinates and sphere radius. Specifically, for both parameters, the deviation values of PK-RANSAC are significantly smaller than those of the other four methods, demonstrating that it has greater stability and accuracy when handling complex point cloud data. In contrast, although TLS and PC-RANSAC exhibit obvious improvements in terms of handling outliers and noise compared with LS and RANSAC, PK-RANSAC still provides superior fitting accuracy. This demonstrates that PK-RANSAC improves overall performance by combining the advantages of RANSAC and projection filtering, providing outstanding performance in complex environments. Overall, these results indicate that the application of PK-RANSAC to industrial CT measurement has great potential and can provide a more reliable solution for spherical point cloud fitting.
In the CT cylinder-ball reference object experiment, we considered the same five methods to conduct a comparative analysis of the parameter of sphere radius. Figure 18 presents the deviations of the five point cloud algorithms when fitting the radius compared with the true value. The ordinate represents the deviation between the fitting radius and the true value. The smaller the value, the closer the fitting result is to the true value, indicating better performance. There are inevitable errors in the reconstruction process of CT, and certain deviations are introduced in the conversion from reconstructed volume data to a mesh model. However, the mesh model used by all fitting algorithms is the same, so each method has the same inherent deviation between the fitted radius and true value. This deviation can be considered a constant, so the closer the fitting result is to the true value, the better the performance of the algorithm. PK-RANSAC provides the best radius fitting performance with the smallest deviation, demonstrating excellent fitting accuracy and robustness. In contrast, the LS method is easily affected by outliers, and the fitting results contain large deviations, demonstrating the disadvantage of insufficient robustness. Additionally, although RANSAC, PC-RANSAC, and TLS improved fitting accuracy to a certain extent, they still failed to surpass the superior performance of PK-RANSAC. These results demonstrate that PK-RANSAC can effectively reduce the deviation introduced by noise and outliers when processing complex CT cylinder-ball reference object data, yielding a fitting radius close to the true value. This performance improvement is of great significance for the precision of CT measurement, especially in industrial applications that require high-precision fitting. Based on the results of our comparative analysis, it can be concluded that PK-RANSAC provides significant advantages for sphere radius fitting and is superior to the other four methods in terms of fitting accuracy and robustness, demonstrating that PK-RANSAC is not only advanced in theory but also exhibits good applicability and reliability in practical applications.
For the CT ball-plate standard experiment, we selected three algorithms, namely, RANSAC, PC-RANSAC, and PK-RANSAC, for comparative analysis to evaluate their performance in terms of fitting spherical center coordinates. Figure 19 presents the deviations of 30 spherical center distances in the second group of CT-measured data. The numerical data are summarized in Table 6. The horizontal axis represents the spherical center distances, while the vertical axis represents the deviation values. The three lines of different colors in the figure represent the fitting means of the three methods. Owing to its randomness and instability, RANSAC leads to large deviations between the fitting results and true values, indicating that it does not perform well when processing CT data. This instability of RANSAC may lead to a significant decrease in fitting accuracy on some complex point cloud data, negatively affecting the accuracy of geometric parameters. Although PC-RANSAC improves the robustness of fitting to a certain extent, it is still inferior to PK-RANSAC in terms of deviation control. PK-RANSAC exhibits excellent stability and accuracy for fitting the spherical center distances, and its fitting deviations are all within 5 μm, with an average deviation of only 1.91 μm. This demonstrates that PK-RANSAC not only has superior robustness for the processing of noise and outliers, but also has significant advantages in terms of the fitting accuracy of geometric parameters. These results further demonstrate the application potential of PK-RANSAC in industrial CT measurement and the provision of reliable technical support for high-precision measurement needs.
From our discussion of the three experiments above, several important conclusions can be drawn. First, although the LS method provides a simple and direct fitting method in theory, its robustness is poor and it is easily disturbed by outliers, which significantly reduces the reliability of the fitting results. Because the LS method does not effectively handle noise and outliers, it exhibits obvious deficiencies in complex datasets. Second, although RANSAC improves noise resistance to a certain extent through iterative processing, its inherent randomness produces results with greater uncertainty, especially for large-scale point cloud data, rendering it difficult to ensure the repeatability of results. This lack of stability makes RANSAC inappropriate for certain practical applications, especially in scenarios with high precision requirements. In contrast, PK-RANSAC demonstrates excellent performance. Its innovation lies in the strategic integration and enhancement of two methods, which improves robustness and repeatability. The workflow of PK-RANSAC is divided into three steps, and this multi-stage processing approach not only enhances the robustness of the algorithm but also effectively reduces the uncertainty of calculations. Consequently, PK-RANSAC achieves a high degree of fitting accuracy and stability in the presence of noise and outliers, allowing it to provide more reliable and accurate results on complex industrial CT measurement tasks.
In summary, PK-RANSAC not only overcomes the limitations of the LS method and RANSAC in terms of processing complex point cloud data, but also ensures the high accuracy and stability of fitting results through a multi-step optimization process. This makes PK-RANSAC a superior algorithm with broad application prospects in point cloud fitting, which can provide strong technical support for high-precision measurement.

5. Conclusions

In order to better address the issue of spherical point cloud target fitting (STF), we propose an improved PK-RANSAC based on the RANSAC. This new approach significantly outperforms RANSAC in terms of fitting accuracy and also surpasses the robustness of least squares methods and their variants. Through validation with simulated data, PK-RANSAC demonstrates exceptional feasibility and advantages. In experimental tests, the cylinder-ball reference object data experiments confirm the high precision of PK-RANSAC in fitting spherical radii, while experiments with stepped ball-plate standard data showcase its outstanding performance in fitting sphere center coordinates. The results indicate that the integration of projection filtering and K-means clustering methods achieves remarkable accuracy and robustness, offering significant advantages over traditional algorithms. However, the algorithm currently requires a longer processing time, and improving its efficiency will be a focus for future efforts. PK-RANSAC is not only applicable for enhancing fitting accuracy in the field of CT imaging, but also for point cloud registration. This algorithm holds broad application prospects in industrial inspection, reverse engineering, and materials science.

Author Contributions

Conceptualization, Z.W. and J.H.; methodology, Z.W. and J.H.; validation, Z.W. and J.H.; formal analysis, Z.W.; investigation, J.C. and L.P.; resources, L.P. and Y.S.; data curation, Z.W. and J.C.; writing—original draft preparation, Z.W.; writing—review and editing, J.H.; supervision, J.H. and Y.S.; project administration J.H. and J.C. All authors have read and agreed to the published version of the manuscript.

Funding

Co-sponsored by the National Key R&D Program of China under grant No. 2022YFF0706400 and the Key Laboratory of In-situ Metrology of the Ministry of Education (China Jiliang University).

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

Data will be made available upon reasonable request.

Acknowledgments

We would like to thank Guo Xin from Nanjing Institute of Measurement and Testing Technology for his help in the experiment.

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. Daly, B.D.T.; Faling, J.L.; Pugatch, R.D.; Jung-Legg, Y.; Gale, E.M.; Bite, G.; Snider, G.L.; Rheinlander, H.F. Computed tomography. J. Thorac. Cardiovasc. Surg. 1984, 88, 486–494. [Google Scholar] [CrossRef] [PubMed]
  2. Hsieh, J.; Flohr, T. Computed tomography recent history and future perspectives. J. Med. Imaging 2021, 8, 052109. [Google Scholar] [CrossRef]
  3. Meli, F.; Küng, A. AFM investigation on surface damage caused by mechanical probing with small ruby spheres. Meas. Sci. Technol. 2007, 18, 496–502. [Google Scholar] [CrossRef]
  4. Ebrahim, M.A.-B. 3D laser scanners’ techniques overview. Int. J. Sci. Res. 2015, 4, 323–331. [Google Scholar]
  5. Shi, Y.; Zhao, G.; Hu, C.; Wang, M.; Shi, M.; Ma, H. Comparative study of the representative algorithms for fitting spherical target based on point cloud. IEEE Trans. Geosci. Remote Sens. 2022, 60, 1–16. [Google Scholar] [CrossRef]
  6. Reshetyuk, Y.; Horemuž, M.; Sjöberg, L.E. Determination of the optimal diameter for spherical targets used in 3D laser scanning. Surv. Rev. 2005, 38, 243–253. [Google Scholar] [CrossRef]
  7. Lu, T.; Zhou, S.; Zhang, L.; Guan, Y. Sphere target fitting of point cloud data based on TLS. In Proceedings of the International Symposium on Spatial Analysis, Spatial-Temporal Data Modeling, and Data Mining, Wuhan, China, 15 October 2009; SPIE: Bellingham, WA, USA, 2009; p. 74922W. [Google Scholar]
  8. Le, H.; Zach, C. Robust fitting with truncated least squares: A bilevel optimization approach. In Proceedings of the 2021 International Conference on 3D Vision (3DV), London, UK, 1–3 December 2021; IEEE: Piscataway, NJ, USA, 2021; pp. 1392–1400. [Google Scholar]
  9. Bektas, S. Least squares fitting of ellipsoid using orthogonal distances. Bol. Ciênc. Geod. 2015, 21, 329–339. [Google Scholar] [CrossRef]
  10. Liu, W.I. Novel method for sphere target detection and center estimation from mobile terrestrial laser scanner data. Measurement 2019, 137, 617–623. [Google Scholar] [CrossRef]
  11. Wu, Q.; Liu, J.; Gao, C.; Wang, B.; Shen, G.; Li, Z. Improved RANSAC point cloud spherical target detection and parameter estimation method based on principal curvature constraint. Sensors 2022, 22, 5850. [Google Scholar] [CrossRef]
  12. Tao, W.; Hua, X.; Yu, K.; He, X.; Chen, X. An improved point-to-plane registration method for terrestrial laser scanning data. IEEE Access 2018, 6, 48062–48073. [Google Scholar] [CrossRef]
  13. Fei, Z.; Fu, J.; Ma, J.; He, W.; Xiao, Y. A new high-precision sphere-fitting method with small segment angles. Meas. Sci. Technol. 2020, 32, 015012. [Google Scholar] [CrossRef]
  14. Li, M.; Li, Z.; Zhang, M.; Liu, Q.; Li, M. Efficient shrub modelling based on terrestrial laser scanning (TLS) point clouds. Int. J. Remote Sens. 2024, 45, 1148–1169. [Google Scholar] [CrossRef]
  15. Zong, W.; Li, M.; Li, G.; Wang, L.; Wang, L.; Zhang, F. Toward Efficient and Complete Line Segment Extraction for Large-Scale Point Clouds via Plane Segmentation and Projection. IEEE Sens. J. 2023, 23, 7217–7232. [Google Scholar] [CrossRef]
  16. Zheng, Z.; Bian, J.; Gao, Y.; He, S.; Liu, W.; Song, T.; Liu, G. Three-dimensional defects detection of high-voltage cable joint based on iterative residual fitting. Meas. Sci. Technol. 2022, 34, 025021. [Google Scholar] [CrossRef]
  17. Yao, K.; Liu, B. Parameter estimation in uncertain differential equations. Fuzzy Optim. Decis. Mak. 2020, 19, 1–12. [Google Scholar] [CrossRef]
  18. Hulik, R.; Spanel, M.; Smrz, P.; Materna, Z. Continuous plane detection in point-cloud data based on 3D Hough transform. J. Vis. Commun. Image Represent. 2014, 25, 86–97. [Google Scholar] [CrossRef]
  19. Coggrave, C.R. Automated detection of planes in 3-D point clouds using fast Hough transforms. Opt. Eng. 2011, 50, 053609. [Google Scholar] [CrossRef]
  20. Schnabel, R.; Wahl, R.; Klein, R. Efficient RANSAC for point-cloud shape detection. Comput. Graph. Forum 2007, 26, 214–226. [Google Scholar] [CrossRef]
  21. Yang, L.; Li, Y.; Li, X.; Meng, Z.; Luo, H. Efficient plane extraction using normal estimation and RANSAC from 3D point cloud. Comput. Stand. Interfaces 2022, 82, 103608. [Google Scholar] [CrossRef]
  22. Roman-Rivera, L.-R.; Pedraza-Ortega, J.C.; Aceves-Fernandez, M.A.; Ramos-Arreguín, J.M.; Gorrostieta-Hurtado, E.; Tovar-Arriaga, S. A robust sphere detection in a realsense point cloud by using Z-score and RANSAC. Mathematics 2023, 11, 1023. [Google Scholar] [CrossRef]
  23. Schnabel, R.; Wahl, R.; Klein, R. Shape detection in point clouds. Comput. Graph. Tech. Rep. 2006, 2, 2. [Google Scholar]
  24. Nguatem, W.; Mayer, H. Modeling urban scenes from pointclouds. In Proceedings of the 2017 IEEE International Conference on Computer Vision (ICCV), Venice, Italy, 22–29 October 2017; IEEE: Piscataway, NJ, USA, 2017; pp. 3857–3866. [Google Scholar]
  25. Kang, Z.; Zhong, R.; Wu, A.; Shi, Z.; Luo, Z. An efficient planar feature fitting method using point cloud simplification and threshold-independent BaySAC. IEEE Geosci. Remote Sens. Lett. 2016, 13, 1842–1846. [Google Scholar] [CrossRef]
  26. Kang, Z. The applications of robust estimation method BaySAC in indoor point cloud processing. Geo-Spat. Inf. Sci. 2016, 19, 182–187. [Google Scholar] [CrossRef]
  27. Kang, Z.; Li, Z. Primitive fitting based on the efficient multiBaySAC algorithm. PLoS ONE 2015, 10, e0117341. [Google Scholar] [CrossRef]
  28. Shi, Y.; Zhao, G.; Wang, M.; Xu, Y.; Zhu, D. An algorithm for fitting sphere target of terrestrial LiDAR. Sensors 2021, 21, 7546. [Google Scholar] [CrossRef]
  29. Shi, Y.; Zhao, G.; Wang, M.; Xu, Y. An adaptive grid search algorithm for fitting spherical target of terrestrial LiDAR. Measurement 2022, 198, 111430. [Google Scholar] [CrossRef]
  30. Wang, B.; Zhao, Z.; Chen, Y.; Yu, J. A novel robust point cloud fitting algorithm based on nonlinear Gauss–Helmert model. IEEE Trans. Instrum. Meas. 2023, 72, 1–12. [Google Scholar] [CrossRef]
  31. Shu, J.; Zhang, X.; Li, W.; Zeng, Z.; Zhang, H.; Duan, Y. Point cloud and machine learning-based automated recognition and measurement of corrugated pipes and rebars for large precast concrete beams. Autom. Constr. 2024, 165, 105493. [Google Scholar] [CrossRef]
  32. Zhang, G.; Wu, K.; Lin, J.; Wang, T.; Liu, Y. Automatic Extrinsic Parameter Calibration for Camera-LiDAR Fusion using Spherical Target. IEEE Robot. Autom. Lett. 2024, 9, 5743–5750. [Google Scholar] [CrossRef]
  33. Singh, D.P.; Yadav, M. Suitable Landing Site Selection for Unmanned Aerial Vehicles Using Airborne Laser Scanning Point Cloud. Int. Arch. Photogramm. Remote Sens. Spat. Inf. Sci. 2024, 48, 343–348. [Google Scholar] [CrossRef]
  34. Li, R.; Chen, X.; Dong, Q.; Wang, S.; Chu, Z.; Gu, X. Point Cloud-Based Pavement Crack Extraction Using MSAC and KNN Algorithm. In Proceedings of the International Conference on Road and Airfield Pavement Technology 2023, Beijing, China, 6–8 July 2023; pp. 831–838. [Google Scholar]
  35. Burkhard, S.; Küng, A. Exact computation of projected sphere centres in cone beam x-ray projections. Meas. Sci. Technol. 2024, 35, 075008. [Google Scholar] [CrossRef]
  36. Hong, Y.; Xu, J.; Wu, C.; Pang, Y.; Zhang, S.; Chen, D.; Yang, B. Combining Multisource Data and Machine Learning Approaches for Multiscale Estimation of Forest Biomass. Forests 2023, 14, 2248. [Google Scholar] [CrossRef]
Figure 1. Overall process of the proposed algorithm (first step (the purple part): RANSAC rough fitting; second step (the blue part): projection filter correction; third step (the yellow part): accurate fitting to obtain parameters).
Figure 1. Overall process of the proposed algorithm (first step (the purple part): RANSAC rough fitting; second step (the blue part): projection filter correction; third step (the yellow part): accurate fitting to obtain parameters).
Sensors 24 05762 g001
Figure 2. Schematic of the actual S c o r r e c t and roughly estimated center of the sphere S b e s t (the blue coordinate system is the rough estimate of the center of the sphere, while the black coordinate system is the actual center of the sphere).
Figure 2. Schematic of the actual S c o r r e c t and roughly estimated center of the sphere S b e s t (the blue coordinate system is the rough estimate of the center of the sphere, while the black coordinate system is the actual center of the sphere).
Sensors 24 05762 g002
Figure 3. Process of obtaining the correction value in the Z-axis direction (part (a) is a three-dimensional space display and part (b) is a two-dimensional side-view display).
Figure 3. Process of obtaining the correction value in the Z-axis direction (part (a) is a three-dimensional space display and part (b) is a two-dimensional side-view display).
Sensors 24 05762 g003
Figure 4. Process of finding the contour points of a two-dimensional circle (the direction of the arrow indicates the direction in which the contour points are found).
Figure 4. Process of finding the contour points of a two-dimensional circle (the direction of the arrow indicates the direction in which the contour points are found).
Sensors 24 05762 g004
Figure 5. K-means clustering process.
Figure 5. K-means clustering process.
Sensors 24 05762 g005
Figure 6. Process of finding the maximum-intensity voxel.
Figure 6. Process of finding the maximum-intensity voxel.
Sensors 24 05762 g006
Figure 7. Effect of the parameter σ on the decay of weights (the ordinate is the weight value, and the abscissa is the distance from each point to the maximum-intensity voxel).
Figure 7. Effect of the parameter σ on the decay of weights (the ordinate is the weight value, and the abscissa is the distance from each point to the maximum-intensity voxel).
Sensors 24 05762 g007
Figure 8. Procedure for finding the radius r (the direction of movement is bottom-up (i.e., away from the center of the sphere)).
Figure 8. Procedure for finding the radius r (the direction of movement is bottom-up (i.e., away from the center of the sphere)).
Sensors 24 05762 g008
Figure 9. Normal distribution of deviation (the blue curve is the normal distribution curve, and the orange bars form a distribution histogram of the deviation).
Figure 9. Normal distribution of deviation (the blue curve is the normal distribution curve, and the orange bars form a distribution histogram of the deviation).
Sensors 24 05762 g009
Figure 10. Comparison of the point clouds before and after statistical outlier removal filtering.
Figure 10. Comparison of the point clouds before and after statistical outlier removal filtering.
Sensors 24 05762 g010
Figure 11. K-means clustering based on fitted spherical center point sets (the cross symbol indicates the barycenter).
Figure 11. K-means clustering based on fitted spherical center point sets (the cross symbol indicates the barycenter).
Sensors 24 05762 g011
Figure 12. Stepped ball-plate standardizer placement (the step-type ball-plate standard is inside the red circle).
Figure 12. Stepped ball-plate standardizer placement (the step-type ball-plate standard is inside the red circle).
Sensors 24 05762 g012
Figure 13. Slices of cylinder-ball reference object CT reconstructed volume data (slice order: ad).
Figure 13. Slices of cylinder-ball reference object CT reconstructed volume data (slice order: ad).
Sensors 24 05762 g013
Figure 14. Voxel logarithmic histogram of cylinder-ball reference object grayscale values.
Figure 14. Voxel logarithmic histogram of cylinder-ball reference object grayscale values.
Sensors 24 05762 g014
Figure 15. (a) Fitting deviation histogram and (b) percentage accumulation graph.
Figure 15. (a) Fitting deviation histogram and (b) percentage accumulation graph.
Sensors 24 05762 g015
Figure 16. Fifteen spheres and thirty sphere center distances (different colors represent different values).
Figure 16. Fifteen spheres and thirty sphere center distances (different colors represent different values).
Sensors 24 05762 g016
Figure 17. Comparison of multiple methods on simulation experiment data. The vertical axis represents the absolute value of the logarithm of the deviation, meaning larger values represent smaller deviations of the fitted geometrical parameters; the horizontal axis represents the three parameters of the spherical center coordinates (X, Y, Z) and the radius of the sphere.
Figure 17. Comparison of multiple methods on simulation experiment data. The vertical axis represents the absolute value of the logarithm of the deviation, meaning larger values represent smaller deviations of the fitted geometrical parameters; the horizontal axis represents the three parameters of the spherical center coordinates (X, Y, Z) and the radius of the sphere.
Sensors 24 05762 g017
Figure 18. Comparison of multiple methods for cylinder-ball reference object fitting experiments.
Figure 18. Comparison of multiple methods for cylinder-ball reference object fitting experiments.
Sensors 24 05762 g018
Figure 19. Measurement object size. (af) represent fitting experiments for six values and thirty spherical center distances. The vertical and horizontal axes represent deviations and spherical center distances, respectively, and the unit of deviation is μm.
Figure 19. Measurement object size. (af) represent fitting experiments for six values and thirty spherical center distances. The vertical and horizontal axes represent deviations and spherical center distances, respectively, and the unit of deviation is μm.
Sensors 24 05762 g019
Table 1. Comparison of fitted values after each step with true values.
Table 1. Comparison of fitted values after each step with true values.
ParametricStep 1Step 2Step 3True Value
X246.917175246.936550246.933054246.933484
Y578.279846578.304406578.303259578.303252
Z897.144836897.113507897.077428897.076754
R10.0498759.9984379.99905510.000000
Table 2. Deviation at each step.
Table 2. Deviation at each step.
ParametricStep 1–Step 2Step 2–Step 3Step 1–Step 3
X0.0132430.0026360.015879
Y0.0222520.0011470.023399
Z0.0313290.0360790.067408
R0.0483120.0006180.048930
Table 3. Multiple spherical point cloud experiments (Group: Number of groups in the experiment; P: Geometric information parameters of the sphere).
Table 3. Multiple spherical point cloud experiments (Group: Number of groups in the experiment; P: Geometric information parameters of the sphere).
GroupPRANSACPK-RANSACReal ValueGroupPRANSACPK-RANSACReal Value
1X246.917175246.933054246.93348411X743.550598743.568272743.561821
Y578.279846578.303259578.303252Y306.055450306.016250306.014524
Z897.144836897.077428897.076754Z882.056213882.043980882.044992
R10.0498759.99905510.000000R20.04682020.00034520.000000
2X561.129333561.129555561.13087812X704.275024704.301214704.301318
Y195.709412195.725723195.725104Y867.981934868.012446868.012579
Z226.497665226.502046226.501991Z26.35042026.76962226.769830
R20.07875119.99882620.000000R9.64365110.00012010.000000
3X381.793457381.769778381.77452813X572.365173572.703407572.702488
Y285.973022285.936395285.933115Y834.539856834.617653834.619924
Z98.47793698.48007298.481401Z728.508972728.564828728.564621
R19.98671319.99957420.000000R10.0249699.99940210.000000
4X786.689819786.673251786.67509914X889.814880889.854685889.858171
Y254.344620254.254536254.262859Y671.338440671.589943671.590496
Z709.607544709.591002709.584786Z141.074600141.017180141.016547
R20.06240319.99998620.000000R19.99062319.99969520.000000
5X493.628815493.629719493.63073515X883.981506884.086524884.087031
Y922.256470922.255856922.255376Y415.568085415.715176415.711885
Z59.10325659.18621959.184562Z505.630524505.647207505.650742
R10.0623059.99905310.000000R20.11218520.00031120.000000
6X947.520935947.542646947.54075716X105.581985105.183584105.183946
Y481.574310481.964760481.967207Y766.359253766.367362766.366602
Z315.237671315.274308315.274122Z708.879089708.905112708.907239
R10.00000010.00070810.000000R10.19803910.00062710.000000
7X639.219604639.264039639.26468117X248.298431248.303789248.304023
Y28.85511028.93064728.931308Y132.508316132.527841132.525323
Z858.563965858.567802858.567937Z100.069572100.038094100.036081
R9.9058079.99975210.000000R10.0160039.99927210.000000
8X147.419312147.413612147.41541418X593.301453593.198806593.199986
Y836.551270836.549566836.547329Y581.203674581.386051581.384344
Z134.673981134.687489134.689662Z806.116821806.239197806.240295
R20.02030219.99979820.000000R9.9247179.99986810.000000
9X542.255432542.241369542.24327919X522.112244521.945001521.945154
Y333.036255333.098283333.102226Y323.894165323.514885323.515338
Z548.272949548.264637548.264175Z976.824036976.965890976.967813
R20.03434619.99954620.000000R10.1427329.99937010.000000
10X810.159546810.166847810.17200620X656.082031655.977859655.979157
Y737.505981737.509693737.515096Y641.028137641.032843641.035319
Z136.618729136.559892136.559440Z789.694458789.657126789.660352
R19.92799619.99905520.000000R20.01874219.99929820.000000
Table 4. Comparisons of RANSAC and PK-RANSAC radius fitting values with the true value.
Table 4. Comparisons of RANSAC and PK-RANSAC radius fitting values with the true value.
Geometric ParameterRANSAC (μm)PK-RANSAC (μm)Real Value (μm)
Radius value5128.455130.555135.01
Table 5. Comparison of MSE values of fitting methods.
Table 5. Comparison of MSE values of fitting methods.
Unit: μm2RANSACPK-RANSAC
MSE value48.101241.2714
Table 6. Comparison of polar coordinate fitting values for CT data (μm).
Table 6. Comparison of polar coordinate fitting values for CT data (μm).
MeasurementsSerial NumberNameRANSACPC-RANSACPK-RANSACReal Value
2015_820,083.7220,108.3820,100.0820,101.28
26_820,059.2119,997.6120,005.8020,004.41
37_920,047.7020,109.5120,089.5720,088.58
48_1020,014.7320,056.1620,040.9520,042.30
59_1120,032.6020,054.5320,044.0520,046.19
3514_835,005.3334,981.6134,982.8434,984.45
24_935,011.4435,011.9635,013.9335,014.50
35_635,122.7535,104.3035,106.3035,107.28
45_1035,111.7335,110.0235,092.3935,094.34
57_1135,061.4135,070.5935,082.0235,085.59
5611_656,369.3356,317.6156,324.8156,326.23
21_1056,327.6956,314.3756,273.6656,274.76
32_356,048.3656,046.3856,061.6056,063.32
43_656,376.5856,372.4556,375.0356,379.11
511_1556,114.4756,110.9756,094.2956,095.56
7511_975,018.0474,974.7274,975.9974,979.47
23_875,024.8874,974.9174,984.3674,986.79
36_1275,120.8275,113.8775,092.6675,089.77
48_1574,793.9374,831.7074,831.4274,832.57
511_1275,176.3875,172.5975,144.3775,145.49
8511_1384,181.6384,153.7484,157.0484,157.51
23_584,158.4584,149.0584,142.4684,145.42
37_1584,054.5884,034.5884,034.6584,038.97
48_1486,520.9286,546.4886,536.8086,536.61
59_1286,455.6986,451.1286,429.7086,432.01
10011_399,968.4099,950.4799,937.6899,939.65
21_1599,884.2799,855.6499,847.9899,850.57
32_14100,147.72100,191.89100,186.96100,187.11
43_1599,829.7599,833.0799,827.9699,830.94
57_1299,879.9199,878.4499,854.8799,857.84
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Wang, Z.; Hu, J.; Shi, Y.; Cai, J.; Pi, L. Target Fitting Method for Spherical Point Clouds Based on Projection Filtering and K-Means Clustered Voxelization. Sensors 2024, 24, 5762. https://doi.org/10.3390/s24175762

AMA Style

Wang Z, Hu J, Shi Y, Cai J, Pi L. Target Fitting Method for Spherical Point Clouds Based on Projection Filtering and K-Means Clustered Voxelization. Sensors. 2024; 24(17):5762. https://doi.org/10.3390/s24175762

Chicago/Turabian Style

Wang, Zhe, Jiacheng Hu, Yushu Shi, Jinhui Cai, and Lei Pi. 2024. "Target Fitting Method for Spherical Point Clouds Based on Projection Filtering and K-Means Clustered Voxelization" Sensors 24, no. 17: 5762. https://doi.org/10.3390/s24175762

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop