Research Article

A Multilevel Point Cloud Classification Method for Underground Tunnels Based on Three-Dimensional Moving LiDAR Measurements

Table 3

Pseudocode of three-level clustering algorithm based on region growth algorithm.

Step 1Set an empty seed point sequence and an empty cluster array, select the seed point (the point with the minor curvature), and add it to the seed point sequence.
pcl :: RegionGrowing < pcl::PointXYZ, pcl::Normal > 
rg; rg.setMinClusterSize (10);
Step 2Search the neighborhood points of the current seed point, calculate the included angle between the normal of the neighborhood point and the normal of the current seed point, and add the neighborhood points less than the smoothing threshold to the current region.
rg.setInputNormals (normals);
rg.setSmoothnessThreshold (3.0/180.0 M_PI);
Step 3The curvature of each seed in the neighborhood is less than the current threshold, and the new seed is added to the neighborhood to delete the new seed curvature.
rg.setCurvatureThreshold (0.8);
Step 4Repeat the above growth process until the seed point sequence is emptied. At this point, a region is grown and added to the cluster array.
vector < pcl :: PointIndices > clusters;
rg.extract (clusters);
Step 5Repeat the above steps for the remaining points until all points are traversed.