# Optimization Algorithm for Point Cloud Quality Enhancement Based on Statistical Filtering

Authors: Qian Zhao; Xiaorong Gao; Jinlong Li; Lin Luo
Journal: Journal of Sensors
 (2021)

---

## Abstract

In the process of acquiring point cloud data by a 3D laser scanner, some problems, such as outliers, mixed points, and holes, may be caused in the target point cloud due to the external environment, the discreteness of the laser beam, and the occlusion of objects. In this paper, a point cloud quality optimization and enhancement algorithm is designed. A self-adaptive octree is established to rasterize the point cloud and calculate the density of each grid, combing with the statistical filtering to remove outliers from the point cloud data. Then, a plane projection method is used for removing the confounding points from the point cloud data. Finally, the point cloud is triangulated and a priority value is set, and then, points are preferentially inserted where the priority value is the largest to repair the holes. Experiments show that while removing outliers and confounding points, the detailed features of the point cloud can be maintained, holes are effectively filled, and the quality of the point cloud is effectively improved.


---

## Body

## 1. Introduction

In recent years, laser 3D scanning technology has developed rapidly. As a new format of data, the three-dimensional point cloud can accurately record the three-dimensional topography, geometric features, spatial coordinates, and other information about the surface of the object, and it has many advantages that two-dimensional data does not have [1]. In the process of acquiring point cloud data by a 3D laser scanner, outliers, mixed points, holes, and other defects may be generated in the target point cloud due to the external environment, the discreteness of the laser beam, and the occlusion of objects [2–5]. These defects degrade the quality of the point cloud and affect the subsequent reconstruction accuracy of the three-dimensional surface.Pirotti et al. [6] made some assessment with the two commonly used outlier detection methods—statistical outlier removal (SOR) filter and local outlier factor (LOF) filter. Four different filtering algorithms were well used for filtering the raw point cloud data form a UAV by Mustafa Zeybek [7], and a developed methodology contributes to the reduction of errors caused by data losses in various modelling studies [8]. Fleishman et al. [9] proposed the moving least squares algorithm, in which the noise points are projected onto an estimated plane. But it is sensitive to a large number of outliers. Based on the locally optimal projection (LOP) algorithm proposed by Lipman et al. [10], Huang et al. [11] proposed weighted locally optimal projection algorithms that can remove some noise points during the projection. But these algorithms have poor robustness and cannot keep the sharp features of the point cloud well. Rusu et al. [12] proposed an algorithm based on neighborhood statistics, which needs two iterations and takes much time to process the large-scale point cloud. Meanwhile, it is a challenge to guarantee accuracy when removing the noise. Ning et al. [13] proposed a simple and effective noisy point trimming method based on two geometric feature constraints, but it is only suitable for certain types of noise. Ester et al. [14] proposed a clustering algorithm DBSCAN, which can be used for removing the redundant points including the noise points. Leal et al. [15] presented a two-step method both for normal estimation and for point position update, measuring the sparsity of sharp features while discriminating between noise and feature, but the performance in some models with more detailed features is general. In addition to removing noisy points, the optimization and enhancement of point cloud quality also need to repair the holes caused by the object occlusion. Holes repairing algorithms based on triangular meshes could be divided into two categories: surface-based methods and volume-based ones [16]. Generally, surface-based methods detect, repair, and refine the holes on the given triangular mesh [17, 18]. Volume-based methods convert the given mesh into a function with signed distance on the volume mesh to fill the holes and then extract the complete grid from the zero-order set of the distance function [19–21]. The holes repairing the algorithm proposed by Leong et al. [22] directly connect the boundary of the holes, but the repair is not effective since no new triangle surfaces are added. Liu Zhenghong and Yun [23] extracted the boundary of the holes and determined the direction of contraction by calculating the direction of the triangular surface’s normal vector related to the boundary point. In this way, a complete triangular patch is iteratively generated, but the number of additional points could not be controlled. The point cloud quality optimization and enhancement algorithm designed in this paper could effectively remove the outliers and confounding points while maintaining the sharp features of the point cloud. At the same time, by setting the priority value, the number of new points could be controlled when repairing holes.


## 2. Theoretical Derivation

The implementation steps of the proposed method are as follows:(1)
Establishing a self-adaptive octree to rasterize the point cloud and setting the thresholds for defining the outliers to delete these points(2)
After removing the outliers, projecting the point cloud onto the local least squares fitting plane to remove the confounding points(3)
Establishing a priority value and inserting points at the positions with higher priority values until the hole filling which is completed


### 2.1. Outlier Removal

Outliers are usually disorganized, far away from the main point cloud, sparse, and geometrically discontinuous with inconsistent local point density. In contrast, the main point cloud is relatively concentrated and dense. The statistical filtering algorithm is based on the characteristics that the distance between the outlier points and the neighboring points is considerable while the distance between the main points and the neighboring points is small. And the statistical analysis towards the neighborhood of each point is used for removing the outliers [24]. In this paper, density is introduced based on the statistical filtering algorithm. First, an octree is established to take the minimum enclosing cube of the point cloud as the root node, and the cube is divided into eight subcubes with equal size. If a subcube contains points, it should continue to be divided into eight cubes with equal size until each point in the point cloud obtains a unique index coordinate. Then, the density of the point cloud in each small cube is calculated, and usually, the density of the subcube containing outliers is relatively small.The specific implementation steps are as follows:(1)
Establishing a self-adaptive octree to rasterize the point cloud and calculating the density of the point cloudρn in each grid(2)
For any pointpi∈P of the point cloud in each grid, searching for thek-neighborhood point pjj∈k of pi and calculating the distance between pi and pj(3)
Defining the probability of a point being an outlier as(1)δ=∑j=1kpi−pjkρn(4)
Establishing a threshold. Ifδ is greater than the threshold, pi is considered an outlier and is deleted


### 2.2. Confounding Point Removal

Confounding points cannot be easily distinguished from the real point cloud. It is difficult for traditional algorithms to achieve a balance between removing the confounding points and maintaining the detailed and sharp features of the point cloud. In this paper, we use the least square to fit the local plane and obtain the normal vector of the local plane. The mixed points are projected onto the local fitting plane, which not only improves the quality of the point cloud but also maintains the sharp features.The least squares method is used for fitting the local plane and obtaining the normal vector. First, we fit a local plane with a set of points composed of a pointpi∈P and its k-neighborhood points. Suppose the local fitting plane is Z=Ax+By+C, and then, the formula of the deviation quadratic sum is as follows:
(2)d=∑i=1k+1Axi+Bi+C−zi2.It can also be written in matrix form as follows:(3)d=UB−l2,where
(4)U=x1y11x2y21⋮⋮⋮xnyn1,B=ABC,l=z1z2⋮zn.Whend takes the minimum value, the fitting degree is the best. According to the least squares criterion, we can use the following formula to obtain B.
(5)B=UTU−1UTl.In this way, the fitting plane can be obtained, and the normal vector of a certain point can also be got by substituting the coordinates of the point into the fitting plane.The specific implementation steps are as follows:(1)
For a pointpi∈P in the target point cloud P, searching for its k-neighborhood points and calculating the mean value pmi of the neighborhood points(2)
Using the least squares method to fit a local planeLi and calculating the normal vector ni of pmi(3)
Calculating the projection of the vectorpipmi in the normal direction to obtain the distance d from the point pi∈P to the local fitting plane Li(6)d=pi−pm⋅cosθ(4)
Projectingpi∈P onto the local fitting plane Li and obtaining a projection point pi′(7)pi′=pi−d⋅ni(5)
Getting the new point setP′


### 2.3. Hole Filling

For the hole repair based on scattered point clouds, the scattered point cloud data can be triangulated first, and the possible holes in the point cloud data can be transformed into grid holes. When using the triangulation algorithm to fit the surface of a point cloud, the part of the triangle with a hole is usually relatively large, so in the process of repairing the point cloud hole, we can judge whether there is a hole by the area of the triangle. In this paper, a priority value is established preferentially to repair the part with a larger hole area in the point cloud. A higher priority value means that a specific part in the point cloud has a larger area of the hole. Then, a point is inserted firstly in the part with the largest priority value. Next, the inserted point is merged with the original point, and the above operations are repeated until the holes are repaired.The specific implementation steps are as follows:(1)
Triangulating the target point cloud using triangulation algorithm(2)
Getting the corresponding three edgesai,bi,ci from the vertices of each triangular patch; and using Heron’s formula to calculate the area si of each triangular patch; then getting the priority value corresponding to each triangular patch
(8)psi=ai+bi+ci2,(9)si=psipsi−aipsi−bipsi−ci(3)
Getting the largest priority value, that is, finding the triangular patch with the largest area and its vertices(4)
Inserting a pointPhi at the center of gravity of the triangle with the largest priority value and getting a new point set(5)
Repeating (1) to (4) until the hole is repaired completely


## 2.1. Outlier Removal

Outliers are usually disorganized, far away from the main point cloud, sparse, and geometrically discontinuous with inconsistent local point density. In contrast, the main point cloud is relatively concentrated and dense. The statistical filtering algorithm is based on the characteristics that the distance between the outlier points and the neighboring points is considerable while the distance between the main points and the neighboring points is small. And the statistical analysis towards the neighborhood of each point is used for removing the outliers [24]. In this paper, density is introduced based on the statistical filtering algorithm. First, an octree is established to take the minimum enclosing cube of the point cloud as the root node, and the cube is divided into eight subcubes with equal size. If a subcube contains points, it should continue to be divided into eight cubes with equal size until each point in the point cloud obtains a unique index coordinate. Then, the density of the point cloud in each small cube is calculated, and usually, the density of the subcube containing outliers is relatively small.The specific implementation steps are as follows:(1)
Establishing a self-adaptive octree to rasterize the point cloud and calculating the density of the point cloudρn in each grid(2)
For any pointpi∈P of the point cloud in each grid, searching for thek-neighborhood point pjj∈k of pi and calculating the distance between pi and pj(3)
Defining the probability of a point being an outlier as(1)δ=∑j=1kpi−pjkρn(4)
Establishing a threshold. Ifδ is greater than the threshold, pi is considered an outlier and is deleted


## 2.2. Confounding Point Removal

Confounding points cannot be easily distinguished from the real point cloud. It is difficult for traditional algorithms to achieve a balance between removing the confounding points and maintaining the detailed and sharp features of the point cloud. In this paper, we use the least square to fit the local plane and obtain the normal vector of the local plane. The mixed points are projected onto the local fitting plane, which not only improves the quality of the point cloud but also maintains the sharp features.The least squares method is used for fitting the local plane and obtaining the normal vector. First, we fit a local plane with a set of points composed of a pointpi∈P and its k-neighborhood points. Suppose the local fitting plane is Z=Ax+By+C, and then, the formula of the deviation quadratic sum is as follows:
(2)d=∑i=1k+1Axi+Bi+C−zi2.It can also be written in matrix form as follows:(3)d=UB−l2,where
(4)U=x1y11x2y21⋮⋮⋮xnyn1,B=ABC,l=z1z2⋮zn.Whend takes the minimum value, the fitting degree is the best. According to the least squares criterion, we can use the following formula to obtain B.
(5)B=UTU−1UTl.In this way, the fitting plane can be obtained, and the normal vector of a certain point can also be got by substituting the coordinates of the point into the fitting plane.The specific implementation steps are as follows:(1)
For a pointpi∈P in the target point cloud P, searching for its k-neighborhood points and calculating the mean value pmi of the neighborhood points(2)
Using the least squares method to fit a local planeLi and calculating the normal vector ni of pmi(3)
Calculating the projection of the vectorpipmi in the normal direction to obtain the distance d from the point pi∈P to the local fitting plane Li(6)d=pi−pm⋅cosθ(4)
Projectingpi∈P onto the local fitting plane Li and obtaining a projection point pi′(7)pi′=pi−d⋅ni(5)
Getting the new point setP′


## 2.3. Hole Filling

For the hole repair based on scattered point clouds, the scattered point cloud data can be triangulated first, and the possible holes in the point cloud data can be transformed into grid holes. When using the triangulation algorithm to fit the surface of a point cloud, the part of the triangle with a hole is usually relatively large, so in the process of repairing the point cloud hole, we can judge whether there is a hole by the area of the triangle. In this paper, a priority value is established preferentially to repair the part with a larger hole area in the point cloud. A higher priority value means that a specific part in the point cloud has a larger area of the hole. Then, a point is inserted firstly in the part with the largest priority value. Next, the inserted point is merged with the original point, and the above operations are repeated until the holes are repaired.The specific implementation steps are as follows:(1)
Triangulating the target point cloud using triangulation algorithm(2)
Getting the corresponding three edgesai,bi,ci from the vertices of each triangular patch; and using Heron’s formula to calculate the area si of each triangular patch; then getting the priority value corresponding to each triangular patch
(8)psi=ai+bi+ci2,(9)si=psipsi−aipsi−bipsi−ci(3)
Getting the largest priority value, that is, finding the triangular patch with the largest area and its vertices(4)
Inserting a pointPhi at the center of gravity of the triangle with the largest priority value and getting a new point set(5)
Repeating (1) to (4) until the hole is repaired completely


## 3. Experimental Results and Data Analysis

### 3.1. Algorithm Validation

The denoising accuracy and denoising recall rate [25] are adopted to evaluate the effect of the algorithm on the outlier removal so as to verify the effectiveness of the proposed algorithm. Since the denoising accuracy and the denoising recall rate are inversely proportional, the F-score is introduced as the harmonic mean of the two parameters. A higher F-score means a better performance of the algorithm. The chamfer distance [26] is used for measuring the average nearest squared distance between the point cloud S1 and S2.The denoising accuracy can be calculated as follows:(10)Pd=NqNs,where Pd is the denoising accuracy, Nq is the number of noisy points removed, and Ns means the whole number of noisy points.The denoising recall rate is defined by the following formula:(11)Rd=NqNy,where Rd is the denoising recall and Ny is the number of points that should be removed.So theF-score can be obtained by
(12)F1=2∗Pd∗RdPd+Rd,where F1 is the F-score.We defineddCDS1,S2 as the chamfer distance between the point cloud S1 and S2, and it can be calculated as follows:
(13)dCDS1,S2=1S1∑x∈S1miny∈S2x−y22+1S2∑y∈S2minx∈S1y−x22,where x is the point in S1 and y is the point in S2.In the experiments, we added 10%, 20%, and 30% random noise to the point cloud, respectively. The method of adding noise points in this paper is as follows: some points are selected randomly in the origin point cloud; then, the coordinates of these points are changed within a range; here, we used the 2 to 8 times of mesh resolution, so the confounding points and outliers could be obtained, adding these points into the origin point cloud so that we can get the noisy point cloud finally.For enhancing the quality of the point cloud, first, we removed the outliers using the proposed algorithm and compared it with the statistical filtering and the radius filtering. As shown from Figures1–3 and Tables 1–3, four neighborhood points are selected in the four algorithms, and the highest F-score value of each algorithm and the corresponding Pd and Rd are recorded. In the second part, we removed the confounding points using the proposed method. After processing the noisy point cloud by the proposed method, we calculated the dcd in each part. Finally, the point cloud was triangulated, and a priority value was set. Points are preferentially inserted to where the priority value was the largest so as to repair the holes.Figure 1
Denoising results of the three methods with 10% noise in the Bunny point cloud. (a) The original Bunny point cloud. (b) Bunny point cloud with 10% noise. (c) Statistical filtering algorithm. (d) Radius filtering algorithm. (e) Our outlier removal algorithm. (f) Our confounding point removal algorithm.
(a)(b)(c)(d)(e)(f)Figure 2
Denoising results of the three methods with 20% noise in the Bunny point cloud. (a) The original Bunny point cloud. (b) Bunny point cloud with 20% noise. (c) Statistical filtering algorithm. (d) Radius filtering algorithm. (e) Our outlier removal algorithm. (f) Our confounding point removal algorithm.
(a)(b)(c)(d)(e)(f)Figure 3
Denoising results of the three methods with 30% noise in the Bunny point cloud. (a) The original Bunny point cloud. (b) Bunny point cloud with 30% noise. (c) Statistical filtering algorithm. (d) Radius filtering algorithm. (e) Our outlier removal algorithm. (f) Our confounding point removal algorithm.
(a)(b)(c)(d)(e)(f)Table 1
Denoising results of the three methods with 10% noise in Bunny point cloud.
AlgorithmsTotal number of noisy point cloudsPdRdF1Statistical filtering395420.69350.97040.8091Radius filtering395420.70290.98140.8189Our method395420.75410.71770.8279Table 2
Denoising results of the three methods with 20% noise in Bunny point cloud.
AlgorithmsTotal number of noisy point cloudsPdRdF1Statistical filtering431730.63150.93390.7535Radius filtering431730.70010.98480.8184Our method431730.74410.94530.8327Table 3
Denoising results of the three methods with 30% noise in Bunny point cloud.
AlgorithmsTotal number of noisy point cloudsPdRdF1Statistical filtering467320.59290.90460.7163Radius filtering467320.71240.96460.8192Our method467320.75880.93680.8385Figure1 and Table 1 show that after the Bunny point cloud with 10% noise is processed by the proposed method, the surface of the point cloud is smooth, uniform, and almost without noise; meanwhile, the outliers and confounding points are removed. The denoising recall rate of the radius filtering is higher than that of the statistical filtering and the proposed outlier removal algorithm. But the denoising accuracy rate and F-score of the outlier removal algorithm are better than those of the statistical filtering and the radius filtering.Figure2 and Table 2 demonstrate that after the Bunny point cloud with 20% noise is processed by the proposed method, no noticeable noise points appear on the surface of the point cloud, together with the outliers and confounding points removed. The denoising recall rate of the radius filtering is better than that of the statistical filtering and the outlier removal algorithm. Yet the denoising accuracy rate and F-score of our outlier removal algorithm are better than those of the statistical filter and radius filtering.In experiment 3, Figure3 and Table 3 show that after in the Bunny point cloud with 30% noise is processed by the proposed method, no obvious noise points exist on the surface of the point cloud, together with the outliers and confounding points removed. The denoising recall rate of the radius filtering is better than that of the statistical filtering and the proposed outlier removal algorithm. But the denoising accuracy rate and F-score of our outlier removal algorithm are better than those of the statistical filter and radius filtering.The effect comparison of the three algorithms in removing outliers with different noise degrees is shown in Figure4. The proposed outlier removal algorithm shows an upward trend with the increase of noise level, the radius filtering tends to be stable, and the statistical filtering shows a downward trend. The algorithm in this paper has always been better than the other two algorithms.Figure 4
F-score of the three algorithms.Thes0 is the original Bunny point cloud, s1 is the noisy point cloud, s2 is the point cloud after the outliers removed by the proposed outlier removal algorithm, and s3 is the point cloud after the confounding points removed by the proposed confounding point removal algorithm. From the evaluation indicators in Table 4, we can see that dCDs0,s3 is smaller than dCDs0,s2 and dCDs0,s1, indicating that the proposed algorithm can effectively remove outliers and confounding points.Table 4
Chamfer distance in Bunny point cloud.
Noise leveldCDs0,s1dCDs0,s2dCDs0,s310%1.58920.04640.042420%2.72080.07480.071830%3.73170.11320.0891The Bunny point cloud with 20% noise added is taken as an example to verify the effect of hole filling. Both the Bunny point cloud with noise and that has been processed by the proposed algorithm are triangulated, as shown in Figures5(a) and 5(b). Figures 5(c) and 5(d) show the triangulation effect of the point cloud with noise and that has been processed by the proposed algorithm after the viewing angle is flipped, respectively. The noise on the surface of the Bunny noisy point cloud is completely removed, and the fitted surface is uniform and smooth without apparent loss. The holes at the bottom of the point cloud are also effectively filled. The results show that the proposed algorithm in this paper preserves the sharp and detailed features of the point cloud while removing the outliers and confounding points and makes an effective repair for the holes finally.Figure 5
Triangulation effect. (a) Noisy point cloud triangulation effect. (b) Point cloud triangulation effect after the viewing angle is flipped. (d) Triangulation effect of the point cloud processed by the proposed algorithm after flipping the viewing angle.
(a)(b)(c)(d)


### 3.2. Experimental Verification of Algorithm Performance

To further verify the effect of the proposed algorithm, the actual point cloud data of the locomotive pantograph slide, obtained by the laser line structured light three-dimensional scanner, is set as the experimental object. In the data collection, the camera type is Ranger3, the laser model is Lingyun (808 nm, 15 W), and the effective accuracy of the 3D scanner is 0.5 mm. The collected pantograph data contains 632,718 points with some obvious defects on the surface. The results are shown from Figures6–8 and Tables 5–7.Figure 6
Denoising results of the three methods in the pantograph model. (a) The original pantograph point cloud. (b) Pantograph point cloud with 10% noise. (c) Statistical filtering algorithm. (d) Radius filtering algorithm. (e) Our outlier removal algorithm. (f) Our confounding point removal algorithm.
(a)(b)(c)(d)(e)(f)Figure 7
Denoising results of the three methods in the pantograph model. (a) The original pantograph point cloud. (b) Pantograph point cloud with 20% noise. (c) Statistical filtering algorithm. (d) Radius filtering algorithm. (e) Our outlier removal algorithm. (f) Our confounding point removal algorithm.
(a)(b)(c)(d)(e)(f)Figure 8
Denoising results of the three methods in the pantograph model. (a) The original pantograph point cloud. (b) Pantograph point cloud with 30% noise. (c) Statistical filtering algorithm. (d) Radius filtering algorithm. (e) Our outlier removal algorithm. (f) Our confounding point removal algorithm.
(a)(b)(c)(d)(e)(f)Table 5
Denoising results of the three methods with 10% noise in pantograph point cloud.
AlgorithmsTotal number of noisy point cloudsPdRdF1Statistical filtering6959900.79340.98120.8774Radius filtering6959900.83770.93180.8823Our method6959900.83190.9740.8974Table 6
Denoising results of the three methods with 20% noise in pantograph point cloud.
AlgorithmsTotal number of noisy pointsPdRdF1Statistical filtering7592620.75690.96870.8498Radius filtering7592620.83580.96660.8964Our method7592620.83580.98110.9028Table 7
Denoising results of the three methods with 30% noise in pantograph point cloud.
AlgorithmsTotal number of noisy point cloudsPdRdF1Statistical filtering8225340.71220.95120.8145Radius filtering8225340.83340.97870.9002Our method8225340.83360.97910.9004Figure6 and Table 5 show that after the pantograph point cloud with 10% noise is processed by the proposed method, no obvious noise points exist on the surface of the point cloud, together with the outliers and confounding points removed. Radius filtering has the highest denoising accuracy. The denoising recall rate of the statistical filtering is better than that of the radius filtering and the proposed outlier removal algorithm. However, the denoising accuracy of the proposed outlier removal algorithm is close to that of the radius filtering, and the denoising recall rate is close to that of the statistical filtering. The F-score of the proposed outlier removal algorithm is better than that of the statistical filtering and radius filtering. So the comprehensive performance of the proposed method is the best.Figure7 and Table 6 show that after the pantograph point cloud with 20% noise is processed by the proposed method, no noticeable noise points appear on the surface of the point cloud, together with outliers and confounding points removed. The denoising accuracy rate, the denoising recall rate, and F-score of the proposed outlier removal algorithm are better than those of the statistical filtering and radius filtering.Figure8 and Table 7 illustrate that after the pantograph point cloud with 30% noise is processed by the proposed method, no evident noise points remain on the surface of the point cloud together with the outliers and confounding points removed. The denoising recall rate of the radius filtering is better than that of the statistical filtering and the proposed outlier removal algorithm, but the denoising accuracy rate and F-score of the proposed outlier removal algorithm are better than those of the statistical filter and radius filtering.The effect comparison of the three algorithms in removing outliers with different noise degrees is shown in Figure9. The proposed outlier removal algorithm and the radius filtering show an upward trend with the increase of noise level, and the statistical filtering shows a downward tread. The proposed algorithm always performs better than the other two algorithms.Figure 9
F-score of the three algorithms.Thes0 is the original pantograph point cloud, s1 is the noisy point cloud, s2 is the point cloud after the outliers removed by the proposed outlier removal algorithm, and s3 is the point cloud after the confounding points removed by the proposed confounding point removal algorithm. From the evaluation indicators in Table 8, the proposed algorithm can remove both the outliers the confounding points.Table 8
Chamfer distance in pantograph point cloud.
Noise leveldCDs0,s1dCDs0,s2dCDs0,s310%2.25050.01810.016320%4.10810.03250.027330%5.57580.05320.0447To show the hole filling effects, we compared the original pantograph point cloud with that after the hole filling, as shown in Figure10. Figures 10(a) and 10(c) illustrate the original pantograph point cloud and that after the hole filling, respectively. Figures 10(b) and 10(d) demonstrate the original pantograph point cloud with the local hole and that after the hole filling. The results show that the algorithm proposed in this paper effectively fills the hole.Figure 10
Hole filling effect. (a) Original point cloud. (b) Local hole in original point cloud. (c) Point cloud after hole-filling. (d) Local hole after hole-filling.
(a)(b)(c)(d)


## 3.1. Algorithm Validation

The denoising accuracy and denoising recall rate [25] are adopted to evaluate the effect of the algorithm on the outlier removal so as to verify the effectiveness of the proposed algorithm. Since the denoising accuracy and the denoising recall rate are inversely proportional, the F-score is introduced as the harmonic mean of the two parameters. A higher F-score means a better performance of the algorithm. The chamfer distance [26] is used for measuring the average nearest squared distance between the point cloud S1 and S2.The denoising accuracy can be calculated as follows:(10)Pd=NqNs,where Pd is the denoising accuracy, Nq is the number of noisy points removed, and Ns means the whole number of noisy points.The denoising recall rate is defined by the following formula:(11)Rd=NqNy,where Rd is the denoising recall and Ny is the number of points that should be removed.So theF-score can be obtained by
(12)F1=2∗Pd∗RdPd+Rd,where F1 is the F-score.We defineddCDS1,S2 as the chamfer distance between the point cloud S1 and S2, and it can be calculated as follows:
(13)dCDS1,S2=1S1∑x∈S1miny∈S2x−y22+1S2∑y∈S2minx∈S1y−x22,where x is the point in S1 and y is the point in S2.In the experiments, we added 10%, 20%, and 30% random noise to the point cloud, respectively. The method of adding noise points in this paper is as follows: some points are selected randomly in the origin point cloud; then, the coordinates of these points are changed within a range; here, we used the 2 to 8 times of mesh resolution, so the confounding points and outliers could be obtained, adding these points into the origin point cloud so that we can get the noisy point cloud finally.For enhancing the quality of the point cloud, first, we removed the outliers using the proposed algorithm and compared it with the statistical filtering and the radius filtering. As shown from Figures1–3 and Tables 1–3, four neighborhood points are selected in the four algorithms, and the highest F-score value of each algorithm and the corresponding Pd and Rd are recorded. In the second part, we removed the confounding points using the proposed method. After processing the noisy point cloud by the proposed method, we calculated the dcd in each part. Finally, the point cloud was triangulated, and a priority value was set. Points are preferentially inserted to where the priority value was the largest so as to repair the holes.Figure 1
Denoising results of the three methods with 10% noise in the Bunny point cloud. (a) The original Bunny point cloud. (b) Bunny point cloud with 10% noise. (c) Statistical filtering algorithm. (d) Radius filtering algorithm. (e) Our outlier removal algorithm. (f) Our confounding point removal algorithm.
(a)(b)(c)(d)(e)(f)Figure 2
Denoising results of the three methods with 20% noise in the Bunny point cloud. (a) The original Bunny point cloud. (b) Bunny point cloud with 20% noise. (c) Statistical filtering algorithm. (d) Radius filtering algorithm. (e) Our outlier removal algorithm. (f) Our confounding point removal algorithm.
(a)(b)(c)(d)(e)(f)Figure 3
Denoising results of the three methods with 30% noise in the Bunny point cloud. (a) The original Bunny point cloud. (b) Bunny point cloud with 30% noise. (c) Statistical filtering algorithm. (d) Radius filtering algorithm. (e) Our outlier removal algorithm. (f) Our confounding point removal algorithm.
(a)(b)(c)(d)(e)(f)Table 1
Denoising results of the three methods with 10% noise in Bunny point cloud.
AlgorithmsTotal number of noisy point cloudsPdRdF1Statistical filtering395420.69350.97040.8091Radius filtering395420.70290.98140.8189Our method395420.75410.71770.8279Table 2
Denoising results of the three methods with 20% noise in Bunny point cloud.
AlgorithmsTotal number of noisy point cloudsPdRdF1Statistical filtering431730.63150.93390.7535Radius filtering431730.70010.98480.8184Our method431730.74410.94530.8327Table 3
Denoising results of the three methods with 30% noise in Bunny point cloud.
AlgorithmsTotal number of noisy point cloudsPdRdF1Statistical filtering467320.59290.90460.7163Radius filtering467320.71240.96460.8192Our method467320.75880.93680.8385Figure1 and Table 1 show that after the Bunny point cloud with 10% noise is processed by the proposed method, the surface of the point cloud is smooth, uniform, and almost without noise; meanwhile, the outliers and confounding points are removed. The denoising recall rate of the radius filtering is higher than that of the statistical filtering and the proposed outlier removal algorithm. But the denoising accuracy rate and F-score of the outlier removal algorithm are better than those of the statistical filtering and the radius filtering.Figure2 and Table 2 demonstrate that after the Bunny point cloud with 20% noise is processed by the proposed method, no noticeable noise points appear on the surface of the point cloud, together with the outliers and confounding points removed. The denoising recall rate of the radius filtering is better than that of the statistical filtering and the outlier removal algorithm. Yet the denoising accuracy rate and F-score of our outlier removal algorithm are better than those of the statistical filter and radius filtering.In experiment 3, Figure3 and Table 3 show that after in the Bunny point cloud with 30% noise is processed by the proposed method, no obvious noise points exist on the surface of the point cloud, together with the outliers and confounding points removed. The denoising recall rate of the radius filtering is better than that of the statistical filtering and the proposed outlier removal algorithm. But the denoising accuracy rate and F-score of our outlier removal algorithm are better than those of the statistical filter and radius filtering.The effect comparison of the three algorithms in removing outliers with different noise degrees is shown in Figure4. The proposed outlier removal algorithm shows an upward trend with the increase of noise level, the radius filtering tends to be stable, and the statistical filtering shows a downward trend. The algorithm in this paper has always been better than the other two algorithms.Figure 4
F-score of the three algorithms.Thes0 is the original Bunny point cloud, s1 is the noisy point cloud, s2 is the point cloud after the outliers removed by the proposed outlier removal algorithm, and s3 is the point cloud after the confounding points removed by the proposed confounding point removal algorithm. From the evaluation indicators in Table 4, we can see that dCDs0,s3 is smaller than dCDs0,s2 and dCDs0,s1, indicating that the proposed algorithm can effectively remove outliers and confounding points.Table 4
Chamfer distance in Bunny point cloud.
Noise leveldCDs0,s1dCDs0,s2dCDs0,s310%1.58920.04640.042420%2.72080.07480.071830%3.73170.11320.0891The Bunny point cloud with 20% noise added is taken as an example to verify the effect of hole filling. Both the Bunny point cloud with noise and that has been processed by the proposed algorithm are triangulated, as shown in Figures5(a) and 5(b). Figures 5(c) and 5(d) show the triangulation effect of the point cloud with noise and that has been processed by the proposed algorithm after the viewing angle is flipped, respectively. The noise on the surface of the Bunny noisy point cloud is completely removed, and the fitted surface is uniform and smooth without apparent loss. The holes at the bottom of the point cloud are also effectively filled. The results show that the proposed algorithm in this paper preserves the sharp and detailed features of the point cloud while removing the outliers and confounding points and makes an effective repair for the holes finally.Figure 5
Triangulation effect. (a) Noisy point cloud triangulation effect. (b) Point cloud triangulation effect after the viewing angle is flipped. (d) Triangulation effect of the point cloud processed by the proposed algorithm after flipping the viewing angle.
(a)(b)(c)(d)


## 3.2. Experimental Verification of Algorithm Performance

To further verify the effect of the proposed algorithm, the actual point cloud data of the locomotive pantograph slide, obtained by the laser line structured light three-dimensional scanner, is set as the experimental object. In the data collection, the camera type is Ranger3, the laser model is Lingyun (808 nm, 15 W), and the effective accuracy of the 3D scanner is 0.5 mm. The collected pantograph data contains 632,718 points with some obvious defects on the surface. The results are shown from Figures6–8 and Tables 5–7.Figure 6
Denoising results of the three methods in the pantograph model. (a) The original pantograph point cloud. (b) Pantograph point cloud with 10% noise. (c) Statistical filtering algorithm. (d) Radius filtering algorithm. (e) Our outlier removal algorithm. (f) Our confounding point removal algorithm.
(a)(b)(c)(d)(e)(f)Figure 7
Denoising results of the three methods in the pantograph model. (a) The original pantograph point cloud. (b) Pantograph point cloud with 20% noise. (c) Statistical filtering algorithm. (d) Radius filtering algorithm. (e) Our outlier removal algorithm. (f) Our confounding point removal algorithm.
(a)(b)(c)(d)(e)(f)Figure 8
Denoising results of the three methods in the pantograph model. (a) The original pantograph point cloud. (b) Pantograph point cloud with 30% noise. (c) Statistical filtering algorithm. (d) Radius filtering algorithm. (e) Our outlier removal algorithm. (f) Our confounding point removal algorithm.
(a)(b)(c)(d)(e)(f)Table 5
Denoising results of the three methods with 10% noise in pantograph point cloud.
AlgorithmsTotal number of noisy point cloudsPdRdF1Statistical filtering6959900.79340.98120.8774Radius filtering6959900.83770.93180.8823Our method6959900.83190.9740.8974Table 6
Denoising results of the three methods with 20% noise in pantograph point cloud.
AlgorithmsTotal number of noisy pointsPdRdF1Statistical filtering7592620.75690.96870.8498Radius filtering7592620.83580.96660.8964Our method7592620.83580.98110.9028Table 7
Denoising results of the three methods with 30% noise in pantograph point cloud.
AlgorithmsTotal number of noisy point cloudsPdRdF1Statistical filtering8225340.71220.95120.8145Radius filtering8225340.83340.97870.9002Our method8225340.83360.97910.9004Figure6 and Table 5 show that after the pantograph point cloud with 10% noise is processed by the proposed method, no obvious noise points exist on the surface of the point cloud, together with the outliers and confounding points removed. Radius filtering has the highest denoising accuracy. The denoising recall rate of the statistical filtering is better than that of the radius filtering and the proposed outlier removal algorithm. However, the denoising accuracy of the proposed outlier removal algorithm is close to that of the radius filtering, and the denoising recall rate is close to that of the statistical filtering. The F-score of the proposed outlier removal algorithm is better than that of the statistical filtering and radius filtering. So the comprehensive performance of the proposed method is the best.Figure7 and Table 6 show that after the pantograph point cloud with 20% noise is processed by the proposed method, no noticeable noise points appear on the surface of the point cloud, together with outliers and confounding points removed. The denoising accuracy rate, the denoising recall rate, and F-score of the proposed outlier removal algorithm are better than those of the statistical filtering and radius filtering.Figure8 and Table 7 illustrate that after the pantograph point cloud with 30% noise is processed by the proposed method, no evident noise points remain on the surface of the point cloud together with the outliers and confounding points removed. The denoising recall rate of the radius filtering is better than that of the statistical filtering and the proposed outlier removal algorithm, but the denoising accuracy rate and F-score of the proposed outlier removal algorithm are better than those of the statistical filter and radius filtering.The effect comparison of the three algorithms in removing outliers with different noise degrees is shown in Figure9. The proposed outlier removal algorithm and the radius filtering show an upward trend with the increase of noise level, and the statistical filtering shows a downward tread. The proposed algorithm always performs better than the other two algorithms.Figure 9
F-score of the three algorithms.Thes0 is the original pantograph point cloud, s1 is the noisy point cloud, s2 is the point cloud after the outliers removed by the proposed outlier removal algorithm, and s3 is the point cloud after the confounding points removed by the proposed confounding point removal algorithm. From the evaluation indicators in Table 8, the proposed algorithm can remove both the outliers the confounding points.Table 8
Chamfer distance in pantograph point cloud.
Noise leveldCDs0,s1dCDs0,s2dCDs0,s310%2.25050.01810.016320%4.10810.03250.027330%5.57580.05320.0447To show the hole filling effects, we compared the original pantograph point cloud with that after the hole filling, as shown in Figure10. Figures 10(a) and 10(c) illustrate the original pantograph point cloud and that after the hole filling, respectively. Figures 10(b) and 10(d) demonstrate the original pantograph point cloud with the local hole and that after the hole filling. The results show that the algorithm proposed in this paper effectively fills the hole.Figure 10
Hole filling effect. (a) Original point cloud. (b) Local hole in original point cloud. (c) Point cloud after hole-filling. (d) Local hole after hole-filling.
(a)(b)(c)(d)


## 4. Conclusions

In this paper, an algorithm for point cloud quality optimization and enhancement is designed and verified. Firstly, an adaptive octree is established to rasterize the point cloud and to calculate the density of each grid. Then, the statistical filtering is combined to remove the outliers from the point cloud data. And the method of plane projection is used for removing the confounding points. Finally, the point cloud is triangulated, and a priority value is set up to insert the point to the place where the priority value is the largest, so as to repair the holes. To verify the effectiveness of the proposed algorithm, we, respectively, added 10%, 20%, and 30% noise to the Bunny point cloud and used the actual point cloud data of the locomotive pantograph slider to test. Then, the proposed algorithm was compared with the statistical filtering algorithm and the radius filtering algorithm. Experimental results show that the proposed algorithm can decently keep the sharp and detailed features from the original point cloud surface while removing noise. It can also effectively fill the holes and comprehensively perform better than the algorithms of statistical filtering and radius filtering.



---

*Source: 7325600-2021-12-06.xml*