Prior to estimating normals, we detect the best local tangent planes for the input point data. Generally, the linear regression based on least squares is the most common method to fit a model from point data. However, for a point of real scanning data, its neighbourhood may be corrupted by some noise or gross outliers, or may contain more than one structure (i.e. pseudo-outliers). Consequently, it is fairly challenging to obtain the surrounding inliers of the point, from which the local tangent plane is faithfully approximated. As we know, a single outlier can be sufficient to force the least-squares estimator to produce an arbitrarily large value. To tackle this problem, we adopt a robust statistical method to find the best tangent plane for each point, in which the non-parametric density and density gradient estimation techniques are exploited to estimate the scale of inliers, and thereby a modified random sample consensus strategy is used to obtain the best tangent plane. The noise scale estimation does not get affected by sharp features, and is able to achieve favourable results even in the presence of more than 80% outliers.
3.1. Noise scale estimation
In this section, we adopt a robust noise scale estimator [WS04], derived from kernel density estimation and mean shift techniques. Following the main idea of the statistical estimator, we take advantage of random sampling to obtain a local plane for each point so as to estimate the noise scale, respectively. Given an arbitrary point p, its neighbourhood is searched, denoted by Nbr (p). After randomly choosing non-collinear 3-subset from Nbr (p), the three points determine a plane θ. We calculate the residuals (i.e. geometric distances) of all points in Nbr (p). Given a set of residuals (n is the number of points in Nbr), the kernel density estimator is defined as:
where is a window or kernel function of width h. We select the Epanechnikov kernel that yields the minimum mean integrated square error. The kernel is defined as:
where cd is the volume of a d-dimensional hypersphere of unit radius (i.e. c1= 2, c2=π). In our case, the kernel is applied on the residual, so we have d= 1.
To estimate the extrema of the kernel density , we compute the gradient of this density. Given the Epanechnikov kernel, the density gradient estimate is written as:
where Sh(r) is a hypersphere of the radius h, having the volume hdcd, centred at r, and containing nr data points. Consequently, we can define the mean shift vector Mh(r) [CM02] as:
It has been observed that the mean shift vector points towards the direction of the maximum increase in the density [WS04]. Therefore, the optimal mode can be obtained using an iterative procedure:
where 0 < ω≤ 1. The iteration terminates until convergence, that is,
or the maximal iteration τ is reached. By testing a number of models, ɛ= 0.012 and τ= 250 generally produce good results.
After determining the bandwidth h, the mean shift based procedure is run to find the optimal r⋆ such that all the points whose residuals fall in comprise the largest cluster of inliers. Subsequently, a least median squares estimator [RL87] is applied to the cluster in order to estimate the final inliers scale, which is given by:
where n is the number of the sample points, p is the dimension of the parameter space (e.g. 3 for a plane) and (R) is the set of residuals of sampling points related to the plane θ. The least median squares estimator is probably the most extended robust estimator due to its simplicity and robustness when the ratio of inliers is higher than 0.5. In this case, the least median squares converges to a solution since the cluster only includes inliers.
3.2 Tangent plane detection
According to random sample consensus theory, let P be the probability to get a clean subset, the number of samples to draw in order to find the clean subset is:
where η is the ratio of outliers contained in the whole point set; p is the size of a subset to compute a minimal parametric model (e.g. 3 for a plane).
We assume that when the best tangent plane is correctly detected, two conditions should be satisfied:
There are as many as possible geometrically connected data points near or on the tangent plane. This condition is based on the observation that point data which are the inliers of a ‘real’ plane cluster are contiguous in space.
The residuals of inliers should be as small as possible. That is, the scale of inliers should be as small as possible.
Then, the score function of a tangent plane θ around p is defined as:
where is the largest connected component of inliers with 8-neighbour topology, and σ (θ) is the scale of inliers.
The largest connected component is extracted as follows. Given a point p, its neighbouring points Nbr and a tangent plane θ, we project the inliers of θ onto θ and parameterize the projected points to generate a bitmap. A pixel in the bitmap is set if a point is projected into it. Meanwhile, each pixel is associated with a number, which indicates the number of projected points in this pixel. Ideally, the size of the pixels in the bitmap corresponds to the distance between neighbouring points in Nbr, that is, the sampling resolution. However, if the data are sampled non-uniformly, we choose the average value of the distances between neighbouring points in Nbr. Based on the bitmap, connected components are computed and the largest one is extracted. Figure 2 gives an example of bitmap generation and largest connected component extraction.
Figure 2. Bitmap generation and largest component extraction. (a) Point cloud with the point of interest (in red); (b) the neighbouring points; (c) one of the tangent planes; (d) point projection onto the tangent plane; (e) the generated bitmap. The number of each pixel in the bitmap stands for the number of points projected onto the corresponding grid. There are seven connected components, and the largest connected component contains 131 points.
Download figure to PowerPoint
Thus, the best tangent plane is obtained by solving this objective function:
Based on the aforementioned techniques, we first apply the mean shift clustering to find the bounds of an inlier cluster. Then, we adopt the least median squares estimator to estimate the scale of the inlier cluster. Finally, the score function is computed to search the best tangent plane. Specifically, for each point p, the best tangent plane is extracted by the following robust algorithm:
This detection procedure, referred to as Adaptive Scale SAmple Consensus, is similar to RANSAC. Because no prior knowledge concerning the scale of inliers is necessary (the scale estimation is data driven), the Adaptive Scale SAmple Consensus is an important improvement over RANSAC. It is highly robust to heavily corrupted data with multiple structures and discontinuities. Empirically, it can tolerate more than 80% outliers.