A DATA DRIVEN METHOD FOR FLAT ROOF BUILDING RECONSTRUCTION FROM LiDAR POINT CLOUDS

3D building modeling is one of the most important applications in photogrammetry and remote sensing. Airborne LiDAR (Light Detection And Ranging) is one of the primary information sources for building modeling. In this paper, a new data-driven method is proposed for 3D building modeling of flat roofs. First, roof segmentation is implemented using region growing method. The distance between roof points and the height difference of the points are utilized in this step. Next, the building edge points are detected using a new method that employs grid data, and then roof lines are regularized using the straight line approximation. The centroid point and direction for each line are estimated in this step. Finally, 3D model is reconstructed by integrating the roof and wall models. In the end, a qualitative and quantitative assessment of the proposed method is implemented. The results show that the proposed method could successfully model the flat roof buildings using LiDAR point cloud automatically.


INTRODUCTION
3D building modeling is one of the major applications of LiDAR photogrammetry.There are many methods to model buildings using point cloud.Almost all methods try to reach the good modeling accuracy, in order to improve the old algorithms or to speed up the slow methods.
In general, there are two types of approaches for buildings modeling: model-driven and data-driven (Maas and Vosselman 1999).The model-driven approaches often contain a library of ready parametric models which are compared with extracted building points and then the model that has the most similarity with the building points is chosen.The data-driven approach is more accurate because it depends on the modeling of individual elements of the building structure (Tarsha-Kurdi, Landes et al. 2007).The buildings boundaries, roofs and walls are extracted and the final model is produced by combining the reconstructed elements.
Many studies have implemented the data-driven approach such as Zhou and Neumann (2008) in which they proposed an algorithm that automatically learns the principal directions of roof boundaries and uses them in footprint production.Sajadian and Arefi (2014) detected the building edge points using a new method named 'Grid Erosion'.Kim and Shan (2011) presented a novel approach for building roof modeling including: roof plane segmentation and roof model reconstruction.Segmentation is performed by minimizing an energy function.Arefi and Reinartz (2013) extracted edge information from an orthorectified image for precise 3D building reconstruction.An approach by integrating airborne LiDAR data and optical multi-view aerial imagery is presented for automatic reconstruction of 3D building roof models (Cheng, Tong et al. 2013).Vögtle and Steinle (2005) reconstructed the 3D building model from both the first and the last pulse LIDAR data, then these two models are fused in one model.Another study used cadastre maps for separating building points from other points (Rau and Lin 2011).Also, there are * Corresponding author many other studies that utilized model-driven approaches.Some of them used only point cloud for 3D model generation (Rottensteiner 2003, Lin, Gao et al. 2013), some other studies employed cadastre maps together with point clouds for this purpose (Elberink andVosselman 2009, Henn, Gröger et al. 2013), and finally some researches used optical images and point cloud for 3D building model generation (Wang, Zhang et al. 2015).
In this paper, a new data-driven method is proposed for the 3D reconstruction of flat roof building from LiDAR point cloud.First, building extraction is carried out from LiDAR data, then roof planes are segmented.For extraction of points of building edges, a new method utilizing a regular grid is proposed.A Straight line equation has been employed to approximate building boundaries by computing the centroid point and guidance for each occupation.Finally, flat roof buildings are reconstructed by integrating roof and wall polygons.

PROPOSED METHOD
Proposed method for 3D reconstruction of flat roof building is shown in Figure 1.Roof segmentation, boundary points detection, boundary approximation, and 3D modeling of the building are the major steps in this method.More explanations regarding to the details are given in the following sections.

Roof segmentation
The first step of the proposed method is roof segmentation so that the flat roofs are segmented and separated from the points of the walls.For this process, region growing method is implemented using two parameters: the distance between points and a height difference of the points.So, the roof segment is found by clustering together adjacent points.based on the vertical component of points.If the difference between adjacent points is less than a given threshold (here ca.15cm) are grouped.Usually, a threshold of about 15 cm is appropriate.As shown in Figure 2, the roof points are segmented.

Edge points detection
After roof segmentation, edge points of each roof segment are detected.For each roof segment, a regular grid is generated, so that the elevation of points in this grid is equal to the average height of the roof points.The distances between grid points in the x-y directions are calculated from the distance between the roof points, where the distances from each point of the roof points to its closest point are calculated, then the larger distance is selected to be the distance between grid points.These grid points represent the centers of square cells, thus the roof points are located within these cells.Therefore, the 3D means for each cell are computed, so that all the points located within each cell are detected and then the 3D means of these points are computed.Thus, there are two cases for each cell: (1) 3D regular grid point, (2) 3D mean, and these two sets are related by index.Initially, edge points are detected by grid points, then 3D means by the index are detected as shown in Figure 3.  1).If the number of points is 8, the interested point is deleted from the grid because it will be inside the roof plane.If the number of points is less than 8, then the point will be edge point.In the last, the detected edge points of the grid are changed with 3D means points (Figure 4).

Line approximation
After detection of final edge points, roof lines are approximated.
To draw the lines of the buildings, the straight line equation is used.First, the edge points should be grouped so that each group represents a line.For this, initially the edge points are rearranged in the data matrix as in the reality.In other words, each point in the edge points matrix become next to each other.Next, the normals of points are computed.The arranged edge points are grouped based on their adjacent position in the matrix and similarity of directions.Finally, the lines are drawn.
To rearrange the edge points in the matrix data, this process selects the first point in the matrix and finds the nearest point of the matrix and the nearest point is placed next to the first point.This process is repeated for the new point, until all the points are finished.As a result, the matrix of points is rearranged as in the reality.In the next step, (Nx, Ny, Nz) normal of each point is estimated by applying a covariance analysis on three points: the interested point and two nearby edge points.In particular, we solve the eigenvector problem for the covariance matrix: where Np = the set of points.p = interested point.q = point.̅ : mean of points.
The three eigenvalues are sorted in ascending order, i.e. λ0 ≤ λ1 ≤ λ2; and the eigenvector corresponding to the smallest eigenvalue (v0) is the approximated normal at point p (Figure 5a).Nz for all points is zero since the points are located in a horizontal plane.Therefore, angles of directions respecting to the x-axis are estimated by the equation (3).Nx must be positive before using the equation (3), so the normal direction of each point is reversed if Nx < 0. The angles i are calculated from the X-Axis for using in the straight line equation in the next step, where the angles are in the range [-90, +90].The angle is positive if its direction is anticlockwise (Ny > 0), and negative if it is clockwise (Ny < 0).
Next, the edge points are segmented based on their adjacent position in the matrix and similarity of angels.If the angle difference is smaller than the pre-defined threshold, it belongs to a unit segment line.This threshold is about 15 degrees.The final direction of each line must be estimated.The longest line segment is found based on the number of its points, then using equations (2 and 3), its normal vector and angle are estimated by applying a covariance analysis on all line points.This direction is assigned to all parallel lines, then the orthogonal direction is computed (Figure 5b).This method maintains the conditions of orthogonality and parallelism.
For drawing the lines we need at least one point, so the centroid point for each line is computed as shown in Figure 6a.Next, using centroid points and directions for each line, roof lines are approximated by the straight line equation ( 4).So that the parameter b is calculated for each line in the equation ( 4).The lines are approximated and intersections of lines are estimated as displayed in Figure 6b.

3D modeling
After extraction of building edges, 3D building models are reconstructed.The floors are flat therefore, for each roof a plane passes through its intersection points of the edge.Using these planes, the roofs are reconstructed.For the modeling of the walls, the adjacent ground points (or the lowest points in the walls points) are detected so that the points are in the neighborhood of building boundaries.Then the lowest elevation of these points is considered as the height of floor.Thus, the roof edges and corners are projected on the building floor.Finally, using the roof edges and the projected edges, the walls are reconstructed as shown in Figure 7.

RESULTS AND DISSCUSION
The proposed method has been tested on IEEE sample dataset of the Zeebruges, Belgium study area.The data cover an urban and harbor area in Zeebruges, Belgium.The LiDAR data were captured with Riegl laser scanner.The point density of the LiDAR data is approximately 65 points/m², which is related to point spacing of approximately 10 cm.We selected a building with two roofs and small details in the roof to test the accuracy of the proposed method, then the proposed method has been applied to other flat buildings.In this research, we focused only on the 3D building modeling, so the building points were already segmented.The visual interpretation of the result shows that the proposed method was very successful and the roofs were modeled appropriately.Also, the roof planes were precisely reconstructed and passed in the middle of the roof points as shown in Figure 8.The small and big walls are located in real locations exactly.In this method, by finding the building boundaries and intersection points with good accuracy, the building modeling has a good accuracy.The proposed method separates the flat roofs from each other, especially the roofs related to one build.Also, it separates the roof points from the wall points so that the wall points do not affect the average height of the roof.The factors that affect on the separation of the roofs are neighbor point distance and the amount of height difference between the points.Where by choosing a large neighbor distance, adjacent roofs in two buildings may be combined.Also, if we choose a great height difference between the points, adjacent roofs in the same building may be combined, besides the walls points will be entered in the computations and these will affect the exact roof height.The appropriate threshold for a distance of neighborhood points has been selected as the twice maximum distance between the points, so that gaps within the grid are not formed.The distance is about 40 cm.The height difference threshold is about 15 cm.For a more accurate evaluation, a quantitative assessment is performed by digitizing the building roof model manually from LiDAR point clouds.The corners of this model are compared with the corners of the model that has been reconstructed using the proposed method.The results are given in table 1 proves that the accuracy of the results is very good.The quality of the 3D model in the big roof is equal approximately to the point density of the LiDAR sensor which is 10 cm.Also, the quality of the 3D model in the small roof is approximately equal to half of the grid spacing which is 40 cm.This is logical because we used 3D mean points to detect the edges.Therefore, the maximum error must be the half.From above, we see that the factors influencing the accuracy of the proposed method are the density of points and the size of the grid spacing.So, the method leads to very good results with good factors.In the end, errors yield from all steps of roof segmentation, edge points detection, line approximation and others.Finally, the proposed method has been applied to other flat buildings as shown in Figure 9.

CONCLUSION
There are several factors that affect the accuracy of the final results of 3D building reconstruction of flat roofs in this algorithm.These factors are the nearest neighbor distances, the height difference threshold, the distance between the grid points and the point density.The distance between the grid points is the most important parameter.The algorithm is able to draw the small lines with high accuracy if the distance between the grid points is small.If this distance is big, the small lines that are shorter than the distance, cannot be approximated.As if the distance is a small, gaps within the grid may be formed because the distance between some of the roof points is greater than the distance between the grid points.In the end, this method is very precise for 3D flat building reconstruction from the dense LiDAR point cloud.As we have found that even small details of building have been modeled.This algorithm may have a problem with the buildings including short edges in the low density point cloud, because the distance between the grid points, in this case, will be large and the small lines will be removed

Figure 1 .
Figure 1.Workflow of the proposed method.
a) Projected roof edges and corners on the building floor, b) Walls reconstruction, c) 3D flat building modeling

Figure 8 .
Figure 8. 3D flat building model with roof points (yellow points), a) top view, b) Lower view.