1. Introduction
With the arrival of Industry 4.0 [
1], the architecture, engineering, construction, and facility management (AEC/FM) industry has begun to transform to informatization, digitalization and intelligence. Using building information modeling (BIM) technology to promote productivity has increasingly attracted the attention of industries and enterprises [
2,
3]. In recent years, unmanned aerial vehicle (UAV) oblique photogrammetry and laser scanning technology have been continuously developed and widely used for BIM modeling in the field of AEC/FM [
4]. UAVs have the characteristics of a low cost and high efficiency. Terrestrial laser scanning (TLS) has the characteristics of a noncontact approach, high sampling rate, high accuracy, high resolution, and panoramic scanning; such characteristics can significantly save time and reduce costs [
5]. Many applications in the field of remote sensing can be solved by incorporating methodologies from the fields of photogrammetry and laser scanning [
6,
7].
BIM is a rich object-based parametric model. BIM modeling usually comprises three parts: geometric modeling, semantic modeling, and topological relationship modeling [
3,
8,
9]. However, the current research on BIM modeling from laser point clouds is highly dependent on human interaction, which is time-consuming and laborious [
10]. The laser point clouds obtained are usually unstructured and lack semantic information. They contain noise and suffer from shadowing from nearby objects. Due to the incomplete point cloud data caused by occlusion, the high density and magnanimity of point clouds, the complex structure of buildings, the staggered space, and the diversity of functions, significant challenges to the automatic extraction of geometric elements of building point clouds may occur [
11]. Solid walls are one of the most important building structures in BIM [
12]. Most existing studies focus on the plane segmentation and fitting of the plane parameters of the wall surface from the unstructured 3D point cloud, ignoring the occupied space surrounded by the boundary surface (usually shown as a pair of parallel walls) and the topological relationship between the wall objects [
13]. In addition, most current studies usually use only a single data source [
5,
14,
15,
16,
17,
18], for example, indoor 3D point clouds [
17,
18], which cannot provide sufficient information to estimate the thickness of exterior walls and thus cannot meet the needs of BIM modeling for complex buildings. Both laser point clouds and pictures are essential data sources for BIM wall reconstruction, and their individual benefits should be merged to increase information availability.
In this study, a BIM solid wall modeling method based on oblique photogrammetric meshes and laser point cloud is proposed. The contributions of this study are two-fold: (1) A kinetic space partition algorithm to generate building footprint and indoor floor plan. It classifies interior and exterior wall segments and infers parallel line segments to extract wall centerlines; (2) A topology reconstruction method that reconstructs and maintains the topological relationship of detected wall elements is used to build BIM wall objects with topological consistency.
3. Methods
The input of this study is a photogrammetric mesh and 3D laser point cloud, which are pre-aligned accurately. There are two methods for the coordinate registration of the UAV photogrammetric model and 3D laser point cloud: (1) using control points to improve the accuracy of UAV photogrammetry and laser scanning point clouds, respectively, and ensuring that the two are in the same coordinate system; and (2) using control points to improve the accuracy of the UAV image and selecting marker points from the UAV image as control points to improve the accuracy of the indoor laser point cloud. The basic idea of both methods is to transfer external spatial reference information into indoor space. Obtaining real-world scene data with a high precision is necessary for BIM modeling in the ACE field. The measurement coordinate system in this study adopts the Transverse Mercator projection [
35], and the central longitude is the central longitude of the research area. The outdoor UAV photogrammetric model and the indoor laser scanning point cloud are in the same coordinate system. The input laser point cloud completely covered the ceiling area of the building interior, which is easy to meet for most laser scanners.
The flowchart of the proposed method is shown in
Figure 1. It contains six steps: (1) line feature extraction, (2) regularization and fusion, (3) kinetic space partitioning and optimization, (4) wall centerline extraction, (5) wall refinement and topology reconstruction, and (6) solid wall reconstruction.
3.1. Line Feature Extraction
First, the contour-based line extraction method [
36,
37] is used to extract line features from the oblique photogrammetric surface mesh and 3D laser point cloud. For the photogrammetric mesh model, the relative ground elevation h
s of the cutting plane is given along the Z axis direction. The intersection of the triangle in the mesh and the cutting plane is used to obtain the intersection line, and the linear segment features of the building outline are clustered using the region growth algorithm.
For the input 3D point cloud data, along the Z axis, the given slice thickness is
. The input point cloud is segmented by a set of parallel planes, and the layered point cloud is projected onto the corresponding reference plane to form a contour point cloud slice. For a layered point cloud, its middle position is defined as the projection reference plane of the layer, and all data points in the layer are projected to the reference plane to form a point cloud slice P′. Then, line features are extracted from the segmented slice point cloud P′. The efficiency of the direct point-based calculation is low, while rasterization can not only improve the efficiency of the calculation but also ensure sufficient accuracy when the pixel size is sufficiently small. Common image edge-detection algorithms (such as the LSD algorithm [
32]) use gradient information to calculate the edge information. However, for the rasterized point cloud slice, the centerline of the slice cannot be accurately extracted using edge gradient information, which will lead to a reduction in the accuracy of the extracted line feature. Therefore, in this study, a line feature detection algorithm based on eigenvector calculations (E-LSD) is proposed. This algorithm can accurately extract slice line features by replacing the gradient direction with the eigenvector direction. This method uses a small pixel size to ensure the geometric accuracy of the extracted line segment (usually the pixel size is set to 0.01–0.02 m). Algorithm 1 is a line segment detection algorithm based on the eigenvector proposed in this paper. The algorithm adopts the same region growing and line fitting strategy based on rectangle estimation as LSD algorithm [
32], and the angle threshold
used in the region growing algorithm is usually an empirical value. Due to the existence of measure errors of direction vector, the angle threshold usually adopts 10 to 30 degrees.
Algorithm 1. E-LSD |
input: point cloud . |
output: list of rectangles. |
; // 3D occupancy probability grid |
P′; // 2D slice point cloud |
// set the z value to 0 for each point |
= 2D_OPG(); // calculate 2D coordinates of occupied and free pixels in OPG |
Status(allpixels in ) = NotUsed; |
DensityAndLinearity(allpixels); |
for each () |
if Status(p) = NotUsed then |
region = RegionGrow(); |
Rect = RectApprox(region); |
end if |
end for |
3.2. Regularization and Fusion
Due to noise and missing data in the point cloud, the line features extracted from the oblique photographic mesh and point cloud may contain a significant number of redundant and broken lines. In addition, the extracted line features do not take into account the constraint that the surface of a wall typically appears as a pair of parallel faces. Therefore, in this paper, the line feature regularization method [
38] is used to jointly regularize the two types of line features; then, the two types of line features are separately fused. With the combination of the line features of the building outline and line features of the building interior, parallel constraints are first added, and then the extracted redundant lines and broken lines are fused to reduce the data amount of extracting line features. The polar coordinates are used to represent linear segments; taking the x-axis as the polar axis and denoting the quadrant angle of each line segment as
, the relative angle between Line Segment
and Line Segment
in Neighbor
is
. Let
denote the quadrant angle of Line Segment
and let
denote the quadrant angle after reorientation; then, the quantity to be added to the initial orientation is
, and the object function for line-segment reorientation is:
when
approaches 0° or 180°,
. Approximately parallel line segments are corrected to become strictly parallel through
. By Parameter
is a weight coefficient balancing the contributions of
and
, and its default value is 0.8. The
objective function is minimized by solving the convex quadratic programming.
Continuing with the realignment of line segments, the expression of the straight line is still represented by a polar coordinate. With
denoting the translation to be added to Line Segment i along its orthogonal vector, the formulations of
and
in Equation (1) are as follows:
After reorientation and realignment, a new line-segment collection
is obtained. An example for line segment reorientation, realignment and line segment fusion is shown in
Figure 2.
3.3. Kinetic Partitioning and Optimization
Architecture space partitioning and optimization mainly includes three parts: (1) voxel-based semantic classification of indoor space, (2) kinetic space partitioning, and (3) graph cut-based optimization.
The voxel-based semantic segmentation of indoor space first initializes the discrete 3D occupancy probability grid (OPG) and sets the value of each voxel as free. Then, the voxels containing the points are marked as occupied values. The last step is to mark the unknown area. The algorithm initializes the boundary (the maximum value of the point cloud elevation range), sets each voxel as unknown, and traverses the voxels layer by layer according to the z-axis direction. When the voxel value of the current layer in the occupancy probability grid is the same as that of the previous layer, the value is marked as unknown; if the voxel value of the current layer is different from that of the previous layer, the traversal stops. This marks all unknown areas. As shown in
Figure 3, the returned occupancy probability grid contains S
voxel = {Free = 0, Occupied = 1, Unknown = −1}. Then, the 3D room segmentation method [
11] utilizes the volumetric representation and sphere packing of indoor space to separate free indoor space. Similarly, the occupancy probability grid for photogrammetric mesh contains S
voxel = {Inside = 0, Occupied = 1, Outside = −1}. The Algorithm 2 is used to refine the classification of inside space. The function 3D_OPG calculates the evidence that each voxel is occupied, free, or of unknown status. The function VDB_EDT is an implementation of a distance transform algorithm;
represents the distance from each grid voxel to the closest obstacle. The SpherePacking function packs the indoor space with a set of compact spheres to form rooms as separated connected components. Each connected component is treated as an initial seed room region and the wavefront growing algorithm is used to mark unlabeled voxels to obtain the final classification for inside space or indoor free space.
Algorithm 2 Semantic Labeling of Inside Space or Indoor Free Space |
input: P: photogrammetric mesh or indoor laser point cloud; : the voxel size of the grid map; : overlap ratio threshold for two spheres; : minimum room volume threshold |
output: : voxel-based grid with semantic labels |
; // 3D occupancy probability grid |
; // grid for Euclidean distance transform (EDT) |
; //initial seed regions |
; // inside space or indoor free space |
- (1)
3D_OPG;
- (2)
VDB_EDT; // EDT
- (3)
SpherePacking;
- (4)
= InitialSeedRoom;
- (5)
WavefrontGrowing;
|
After the regularization and fusion steps are performed, the building outline segment and interior line segments are regularized jointly, and the two regularized segment sets are then fused separately. The building outline line and interior line segments are used as inputs for the kinetic space partitioning algorithm. A comparison between kinetic space partitioning and the traditional space partitioning algorithm has previously been discussed in the papers [
39,
40]. The algorithm based on kinetic space partitioning has obvious advantages over the traditional two-dimensional space partitioning method. The kinetic space partition algorithm is faster, and the constructed cell complex is simpler.
The kinetic space partitioning algorithm achieves the partitioning of the building topological space, thus transforming building space modeling into a problem of labeling the cell complex (
Figure 4). The cell complex is expressed by the graph G = 〈V, E〉. With the source point s and sink point t, the node V corresponds to the polygon element of the cell complex, the undirected edge E corresponds to the adjacency relationship of the cells, and each cell is marked as free and non-free. Cut C of Graph G can divide Node V into two disjoint subsets A and B. The cost of Cut
is defined as the sum of the weights of all edges on the connecting boundary of two subsets A and B. The minimum cut is the cut with the lowest cost among all cuts of Graph G. The energy function is defined as:
where
is the weight between vertex nodes and
is the weight between a vertex and Terminals s and t.
where
and
are adjacent cells,
is the weight between
and
, and
is the value of Cell
. Therefore, Equation (7) can be interpreted as a discontinuity penalty between Cells
and
. If
and
are more similar, then
is larger. In contrast, if the difference between
and
is greater, then
is smaller and close to 0. The two cells with large value gaps have very small weights, so they are the cells that need to be divided. After completing the cell-complex marking, the cell units are merged with the same label to obtain Polygon Q1 of the building outline and the indoor floor plan Q2.
3.4. Wall Centerline Extraction
In this step, the building footprint Q1 and indoor floor plan Q2 are taken as inputs. We search the wall line segments in Q2 that are parallel to the line segments in Q1 with distances less than ε. The wall line segments in Q2 are classified as exterior walls and interior walls. The wall line segments in Q2 are broken when the line contains both exterior and interior parts. All the wall lines in Q2 adjacent to the outside of Q1 are extracted as exterior wall line segments, and the rest are used as interior wall line segments. To extract the wall centerline, the parallel line pairs are extracted, and the interior wall centerlines are then extracted. The algorithm calculates the middle points of all wall line segments, and constructs Delaunay triangulation (DT) for the middle point set. For each line segment i, the nearest neighbor of each line segment is obtained by searching the neighbor points in DT, and then the nearest neighborhood M
i is constructed. We denote the angle between Line Segment i and Line Segment j as
. If the angle is less than
and the distance between Line Segment i and Line Segment j is less than the threshold
, the two line segments are parallel. For a straight wall, the centerline of the interior wall can be calculated using the median of the vertical intercept in the straight-line equation. The thickness of each wall is estimated by calculating the orthogonal distance between two parallel lines (
Figure 5). If the outline of Q1 has no adjacent line segments in Q2, the most common thickness among the exterior walls is used for it.
For the case in which only an indoor laser point cloud is available, the user inputs the thickness of the exterior walls for modeling. Because the thickness of the exterior wall components cannot be determined from single exterior wall surface line segments, the exterior wall thickness is assumed to be the most common exterior wall thickness. A dilate operator is performed for Q2 to obtain building footprint Q1. The wall line segments in Q2 are classified as exterior walls and interior walls. The centerlines of the exterior walls and interior walls are extracted by searching the parallel line pairs and calculating the median of the vertical intercept of the straight-line equation.
3.5. Wall Refinement and Topology Reconstruction
Because this method depends on the unit characteristics of the interior space, the same wall may be divided into different sections because it adjoins multiple rooms. The cases where the wall centerline needs to be merged are divided into three cases: adjacent and collinear, vertical, and intersecting. As shown in
Figure 6, the walls with “T”, pseudo “T”, and the cross shapes in space are merged according to the primary and secondary principles to obtain the final wall object centerline parameters. The specific method is as follows: the center points of all wall centerline segments are obtained, and the DT is constructed.
The centerline i of each wall segment is traversed, the nearest neighbor of each wall centerline is obtained by searching the neighbor points in the DT, and the nearest neighborhood Mi is constructed. For each line segment i, the angle between line segment i and its nearest neighbor j is calculated. If the angle is less than 5° and the distance between Line Segment i and Line Segment j is less than the threshold , the two segments are merged. The neighborhood Mi is updated in this way until all segments have been processed.
The center points of all updated wall centerline segments are again obtained to build the DT. For each line segment i, the angle between line segment i and its nearest neighbor j is calculated. If the angle is 90° and the distance between the end points of Line Segment i and Line Segment j is less than the threshold , then the two line segments are perpendicular. If the angle is less than 45° and the distance between the end points of Line Segment i and Line Segment j is less than the threshold , then the two line segments are considered to intersect. The neighborhood Mi is updated until all segments have been processed.
3.6. Solid Wall Reconstruction
After topological reconstruction, the topological map of the wall centerline is still maintained. Wall reconstruction depends on the elevation, wall type, and height parameters (
Figure 7). The wall elevation is detected based on the Z value of the floor. A histogram method [
32] is used to obtain the Z value of floor, and the average height from floor to ceiling. The elevations of all walls are sorted, and the level set H is extracted by Gaussian clustering [
41]. The wall type is characterized in accordance with the wall thickness, material, and other parameters. To build the BIM solid wall object, each wall centerline is traversed, and the corresponding wall type and level parameters are selected as the input to the parametric BIM wall generation function. The topological connections are built between the walls, and between the walls and rooms. Moreover, the required reference information is added. The room boundary surface parameters are adjusted, the associated wall objects are considered, and the room object is rebuilt accordingly.
4. Results
To verify the effectiveness of the proposed method, two real-world datasets were used for the experiment (
Table 1). A DJI Phantom 4 RTK was used to capture UAV images of the building of interest from the air using an oblique angle of view. The control points were uniformly arranged in the survey area to ensure measurement accuracy. A Trimble TX8 scanner was used to obtain the laser scanning point cloud in an indoor environment, and targets are used to assist the registration of adjacent stations. A total station was used to capture the targets’ coordinates in the indoor environment. To meet the needs of coordinate registration between the UAV photogrammetric meshes and laser scanning point clouds, a control point layout was designed for UAV photogrammetry and laser scanning in the same coordinate system. Because multiple floors can usually be separated into single floors for processing and the floors are similar, only one floor of laser point cloud data was used in the experiment (
Figure 8). For both datasets, the flight altitude is approximately 50 m, the forward overlap rate is 80%, the side overlap rate is 70%, and the flight speed is 4 m/s. The ground resolution of the image is 0.02 m. The Trimble TX8 captures data at one million points per second with a typical scan. The original point clouds are subsampled with a minimal distance of 5 mm between two points. For Dataset A, 11 photo-control points (5 as checkpoints) were set up and 6 target coordinates were captured. For Dataset B, nine photo-control points (four as checkpoints) were set up and six target coordinates were captured. For the photo-control point, CGS2000 coordinate system and Gauss three-dimensional zone projection were adopted; the central longitude is 121°, and the elevation system is the 1985 National Elevation Datum. The reference background solid walls of the datasets were manually obtained. The maximum-overlap metric was used to find the correspondences between the reference and the results. The reference model’s solid walls were modeled as cellular spaces to guarantee one-to-one correspondences, which is in line with the specification of the IndoorGML standard [
42]. The completeness, correctness, and quality index are used to evaluate the accuracy of wall object detection:
Here, the number of true positive (
) refers to the number of solid walls detected in both the reference data and the reconstruction results. The number of false positive (
) is the number of detected solid walls not found in the reference data. The number of false negatives (
) is the number of undetected ground-truth solid walls. The accuracy of the wall surfaces is evaluated using
[
43,
44], which is defined as:
where
is the vertical distance between Vertex
in the source model and Plane π in the reference model; and
is the truncation threshold that is used to prevent the influence of an incomplete or inaccurate source model. To determine how far off the closest surfaces in the reference model are from the sample points representing the source surfaces, the
function is used to compute the median Euclidean distance between them. Relatively high completeness and low correctness scores mean that the reconstructed models contain most of the elements that are present in the corresponding reference models but that they also include a considerable number of incorrect facets.
The algorithm in this study is implemented by using C++, Computational Geometry Algorithm Library (CGAL) [
45] and CloudCompare [
46]. The BIM object generation plug-in program is developed based on C# and Revit API. All experiments use an Intel Core i7-10750H CPU (2.60 Hz) and 32 GB RAM.
Table 2 shows the input parameters for the experiment.
The line features of the UAV oblique photogrammetric mesh and laser scanning point cloud are extracted first. In Dataset A, the angle threshold is set to 22.5°, and the relative ground elevation is 2 m for mesh line feature extraction. To extract line features from the 3D point cloud, an image pixel size of 0.015 m and a slice thickness of 0.1 m were applied. Then, the extracted two types of the line-segment features are combined and regularized together with a parallel line fusion distance of 0.025 m and an angle threshold of 3°. The line features extracted by the mesh and indoor line features are fused separately to reduce broken lines and redundant parallel line segments with a distance threshold of 0.1 m. The extracted regular line-segment feature results are shown in
Figure 9a.
To extract line features from photogrammetric mesh on Dataset B, an angle threshold of 22.5° and a relative ground elevation of 2 m were used. An image pixel size of 0.015 m and a slice thickness of 0.1 m were applied for line feature extraction from the 3D point cloud. Then, the extracted two types of line features are combined and regularized together. In the experiment, the parallel line fusion distance is set to 0.025 m, and the parallel line angle threshold is 3°. The line features extracted from the photogrammetric mesh and indoor point cloud are fused, and the distance threshold is 0.1 m. The extracted regular line feature results on Dataset B are shown in
Figure 9b.
The voxel-based semantic segmentation of the indoor space was applied for both the photogrammetric mesh and indoor point cloud. On Dataset A, the voxel size is set to 0.25 m for the oblique photogrammetric mesh and 0.05 m for the indoor point cloud. For the input indoor laser scanning point cloud, the voxel setting of semantic markers is usually smaller than the wall thickness. However, too small of a voxel size will reduce the program execution efficiency.
The kinetic space partitioning algorithm is used to carry out spatial partitioning of the regularized building outline features, and the results are shown in
Figure 10a. The graph cut optimization algorithm is used to classify the cell complex, and the cells with the same semantic labels are merged to obtain the building footprint polygon. Similarly, the space partition algorithm is used to decompose the indoor space with regularized indoor line segments extracted from indoor point clouds. The resulting cell complex is shown in
Figure 10c. The graph cut optimization algorithm is used to obtain the optimum floor plan, as shown in
Figure 10d.
In Dataset B, the voxel size is set to 0.25 m for the oblique photogrammetric mesh and 0.05 m for the indoor point cloud. The resulting cell complex of the space partition result and building footprint are shown in
Figure 11a,b. For the indoor laser scanning point cloud, the generated cell complex is shown in
Figure 11c. The graph cut optimization algorithm classified the cell complex, and the resulting room floor plan is shown in
Figure 11d.
To extract wall centerlines, a search radius of 0.025 m is applied for Dataset A. It searches the line segments of the exterior walls from the indoor floor plan, as shown in the blue contour line in
Figure 12b. The parallel lines were classified as exterior walls and interior walls. The extracted wall centerlines are shown in green in
Figure 12b. The wall thickness parameters are then extracted from parallel line segments. The most common exterior wall thickness is used for single line segments, shown in pink. The histogram method is used to obtain the average height from the floor to the ceiling. Two peaks in the histogram correspond to the level and height of the wall. The building footprint generated from Dataset B overlapped with the indoor floor plan in
Figure 13c, and the exterior wall centerlines extracted from Dataset B are colored blue in
Figure 13b.
In Dataset A, a total of 51 exterior wall lines and 44 interior wall lines are in the background. The correctness of the exterior wall extraction is 98.0%, and the completeness is 96.2%. As seen in
Table 3, the correctness and completeness in the experiment using both photogrammetric mesh and laser point clouds are significantly improved when compared with the experiment using a single laser point cloud data source. The wall surface accuracy (10 cm cutoff threshold) is 2.705 cm. The level set contains three levels, the wall thickness parameters were clustered, and five different wall types were built. The results of the experimental solid wall modeling are shown in
Figure 14.
In Dataset B, a total of 10 exterior wall lines and 18 interior wall lines are in the background.
Table 3 shows that the correctness of exterior wall extraction is 100%, and the completeness is 100%. The wall surface accuracy (10 cm cutoff threshold) is 2.023 cm (
Figure 15). The level set contains only one level, and three wall types were generated. The external program for automatically building the BIM model is developed depending on the Revit API, and the BIM object is generated according to the wall parameters.
5. Discussion
In this study, the construction of BIM solid walls by the combination of UAV oblique photogrammetric models and laser point clouds is discussed. When only indoor laser point clouds are used, the buffer method can be used to determine the exterior wall of the building. However, it classifies many interior walls into exterior walls, resulting in reduced accuracy.
The proposed method has significant advantages in reconstructing buildings from point clouds with heavy occlusions and missing data. To illustrate this, a comparison of the reconstruction result of Bassier’s method [
17] (
Figure 16a) and the proposed method (
Figure 16b) is presented. Bassier’s method is a wall-based method; it cannot ensure watertight modeling of room spaces. Our method has two basic demands for the input data sources. The kinetic space partitioning algorithm typically requires at least one observation from every wall to create proper cells. It can cope with photogrammetric mesh or point cloud data with holes distributed on the wall. However, if the holes are too big to ensure that at least one wall line segment can be extracted, the proposed method may fail. The other demand is that the roof of the photogrammetric mesh and the ceiling of the indoor point cloud must perfectly cover the region to be modeled. If holes exist in the roof or ceiling region (
Figure 16c), the initial labeling information for the cell complex will be incorrect.
In the experiment, some rooms did not obtain the required data because they were not licensed. Therefore, this method compromises and uses the extracted wall thickness as the default value for these walls. BIM has strict requirements to achieve a high accuracy of the model, and the UAV photogrammetric mesh may not fulfill the requirement of BIM modeling in some cases. However, the proposed method provides a framework for BIM modeling by fusing different data sources. Moreover, the modeling of doors and windows are not further considered in this study. After building the BIM wall objects, the structural elements and topological relationships of doors and windows can be reconstructed.