FAST EDGE DETECTION AND SEGMENTATION OF TERRESTRIAL LASER SCANS THROUGH NORMAL VARIATION ANALYSIS

Terrestrial Laser Scanning (TLS) utilizes light detection and ranging (lidar) to effectively and efficiently acquire point cloud data for a wide variety of applications. Segmentation is a common procedure of post-processing to group the point cloud into a number of clusters to simplify the data for the sequential modelling and analysis needed for most applications. This paper presents a novel method to rapidly segment TLS data based on edge detection and region growing. First, by computing the projected incidence angles and performing the normal variation analysis, the silhouette edges and intersection edges are separated from the smooth surfaces. Then a modified region growing algorithm groups the points lying on the same smooth surface. The proposed method efficiently exploits the gridded scan pattern utilized during acquisition of TLS data from most sensors and takes advantage of parallel programming to process approximately 1 million points per second. Moreover, the proposed segmentation does not require estimation of the normal at each point, which limits the errors in normal estimation propagating to segmentation. Both an indoor and outdoor scene are used for an experiment to demonstrate and discuss the effectiveness and robustness of the proposed segmentation method.


INTRODUCTION
Because Terrestrial Laser Scanning (TLS) effectively and efficiently acquires detailed point cloud data, it has been widely used in topographic mapping, engineering surveying, forest management, industrial facilities, cultural heritage, geohazard analysis, and so forth.In these applications, however, the point cloud needs to be divided into simpler features based on common attributes to support further processing and analysis.This process, known as segmentation, groups the points based on similar geometric, colormetric, or radiometric attributes.The grouped points can be then used for feature extraction, classification, modeling, and other applications.
Many segmentation approaches have been developed based on analyzing data from Airborne Laser Scanning (ALS).While some of these techniques can be applied to TLS data, TLS has notable differences from ALS and Mobile Laser Scanning (MLS) in characteristics such as view angles, scan resolution, and applicability for an area of interest.
An object can be scanned from by TLS from several scan positions while ALS is often only capable of scanning from above an object.Although MLS acquires the data from the side of an object similar to TLS, MLS still relies on the accessibility of the area for the platform holding the MLS system, resulting in less flexibility.In addition, because MLS and ALS are designed for covering a large area, the TLS data usually focuses on a smaller area at higher resolution, enabling more details to be captured.The resolution (point density) of TLS data also varies significantly across the scene by orders of magnitudes.Thus, with respect to data size and geometric complexity, segmentation for TLS data presents additional challenges compared with ALS data and MLS data.Existing segmentation approaches for TLS can be categorized into point cloud-based and image-based.Both of these approaches will be discussed in detail in the following sections.

Point Cloud-based Segmentation
Point cloud-based methods process the data in 3D space, primarily using geometric characteristics.Most of these methods are based on either region growing or clustering depending on the core criteria set for the relation between the points in neighbor or the attribute of each single point.

1.1.1
Region growing: The basic idea of region growing is that each segment will initiate from a seed point and criteria for the neighbors of the current point is given to determine whether to grow or break.Rabbani et al. (2006) present a region growingbased method for the segmentation of smooth surfaces.The points with residuals lower than a threshold in plane fitting are set as seed points while another angle threshold of normal difference is used as the criteria of growing.Belton and Lichti (2006) perform covariance analysis for each point and its neighbors to classify this point to be on a surface, a boundary, or an edge.Then, the points on a surface are further examined by its curvature.Nurunnabi et al. (2012) propose a similar idea of segmentation with a more robust normal estimation and feature extraction based on a modified Principal Component Analysis (PCA).Dimitrov et al. (2015) present a multi-scale feature detection considering point density, surface roughness, and curvature, which could help the following stage of region growing.Vo et al. (2015) build an adaptive octree to resample the data into voxels and then a coarse segmentation is performed based on region growing.Habib and Lin (2016) propose a regiongrowing multi-class simultaneous segmentation procedure for planar and pole-like features.The procedure of region growing starts from the seed regions selected optimally based on the residuals of fitting a planar or pole-like feature.

1.1.2
Clustering: Some existing segmentation methods which cluster points based on one or more geometric attributes computed for each individual point.The attributes can be an ndimensional feature vector, which can distinguish the points lying on different class of object.For example, Vosselman et al. (2004) summarize the 3D Hough transform for extracting the parameterized shapes such as planes, cylinders, and spheres.The normal vectors computed accurately can be used for improving the efficiency and reliability.Biosca and Lerma (2008) present a clustering method for segmentation where for each point, a plane best fit to its neighbors is used for computing the feature vector including the height difference, normal direction, and projected distance against the origin.Then Fuzzy C-Means (FCM) and Possibilistic C-Means (PCM) are utilized for grouping the points.Similarly, Lari et al. (2011) utilize point density to classify the point cloud into planar and rough surfaces, after which the normal of the best fitting plane at each point is used for computing the attributes.Aijazi et al. (2013) resample the data into 3D voxels and the position, normal, colors, intensity information of each voxel is utilized for assigning a feature vector to each voxel, which is further used in clustering and classification.Maalek et al. (2015) first extract planar features and linear features from the point cloud and then cluster the planar feature points by using the plane parameters.Su et al. (2016) present a segmentation algorithm for industrial sites where an octree-based split is performed based on a graph theory based analysis and a combination of proximity, orientation, and curvature connectivity criteria is used for a merging process.Kim et al. (2016) propose a segmentation of planar surfaces using the magnitude of normal position vector for a cylindrical neighbor, which uses two sets of best-fitting plane parameters against two origins as attributes.Lastly, Hackel et al. (2016) propose an efficient method of semantic classification and demonstrate the effectiveness using both TLS and MLS data.

Image-based Segmentation
The basic idea of image-based segmentation methods is to project or structure the TLS data into a 2D image first, perform an image segmentation, and finally map the results back to the 3D point cloud data.There are two major advantages in image-based segmentation: 1) efficiency in image processing, and 2) a substantial amount of available techniques for image segmentation, edge detection, and analysis.Gorte (2007) presents a segmentation algorithm based on a range image where range is defined as the 3D Euclidean distance from a point to the scan origin.The range, horizontal and vertical angles of the normal vectors to each point are used to generate a three-band image in a spherical coordinate system.Then image segmentation is performed by setting criteria based on the range image gradients.The results show that it works properly on vertical planes but fails on horizontal planes.Zhou et al. (2016) fix this problem by fine-tuning the computation of the plane parameters instead of coarse estimation.Weinmann and Jutzi (2015) further exploit this scan grid to derive various metrics for evaluating the quality of each point in a TLS scan.Barnea and Filin (2013) utilize the mean-shift algorithm to segment three images generated by range, normal, and colors respectively, followed by a refinement.Mahmoudabadi et al. (2013) implement Simple Linear Iterative Clustering for clustering and Support Vector Machine (SVM) for categorizing the segments to multiple classes.In addition to range, normal, and color information used in the aforementioned methods, Mahmoudabadi et al. (2016) consider intensity, angle of incidence in the segmentation as well.High Dynamic Range (HDR) imaging is utilized to minimize color inconsistencies across multiple images caused by variable lighting conditions.A series of images are generated with these characteristics and then segmented to identify and extract edges.All of these edges from the input metrics are integrated for obtaining the final results of segmentation.

Challenges in Segmentation
Many of the existing segmentation methods perform a normal estimation or a plane fitting for each individual point, which provides important geometric details.Despite a number of approaches to adaptively define neighbors, normal estimation can be typically unreliable at the edges of a surface.Some methods utilize color information from the photographs to assign attributes to point cloud.However, there are many potential error sources such as misalignment between the point cloud and photographs, lighting effect, moving objects, and so on, which may cause a failure of segmentation.To overcome these challenges, this paper presents a fast segmentation method for a TLS scan based on edge detection.By taking advantage of the grid data structure used in storing TLS data, the proposed method first detects different types of edge points in a scan.The point cloud can be then clustered by using these edge points as closed boundary of each segment.

METHODOLOGY
Many TLS systems collect data in a certain range and resolution of horizontal and vertical angles.Based on this scan pattern, each scan can be structured into a grid.This grid structure is exploited in the proposed segmentation method consisting of two steps: 1) edge detection; 2) region growing.First, points lying on silhouettes or edges are extracted by analyzing the angle of incidence and the normal variation.Then, based on the results of edge detection, region growing is utilized for grouping the points inside the closed boundaries determined in the edge detection.

Edge Detection
Two types of edge points are extracted for segmentation: 1) the points lying on the silhouettes; 2) the points with a large variation in normals (e.g., the intersection of two planar surfaces).
Because the low power, either visible or near infrared laser pulse used in TLS does not normally penetrate most objects, an object in the scene can cause an occlusion effect where a data gap (shadow) occurs behind this object.However, this effect can be used to separate objects at different ranges by detecting the silhouette edges of these objects in a scan.To detect silhouette edges, for each point, we search for its adjacent eight neighbors in the grid structure, and the projected incidence angle is computed with each neighbor point based on the law of cosines (Figure 1).Based on a given threshold of incidence angle, the point is then analyzed to determine whether it is an edge point or not.Note that the threshold of incidence angle should be set based on the angle resolution and maximum obliquity of a surface is acceptable within the scan.
Figure 1.Silhouette edge detection based on projected incidence angle: A is the current point being analyzed, lying on the silhouette edge of an object while B is its neighbor, lying on another object behind;   ,   and   are the distances between A and B, and the 3D Euclidean distance of A and B to the scan origin O, respectively;  ⇀  is the normal component of AB coplanar with triangle OAB, and lastly the corresponding projected incidence angle is .
Normal estimation at each individual point is a common procedure in point cloud segmentation, after which the gradient and curvature of the normal can be derived to set criteria for region growing or assign the attributes to each point for clustering.Normal estimation is usually completed by fitting a plane or performing statistical analysis with neighboring points.
Unfortunately, there are two limitations with such an approach.1) An ideal result of neighbor searching in 3D space (e.g., k nearest neighbors, local neighbor (spherical or cylindrical), and so on) at a point requires several neighbors to be evenly distributed around it to obtain an accurate and reliable normal.
Unfortunately, this situation is difficult to achieve in most cases unless the scan configuration to all the objects in the scene is given because the point density changes dramatically from different geometries between the various objects and the scanner; 2) Even if an ideal result of neighbor searching exists, estimating a normal at the intersection of multiple surfaces is challenging because the neighbors do not all lie on the same plane.
Instead of performing an error-prone normal estimation for each individual point, a normal variation analysis is proposed to detect an edge point by analyzing the differences of normals between the triangular patches around a point.The basic idea of the normal variation analysis is that: 1) in the grid structure, the eight neighbor points are used to generate eight triangles and eight shared edges around a point; 2) the normal gradient at each shared edge can be then derived from the normal for all triangles around the center point; 3) the maximum normal gradient is compared against a given threshold to finally determine if it is an edge (Figure 2).Considering the high point density and ranging errors in close range, during neighbor searching in each direction, the points within a given threshold of minimum distance are skipped.The proposed edge detection analyzes each point with its neighbors independently, enabling us to parallelize the procedure to process multiple points simultaneously using multiple threads.

Region Growing
Region growing is widely used in segmentation for point cloud data.The concept behind region growing is to start from a seed point and grow to the neighbor point if it meets a given criteria (Vosselman et al., 2004).In the proposed method, a region growing in the grid structure is simply performed within the points lying on a smooth surface, where all the points that are not labeled as edge points are selected to be seed points.The proposed region growing is not required to set other constraints because: 1) the normal gradient has been analyzed in the previous procedure of edge detection; 2) the extracted edge points enclose the segments of smooth surface in the point cloud.In this case, the growth ends after growing to the edge points to group the points lying on either a smooth surface or its edges into one segment so that the boundary of each segment is extracted, which can be potentially used for refining the edge detection results.

Indoor Scene
To demonstrate the effectiveness of the proposed segmentation method in an indoor environment, we collect one scan in a room using a Leica P40 3D laser scanner, resulting in 9,135,288 points (Figure 3(a, b)).In this indoor scene, there are various objects with different geometric features of different sizes.In addition, there are different types of noise or undesired points in this data such as mixed pixels, points with a significant ranging error (range walk) due to refraction on shiny or transparent objects, points captured on tiny objects or geometry that cannot be identified in the data, and so on.Note that by taking advantage of parallel programming, the processing time of this dataset is less than 10 seconds using 8 threads (excluding data I/O operations).
First, to extract the silhouette edges, each point is examined by computing the projected incidence angles with its neighbors in the angular scanning grid structure (Figure 3(c)).85 degrees was selected as the threshold of projected incidence angle, which represents the most oblique surface that can be captured with some confidence in a scan.Next, a normal variation analysis completes the edge detection for the remaining points where the points with a maximum gradient of normals between neighbors larger than 20 degrees are labeled as edge points (Figure 3(d)).Finally, region growing groups the points belonging to the same smooth surface and eliminates those segments with less than 100 points.In this case, the edge points adjacent to the smooth surface segments are preserved to visualize the borders and features (Figure 3(e)).
For an object in close range, there are a few mixed pixels between its silhouette edges and the object behind.In the point cloud data, these mixed pixels can artificially form a very oblique surface between two objects which does not actually exist.By computing the projected incidence angles, the proposed approach not only extracts the silhouette, but also eliminates the mixed pixels from the other points lying on smooth surfaces (Figure 4(a)).
The objects in the scene are made of various types of material in the test data, which could bring errors to the range measurement in different ways.For example, the white board on the wall is a highly glossy surface such that when laser pulses hit at near perfect incidence, the returns are saturated, resulting in significant range measurement errors, which is called range walk (Figure 4(b)).This effect also occurs on the lockers and photographs on the wall.
There are also some objects present in this scene that can refract the laser beam such as the plastic light covers on the ceiling (Figure 4(c)).These errors are difficult to model, but fortunately, these points usually have a large variation in normals leading to detection as edge points at this stage.Then, depending on the sequential processing and application, these edge points can be further classified and used for feature extraction, if desired.For most objects in the test data, the edges can be well defined and provide an enclosed boundary of a region by using the proposed edge detection approach (Figure 3(d)).Since there is no constraint of geometry in the proposed region growing, some objects with complex geometry such as the pipes (and joints between sections) can be grouped properly (the purple and green segments in Figure 5).However, the pipe in this data set is oversegmented due to the discontinuity in the grid structure where it is occluded by the objects in front (a hanging power plug).The segmentation result at the door shows that upper and left rails of the door frame (the yellow segment in Figure 5) are segmented from the wall and the door while the other rail is grouped with the door (the red segment in Figure 5).In addition, even though there are edge points extracted on the door, which ideally would be separated into different components (the panels, stiles, and rails) in the segmentation, the region growing may connect the points on both sides of the edges unless the edges enclose the region strictly in the grid structure.These components may need to be further segmented based on the target level of detail in the sequential processing or application.These problems can be solved, to some extent, by comparing multiple scans and adapting the threshold of the maximum difference in normal in the normal variation analysis.By analyzing multiple scans, an object with such features on it can be scanned more completely and continuity will be improved so that the edge detection and region growing can be more robust.
Figure 5. Close-up view of the segmentation result with the borders colored in black at the door and pipes.

Outdoor Scene
To further demonstrate the versatility and the parameter robustness of the proposed segmentation method, an outdoor scan (Figure 6(a)) including 50,204,636 points collected by the same scanner is tested using the same parameter settings where the maximum normal variation and maximum incidence angle are 20 and 85 degrees, respectively.The processing using 8 threads requires about 40 seconds to complete (excluding disc I/O).
The result of edge detection (Figure 6(b)) shows that the blue points lying on the vegetation (tree leaves and grass) and other occlusion effects caused by vehicles and pedestrians are readily extracted as silhouette edges, indicating that this technique functions well to perform noise removal.Notice, however, that the distant points on the road are eliminated as well because they fail to pass the incidence angle criteria.If desired, the edge points in red lying on the line features of the building façade can be further used as input for line drawing in some applications such as building documentation (Liang et al., 2013).
The building façade is segmented into a number of patches through the proposed method where even the large bricks on the façade can be extracted properly (Figure 6(c, d)).Depending on the desired level of detail, these segments on the building façade can be further modeled by fitting planes and the criteria of merging can be set accordingly.The over-segmentation occurring on the road and sidewalk due to the occlusion effects could be solved in a similar fashion.To further test the robustness of the proposed method to the point density, we down-sample the raw dataset by 1/9 (including 5,577,473 points) and run the proposed method with the same parameter settings except for the minimum number of points in each cluster, which is dependent with the scan resolution.The result (Figure 7) shows that the proposed segmentation is robust across scan resolution.Further, over-segmentation problems occur less than with the full scan because by down-sampling the data, some of the occlusion effects are eliminated.

CONCLUSION
This paper presents a fast segmentation method for TLS data consisting of two primary steps: edge detection and region growing.First, the silhouette edge points are extracted by computing the projected incidence angles.Then, a normal variation analysis separates the edge points from the smooth surfaces.Finally, a region growing without the constraint of the grid structure groups points lying on the same smooth surface.
Results from testing in both indoor and outdoor scenes demonstrate that the proposed method effectively segments the TLS data including objects in different shapes and sizes.The capability of handling different types of noise in the TLS data is illustrated and discussed.Ultimately, the proposed method is very efficient due to exploiting the grid structure storing TLS data, and, as a result, the efficiency performance can be further improved through parallel programming.Nevertheless, a limitation is that this approach cannot be applied directly to unstructured TLS data.

Figure 2 .
Figure 2. Edge detection based on normal variation analysis: Point C (red) is the center point being analyzed with neighbors (blue) in the grid data structure; Points T, C, and B technically lie on the intersection of Plane 1 and Plane 2 (hence, on both planes), while the other points lie on only one of the planes.

Figure 3 .Figure 4 .
Figure 3. Segmentation results based on edge detection: (a) initial TLS data presented as an angular grid image colored by intensity; (b) the initial TLS data colored by image texture; (c) points lying on silhouettes (blue) are extracted; (d) points with large variation in normals are extracted as edges (orange); (e) grouping of smooth surfaces following region growing where the borders of each segment are colored in black and each segment is randomly colored.

Figure 6 .
Figure 6.Segmentation results for an outdoor scan: (a) the raw TLS data colored by image texture; (b) the edge detection where extracted silhouettes are colored in blue while the edges are in orange; (c) grouping of smooth surfaces following region growing where the borders of each segment are colored in black and each segment is randomly colored; (d) close-up view of the segmentation result for the building façade.
Figure 7. (a)Segmentation results for the scan down-sampled by 1/9; (b) close-up view for the segmented building façade.