## 3 Methodology
### Door Extraction  
Most existing methods for extracting indoor doors based on point clouds are projecting the point cloud onto a 2D raster and identifying the openings [2; 43; 27]. Since the walls are affected by occlusion and the density of the point cloud, different openings projected onto the 2D raster may be identified as the same opening by the connection between pixels. In the projected two-dimensional raster, the openings as doors are usually significantly different in length and width from the other openings caused by occlusion. Thus, we used a method based on statistical graphs of wall projections to fill the missing wall surfaces and extract doors using given thresholds. The method can be divided into four steps:  
Figure 7: Construct virtual enclosures in different areas. Step 1: The point cloud on the wall surface is projected onto a two-dimensional raster parallel to the wall surface and perpendicular to the XOY plane, as shown in Figure 8a. Then, noise is removed using a morphological open operation, as shown in Figure 8b;  
Step 2: The black pixels in each column in Figure 8b are counted and the proportion of black pixels in the columns of the raster is calculated to generate a statistical graph, as shown in Figure 9a. The pixels at the peak of each column are smaller than the threshold \(P_{col}\) that are filled as wall surface, as shown in Figure 8c;  
Step 3: In Figure 8c, columns that have black pixels are continuously above the threshold \(P_{col}\) and are recognized as local regions in turn. Then, the black pixels in each local region are separately counted by rows and the proportion of black pixels in the rows of the local region is calculated to generate statistical graphs, as shown in Figure 9b. For each local region, the rows above the threshold \(P_{row}\) are filled as the wall surface and the rows less than the threshold \(P_{row}\) are filled as black pixels, as shown in Figure 8d;  
Step 4: The openings from the processed wall surface that meet the length and width thresholds are selected as doors, as shown in Figure 8e. After the doors and connection transition spaces are extracted, there are still some \"hidden doors\" and connection transition spaces that need to be identified. Since some doors are closed during the data collection process, the location of the door may be considered as wall surface in door extraction. Secondly, since point cloud acquired by some laser scanning devices may have local drift. These drifted point clouds will be considered as connecting transition spaces when they appear inside the walls. To solve this problem, the  
Figure 8: Door extraction process. Red represents the wall surfaces. Black represents the openings. Blue represents the alternative results. Green represents the extraction results. (**a**) is the 2D raster after point cloud projection on the wall surface. (**b**) is the result of (**a**) after morphological open operation. (**c**) is the result after some of the column pixels in (**b**) are filled. (**d**) is the result after some of the row pixels in (**c**) are filled. (**e**) is the result of the door extraction. Figure 9: Statistics graph of wall projection raster. (**a**) represents the column statistics graph in step 2 of Figure 8b represents the row statistics graph of the purple boxed area in Figure 8b. The red line indicates the threshold values. (**b**) represents the column statistics graph in step 3 of Figure 8c. following reasonable rules were made to automatically correct partially undetected doors and incorrectly detected connecting transition spaces. Rule 1 is used to detect \"hidden doors\". Rule 2 is used as an optional rule to remove connection transition areas that are incorrectly constructed due to drifting point cloud. Rule 1: If a \"thin door\" exists at the location where the connecting transition space connects to a structural unit, another \"thin door\" also exists at the location where the connecting transition space connects to another structural unit.