Pairwise Registration Algorithm for Large-Scale Planar Point Cloud Used in Flatness Measurement

In this paper, an optimized three-dimensional (3D) pairwise point cloud registration algorithm is proposed, which is used for flatness measurement based on a laser profilometer. The objective is to achieve a fast and accurate six-degrees-of-freedom (6-DoF) pose estimation of a large-scale planar point cloud to ensure that the flatness measurement is precise. To that end, the proposed algorithm extracts the boundary of the point cloud to obtain more effective feature descriptors of the keypoints. Then, it eliminates the invalid keypoints by neighborhood evaluation to obtain the initial matching point pairs. Thereafter, clustering combined with the geometric consistency constraints of correspondences is conducted to realize coarse registration. Finally, the iterative closest point (ICP) algorithm is used to complete fine registration based on the boundary point cloud. The experimental results demonstrate that the proposed algorithm is superior to the current algorithms in terms of boundary extraction and registration performance.


Introduction
Flatness is an important component of geometric tolerance and has a wide range of testing applications in many fields, such as for precision machinery, military manufacturing, and electronics. The traditional flatness measurement scheme is limited by many factors, such as precision, detection speed, and equipment cost, which cannot meet the increasingly stringent detection requirements in production lines. Machine vision has become widely used for flatness measurement. Among various machine vision schemes, a laser profilometer [1,2] is suitable for fast and high-precision flatness measurement because of its excellent point cloud acquisition ability. However, to improve the repeatability of flatness measurement, the relative position of each sampling point must be fixed in repeated measurements, which is undoubtedly a difficult problem when the initial pose of the objects to be measured differs significantly. To solve the above problem, the rigid registration technology of a three-dimensional (3D) point cloud is used to achieve six degrees-of-freedom (6-DoF) [3,4] pose estimation of the object to be measured.
The iterative closest point (ICP) and its variants [5][6][7][8][9][10] are the most widely used point cloud registration methods due to their simplicity and good performance. However, the main problems in point cloud registration for flatness measurement are as follows: Because of its high computational complexity, the ICP algorithm cannot efficiently process largescale point clouds obtained by a laser profilometer. In addition, the ICP method may suffer from the local optimum problem because it considers the closest point as the corresponding point [11], especially when the point cloud is not well initialized. Conversely, to overcome the local minimum problem, the coarse-to-fine registration strategy [12] is widely used. However, in the case of point clouds with curvature-invariant surfaces [13], the coarse registration precision is low, which adversely affects subsequent fine registration.
In this paper, an optimized 3D point cloud registration algorithm is proposed, which realizes the registration of large-scale planar point clouds in flatness measurement. We introduce an improved 3D point cloud boundary extraction method, which obtains approximate boundary points through coarse estimation. Then, it removes outliers and extracts accurate boundary points through fine estimation in the neighborhood of the approximate boundary points. Compared with the traditional boundary extraction method, the optimized method introduces the idea of a hierarchical strategy to avoid evaluating every point, thereby greatly improving the efficiency of calculation. Then, point cloud registration is acquired based on the boundary information. We calculate the feature descriptor of the boundary point cloud to overcome the problem of weak uniqueness of feature descriptors in curvature-invariant surfaces. We concurrently designed an algorithm to eliminate invalid keypoints and mismatches for the boundary point cloud to achieve fast and accurate coarse registration. Finally, the boundary point cloud is input to the ICP framework to accomplish fine registration, which significantly reduces the computational complexity and maintains accuracy. The experimental results show that the proposed algorithm can effectively extract the boundary of a 3D point cloud and obtain better registration accuracy and computation efficiency in several point clouds to ensure fast and accurate flatness measurement based on a laser profilometer. The main contributions of this study are as follows: 1.
An improved 3D point cloud boundary extraction method is proposed. This method integrates a hierarchical strategy, an outlier filter, and a traditional boundary extraction algorithm to increase computational efficiency.

2.
A novel boundary-based registration method is presented in this study. It achieves coarse-to-fine registration based on a boundary point cloud, which significantly improves the situation in which ICP is prone to fall into local minima and low calculation efficiency and has high registration precision.

3.
We apply the proposed large-scale planar point cloud registration algorithm to the laser profilometer-based flatness measurement for greater efficiency and accuracy.
The remainder of this paper is organized as follows. Related work is described in Section 2. The proposed method is detailed in Section 3. The experimental results and analyses are presented in Section 4. Conclusions and perspectives are presented in Section 5.

Boundary Extraction
Since the original point clouds obtained by the scanning device have a large number of points and contain a lot of curvature-consistent surfaces, boundary feature extraction is needed to improve data utilization. The point cloud boundary plays an important role in boundary-based registration. The efficient and accuracy of point cloud registration will be directly affected by the boundary extraction performance. A variety of boundary extraction methods have been developed. Wang et al. [14] introduced an approach to fusing boundary data extracted in a 2D image and 3D point cloud to obtain the 3D boundary characteristics with increased accuracy; however, the accuracy of identifying the target object from the background in the depth image may affect the final performance of the algorithm. Chen et al. [15] achieved point cloud boundary detection, which combined the k-nearest neighbors angle method [16,17] with the geometric distribution of point clouds. However, the applicability of the two-way nearest points search method is poor, and for the large-scale point clouds, using each point for k-nearest neighbors search will be time consuming. The improved Hough transform [18] was successfully applied to boundary extraction of point clouds, reducing the computational complexity, but the final result is susceptible to the performance of normal calculation. Chen et al. [19] used an improved k-d tree method to search the k neighbors in point cloud; then, they established the least-squares microcut plane by the sampling point and its k-nearest neighbors and projected them onto the plane, and the boundary points were extracted according to the judge criterion of field force and a sorting method based on the vector deflected angle and distance.
In general, existing boundary extraction algorithms can achieve high accuracy, but for large-scale point clouds, most of them take a long time because of the k neighbors searching and normal estimation for each point.

Coarse Registration
One of the core technologies for 3D point cloud data processing, 3D point cloud registration is widely used in many fields, such as 3D reconstruction [20], 3D recognition [21], and simultaneous localization and mapping (SLAM) [22]. For registration, it is critical to obtain a coordinate transformation matrix between a set of point clouds across several views into the same coordinate system using particular algorithms or statistical rules. The local registration algorithms easily fall into a local optimum when the initial pose of the point cloud sets is arbitrary. To solve this problem, a coarse-to-fine strategy is proposed, where the coarse registration can estimate a rough transformation matrix between two surfaces without strict requirements of the initial pose, and the fine registration refines the approximate transformation [23].
Handcrafted feature-based methods are widely used for coarse registration. These methods entail two significant steps: extracting geometric characteristics and identifying correspondences [24]. In step one, features such as fast point feature histogram (FPFH) [25], 3D scale-invariant feature transform (SIFT) [26], signature of histogram of orientation (SHOT) [27], rotation projection statistics (RoPS) [28], local feature statistic histogram (LFSH) [29], binary shape context [30], and plane structure [31] are calculated as the primitives for registration. Then, using various matching strategies, such as geometric consistency constraints [27], Hough transform [32], search for inliers [33], and non-cooperative games [34], the corresponding features are identified to calculate the transformation between point clouds. The accuracy of registration based on these methods greatly depends on the quality of feature extraction; however, the robustness, generalizability, descriptive capacity, and uniqueness of geometric features may not be sufficient, especially in point clouds with curvature-invariant surfaces.
Instead of feature descriptor calculation and corresponding identification, the fourpoint congruent set (4PCS)-based registration methods [35] find a transformation between point clouds using constant affine invariance ratios for the distances between pairs of points. These methods are highly efficient with good anti-noise ability [36] and can work well for point cloud sets with small overlaps. Mellado et al. [37] greatly enhanced the 4PCS algorithm by applying a splitting and indexing strategy. Semantic keypoint-based 4PCS (SK-4PCS) [38] combines the advantages of keypoint-based 4PCS (K-4PCS) [39] to reduce unnecessary points and uses the semantics of keypoints to decrease the complexity of the search for corresponding congruent sets. Nevertheless, the coplanar sets in the 4PCS-based algorithm may not take full advantage of the geometric features of planar point clouds.
Another coarse registration scheme is the probabilistic method. These methods are highly robust to outliers, noise, and occlusions. However, because it is highly timeconsuming, the utility of probabilistic registration is severely limited. Jian et al. represented the distributions of point clouds as Gaussian mixture models (GMMs), which transform the registration problem into minimizing the statistical discrepancy between two GMMs. The coherent point drift (CPD)-based method [40] uses GMMs to describe the corresponding relationship between two sets of points and considers the registration to be a problem of probability density estimation, which can be solved by the expectation-maximization (EM) algorithm. Gao et al. [41] proposed a novel probabilistic registration method, FilterReg, which uses a Gaussian filter and twist parameterization to achieve robust point cloud registration with fast computational performance.
Recently, deep learning-based methods have been used to solve the problem of 3D point cloud registration. 3DMatch [42] establishes correspondences by learning a local volumetric patch descriptor. Deng et al. [43] presented PPF-FoldNet, which uses a folding- based auto-encoder to learn 3D local descriptors. Aoki et al. [44] considered Point Net as learnable "imaging" and introduced the Lucas and Kanade (LK) algorithm to achieve 3D point cloud registration. The deep closest point [45] method proposes a simple architecture, which addresses key issues in each part of the classical ICP pipeline to obtain the transformation between a pair of point clouds. These deep learning-based methods achieve outstanding performance at small-scale point cloud registration; however, limited by the calculation complexity and the amount of data, they do not apply to large-scale point clouds.

Fine Registration
ICP [5] is the best-known algorithm for fine registration, which alternates between searching point cloud correspondences and finding the optimal solution by the leastsquares method to update the alignment. However, owing to the establishment of correspondences by searching the nearest points in the iterative process, the ICP algorithm has low computational efficiency and often stalls at suboptimal local minima. Therefore, several ICP variants have been proposed to solve these problems. To broaden the basin convergence of ICP, Fitzgibbon [6] introduced the Levenberg-Marquardt ICP algorithm that enlarges the range of convergence and improves computational efficiency. Yang et al. [7] proposed a global optimal ICP (Go-ICP) to solve the local minimum problem. However, Go-ICP is sensitive to occlusion and partial overlap and is significantly more time-consuming than ICP. To improve the accuracy and efficiency, point-to-plane [8], point-to-projection [9], and plane-to-plane [10] correspondence error metrics have been used in ICP variants.
Magnusson [46] extended the normal distribution transform (NDT) algorithm to 3D space to realize registration. The main concept of this method is to present a point cloud pair as a set of Gaussian distributions. Subsequently, the Hessian matrix method is used to optimize the probability of the Gaussian distribution of the point cloud pair to realize registration. In contrast to the ICP algorithm, NDT and its variants [47] achieve fine registration without a good initial pose and avoid time-consuming searches for the closest points.
In summary, it is difficult for most extant 3D point cloud registration algorithms to achieve accurate registration for point cloud with curvature-invariant surfaces. In addition, for large-scale point clouds, it is hard work to reduce the processing time while retaining the registration accuracy.

Proposed Methods
The proposed registration method for a large-scale planar point cloud follows the same framework as the SHOT-ICP algorithm but is optimized hierarchically. Figure 1 shows the flowchart of this method, which involves three steps. The details are presented as follows:

1.
Boundary Extraction: Given the input point cloud sets P and Q, we introduce a novel boundary extraction algorithm to obtain the boundary point clouds efficiently and eliminate the noise caused by the acquisition equipment.

2.
Coarse Registration: After boundary extraction, the obtained point clouds are described by SHOT descriptors. To obtain accurate correspondences, we designed an invalid keypoints elimination method based on the least square (LS) fitting of point clouds in the neighborhood of keypoints. Then, we obtain a cluster of keypoint pairs based on the geometric consistency constraints. Subsequently, the random sample consensus (RANSAC) iteration is used to eliminate further the mismatched keypoints and estimate the approximate transformation M c .

3.
Fine Registration: Finally, the roughly registered boundary point clouds are combined into the ICP algorithm to obtain the fine transformation M f . By adopting two steps of rotation and translation with the parameters M f , the input point clouds can be registered accurately. 3. Fine Registration: Finally, the roughly registered boundary point clouds are combined into the ICP algorithm to obtain the fine transformation Mf. By adopting two steps of rotation and translation with the parameters Mf, the input point clouds can be registered accurately.

Optimized Boundary Extraction Algorithm
To achieve more efficient and accurate registration, we characterize the large-scale planar point cloud as its boundary points. The proposed boundary extraction method is a variant algorithm that introduces a hierarchical strategy to improve the computational efficiency and combines the statistical outlier removal filter (SOR) [48] to remove the noise around the boundary. Figure 2 shows the principle of the traditional k neighbors angle method-based boundary point cloud extraction method in a point cloud library (PCL).

Optimized Boundary Extraction Algorithm
To achieve more efficient and accurate registration, we characterize the large-scale planar point cloud as its boundary points. The proposed boundary extraction method is a variant algorithm that introduces a hierarchical strategy to improve the computational efficiency and combines the statistical outlier removal filter (SOR) [48] to remove the noise around the boundary. Figure 2 shows the principle of the traditional k neighbors angle method-based boundary point cloud extraction method in a point cloud library (PCL). 3. Fine Registration: Finally, the roughly registered boundary point clouds are combined into the ICP algorithm to obtain the fine transformation Mf. By adopting two steps of rotation and translation with the parameters Mf, the input point clouds can be registered accurately.

Optimized Boundary Extraction Algorithm
To achieve more efficient and accurate registration, we characterize the large-scale planar point cloud as its boundary points. The proposed boundary extraction method is a variant algorithm that introduces a hierarchical strategy to improve the computational efficiency and combines the statistical outlier removal filter (SOR) [48] to remove the noise around the boundary. Figure 2 shows the principle of the traditional k neighbors angle method-based boundary point cloud extraction method in a point cloud library (PCL).  As shown in Figure 2a, the boundary extraction method is based on the point neighborhood. The neighborhood of each point p i is defined as a set that includes the k-nearest points of the center p i , where k = 30. The covariance matrix C with dimension 3 × 3 is created to estimate the surface normal and the eigenvectors and eigenvalues are calculated by eigen-decomposition: where p a i , a ∈ (1, k) is the a-th k-nearest point of p i , p i is the centroid of all k-nearest points of p i , and v i and λ i respectively are the j-th eigenvectors and eigenvalues of the covariance matrix C. The eigenvector corresponding to the minimum eigenvalue is identified as the normal vector of the neighborhood. For the normal vectors of all points, the viewpoint position is introduced to solve the problem of ambiguous orientation. Then, based on the normal vector n i , the unit orthogonal vectors u, v are obtained to construct the local coordinate system.
In the local coordinate system of the p i , by connecting p i and p a i , we can obtain the dot product of p i − p a i with u and v. Since p a i is probably distributed around the plane up i v; there is an approximate formula: θ a + γ a = π/2. Hence, θ a ∈ (−π, π) can be calculated as: θ a is calculated for each k-nearest point, which is sorted in ascending order to obtain the set, {θ 1 , θ 2 , θ 3 , . . . , θ k }. Subsequently, the differences between two adjacent angles are obtained as ∆θ t = θ t+1 − θ t and t ∈ {1, 2, . . . k − 1}, which can be transferred to ∆θ t = 2π − θ t + θ 1 , and t = k. If the maximum angle difference is ∆θ max = max 1≤t≤k ∆θ t above a certain threshold π/2, the point p i can be identified as a boundary point cloud, as shown in Figure 2b.
The traditional boundary extraction algorithm can achieve good results, but it is time-consuming if all points are involved in the operation. Furthermore, the original point cloud data must be filtered effectively and denoised, which can enhance the accuracy of subsequent processing. To solve these problems, we propose an improved boundary extraction algorithm, which first obtains approximate boundary points and then identifies the accurate boundary points and removes the outliers through a radius search of the rough boundary points ( Figure 3). The working details are presented in Algorithm 1. In this study, the outlier removal factor α is set to 0.5.

Algorithm 1. Optimized Boundary Extraction Method
Input: Source point cloud S Output: Boundary point cloud T without outliers Boundary identification 7 Add boundary points into R 8 end 9 Z←radius search for each point in R 10 for each point q i in Z do 11 Search for the k-nearest points: cloud data must be filtered effectively and denoised, which can enhance the accuracy o subsequent processing. To solve these problems, we propose an improved boundary e traction algorithm, which first obtains approximate boundary points and then identifie the accurate boundary points and removes the outliers through a radius search of th rough boundary points ( Figure 3). The working details are presented in Algorithm 1. I this study, the outlier removal factor α is set to 0.5.

Elimination of Invalid Keypoints
To establish the local correspondences between two boundary point clouds to realize coarse registration, we obtained the keypoints of the boundary by uniform down-sampling and calculated their descriptors. We utilize a robust descriptor capable of reflecting the geometric structure of the boundary point cloud: SHOT, which constructs a normalized histogram by counting the geometric distribution of point clouds in the constructed local reference frame around the keypoints. In particular, the local reference frame uses an isotropic spherical grid with 32 spatial bins that results from two elevation divisions, two radial divisions, and eight azimuth divisions. Each spatial bin can be further divided into 11 sub-bins according to the spatial distribution. Hence, the SHOT descriptor can ultimately be represented as a 352-dimensional vector. The correspondences can be identified as a keypoint pair, the descriptors' Euclidean distance of which is less than a certain threshold.
Boundary-based SHOT descriptors can overcome the problem of weak uniqueness in a curvature-consistent surface, thus reducing the number of mismatches. However, there are still many non-corresponding keypoint pairs with similar spatial distributions. Therefore, we designed a method to evaluate the neighborhood of each keypoint based on LS fitting to remove invalid keypoints distributed on the linear boundary that may cause mismatches due to their ambiguous descriptors. As shown in Figure 4, point clouds in the neighborhood of each keypoint are fitted as an LS straight line, and the average distance from all point clouds to the LS line is calculated and is used to evaluate the descriptiveness of the descriptor of the keypoint. If the average distance is less than a certain threshold, the keypoint is identified as invalid.
on LS fitting to remove invalid keypoints distributed on the linear boundary that may cause mismatches due to their ambiguous descriptors. As shown in Figure 4, point clouds in the neighborhood of each keypoint are fitted as an LS straight line, and the average distance from all point clouds to the LS line is calculated and is used to evaluate the descriptiveness of the descriptor of the keypoint. If the average distance is less than a certain threshold, the keypoint is identified as invalid. The target LS line can be represented by a unit vector, D and the centroid in the neighborhood g, yielding: The objective function of LS fitting can be defined as: where n is the number of neighbor points and G j is the vector that connects the centroid with every other point in the neighborhood. Owing to the constraint D D T =1 , j G 2 2 can be written as , and Formula (6) can be transformed to: where is E a three-dimensional unit matrix. To find the minimum, the key is to obtain the eigenvalues and eigenvectors of H. The details of the invalid key point elimination method are given in Algorithm 2 from which we can obtain the coarse correspondences. The elimination threshold, ζ γ = 0.2 , and the correspondence identification threshold, ψ 3γ = are utilized in this study. γ is the resolution of the input point cloud, which can be calculated as: The target LS line can be represented by a unit vector, D and the centroid in the neighborhood g, yielding: l(ε) = εD + g The objective function of LS fitting can be defined as: where n is the number of neighbor points and G j is the vector that connects the centroid with every other point in the neighborhood. Owing to the constraint D T D = 1, G j 2 2 can be written as D T G T j G j D, and Formula (6) can be transformed to: where is E a three-dimensional unit matrix. To find the minimum, the key is to obtain the eigenvalues and eigenvectors of H. The details of the invalid key point elimination method are given in Algorithm 2 from which we can obtain the coarse correspondences. The elimination threshold, ζ = 0.2γ, and the correspondence identification threshold, ψ = 3γ are utilized in this study. γ is the resolution of the input point cloud, which can be calculated as: where c i is the i-th point in the point cloud, c i is its nearest neighbor point, and m is the number of points in the input point cloud.

Correspondence Clustering
Given the coarse correspondences, point cloud registration can be achieved by the RANSAC algorithm. RANSAC iteratively and randomly samples a subset to generate the hypothesis transformation by the singular value decomposition (SVD) method and then tests all the remaining correspondences to detect the best transformation, which is defined as the transformation with the highest percentage of inliers.
The time complexity in the RANSAC iteration depends on the number of input correspondences and the inlier ratio. Therefore, we cluster correspondences based on geometric consistency constraints before inputting them to the RANSAC framework to improve the convergence rate. We iteratively consider the correspondence of the descriptor with the smallest Euclidean distance as the center of a hypothesis cluster and then expand the cluster with the remaining correspondences of which the geometric consistency evaluation values to the cluster center are less than the threshold ϕ = 1. Subsequently, we identify a valid hypothesis cluster for which the membership exceeds a certain threshold, η = 50. The working details of the correspondence clustering are described in Algorithm 3. Sort C in ascending order according to the Euclidean distance between two descriptors of each matching pair to attain a new set of correspondences: Assume a cluster C a , and then add c i into C a 7 for each correspondence c j in C do 8 If c j is unavailable or j = i, then 9 continue 10 end 11 If ∆d ij ≤ ϕ, then 13 Add c j into C a 14 end 15 end  16 if C a .size > η, then 17 Add C a into L 18 Set c i in C a unavailable 19 end 20 end 21 Sort L in ascending order according to the number of correspondences of the cluster to attain a set L = {C k |k = 1, 2, 3, . . . , m} 22 M ← C m

Registration and Flatness Measurement
According to the fine correspondences set, the coarse transformation M c between point cloud pairs can be calculated using the RANSAC and SVD algorithms. Subsequently, fine registration is completed by submitting a coarse registered boundary point cloud into the ICP framework, which greatly reduces the computational complexity and retains precision. The final transformation matrix M f can be expressed as: where R is the rotation matrix with 3 × 3 dimensions and T is the translation vector with 3 × 1 dimensions.
To ensure repeatability in flatness measurements, the consistency of flatness sampling locations must be ensured. As shown in Figure 5, we first set a point cloud with the standard position as the source point cloud and set the sampling points in its coordinate system. Then, the point cloud of the object to be measured is used as the target point cloud, and the transformation matrix M f between the two point clouds is obtained. Finally, we utilize the transformation matrix M f to map the standard sampling points to the coordinate system of the target point cloud and search for the nearest points of the converted sampling points as valid data points to achieve the flatness measurement. The mapping of points can be expressed as: where (x i , y i , z i ) is the standard sampling point, and x i , y i , z i is the converted sampling point.

Experimental Results and Discussion
To verify the efficiency of the proposed method, we first evaluated our optimized boundary extraction algorithm based on different large-scale planar point clouds, which were acquired with a profilometer. Then, the proposed mismatched elimination method was evaluated on the same dataset. Third, the performance and computational efficiency of our registration algorithm were compared with those of other methods. Finally, the proposed registration method is applied to realize laser profilometer-based flatness measurements. As shown in Figure 6, the point cloud dataset includes four point clouds, M1,

Experimental Results and Discussion
To verify the efficiency of the proposed method, we first evaluated our optimized boundary extraction algorithm based on different large-scale planar point clouds, which were acquired with a profilometer. Then, the proposed mismatched elimination method was evaluated on the same dataset. Third, the performance and computational efficiency of our registration algorithm were compared with those of other methods. Finally, the proposed registration method is applied to realize laser profilometer-based flatness measurements. As shown in Figure 6, the point cloud dataset includes four point clouds, M 1 , M 2 , M 3 , and M 4 , which were scanned from the four models using the LMI Gocator 2350 laser profilometer, were used in our experiments. The experiments were conducted based on an open-source PCL. All experiments in this study were run on a computer equipped with an AMD Ryzen 7 4800H, 2.9 GHz CPU, and 16.0 GB of memory.

Experimental Results and Discussion
To verify the efficiency of the proposed method, we first evaluated our optimized boundary extraction algorithm based on different large-scale planar point clouds, which were acquired with a profilometer. Then, the proposed mismatched elimination method was evaluated on the same dataset. Third, the performance and computational efficiency of our registration algorithm were compared with those of other methods. Finally, the proposed registration method is applied to realize laser profilometer-based flatness measurements. As shown in Figure 6, the point cloud dataset includes four point clouds, M1, M2, M3, and M4, which were scanned from the four models using the LMI Gocator 2350 laser profilometer, were used in our experiments. The experiments were conducted based on an open-source PCL. All experiments in this study were run on a computer equipped with an AMD Ryzen 7 4800H, 2.9 GHz CPU, and 16.0 GB of memory.

Boundary Extraction
For the first experiment, we validate the boundary extraction algorithm proposed in this paper by comparing it with the SOR-boundary extraction (BE) algorithm in PCL. The SOR-BE makes all points involved in the calculation, which significantly increases the processing time. In contrast, our approach first obtains a rough boundary to select the region of interest (ROI); then, it contrapuntally removes outliers and extracts boundary points in the ROI to reduce computational complexity. Table 1 shows the quantitative results of the computational complexity of the two methods. Since the proposed algorithm reduces the number of points in the calculation by at least 61.7%, the processing time is reduced by more than 55.7%. In particular, for point clouds with a simple boundary composition, the acceleration effect of our approach is more obvious, and the processing time can be reduced by 75.8%. In addition, the number of boundary points obtained by our method is approximately the same as that of the

Boundary Extraction
For the first experiment, we validate the boundary extraction algorithm proposed in this paper by comparing it with the SOR-boundary extraction (BE) algorithm in PCL. The SOR-BE makes all points involved in the calculation, which significantly increases the processing time. In contrast, our approach first obtains a rough boundary to select the region of interest (ROI); then, it contrapuntally removes outliers and extracts boundary points in the ROI to reduce computational complexity. Table 1 shows the quantitative results of the computational complexity of the two methods. Since the proposed algorithm reduces the number of points in the calculation by at least 61.7%, the processing time is reduced by more than 55.7%. In particular, for point clouds with a simple boundary composition, the acceleration effect of our approach is more obvious, and the processing time can be reduced by 75.8%. In addition, the number of boundary points obtained by our method is approximately the same as that of the SOR-BE algorithm. Figure 7 shows the comparison results of the boundary extraction for point clouds in M 1 and M 2 using the two methods. Owing to the use of voxel down-sampling and ROI selection, our algorithm has better anti-noise performance but suffers from reduced extraction capability for tiny boundaries. SOR-BE algorithm. Figure 7 shows the comparison results of the boundary extraction for point clouds in M1 and M2 using the two methods. Owing to the use of voxel down-sampling and ROI selection, our algorithm has better anti-noise performance but suffers from reduced extraction capability for tiny boundaries.

Mismatches Elimination
Feature matches based on boundary point clouds can overcome the problem of mismatch caused by the weak uniqueness of descriptors in planar point clouds. For comparison, we calculated the SHOT feature descriptor before and after the boundary extraction of the M1 point cloud, and the comparison results are shown in Figure 8. Since most of the space composition of the planar point cloud is almost identical, the resulting feature descriptors tend to be similar, and mismatched pairs are prone to occur. In contrast, the feature descriptors for the point cloud after boundary extraction are unique, which results in more correspondences that are accurate.

Mismatches Elimination
Feature matches based on boundary point clouds can overcome the problem of mismatch caused by the weak uniqueness of descriptors in planar point clouds. For comparison, we calculated the SHOT feature descriptor before and after the boundary extraction of the M 1 point cloud, and the comparison results are shown in Figure 8. Since most of the space composition of the planar point cloud is almost identical, the resulting feature descriptors tend to be similar, and mismatched pairs are prone to occur. In contrast, the feature descriptors for the point cloud after boundary extraction are unique, which results in more correspondences that are accurate. Correspondences can be obtained by calculating the Euclidean distances between the descriptors. The proposed invalid keypoints elimination and correspondence clustering algorithm can improve the accuracy of matching point pairs. We experimented on four point clouds and compared the accuracy among original correspondences, boundarybased correspondences, and correspondences after using our identification algorithm. Figure 9 displays the comparison result and, for a more intuitive presentation, we rotate a pair of point clouds parallel to each other according to the rotation matrix between them and display their correspondences. In this case, a higher proportion of parallel lines between two point clouds means a higher proportion of correct correspondences.
As shown in Figure 9, there are a large number of mismatched pairs in planar point clouds, which may lead to a waste of computation and a decrease in the accuracy of point cloud registration. In this case, we extract the boundary of the point cloud and recompute the descriptors to match the keypoints, because the number of invalid descriptors decreases while the descriptive capacity of descriptors is enhanced, and the ratio of mismatches decreases significantly. Subsequently, the proposed invalid keypoint elimination and correspondence clustering algorithm are further used to identify the correspondences. Table 2 shows the quantification result of the inlier ratio of correspondences, where we use the remaining correspondences after RANSAC iteration as the ground truth. For all the different models, mismatches in the original point clouds are more numerous than those in the boundary point clouds; however, for textured point clouds such as M2, boundary extraction slightly improves the descriptive capacity of the descriptors. In addition, the proposed correspondences identification algorithm can maintain the inlier ratio of correspondences above 93.6%, which provides a good input dataset for the RANSAC algorithm to achieve efficient coarse registration. Correspondences can be obtained by calculating the Euclidean distances between the descriptors. The proposed invalid keypoints elimination and correspondence clustering algorithm can improve the accuracy of matching point pairs. We experimented on four point clouds and compared the accuracy among original correspondences, boundary-based correspondences, and correspondences after using our identification algorithm. Figure 9 displays the comparison result and, for a more intuitive presentation, we rotate a pair of point clouds parallel to each other according to the rotation matrix between them and display their correspondences. In this case, a higher proportion of parallel lines between two point clouds means a higher proportion of correct correspondences.
As shown in Figure 9, there are a large number of mismatched pairs in planar point clouds, which may lead to a waste of computation and a decrease in the accuracy of point cloud registration. In this case, we extract the boundary of the point cloud and recompute the descriptors to match the keypoints, because the number of invalid descriptors decreases while the descriptive capacity of descriptors is enhanced, and the ratio of mismatches decreases significantly. Subsequently, the proposed invalid keypoint elimination and correspondence clustering algorithm are further used to identify the correspondences. Table 2 shows the quantification result of the inlier ratio of correspondences, where we use the remaining correspondences after RANSAC iteration as the ground truth. For all the different models, mismatches in the original point clouds are more numerous than those in the boundary point clouds; however, for textured point clouds such as M 2 , boundary extraction slightly improves the descriptive capacity of the descriptors. In addition, the proposed correspondences identification algorithm can maintain the inlier ratio of correspondences above 93.6%, which provides a good input dataset for the RANSAC algorithm to achieve efficient coarse registration.

Point Cloud Registration
In this experiment, we evaluated the registration performance of the proposed algorithm. For comparison, several coarse-to-fine strategy methods, such as SHOT-ICP (SICP), Super4PCS-ICP (SPICP), and another global registration method, NDT, were applied in our experiment. We used point clouds in the dataset (M1, M2, M3, M4) for registration, and each type of point cloud in the dataset was obtained from different views by using the laser profilometer. The root-mean-square error (RMSE), which calculates the Euclidean distance between transformed input sets, was adopted to evaluate the accuracy of the point cloud registration.
where p k and q k are the points in the input point cloud sets, and Rf and Tf are the rotation matrix and translation vector in the final transformation matrix Mf.
The processing time and registration accuracy of these algorithms were tested first. We tested all algorithms with the same iteration-stopping criteria; either the number of iterations exceeded 50 or the difference between adjacent transformations was less than the threshold ε . Since the setting of the threshold ε is subject to the point cloud density, we set ε γ = 0.0005 , where γ is the resolution of the input point cloud. To average the variance caused by point cloud acquisition devices and enhance the reliability of the experiment, we selected five pairs of samples from each type of point cloud and ran the algorithm 20 times for each pair to report the average values of the results.

Point Cloud Registration
In this experiment, we evaluated the registration performance of the proposed algorithm. For comparison, several coarse-to-fine strategy methods, such as SHOT-ICP (SICP), Super4PCS-ICP (SPICP), and another global registration method, NDT, were applied in our experiment. We used point clouds in the dataset (M 1 , M 2 , M 3 , M 4 ) for registration, and each type of point cloud in the dataset was obtained from different views by using the laser profilometer. The root-mean-square error (RMSE), which calculates the Euclidean distance between transformed input sets, was adopted to evaluate the accuracy of the point cloud registration.
where p k and q k are the points in the input point cloud sets, and R f and T f are the rotation matrix and translation vector in the final transformation matrix M f . The processing time and registration accuracy of these algorithms were tested first. We tested all algorithms with the same iteration-stopping criteria; either the number of iterations exceeded 50 or the difference between adjacent transformations was less than the threshold ε. Since the setting of the threshold ε is subject to the point cloud density, we set ε = 0.0005γ, where γ is the resolution of the input point cloud. To average the variance caused by point cloud acquisition devices and enhance the reliability of the experiment, we selected five pairs of samples from each type of point cloud and ran the algorithm 20 times for each pair to report the average values of the results.
The experimental results of the four methods are listed in Table 3. It is apparent that the proposed algorithm performs better in the registration of large-scale planar point clouds than the other three algorithms. Compared with other methods, the proposed method saves at least 39.93% of the average runtime in the coarse registration stage and reduces the average total runtime by at least 34.42%. The proposed method makes two major contributions that significantly reduce registration runtime. In the coarse registration stage, the proposed mismatches-elimination method effectively increases the ratio of inlier correspondences and therefore accelerates the convergence speed of the RANSAC algorithm. Conversely, in the fine registration stage, because the boundary-based ICP greatly reduces the number of points in the iteration, the computational efficiency is significantly improved. The SPICP algorithm is more effective than other methods for registration accuracy on textured point clouds, but our method exhibits a smaller error for textureless point clouds. In the SICP algorithm, registration accuracy is limited to the uniqueness of the SHOT descriptors. As for the SPICP algorithm, the coplanar sets cannot take full advantage of the geometry of the planar point cloud, which affects the accuracy of registration. In contrast, our method can overcome these problems and achieve accurate point cloud registration based on boundary information. Figure 10 shows the visualization results of registration using these four algorithms, which indicates that in most cases, the proposed method performs better with less registration error than the other three methods. To evaluate further the algorithms, we tested the stability of the proposed method for Gaussian noise perturbation. The scanned data usually contain noise points, resulting in multiple errors. In addition, the noise points are attached to the point cloud rather than being free, which makes it difficult to filter out completely and affects the registration result. Hence, the anti-noise ability of the algorithm is significant. Gaussian noise was added to a certain sample in each type of point cloud, and the standard deviations were 0.1, 0.2, 0.3, 0.4, and 0.5. For each sample, we ran each algorithm 100 times to report the average registration errors to eliminate the random noise effect. Figure 11 shows the results of adding different levels of Gaussian noise to the M2 point cloud sample. To evaluate further the algorithms, we tested the stability of the proposed method for Gaussian noise perturbation. The scanned data usually contain noise points, resulting in multiple errors. In addition, the noise points are attached to the point cloud rather than being free, which makes it difficult to filter out completely and affects the registration result. Hence, the anti-noise ability of the algorithm is significant. Gaussian noise was added to a certain sample in each type of point cloud, and the standard deviations were 0.1, 0.2, 0.3, 0.4, and 0.5. For each sample, we ran each algorithm 100 times to report the average registration errors to eliminate the random noise effect. Figure 11 shows the results of adding different levels of Gaussian noise to the M 2 point cloud sample.
in multiple errors. In addition, the noise points are attached to the point cloud rather than being free, which makes it difficult to filter out completely and affects the registration result. Hence, the anti-noise ability of the algorithm is significant. Gaussian noise was added to a certain sample in each type of point cloud, and the standard deviations were 0.1, 0.2, 0.3, 0.4, and 0.5. For each sample, we ran each algorithm 100 times to report the average registration errors to eliminate the random noise effect. Figure 11 shows the results of adding different levels of Gaussian noise to the M2 point cloud sample.  Figure 12 shows the results of the anti-noise experiment. We used the average RMSE to evaluate the different algorithms' robustness to noise. Figure 12a-d displays similar registration error trends; SPICP and our method are more robust to noise, especially in the case of low noise interference. In contrast, because the NDT algorithm achieves point cloud registration based on optimizing the probability distribution rather than searching for the nearest point to iterate, it is less affected by the increased noise level but has worse performance at low noise interference than the other algorithms. In addition, the descriptive capacity of descriptors in point clouds with a curvature-consistent surface is susceptible to noise, resulting in the low anti-noise ability of the SICP. By comparing Figure  12a-d, the RMSEs of the same algorithm on different models are not the same. This may be caused by different model resolutions, structures, or surface features, but overall, our method achieves the best performance among all models.  Figure 12 shows the results of the anti-noise experiment. We used the average RMSE to evaluate the different algorithms' robustness to noise. Figure 12a-d displays similar registration error trends; SPICP and our method are more robust to noise, especially in the case of low noise interference. In contrast, because the NDT algorithm achieves point cloud registration based on optimizing the probability distribution rather than searching for the nearest point to iterate, it is less affected by the increased noise level but has worse performance at low noise interference than the other algorithms. In addition, the descriptive capacity of descriptors in point clouds with a curvature-consistent surface is susceptible to noise, resulting in the low anti-noise ability of the SICP. By comparing Figure 12a-d, the RMSEs of the same algorithm on different models are not the same. This may be caused by different model resolutions, structures, or surface features, but overall, our method achieves the best performance among all models. The algorithms' performance for registering point clouds with different sampling structures and densities was also tested. We sampled the point cloud models in dataset (M1, M2, M3, M4) to get the synthetic data. Uniform and Poisson disk sampling structures were utilized to sample the model point clouds. To perform a controlled evaluation, we set the ratio of the removed points from 0 to 0.75 to represent different sampling densities The algorithms' performance for registering point clouds with different sampling structures and densities was also tested. We sampled the point cloud models in dataset (M 1 , M 2 , M 3 , M 4 ) to get the synthetic data. Uniform and Poisson disk sampling structures were utilized to sample the model point clouds. To perform a controlled evaluation, we set the ratio of the removed points from 0 to 0.75 to represent different sampling densities for both sampling modes. Similarly, RMSE between registered synthetic data and a model point cloud was used to reflect the stability of the registration algorithm for different sampling structures and densities. To average the variances caused by point cloud downsampling, we ran 20 times for each pair of point clouds and reported the average values of results. Figures 13 and 14 show the results of the registration errors of the four algorithms under different sampling perturbation.
As shown in Figures 13 and 14, with the decrease of the remaining points, RMSEs all show an upward trend, but for different sampling structures, the registration errors are different. Since the Poisson disk sampling generates new random points, and the uniform sampling removes a certain number of points from the origin data, the former changes the structure of the origin point cloud more significantly, which causes larger RMSE. In general, the registration errors of NDT and SICP algorithms are larger under different sampling structures and densities, while our method and SPICP have higher accuracy. Since the SHOT descriptor is normalized to sum up to 1, SHOT-based algorithms achieve robustness to variations of the point densities. In addition, our method further enhances the descriptive capacity of the descriptor, thus achieving more accurate point cloud registration.

Application to Flatness Measurement
The proposed algorithm was applied to flatness measurements based on a laser profilometer to verify the effect of point cloud registration accuracy on the measurement results. We tested five different types of objects corresponding to M 1 , and for each type, we constantly changed its pose in the process to obtain 20 results to report the average value of the results and their standard deviation. For a more significant comparison, as a control, we selected the SICP, the performance of which differed most from our registration methods. Furthermore, we used the measurement from a ZEISS CONTURA 9/16/8 RDS coordinate measuring machine (CMM) as a reference, the sampling points of which are set to be the same as the standard sampling points in the point cloud. Table 4 shows the average and standard deviations obtained by the two methods. The results obtained by these algorithms were approximately the same as the reference values. However, owing to the higher accuracy of our registration method, the reproducibility standard deviation of the resulting measurements was smaller and could be controlled below 0.0023 mm. In addition, because 200 sampling points were selected in this experiment, the processing time required by the CMM was more than 20 min, whereas the method based on our algorithm combined with the laser profilometer takes less than 20 s, which is more suitable for batch testing.

Conclusions and Future Work
This paper presents an accurate, efficient, and stable algorithm for large-scale planar point cloud registration. In this approach, coarse-to-fine registration is achieved based on the boundary information. Our improved boundary extraction method filters out the outliers and obtains accurate boundary points after an approximate location. In addition, we introduce an LS-based invalid keypoints elimination method and cluster the correspondences based on geometric consistency constraints to improve the speed and accuracy of registration. The proposed method was tested on four types of large-scale planar point clouds. The experimental results show that our method is both efficient and fast and that it accurately determines the optimal transformation under different levels of noise. In addition, our method successfully overcomes the problems raised in the introduction and can be widely applied to flatness measurement or other applications requiring point cloud registration.
However, the proposed algorithm has certain limitations. The registration accuracy of the method in this study is largely dependent on the accuracy of the boundary extraction result, while it requires experience in selecting optimal down-sampling voxel sizes and search radii in different environments. In addition, the descriptive capacity of the descriptors also affected the results. Future work will include a progressive strategy for boundary extraction and a more efficient descriptor for the boundary point cloud.