Building Contour Extraction Based on LiDAR Point Cloud

This paper presents a new method for solving the problem of utilizing the LiDAR data to extract the building contour line. For detection of the edge points between the building test points by using the least squares fitting to get the edge line of buildings and give the weight determining of the building of edge line slope depend on the length of the edge line. And then get the weighted mean of the positive and negative slope of the building edge line. Based on the structure of the adjacent edge perpendicular hypothesis, regularization processing to extract the edge of the skeleton line perpendicular. The experiments show that the extracted building edges have the good accuracy and have the good applicability in complex urban areas.


Introduction
The application of airborne LiDAR point cloud for building edge extraction has been more extensive [1][2][3][4][5][6][7][8], Baltsavias, Zhang Zhiyou and Khoshelham etc. used aerial imagery and LiDAR data for building extraction comprehensively [9][10][11].Due to the inherent error and resolution of the airborne LiDAR data, noise is often present in the edges of the building which can cause deformation of the edges of the building.It is mainly showed that the building of tiny twist, jagged or buildings connected to the two edge lines are not perpendicular to each other (as shown in Figure1).Zhang Yang-yang proposed a regularization method of building edge line based on minimal outsourcing rectangle 12 .You Hong-jian grouped the boundary points according to the change of the direction angle of edge points, and then the main direction of the building is calculated according to the boundary points of the groups, the outline of the outermost edge of the building is obtained finally 13 .Shen Wei proposed a method of "quadrangle method" for quadrilateral and a method of "categorical forcing orthogonal" for polygons (greater than four edges and even sides) to further regularize the edge lines [13].This paper based on the problem of deformation of the building using LiDAR point cloud extraction.The key points of the building are firstly detected on the basis of obtaining the building edge points, then the edge line of the building is extracted by using the least square method, and then the edge line of the building is regularized to lay the foundation for building the 3D model of the building later.

The building detection of key points
The key point of the building is the projection of the building to the corner or intersection of the planes.As shown in Figure -2, P 1 .P 2 .P 3 .P 4 is the orderly building edge points.From point P 1 , connect P 1 and P 2 , the azimuth angle β 1 and the length l 1 of the straight line P 1 -P 2 are calculated, P 2 for the straight line P 1 -P 2 length d of the vertical line, from this we can calculate , Connect P 1 and P 3 , the azimuth angle β 2 and the length l 2 of the straight lines P1-P3 are calculated.Let .
Figure2. the principle of testing key point 1) if β (βa, βb), then P 2 is not a key point and remove it.P 3 for the straight line P 1 -P 3 length d of the vertical line and calculate .Connect P 1 and P 4 and calculate the azimuth angle β 3 of the straight line P 1 -P 4 .At this time, , return to the first step.

2) if
, then P 2 is the key point and retain it.From P 2 , connect the next point as the start judgment line, and repeat the above steps until the last point.
3) After all edge points are judged, the remaining points are the keys.The key of this algorithm is to reasonably determine the value of d.Take the P 1 , P 2 , P 3 points in Figure-3 as an example, if the d is larger, Δβ 1 is larger and the greater the range of change of β 2 for judging whether or not the point P 2 is a key point.Then the P 2 as a key point of the possibility of the smaller, the final effect is the detection of the key points less.In order to better extract the key points, not only to avoid changes in the direction of the edge of the smaller point as a key point, not the key points will be lost, d value of the selection should be based on the laser point cloud density and the actual building Complex situation specific to determine.As shown in Figure-3 is the key points (red dots) detected by the above algorithm.

The generation of building edge skeleton line
After detection of the building key points was finished, the building edge skeleton lines were generated according to the detected key points.While when we detected the key points, many of the building edge points were considered non-critical points which may be filtered out.But these non-critical points still contain a large amount of useful information.Therefore, the generation of building edge skeleton line in this paper is not simply connecting the adjacent key points into line segments, but utilizing the adjacent two key points and all the building edge points located between these two key points to fit out a straight-line segment by least square method.And it is regarded as a building edge skeleton line in order to improve the generation accuracy of the building edge skeleton line.As shown in Figure -4 After all the building edge skeleton lines are generated, theoretically speaking, the two slopes of the skeleton lines should be either equal in value (parallel) or the product of positive and negative is -1 (vertical).However, due to various factors (data accuracy, errors in building extraction, etc.) makes the actual situation which is not the case, there are often adjacent two skeleton line slope sign the same but not equal.This is because the detection of key points cannot really represent the key points of the building, therefore need to combine the two adjacent skeleton line segments.
An algorithm is required to merge the two skeleton lines.For example , are the two connected straight segments.Their slopes are the same positive or the same negative and the length are the s1, s2 respectively.
is the new straight merged line segment.How to determine the parameters (a3, b3) of line segment of L3?At this time, according to the length of the straight-line segment to weight, the weight of long line is large and using this method to calculate the parameters of L3.
The parameters of L3 is calculated as follows: , . After this treatment, the slope of any two adjacent skeleton lines are positive and negative on the contrary.As shown in Figure -5b, skeletal lines using least-squares fitting and merging are not vertical or parallel to each other, but the number of skeleton lines constructed using the key points is much smaller.

Regularity of the edge of the building skeleton line
There are only two relations between the skeleton lines of buildings, that is, vertical or parallel, and the purpose of regularization is to adjust the skeleton lines of the two connected buildings so as to be perpendicular or parallel to each other.After the completion of the building edge of the skeleton line generation, those trivial lines and redundant points is no longer exist, only leaving the edge of the building skeleton line.Regularization of the skeleton line of the building edge is carried out on the basis of the skeleton line, the regularization process is as follows: 1) All the skeleton lines are divided into two categories according to the positive and negative slope of the generated skeleton line, namely the positive slope of the skeleton line and the negative slope of the skeleton line.
2) After classification, calculate the weighted average slope of the positive and negative slant skeleton lines s_, s_ +.Such as for the positive slope of the skeleton line: , is the weighted average slope of positive slope skeleton line, is the slope of the i-th skeleton line in the positive-slope skeleton line, is the length of the i-th skeleton line in the positive slant skeleton line, l is the total length of the positive slope skeleton line.The weighted mean slope is calculated for the negative slope skeleton line in the same way.On account of the long skeleton lines have a higher accuracy of slope than the short skeleton lines, the weighted average slope of the skeleton line calculated in this way is more reasonable and more accurate.
3) Adjust the two weighted average slopes calculated in the previous step so that they are perpendicular to each other.As shown in Figure -6, OA is the direction of the positive slope of weighted averaged, OB is the weighted average of the direction of the negative slope of the weighted averaged, α is the angle between the OA direction and the X axis, β is the angle between the OB direction and the X axis, , , adjust the direction of the OA and OB direction to make α + β = 90 ° Let the residual of angle is the c=α+β-90°, when c=0, OA OB.In order to make c=0, the negative values of c are assigned to α and β in a certain way .Here α and β represent the total length of each line as the basis for distribution, the longer the length, the smaller the assigned value, , , is the total length of the positive slope skeleton line, is the total length of the negative slope skeleton line, .After this treatment, OA will be strictly perpendicular to the OB, that means that the direction of positive and negative slopes is strictly vertical.α β Figure 6.The weighted average slope vertical processing schematic drawing 1) Rotate each skeleton line around its center point to the direction of the weighted average slope of its category, after this step is completed, the adjacent skeleton lines will be strictly vertical.
2)If the length of the skeleton line is particularly small, the line may not be a real edge of the building, you need to remove it.After stripping, merge the two parallel skeleton lines on either side.

Analysis and conclusions
The experimental results show that the edge extraction and regularization method used in this paper has a good effect, especially for buildings whose edges are at right angles.The innovation of this paper: 1) According to the building key points to generate the building skeleton line is not simply connecting the key points of adjacent buildings, but to make the two building key points and all the building edge points between them are involved in the application of least squares to fit the skeleton line which will be closest to the original edge line of the building.2) When the slope of the skeleton line is calculated, the length is weighted according to the length of the skeleton line, the length is proportional to the weight, and the slope is the slope of the weighted average.

Figure 1 .
Figure 1. the distorted and not vertical phenomenon of extracting the building outline by using LiDAR point cloud (a.Building point cloud; b.Extraction of buildings)

Figure 3 .
Figure 3. Using the above algorithm to detect key points (red point)

Figure 4 .
Figure 4. Key points of contour line compared with least-square fitting contour line(The dotted line is obtained by least squares fitting, the solid line is the key point, the hollow point is the non-key point, the solid point is the key point) After all the building edge skeleton lines are generated, theoretically speaking, the two slopes of the skeleton lines should be either equal in value (parallel) or the product of positive and negative is -1 (vertical).However, due to various factors (data accuracy, errors in building extraction, etc.) makes the actual situation which is not the case, there are often adjacent two skeleton line slope sign the same but not equal.This is because the detection of key points cannot really represent the key points of the building, therefore need to combine the two adjacent skeleton line segments.An algorithm is required to merge the two skeleton lines.For example , are the two connected straight segments.Their slopes are the same positive or the same negative and the length are the s1, s2 respectively.isthe new straight merged line segment.How to determine the parameters (a3, b3) of line segment of L3?At this time, according to the length of the straight-line segment to weight, the weight of long line is large and using this method to calculate the parameters of L3.The parameters of L3 is calculated as follows: ,

Figure 5 .
Figure 5.The generated skeleton line (a.The skeleton line is constructed with key points; b.Least squares fitting and merging processing of skeleton lines)

DOI: 10 Figure 7 .
Figure 7.The results of extracting building contour line (a. the edge skeleton line after regularization; b. the edge skeleton line before regularization)