## Materials and Methods  
### Overview  
This paper focuses on room and corridor segmentation, so clear definitions of rooms and corridors are required [12; 23]. In the Oxford dictionary, a room is defined as a part or division of a building enclosed by walls, a floor, and a ceiling, and a corridor can be considered to be a special room. Moreover, a corridor tends to traverse an entire building for convenient access to rooms [12]. In this study, a corridor is considered a special room that is connected to more than three rooms and is located in the center of the connected map. Each room is connected by doors in the wall, rather than openings in the wall. Two rooms that are separated by an opening in the wall are considered to be one room. In this paper, a door is lower than the height of the wall in which it is contained, whereas an opening extends the entire height of the wall and reaches the ceiling [39].  
In this paper, the geometric structure of building interiors can be organized by floors [11; 50; 51] and the connected area between two floors. Furthermore, each floor can be deconstructed into rooms and corridors [10; 11; 12]. Each room that connects other rooms or corridors via doors is enclosed by a floor, a ceiling, and walls. The proposed method uses raw point clouds as inputs and consists of two main steps, as depicted in Figure 1: comprehensive segmentation and indoor reconstruction. Comprehensive segmentation contains two parts: story segmentation and room segmentation. The input data in this section were captured by an MLS device in a Zeb-Revo sensor [23].
* Story segmentation: The origin data are partitioned into multiple stories and the connected area across floors with a histogram that describes the distribution of points along the z-axis.
* Room segmentation: The points in each story are split into several slices. Then, cells are partitioned by extended wall line segments, which are extracted by a region-growing line extraction algorithm, followed by a line fusion algorithm. The iterative reweighted least-squares (IRLS) algorithm is used for line fitting in the processing of region-growing. In the meantime, the room-space in each story is segmented by using the morphological erosion method after projection onto a horizontal plane and a cutoff connection between rooms through projecting the offset space from the ceiling height. Finally, the rooms in each story are segmented by overlapping the segmented room-space with cell decomposition. The corridor is labeled via a connection analysis between the rooms on each floor. A room that connects more than three rooms and is located in the center of the connected map is labeled a corridor.
* Indoor reconstruction: The height of each story and connected area is extracted via the histogram from the previous step. To obtain an accurate height of each room in each story, the height of the ceiling and floor in each room has been recalculated via the ceiling plane and floor plane, which are extracted by the RANSAC method in each room. The doors' locations in each room or corridor are determined by a horizontal connected analysis. Door reconstruction follows the work of [34]. The planes on stairs are extracted by using a region-growing plane-extraction method and rebuilt by using an arithmetic progression calculation for the height, length, and width of one stair. All of the story and stair models are merged into a connected area model through the models' coordinates. The final model is rebuilt after deleting shared areas through a union operator in the merged models.  
Figure 1: Workflow of the proposed method. (**1**) Story segmentation. (**2**) Room segmentation and corridor detection. (**3**) Stairs reconstruction. (**4**) Indoor reconstruction.