1 Introduction

The use of digital three-dimensional models of real-world environments has become popular in a variety of fields, including environment-based game design, serious gaming, robot navigation, professional civil engineering, architecture, documentation of historical structures or interior design. Terrestrial laser scanners (TLS) measure distances by laser with very high precision. For indoor environments TLS can efficiently produce complete high quality 360\(^{\circ }\) scans, using and combining only a few scan positions [10, 11]. The output of a TLS, is a dense point-cloud (x, y, z) spanning large areas or entire floors, that exceed millions of points. Due to the sheer amount of data, these large datasets lead to difficulties in processing, visualization and real-time use [2, 7]. In indoor scenes the majority of redundant information is captured in planar surfaces like walls, floors or ceilings. These surfaces end up being over-represented by thousands of points, when they could be represented more efficiently by a primitive shape, with only a few parameters [7, 8]. This paper explores a way to reduce point-cloud data size by plane segmentation, normal vector based filtering, statistical clustering, alpha shape boundary recognition and constrained Delaunay triangulation. The proposed approach is evaluated on six different real-world 3D scans of indoor environments.

2 Related Work

Data segmentation is defined as the grouping of elements into regions with similar properties. There are three main segmentation approaches for point-clouds: region growing, clustering of features and model fitting. The region growing method is achieved by identifying a seed element and growing it within some specific patterns in the data [1]. The clustering of features method identifies patterns in the data, based on their attributes and combines them into clusters. The model fitting method is driven by estimating a mathematical model to fit the data. Such models can be geometric primitive shapes like planes, spheres or cylinders [1]. Two widely used model fitting algorithms are Random Sample and Consensus (RANSAC) and hough-transform. For the accurate representation of indoor environments in games or virtual reality, the following works have been found: In the paper of Shui et al. [11], the point-cloud first is coarse segmented by a gaussian map region growing algorithm. Then it is fine segmented using RANSAC, followed by a boundary generation. At the end a semantic graph structure for the segments is created. This is then imported into Unity3D and manually enhanced with textures. Ma et al. in [6] describe a hybrid reconstruction solution. Planar surfaces are segmented by a flatness based region growing method, then the planar surfaces and all residual objects are reconstructed differently. The objects are reconstructed by the Greedy Projection Triangulation. The planes are reconstructed with a Quad-Three-Based algorithm. At the end, object meshes and plane meshes are combined to achieve the full reconstruction of the point-cloud.

3 System Overview

The first step of the proposed pipeline is to detect and remove sparse outliers with an algorithm from Rusu et al. [5]. The second step in the pipeline is the segmentation process. Man-made structures are dominated by planar surfaces. To detect these, the concept of RANdom SAmple Consensus (RANSAC) [3], is used [12]. To define a plane, three points are needed. RANSAC selects these three points randomly and generates a plane model. Then, the algorithm detects all points belonging to the plane model within a given threshold, also known as the plane thickness. This gets repeated until the best-fit plane in the 3D point-cloud is found. This is where the highest number of inlier points fit the candidate plane model. Due to the plane thickness, the obtained point-cloud segment may contain points, belonging to other objects or planes. These points generally are found at the borders of the planes and have a different normal vector direction than the plane model. We first estimate the normal vector of each point in the point-cloud by an algorithm proposed by Hoppe et al. [4]. Then we calculate the angle between each point normal vector and the plane model normal vector. The angle is then used to filter each point by a defined threshold. The next step in the pipeline is a clustering. The filtered plane segments of the point-cloud may contain different disconnected surfaces. To further process these areas separately, a statistical clustering technique is applied. As every extracted segment has a diverse topology, an algorithm that works with no a priori knowledge of the number of clusters is necessary. The algorithm used is the k-means clustering, which separates the data points into k different clusters. With help of the elbow method and the gap statistics, the used cluster algorithm can choose the optimal number of clusters automatically [5, 9]. To decimate the inlier points of each planar cluster, the boundary points of each cluster, containing all necessary information of its shape, are calculated. To achieve this, an alpha-shape-based boundary algorithm is used [6]. The algorithm repeats to assign a polygon around the points, using a set of circles. With this method, cavities of the shape, can be captured. The edge points are then connected with straight edges and are considered as the boundary [8]. The obtained boundary points get then triangulated to form a connected mesh. This is achieved by using the ordered boundary vertices as a constraint for the constrained Delaunay triangulation. At this point the proposed algorithm has processed one plane segment, found by the RANSAC algorithm, into one or more meshes. The algorithm repeats this procedure on the residual point-cloud, as long as the next found RANSAC segment contains a minimum number of point-cloud points. When the segmentation process ends, an output file (.ply) is generated, containing the generated meshes and the points of the residual point-cloud.

4 Results

The sample set to evaluate the proposed system, contains six different dense point-clouds of TLS scanned indoor environments (Fig. 1). All experiments were performed on an Intel Core i5 laptop with 3.1 GHz and 16 GB RAM. The pipeline was implemented in MATLAB R2017b, due to its ease of use and its cross platform compatibility. Each sample was fed into the pipeline with predefined parameters. The algorithm achieves acceptable results for every sample, resulting in reduction ratios from 73.15% to 96.50%. Table 1 gives a quantitative overview of the plane segments found by RANSAC, the total point count of the original TLS scan, the number of the residual point-cloud points and triangulated faces, the processing time and the point reduction rate for each sample. The visual results for each sample are depicted in Fig. 2. To achieve a full reconstruction, the residual point-cloud points have to be triangulated with for example, the greedy projection triangulation.

Fig. 1.
figure 1

Point-cloud sample set (top view).

Table 1. Point-cloud reduction results
Fig. 2.
figure 2

Result set (top view).

5 Conclusion

In this paper, we have developed an automatic system for 3D point-cloud processing, which is capable to reduce the number of points of real-world indoor environments produced by terrestrial laser scanner. After denoising, planar segments of the point-cloud are extracted. By normal vector filtering and clustering of the segments, a number of planar clusters can be obtained. The boundary points, which describe the shape of the planar clusters, are then triangulated. This reduces the number of interior points and simplifies the output mesh, but preserves its geometry. The experiments on six different TLS scanned indoor scenes with 8 to 25 million points and varying characteristics are quantitative and visible acceptable. We were able to reduce the total point count by approximately 75–95%.