Next Article in Journal
Seasonal Variability and Risk Assessment of Atmospheric Polycyclic Aromatic Hydrocarbons and Hydroxylated Polycyclic Aromatic Hydrocarbons in Kanazawa, Japan
Previous Article in Journal
Mario and Sonic at the Olympic Games: Effect of Gamification on Future Physical Education Teachers
Previous Article in Special Issue
Applications of Stretching Technique and Time Window Effects on Ultrasonic Velocity Monitoring in Concrete
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Automatic Registration Algorithm for the Point Clouds Based on the Optimized RANSAC and IWOA Algorithms for Robotic Manufacturing

1
School of Mechanical and Precision Instrument Engineering, Xi’an University of Technology, Xi’an 710048, China
2
School of Mechanical Engineering, Nanjing Vocational University of Industry Technology, Nanjing 210023, China
*
Author to whom correspondence should be addressed.
Appl. Sci. 2022, 12(19), 9461; https://doi.org/10.3390/app12199461
Submission received: 22 August 2022 / Revised: 13 September 2022 / Accepted: 20 September 2022 / Published: 21 September 2022
(This article belongs to the Special Issue Advanced Digital Non-Destructive Testing Technology)

Abstract

:
In order to solve the problems of low accuracy and low efficiency of point cloud registration for stereo camera systems, we propose a binocular stereo camera point cloud registration method based on IWOA and Improved ICP. We propose the following approaches in this paper—the registration process is divided into two steps to complete the initial coarse registration and the exact registration. In the initial registration stage, an improved Whale Optimization Algorithm (IWOA) based on nonlinear convergence factor and adaptive weight coefficients was proposed to realize the initial registration in combination with the RANSAC algorithm, and the obtained transformation matrix was used as the initial estimate of the subsequent exact registration algorithm. In the second step of the exact registration stage, an IICP algorithm with the introduction of normal vector weighting constraints at key points was proposed for achieving point cloud exact registration. This algorithm was verified by using Stanford point clouds (bunnies and monkeys) and our own point clouds algorithm, and the proposed algorithm in this paper has high registration accuracy, improved registration speed, and convergence speed.

1. Introduction

Point cloud registration, widely used in various fields including industrial vision, reverse engineering, cultural relics restoration, virtual reality, intelligent processing, flexible manufacturing, etc., is a key technology in the fields of binocular vision inspection and intelligent processing [1,2]. The purpose of point cloud alignment [3] is to unify multiple point clouds of the same object or scene at different times, different positions, and different angles into the same reference coordinate system by finding some spatial transformation relationship, to realize the fusion and stitching between point clouds and obtain a complete 3D point cloud of the target object. Considerable relevant research has been carried out. Hafiz et al. [4] proposed a novel method for the conversion of 2D RGB images to 3D point clouds by constructing a single-code-multiple-decode depth network architecture in which each decoder generates certain fixed viewpoints and, subsequently, fuses all the viewpoints to generate a dense point cloud, which was experimentally shown to have superior performance. The iterative closest point (ICP) algorithm proposed by Besl [5] et al. in 1992 was extensively applied to point cloud matching, with the focus placed on searching for the correspondence between two sets of registration points for calculating the transformation matrix. However, the ICP algorithm is subject to the disadvantages of necessary inclusion relationships, low computational efficiency, and high initial location requirements [6]. Moreover, the registration results of the algorithm depend heavily on the initial position of the point cloud. When the position of the two-point cloud data sets differs greatly, the results may converge to the optimal local solution and even lead to failure in registration. Therefore, a good initial value is required for the algorithm to ensure convergence.
In order to address the above-mentioned problems, scholars have made improvements based on the ICP algorithm, and brought forth lots of new point cloud registration methods. Yu Wenli et al. [7] accomplished the initial registration of point cloud using the four PCS method, and calculated the rigid transformation matrix of the three-dimensional model using the point-to-face ICP method and least square method, achieving some improvements; Wang Yujian et al. [8] proposed a registration method based on the multi-layer index structure of octree and KD tree and improved the efficiency and accuracy of point cloud registration. Wang Dong et al. [9] reduced the matching error at the edge and corner points and improved the overall matching effect by combining the ICP algorithm and inverse method of surface point parameters. Segal et al. [10] integrated the point-to-point and point-to-surface ICP algorithms into a statistical framework and greatly improved the robustness of three-dimensional point cloud registration for noise, outliers and mismatching; Yang et al. [11] adopted a nested branch and bound search structure comprising two branch and bound searches, one of which was the Go-ICP algorithm bounded by an external branch for rotation space search, with the highest accuracy but still exposed to the inferior strength of time-consuming in the case of calculating a large number of point clouds.
With the algorithm mentioned above, some progress has been made in the study of point cloud registration, but the real-time and accuracy of the point cloud are increasingly demanding as intelligent manufacturing moves forward. Problems faced by point cloud registration, including poor real-time registration, low accuracy, and poor robustness, are still to be solved, thus making the research on rapid and accurate registration methods a hot spot and a difficult point in the engineering field. The problems of determining the corresponding points in the coarse alignment stage and solving the translation and rotation matrix in the fine alignment stage can be converted into constrained optimization problems in the final analysis. Conventional solutions are subject to problems such as failing to find optimal solutions for constraints, being prone to local optimization and poor real-time capability, etc. The application of an intelligent optimization algorithm has been a novel idea in the study of point cloud registration in recent years. Thus far, relevant research has been conducted, and corresponding progress has also been made. Yang Bo et al. [12] put forward an improved ICP point cloud registration algorithm based on the genetic algorithm, which is provided the ability of optimal global search for rough registration, registers point cloud data with the 3D model, and provides a good iterative initial value for subsequent accurate registration. Experimental results showed that this method could effectively improve the accuracy and rate of point cloud registration. Huang et al. [13] fulfilled point cloud registration using an iterative closest point algorithm based on hierarchical particle swarm optimization to improve the performance of 3D point cloud registration, then obtained the feature points precisely expressing the point cloud structure by jointly searching for the optimal particles using the curvature of the point cloud as the fitness value, and finally, performed the registration of the feature points using the iterative closest point algorithm and achieved better registration efficiency. Based on the ICP algorithm, Wu Hao [14] proposed an automatic registration algorithm that carries out automatic rough registration in view of boundary characteristics of the point cloud, followed by automatic fine registration through an improved ICP algorithm. Experimental results proved that this method possesses a sub-millimeter improvement versus the classical algorithm.
The ICP algorithm presupposes that the coarse registration process establishes the correct initial registration point pairs and achieves accurate registration of point clouds. The quality of rough registration directly affects the efficiency and accuracy of fine registration. Until now, the coarse registration methods mainly include Gaussian-likelihood estimation factor analysis proposed by Li Zan et al. [15], 3D-NDT-based point cloud registration by Zhang Xiao et al. [16], the feature-based method by Tian et al. [17], and RANSAC algorithm by RUSU et al. [18]. Liu Meiju et al. [19] combined the descriptor algorithm for internal morphology with the histogram algorithm with fast point characteristics and then improved the RANSAC algorithm for the initial registration of point cloud by means of pre-estimation and 3D grid segmentation to obtain better results. Ren et al. [20] proposed a color-based point cloud alignment algorithm that extracts the hue components based on the color information of the point cloud and makes the hue distribution of the tangent plane continuous. The error function consists of the color of the point cloud to be aligned and the geometric error. The error function is optimized using the Gauss–Newton method, and the algorithm has good robustness under different lighting conditions. Choi et al. [21] proposed a new algorithm to improve numerical stability. Unlike previous algorithms that rely heavily on point-to-plane distances, their algorithm constructs a cost function based on two different projection distances, and experiments show that the algorithm has high accuracy for color point cloud alignment. Ge et al. [22] proposed a pairwise non-rigid alignment algorithm for 3D point clouds, which generates a correspondence between two deformed point clouds based on the isometric deformation property invariant, and subsequently uses a random sample consensus (RANSAC) algorithm for cloud point feature extraction to better prepare for the optimization of alignment. Yang et al. [23] proposed a spatially decomposed and optimized RANSAC algorithm for indoor plane detection based on the phenomenon that the traditional RANSAC algorithm is prone to feature extraction errors for occluded and missing point cloud data. The method uses a weighted PCA method to estimate the normal vector of the point cloud and then employs angular clustering to partition the indoor space, followed by an optimized RANSAC method to calculate the alignment parameters from the obtained point cloud data. Ghahreman et al. [24] proposed a robust method for direct analysis of point cloud data, which proposes an improved RANSAC algorithm to overcome the adverse effects of point cloud data, such as loss and occlusion. The plant feature extraction experiment proved the effectiveness of this algorithm. Niloy et al. [25] investigated the effects of neighborhood size, curvature, sampling density, and noise on normal estimation and proposed an initial position selection based on the curvature of the point cloud surface, which can effectively improve the robustness of the ICP alignment algorithm. Takeshi et al. [26] proposed a new point cloud alignment and data segmentation algorithm with random sampling and the Least Median of Squares (LMS) or the least-median-of-squares (LMedS) estimator. The algorithm was robust in the presence of outliers (outliers) such as noise and occlusion. Rantoson et al. [27] improved the point cloud alignment by considering a new discrete curvature parameter, which also divides the alignment process into two steps: coarse alignment and exact alignment, for which the coarse alignment is performed based on the enhanced Hough transform (HT) and the improved RANSAC model transformation. In the exact alignment stage, the author proposed a new variant of the ICP method to reduce the alignment error when using the curvature parameter. The algorithm they used took into account the curvature similarity and the Euclidean distance to define the criteria used to search for correspondences. Donoso et al. [28] from Australia compared common improved ICP-based algorithms to scan the scene at 20 Hz using their own Velodyne HDL-64E scanner installed on a minecart, and none of the improved ICP-based algorithms could achieve alignment accurately, precisely, and quickly at the same time in three evaluation metrics based on accuracy, precision, and relative computational cost. The best-performing improvement algorithm employs a strategy of filtering the dataset, uses normal forms of local surface geometry, uses the distance between points in a point cloud and the corresponding surface in a reference point cloud as a measure of the fit between the two point clouds, and points out the limitations of various existing improvement algorithms based solely on ICP for terrain mapping. The above-mentioned algorithms have their characteristics for feature extraction, but there are fewer point cloud features that have been applied to processing. There are still many research and studies that are needed to address some of the challenges and difficulties in pre-processing and alignment of point cloud data, considering the time-sensitiveness and accuracy of feature identification in processing.
In the field of robot vision processing, the vision system extracts the point cloud data of the target workpiece in real-time, identifies the features of the workpiece through the calculation of the point cloud data, and then determines the area to be processed and the reserved area. The ICP algorithm alignment accuracy is high, but the algorithm requires the point cloud to be aligned to have a certain initial relationship, and the ICP alignment algorithm alone is easy to fall into misalignment, and the alignment is not high in real time. In the field of robot processing, the surface characteristics of the workpiece and the model data distribution can be described by some model parameters, so the RANSAC algorithm is faster, but it is an uncertain algorithm that has a certain probability of yielding a reasonable result; therefore, the RANSAC algorithm can be used as the basis of the initial alignment algorithm. Based on the above, a new hybrid point cloud registration algorithm integrating the whale optimization RANSAC algorithm and ICP algorithm for point cloud initial alignment was hereby presented in this paper. First, the optimal solution of the RANSAC algorithm is solved quickly by the improved whale optimization algorithm, and the coordinate translation and rotation parameters are obtained by the improved ICP algorithm. Simulations and experiments verified the registration accuracy and efficiency of the algorithm designed in this paper.
The rest of this paper consists of four sections. Section 2 introduces the RANSAC algorithm to achieve initial alignment and proposes a nonlinear convergence factor and adaptive weight coefficient method to improve the whale optimization algorithm to optimize the RANSAC algorithm in order to achieve initial alignment quickly and accurately. Section 3 is the point cloud accurate alignment and proposes a method to improve the ICP algorithm based on the key point normal vector weighted judgment method. Section 4 describes our experiments by comparing the RANSAC algorithm, ICP algorithm, Depth Filtering-ICP, and IWOA-RANSAC-ICP algorithms, and it was concluded that the proposed method in this paper has a small mean square error, low false identification rate, and faster alignment speed. The effectiveness and superiority of the algorithms in this paper are proved. Section 5 summarizes the research in this paper and suggests future research directions.

2. Optimized RANSAC Algorithm Using IWOA

2.1. RANSAC Algorithm

The requirement for a typical ICP algorithm to register the initial position of the point cloud is rather demanding, and it is easy to fall into local optimization when there is a large initial position deviation. In this study, the RANSAC algorithm was used for coarse registration in the initial registration stage. This very algorithm aims to find an optimal transformation matrix for eliminating the error matching and solve 12 unknown parameters of the transformation matrix by randomly selecting six matching points using the normalization method. The general expression of the transformation matrix T is:
x y z 1 = R 11 R 12 R 13 T x R 21 R 22 R 23 T y R 31 R 32 R 33 T z 0 0 0 1 x y z 1
where ( x , y , z ) and ( x , y , z ) are the cartesian coordinates of the target point cloud and the point cloud to be registered.
Given a large number of point clouds, the existence of many mismatching points, and the poor timeliness, coupled with the fact that the solution obtained within the specified iterations may not be optimal, the accuracy of the initial registration is affected while solving the transformation matrix by the RANSAC algorithm.

2.2. Improve WOA Based on Nonlinear Convergence Factor

Whale optimization algorithm (WOA) is a new swarm intelligence algorithm proposed by Australian scholars Seyedal et al. [29] based on the predatory behavior of humpback whales, which, compared with most optimization algorithms, is characterized by strong global optimization capability and simple structure. Inspired by bionics, the algorithm models the featured hunting methods of whales as the processes of encirclement, predation, and random search. The basic model of this algorithm is described as follows: Supposing that the number of whale individuals in d-dimensional search space is N , the i th individual in the t th iteration is represented as:
X i t = ( x i 1 , x i 2 , ) ( i = 1 , 2 , , m ; t = 1 , 2 , , T m a x )
where T m a x is the maximum times of the iterations.
The encirclement and contraction phase simulates the behavior of humpback whale populations identifying the prey and contracting the encirclement. The behavior is expressed by the formula:
D = C · X * ( t ) X ( t )
X ( t + 1 ) = X * ( t ) A · D
where A and C denote coefficient vectors; X * is the current global optimal position; X is the position of the individuals in the t th generation; and t denotes the current number of iterations. Coefficients A and C are calculated as:
A = 2 a · r a
C = 2 r
where a represents the accommodation coefficient that decreases linearly from 2 to 0 with the increasing number of iterations; and r is the random vector of the [0, 1] distribution. Given that A < 1 in this phase, the population converges to the current optimal solution.
Whales prey in two ways of spiraling procession and narrowing encirclement. Assume that the probability of both methods is fifty-fifty when they carry out a task, the position can be updated as:
X ( t + 1 ) = D · e l · cos ( 2 π l ) + X * ( t )
D = X * ( t ) X ( t )
where D denotes the distance between the individual and the optimal solution in the t th Generation; and l is a random number from [–1, 1].
If A > 1 while searching for optimal solutions, the position between individuals updates based on each other’s positions to avoid falling into the local optimal solution to some extent. The mathematical models of the mechanism are described as follows:
D = C · X r a n d ( t ) X ( t ) .
X ( t + 1 ) = X r a n d ( t ) A · D .
where X r a n d denotes the position vector of random individuals in the population.
It can be concluded from the above algorithms that the global search capability of the conventional WOA is dependent on the convergence factor a , whose decreasing tendency with the increasing number of iterations reduces both the convergence rate and the search capability. At the initial stage of the algorithm, a larger a endows the algorithm with a greater global search capability. As the algorithm proceeds, a smaller convergence factor a can provide a higher search accuracy. Therefore, a nonlinear convergence factor is proposed as:
ω = ( 1 + 2 t T m a x ) 5
a = ( 2 2 t T m a x ) ( 1 ω ) .
where t means the current time of iterations; and T m a x , the maximum time of iterations set for the algorithm. The nonlinear convergence factor introduced in this paper produces large parameter A in the early iteration stage, improves the global search capability of the algorithm, and speeds up its convergence; in the latter iteration stage, a smaller parameter A is produced, and the convergence accuracy is improved.
Given that the standard WOA does not take into account the current optimal solution during the iterative process, there may be differences while guiding whales for position updating. WOA combines the idea of population optimization guided by inertia weight in the PSO algorithm, and introduces the adaptive parameters as inertia weight factors in the formula for updating the position, so that the optimal solution can be fully utilized for improving the optimization accuracy of the algorithm. The improved formula for position update is presented as:
X ( t + 1 ) = ω · X r a n d ( t ) A · D .
where the weighting factor ω nonlinearly increases with the rising number of iterations, and the algorithm shows greater global search capability in the case of a relatively large weighting factor in the initial stage; the weighting factor is gradually decreasing with the increase in iterations, and in this case, the algorithm carries out a spiral search in the neighborhood of optimal solution using a smaller weight to prevent it from falling into local optimization.

2.3. Realize Point Cloud Initial Registration Process

In the realization process of the point cloud coarse registration by RANSAC, an appropriate sample subset can improve the registration efficiency, while the distance error determines the registration accuracy. Six sampling points are selected from P , the point cloud to be registered, and the distance between every two points is greater than the preset minimum threshold d . In order to obtain a minimal value by the error function, optimal ones should be found from all the transformations to complete the initial registration. In this paper, the improved WOA was used for optimization. However, the problem needs to be first elaborated by a mathematical model—fitness function, i.e., the target of the optimization algorithm. The corresponding point cloud registration error of the algorithm used in this paper and l are defined as:
l = 1 n i = 1 n ( x i p x i q ) 2 + ( y i p y i q ) 2 + ( z i p z i q ) 2 .
The fitness function f ( t ) is defined as:
f ( t ) = arg m i n i = 1 n H ( l ) = 0.5 l 2 , l < m l 0.5 m l ( 2 l m l ) , l > m l
where H ( l ) indicates H u b e r penalty function, m l denotes the preset threshold, and l is the distance difference after the transformation of the corresponding points in the i th group. The transformation satisfying the minimum value of the error function is considered optimal when the transformation matrix is the initial registration and is used for completing the initial registration of the residual point cloud. The realization flow of R A N S A C registration by IWOA is shown in the figure below (Figure 1):

3. Realize Point Cloud Fine Registration Using Improved ICP Algorithm

3.1. Mathematical Models of the ICP Algorithm

In point-based point cloud registration, the transformation between the target point cloud and the point cloud to be registered can be determined by the affine transformation translation matrix T and the rotation matrix R . Currently, the iterative closet point (ICP) and various variants of the ICP algorithm are the most widely-used point cloud registration algorithms. The ICP algorithm was first developed by Besl et al. [1], which finds the least-square rigid transformation matrix between two point cloud data sets according to the closest distance criterion of the corresponding point, and repeats the iterations until the local minimum value is obtained. Considerable deformations and optimizations of the ICP algorithm were proposed for different application environments.
The registration of the surface point cloud can be simplified as the matching of measured point cloud relative to the theoretical point cloud. If P is set as the measured point cloud of the curved workpiece while Q is the theoretical point cloud, the relationship between these two point clouds can be shown as:
Q = R · P + T
where R = [ R x , R y , R z ] T and T = [ T x , T y , T z ] T represent the rotation and translation of the three axes (x, y, z) of P relative to the theoretical point cloud Q , respectively. Select multiple point pairs in the measured point cloud dataset, denoted by p i P , and find the corresponding point set q i in the theoretical point cloud set Q so that the value of the target function shown in the following formula can be the minimum:
d = m i n p i q i
Then, calculate the transformation matrices R and T to minimize value of the error function:
f ( R , T ) = m i n R , T 1 N P i = 1 N P q i ( p i · R + T ) 2
Rotate and translate the rotation matrix R and translation matrix T obtained in Step 2 for p i using the transformation matrix for a new corresponding point set:
P i = p i = p i · R + T , p i P
Calculate the average distance between P i and the corresponding point set Q:
d = 1 N P i = 1 N P P i Q i 2
If the average distance d is less than the preset threshold or the number of iterations is greater than the preset maximum number of iterations τ , leave the loop and stop the iterations; otherwise, return to recalculate the transformation matrix until the convergence requirements are met. The standard flow of ICP registration is shown in Figure 2.
The accuracy of the ICP algorithm is generally evaluated as the root-mean-square error σ M S E that calculates the distance of all point clouds. The formula is:
σ M S E = i = 1 N P q i ( p i · R + T ) 2 N P .
The standard ICP algorithm is not necessarily required to segment and extract features from the point cloud data to be processed, which saves time for feature extraction and helps obtain more accurate registration results. Additionally, the algorithm converges well in the presence of better initial registration values. However, in search of corresponding points, a comparison with a large number of point cloud data should be conducted, and large computation is therefore required. It is irrational for the standard ICP to make the hypothesis that the closest point of Euclidean Distance is the corresponding point, which brings about a certain number of corresponding false points [29]. For this reason, an improved ICP algorithm was proposed in this paper.

3.2. Realize Accurate Registration of Point Cloud

Conventional point cloud matching algorithms are applicable only between two-point clouds, and the two-point cloud sets have an inclusion relation. In the case of a big difference in the initial spatial position of the overlapping point clouds, the conventional algorithm is apt to fall into the local optimal solution [15,30]. Therefore, under the premise that the standard ICP algorithm satisfies the minimum error function. The algorithms are detailed as follows:
(1)
Downsample the point cloud to be registered P and the target point cloud Q;
(2)
Search for the closest point of the target cloud using KD-tree, calculate the distance di in accordance with Equation (17); if di < k, calculate the normal vector θi of the two corresponding points in P and Q, and the point is determined as the corresponding point in P if θi < θ, otherwise, repeat the iteration;
(3)
Calculate the average distance d of the corresponding point set. If it is less than the preset threshold, or if the times of iterations are greater than the preset maximum number of iterations τ, leave the loop and stop the iterations; otherwise, return to recalculate the transformation matrix until the convergence requirements are met. The registration flow of the algorithm proposed in this paper is shown in Figure 3.

4. Verification and Analysis

4.1. Registration Visualization

In order to test the effectiveness of the proposed algorithm, the data sets Bunny (40256) and Monkey (125952) from Stanford University were adopted for simulation. The initial state of the point cloud is shown in Figure 4. The model computer used in the test is I5-10400F, configured with a memory of 16G, a display card of Nvidia GTX 1060 6G, an operating system of win10 64 bit, and is operated on VS2019. The target point cloud was rotated −50 degrees on the Z axis, and shifted 5 mm in X and Y directions, respectively, but −10 mm in the Z direction, which was then used as a point cloud to be registered. The downsampling grid size was set to 0.05 mm. Since the initial alignment results obtained by the method in the literature [21] have a large deviation, the alignment accuracy and speed were further compared in this paper. and the proposed algorithm was compared to standard ICP, RANSAC algorithms, Depth Filtering-ICP. The initial state of the point cloud is shown in Figure 4.
The maximum number of iterations of ICP, RANSAC, Depth Filtering- ICP and IWOA-RANSAC-ICP algorithms was all set as 50. In IWOA algorithm, set 20 times iterations, 10 whale populations and a 0.05 threshold of fitness function m l were set. For the research objects of this paper, characteristic quantities f were selected as the evaluation index in order to evaluate the algorithm. It is 50 , 1000 for the value range of characteristic quantity f in this paper, which was used for histogram feature quantity evaluating feature points. We can express the feature evaluation function f k of point cloud as follows:
f k = k 1 + 3 k 2
Among which k 1 is determined by the angle between the normal vector of any point and that of its adjacent point. Moreover, the plane is divided into 0 , π / 3 π / 3 , 2 π / 3 2 π / 3 , π , and k 1 is noted as 1,2,3 according to the range of angle between the normal vector and that of its adjacent point. k 2 is the Euclidean distance between any point and the nearest adjacent point. If the distance is one that is greater than a certain threshold value and zero that is less than the threshold value, the threshold value was set to 0.005 in this paper. Then we established a histogram with an interval number that two multiple by 3 equals six to obtain the corresponding 6-dimensional characteristic value in accordance with the classifications of these two feature values.
We regarded the percentage occupying the total number of the points of the point cloud in each interval as the corresponding interval value and characteristic value. The default values were adopted for other parameters, which f k were 16 before optimization. Moreover, it was 0.500000 for the fitness function value. It was 0.000015 for the evaluation function value. After optimization, they f k were 42, 0.239051, and 0.000006, respectively, for the default value, the fitness function value, and the evaluation function value. For convergence curve of the optimized RANSAC algorithm of IWOA, it is shown in Figure 5.
It can be seen from the iteration curve that it can quickly obtain the optimal solution after the start of iteration for the optimized RANSAC algorithm of IWOA. It is less than that of the simple RANSAC algorithm for the fitness value of this algorithm, which has a faster speed of convergence, stable curve, and good real-time performance. The registration results of the four registration methods are shown in Figure 6.
According to Figure 6, the standard ICP algorithm and the three standard algorithms are all capable of completing the registration of Bunny and Monkey point clouds. However, the standard ICP algorithm is greatly influenced by the accuracy of initial registration and poses a great impact on subsequent registration due to the poor accuracy of registration in the process of Monkey registration. In the case of direct registration with ICP, despite the fast rate, there is a large error, and in some cases, it falls into local optimization, failing to fulfill accurate registration. The standard RANSAC algorithm is required to transform and calculate a large amount of point cloud data, which makes its registration rate slower than that of the standard ICP algorithm. However, the proposed IWOA-RANSAC-ICP algorithm overcomes the shortcomings of both the above two algorithms and introduces intelligent optimization algorithms that can quickly achieve the initial registration of point clouds. The point cloud after initial registration subsequently provides a more reliable initial value for the improved ICP algorithm, and the normal vector constraint of key points is introduced into the ICP registration algorithm to avoid local optimization in the stage of accurate registration. On the whole, this method can achieve the optimum registration effect, but given the long registration process, its efficiency remains to be improved. The registration time of Bunny and Monkey using these four methods is shown in the following table (Table 1).
As can be seen from the above table, the number of Bunny point clouds is small, and the ICP algorithm converges the objective function by repeated iterations of the points so that the corresponding points are gradually approximated to achieve accurate alignment quickly, and when the number of point clouds increases significantly, the time required by the ICP algorithm increases accordingly. Depth Filtering-ICP and IWOA-RANSAC-ICP take more time to align than the previous two due to the increased workflow of point cloud registration, and in the subsequent research, the focus is on improving and optimizing the algorithm to increase the speed of the alignment. The mean square error of the four methods is shown in Table 2 below.
According to Table 1 and Table 2, the registration speed of Bunny and Monkey using the standard ICP algorithm is fast but is also subject to a large root-mean-square error, which may be attributed to the great influence of the initial state on the registration. Additionally, the standard RANSAC algorithm is slow but accurate, and the Depth Filtering-ICP algorithm is better than the first two in some metrics. The IWOA-RANSAC-ICP algorithm is close to the standard RANSAC algorithm in terms of the registration rate, but it is more accurate with a minimal root-mean-square error.

4.2. Analysis of Experimental Data

In order to test the algorithm’s effectiveness in the laboratory scanning point cloud, the data from two groups of mechanical devices were collected using a portable three-dimensional scanner (PRINCE 335) with a reference distance of 300 mm and a field depth of 250 mm. The operating distance of the scanner from the scanned surface ranged from 200 to 450 mm, and the precision reached 0.01 mm + 0.025 mm/m by precise scanning. The number of collected workpiece point clouds was 853,105, and the collecting site and the collection point clouds are shown in Figure 7. The above figure is named Workpiece A, and the below figure, Workpiece B, to simplify the subsequent analysis. They are the same as the above for the algorithm settings.
Workpiece A has 853,105 points, which is reduced to 648,172 after downsampling. Workpiece B has 356,310 points, which is reduced to 175,640 after the same operation. Two groups of point clouds were processed by downsampling and translation rotation transformation, respectively, and then registered using the three algorithms mentioned above. The results of their registration using the four algorithms are shown in Figure 8.
The registration time of the point clouds of Workpieces A and B using the three algorithms are shown in Table 3 below.
As can be seen from the above table, when the point cloud data increases significantly, the time of all the above four algorithms increases accordingly. For workpieces A and B, the time difference between the time required by the ICP algorithm and the time of the method designed in this paper is not large. Although the algorithm process in this paper is longer, it still maintains a good alignment speed and accuracy due to the better robustness of IWOA, and the RANSAC and Depth Filtering-ICP algorithms require a larger increase in time and a longer alignment time, which proves that the algorithms need to be further optimized. The mean square error of the point clouds of Workpieces A and B using the four algorithms is presented in Table 4 below.
As can be seen from the above Figure 8, Table 3 and Table 4, the standard ICP can roughly accomplish the registration of some point clouds with the same downsampling rate and maximum number of iterations throughout the test but is subject to poor registration accuracy, which may be attributed to the higher initial point-to-point requirements of ICP registration and the lower accuracy of subsequent registration in the case of a large initial point pair error. The standard RANSAC algorithm can obtain better results than the standard ICP algorithm in the registration of workpieces A and B. Given that the RANSAC algorithm carries out the registration first based on the fast point feature histogram, it is superior to the ICP algorithm for the registration of workpieces with obvious surface features, but the speed is slower due to the necessity of extracting the histogram first. For Depth Filtering, the ICP algorithm has a significant increase in error and a significant decrease in alignment speed at higher data volumes. The hereby proposed IWOA-RANSAC-ICP algorithm realizes rapid optimization of the RANSAC algorithm using WOA, accelerates the feature extraction, and provides a more accurate initial point pair for the ICP algorithm. Overall, this very algorithm possesses higher accuracy, but its efficiency still needs further improvement.

5. Conclusions and Future Work

In this paper, a hybrid optimization algorithm based on the Improved Whale Optimization Algorithm and improved ICP was proposed to achieve point cloud registration in response to the problems and shortcomings of existing point cloud registration methods. In the initial registration stage of this paper, an improved whale optimization algorithm based on nonlinear convergence factor and adaptive weight coefficients was proposed because the number of point clouds is usually substantial, and the standard whale optimization algorithm is easy to suffer premature convergence that causes it to trap in local optimum as the search proceeds. The algorithm uses smaller weights to search in the neighborhood of the optimal solution in a spiral manner to prevent falling into the local optimum. In the second step of accurate registration, since the standard ICP algorithm is sensitive to noise and outliers, it is prone to misregistration. We proposed an improved ICP algorithm with weighted constraints on the normal vectors of key points to avoid the algorithm from falling into local optimum and further improve the performance of the ICP algorithm in point cloud accurate registration. The experimental results show that the proposed algorithm has lower error compared with other registration algorithms, higher registration accuracy, and faster convergence speed and can meet the needs of subsequent work.
With the increasing accuracy and resolution of visual systems, the obtained point cloud data are becoming more and more informative, and further research is still needed for point cloud denoising strategies while keeping the main cloud point data features and information intact. For the registration of a large amount of point cloud data, there are still limitations in the existing algorithms, and further research is needed to improve the accuracy and efficiency of the registration algorithm.

Author Contributions

Formal analysis, L.M.; Funding acquisition, L.W.; Investigation, Y.C.; Methodology, G.L. All authors have read and agreed to the published version of the manuscript.

Funding

This paper is supported by the 2021 Jiangsu Higher Education Teaching Reform Research Key Project (No. 2021JSJG156) and Shaanxi Key Laboratory of Machinery Manufacturing Equipment Construction Project.

Informed Consent Statement

Written informed consent has been obtained from the patient(s) to publish this paper.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Allah, A.A.A.; Aly, A.; Abdelnaim, A. Interactive fluid flow simulation in computer graphics using incompressible smoothed particle hydrodynamics. Comput. Animat. Virtual Worlds 2019, 31, e1916. [Google Scholar] [CrossRef]
  2. Abdelnaim, A.; Hassaballah, M.; Aly, A.M. Fluid-structure interactions simulation and visualization using ISPH approach. J. Flow Vis. Image Process. 2019, 26, 223–238. [Google Scholar] [CrossRef]
  3. Sobreira, H.; Costa, C.M.; Sousa, I.; Rocha, L.; Lima, J.; Farias, P.; Costa, P.; Moreira, A.P. Map-matching algorithms for robot self-localization: A comparison between perfect match, iterative closest point and normal distributions transform. J. Intell. Robot. Syst. 2019, 93, 533–546. [Google Scholar] [CrossRef]
  4. Hafiz, A.M.; Bhat, R.U.A.; Parah, S.A.; Hassaballah, M. SE-MD: A Single-encoder multiple-decoder deep network for point cloud generation from 2D images. arXiv 2021, arXiv:2106.15325. [Google Scholar]
  5. Besl, P.J.; McKay, N.D. A method for registration of 3-D shapes. IEEE Trans. Pattern Anal. Mach. Intell. 1992, 14, 239–256. [Google Scholar] [CrossRef]
  6. Sun, J.; Chen, H.; Geng, G. Optimization algorithm for alignment of 3D cultural relics point cloud model. J. Comput. Aided Des. Graph. 2016, 28, 1068–1074. [Google Scholar]
  7. Yu, W.-L.; Zhou, M.-Q.; Tax, W.-Y.; Wu, Z.-K. Curvature-based automatic point cloud alignment method. J. Syst. Simul. 2015, 27, 50. [Google Scholar]
  8. Wang, Y.; Lian, T.; Wu, M.; Gao, Q. A point cloud alignment method based on octree and KD tree indexing. Surv. Mapp. Eng. 2017, 08, 35–40. [Google Scholar]
  9. Wang, D.; Zhou, K. Application of point cloud alignment in the positioning of large surface workpieces. Comput. Appl. Res. 2015, 32, 2347–2349. [Google Scholar]
  10. Segal, A.; Haehnel, D.; Thrun, S. Generalized-icp. Robot. Sci. Syst. 2009, 2, 435. [Google Scholar]
  11. Yang, J.; Li, H.; Campbell, D.; Jia, Y. Go-ICP: A Globally Optimal Solution to 3D ICP Point-Set Registration. IEEE Trans. Pattern Anal. Mach. Intell. 2016, 38, 2241–2254. [Google Scholar] [CrossRef] [PubMed]
  12. Yang, B.; Yang, Z. Research on point cloud registration technology based on genetic algorithm. J. Cent. South Univ. Natl. 2018, 37, 104–108. [Google Scholar]
  13. Huang, S.; Wen, P.; He, H. 3D point cloud alignment based on hierarchical particle swarm optimization. J. Jinan University 2021, 35, 376–380. [Google Scholar]
  14. Wu, H. Research on the Improved Algorithm of Automatic Point Cloud Alignment Based on ICP Algorithm; Liaoning University of Engineering and Technology: Fuxin, China, 2016. [Google Scholar]
  15. Li, C.; Sun, W. Point cloud alignment algorithm based on Gaussian likelihood estimation factor analysis. Comput. Appl. Softw. 2021, 38, 232–236. [Google Scholar]
  16. Zhang, X.; Zhang, A.; Wang, Z. Point Cloud Registration Based on Improved Normal Distribution Transform Algorithm. Laser Optoelectron. Prog. 2014, 51, 041002. [Google Scholar] [CrossRef]
  17. Tian, Y.; Li, G.-Q.; Song, X. A Novel 3D Terrain Feature Detecting and Matching Method. J. Astronaut. 2018, 39, 690–696. [Google Scholar]
  18. Rusu, B.R.; Blodow, N.; Beetz, M. Fast point feature histograms (FPFH) for 3D registration. In Proceedings of the 2009 IEEE International Conference on Robotics and Automation, Kobe, Japan, 18 August 2009; pp. 3212–3217. [Google Scholar]
  19. Liu, M.; Wang, X.; Li, X.; Gao, E. Application of improved RANSAC algorithm in 3D point cloud registration. Prog. Laser Optoelectron. 2018, 55, 165–171. [Google Scholar]
  20. Ren, S.; Chen, X.; Cai, H.; Wang, Y.; Liang, H.; Li, H. Color Point Cloud Registration Algorithm Based on Hue. Appl. Sci. 2021, 11, 5431. [Google Scholar] [CrossRef]
  21. Choi, O.; Hwang, W. Colored Point Cloud Registration by Depth Filtering. Sensors 2021, 21, 7023. [Google Scholar] [CrossRef]
  22. Ge, X. Non-rigid registration of 3D point clouds under isometric deformation. ISPRS J. Photogramm. Remote Sens. 2016, 121, 192–202. [Google Scholar] [CrossRef]
  23. 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]
  24. Ghahremani, M.; Williams, K.; Corke, F.; Tiddeman, B.; Liu, Y.; Wang, X.; Doonan, J.H. Direct and accurate feature extraction from 3D point clouds of plants using RANSAC. Comput. Electron. Agric. 2021, 187, 106240. [Google Scholar] [CrossRef]
  25. Mitra, N.J.; Nguyen, A. Estimating surface normals in noisy point cloud data. In Proceedings of the Nineteenth Annual Symposium on Computational Geometry, San Diego, CA, USA, 8–10 June 2003; pp. 322–328. [Google Scholar] [CrossRef]
  26. Masuda, T.; Yokoya, N. A Robust Method for Registration and Segmentation of Multiple Range Images. Comput. Vis. Image Underst. 1995, 61, 295–307. [Google Scholar] [CrossRef]
  27. Rantoson, R.; Nouira, H.; Anwer, N.; Mehdi-Souzani, C. Improved curvature-based registration methods for high-precision dimensional metrology. Precis Eng. 2016, 46, 232–242. [Google Scholar] [CrossRef]
  28. Donoso, F.; Austin, K.; McAree, P. How do ICP variants perform when used for scan matching terrain point clouds? Robot. Auton. Syst. 2017, 87, 147–161. [Google Scholar] [CrossRef]
  29. Mirjalili, S.; Lewis, A. The Whale Optimization Algorithm. Adv. Eng. Softw. 2016, 95, 51–67. [Google Scholar] [CrossRef]
  30. Zhao, K. Research on the Alignment Algorithm Based on RGB-D Point Cloud Data in 3D Reconstruction; Tianjin University: Tianjin, China, 2016. [Google Scholar] [CrossRef]
Figure 1. Realize Point Cloud Initial Registration Process.
Figure 1. Realize Point Cloud Initial Registration Process.
Applsci 12 09461 g001
Figure 2. Flow of ICP.
Figure 2. Flow of ICP.
Applsci 12 09461 g002
Figure 3. Flowchart for the initial registration of RANSAC by IWOA+ accurate registration of the improved ICP.
Figure 3. Flowchart for the initial registration of RANSAC by IWOA+ accurate registration of the improved ICP.
Applsci 12 09461 g003
Figure 4. Initial state of point cloud. (a) Bunny; (b) Monkey.
Figure 4. Initial state of point cloud. (a) Bunny; (b) Monkey.
Applsci 12 09461 g004
Figure 5. Iteration curve of IWOA optimized RANSAC algorithm.
Figure 5. Iteration curve of IWOA optimized RANSAC algorithm.
Applsci 12 09461 g005
Figure 6. Registration results of Bunny and Monkey. (a) Standard ICP algorithm; (b) Standard RANSAC algorithm; (c) Depth Filtering-ICP; (d) IWOA-RANSAC-ICP algorithm.
Figure 6. Registration results of Bunny and Monkey. (a) Standard ICP algorithm; (b) Standard RANSAC algorithm; (c) Depth Filtering-ICP; (d) IWOA-RANSAC-ICP algorithm.
Applsci 12 09461 g006
Figure 7. Collected surface workpiece point clouds. (a) Experimental platform; (b) Point cloud data of workpiece A; (c) Point cloud data of workpiece B.
Figure 7. Collected surface workpiece point clouds. (a) Experimental platform; (b) Point cloud data of workpiece A; (c) Point cloud data of workpiece B.
Applsci 12 09461 g007
Figure 8. Results of workpiece point cloud registration. (a) Standard ICP algorithm; (b) Standard RANSAC algorithm; (c) Depth Filtering-ICP; (d) IWOA-RANSAC-ICP algorithm.
Figure 8. Results of workpiece point cloud registration. (a) Standard ICP algorithm; (b) Standard RANSAC algorithm; (c) Depth Filtering-ICP; (d) IWOA-RANSAC-ICP algorithm.
Applsci 12 09461 g008
Table 1. Registration time of these three methods (ms).
Table 1. Registration time of these three methods (ms).
Point CloudICPRANSACDepth Filtering-ICPIWOA-RANSAC-ICP
Bunny745.521026.4371652.411156.532
Monkey2044.72806.243758.653025.42
Table 2. Comparison of mean square error between the proposed algorithm and other algorithms.
Table 2. Comparison of mean square error between the proposed algorithm and other algorithms.
Point CloudError σ M S E   ( mm )
ICPRANSACDepth Filtering-ICPAlgorithm of This Paper
Bunnyx0.3215320.1611320.7525350.125004
y0.2475230.1062120.5321200.113524
z0.3741560.2646520.3321540.154236
Monkeyx2.518213.1524785.3542252.245156
y0.6180390.8725150.9524520.528965
z1.983361.5021461.7521540.896534
Table 3. Registration time of surface workpiece point cloud (ms).
Table 3. Registration time of surface workpiece point cloud (ms).
Point CloudICPRANSACDepth Filtering-ICPAlgorithm of This Paper
A961,35713,252,6102,512,542989,790
B150,330261,587452,535368,283
Table 4. Comparison of mean square error of the 4 algorithms.
Table 4. Comparison of mean square error of the 4 algorithms.
Point CloudError σ M S E   ( mm )
ICPRANSACDepth Filtering-ICPAlgorithm of This Paper
Ax2.493862.381413.2452541.145785
y0.8855430.5078151.2510140.751423
z0.3072920.653591.3215250.895243
Bx1.2154680.8564871.3215870.786325
y0.5698741.3254690.5145240.684751
z0.9651240.9567871.0254100.884265
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Li, G.; Cui, Y.; Wang, L.; Meng, L. Automatic Registration Algorithm for the Point Clouds Based on the Optimized RANSAC and IWOA Algorithms for Robotic Manufacturing. Appl. Sci. 2022, 12, 9461. https://doi.org/10.3390/app12199461

AMA Style

Li G, Cui Y, Wang L, Meng L. Automatic Registration Algorithm for the Point Clouds Based on the Optimized RANSAC and IWOA Algorithms for Robotic Manufacturing. Applied Sciences. 2022; 12(19):9461. https://doi.org/10.3390/app12199461

Chicago/Turabian Style

Li, Guanglei, Yahui Cui, Lihua Wang, and Lei Meng. 2022. "Automatic Registration Algorithm for the Point Clouds Based on the Optimized RANSAC and IWOA Algorithms for Robotic Manufacturing" Applied Sciences 12, no. 19: 9461. https://doi.org/10.3390/app12199461

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