3D Indoor Building Environment Reconstruction using calibration of Range finder Data

: Nowadays, municipalities intend to have 3D city models for facility management, disaster management and architectural planning. 3D data acquisition can be done by laser scanning for indoor environment which is a costly and time consuming process. Currently, for indoor surveying, Electronic Distance Measurement (EDM) and Terrestrial Laser Scanner (TLS) are mostly used. In this paper, several techniques for indoor 3D building data acquisition have been investigated. For reducing the time and cost of indoor building data acquisition process, the Trimble LaserAce 1000 range finder is used. The accuracy of the rangefinder is evaluated and a simple spatial model is reconstructed from real data. This technique is rapid (it requires a shorter time as compared to others), but the results show inconsistencies in horizontal angles for short distances in indoor environments. The range finder was calibrated using a least square adjustment algorithm. To control the uncertainty of the calibration and of the reconstruction of the building from the measurements, interval analysis and homotopy continuation are used.


INTRODUCTION
In 3D GIS, 3D spatial modelling is one of the most important aspects. 3D spatial modelling involves the definition of spatial objects, data models, and attributes for visualization, interoperability and standards (Chen at al., 2008). Due to the complexity of the real world, 3D spatial modelling leads towards different approaches in different GIS applications. In the last decade, there have been huge demands for 3D GIS due to the drastic advancement in the field of 3D computer graphics and other GIS developments. According to Chen et al. (2008), there is not a universal 3D spatial model that can be used in and shared between different applications. Different disciplines according to their input and output use different spatial data model.
3D city modelling is one of the most important areas in the field of 3D spatial modelling with high demands in the last decade. The automatic reconstruction of urban 3D models has been a research area of photogrammetry for the past two decades (Haala and Kada, 2010). According to Habib et al. (2010), digital 3D modelling of complex buildings has been a challenge until now with photogrammetry technology. This leads towards semi-automated construction of complex 3D building models. Difficulties of interpretation of photogrammetric images for 3D city modelling, especially for complex buildings, motivated increasing demands for 3D point cloud technologies such as LiDAR (light detection and ranging), which can facilitate automated 3D building models.
According to Surmann et al. (2003), rapid characterization and quantification of complex environments with increasing demands has created a challenge for 3D data analysis. This crucial demand comes from different fields such as industrial automation, architecture, agriculture, construction and mine and tunnel maintenance. Precise 3D data is needed for facility management, factory design and regional and urban planning.
Considering all the issues affecting fully automated construction of complex 3D building models, 3D indoor modelling is another aspect in the field of 3D city modelling which can make the current situation more complex. According to Deak et al. (2012), indoor location determination has become a crucial aspect in many different applications but unfortunately, a lack of standard is one of the challenges and there are more challenges encountered in this field.
According to Donath and Thurow (2007), considering many fields of applications for building surveying and resulting different demands, representation of the building geometry is the most crucial aspect of a building survey. Due to the complexity of indoor environment, this field needs to be more researched.
In this research, we provide a comparative analysis of the 3D reconstruction and indoor survey of a building done using the Leica scanstation C10 and the Trimble LaserAce 1000 (rangefinder, see Figure 1). The Trimble LaserAce 1000 has been used for outdoor mapping and measurements, such as forestry measurement and GIS mapping (Jamali et al., 2013). A rangefinder can be considered as a basic mobile Total Station with limited functionality and low accuracy.
The Trimble LaserAce 1000 is a three-dimensional laser rangefinder with point and shoot workflow. This rangefinder includes a pulsed laser distance meter and a compass, which can measure distance, horizontal angle and vertical angle up to 150 meter without a target and up to 600 meter with a reflective foil target.
The Trimble LaserAce 1000 has been used for outdoor mapping and measurements such as Forestry measurement and GIS mapping. A rangefinder can be considered as a basic mobile Total Station with limited functionality (Trimble LaserAce 1000 is basically used to measure distance) and low accuracy. In this research, we propose this device for indoor mapping and try to validate this technique in an indoor environment. Trimble LaserAce 1000 will decrease time and cost of surveying process (Jamali et al. 2013;Jamali et al. 2014). For validating the reconstruction done by the Trimble LaserAce 1000, a Leica scanstation C10 was used. Following this introduction, in section 2 indoor building surveying is reviewed. In section 3, the range finder is calibrated using a least square adjustment algorithm. In section 4, interval analysis and homotopy continuation to control the uncertainty of the calibration and of the reconstruction of the building from the measurements is discussed. Section 5 presents conclusion and future research of this study.

INDOOR BUILDING DATA ACQUISITION
Traditional land surveying, photogrammetry, remote sensing, Global Positioning System (GPS) and laser scanning are some of the well-known techniques in the field of surveying engineering which can be used for indoor and outdoor data acquisition. Land surveying is "the science of determining the position, in three dimensions, of natural and man-made features on or beneath the surface of the Earth" (Schofield, 2001).
EDM is one of the most reliable and used techniques in the field of land surveying which can be used for precise distance measurement and determining the coordinates of any point. New EDM equipment is highly accurate and with the current speed of technology development in surveying engineering, more advanced functions of EDM is expected. Remote sensing is defined as information acquisition about an object without physical contact with the object (Elachi and Zyl, 2006). Digital Terrain Model (DTM) and Digital Surface Model (DSM) can be captured by using Airborne Laser Scanning (ALS). This technology (ALS/LiDAR) emits or captures signals returned from the surface of the Earth. Inertial Measuring Unit (IMU), GPS and laser scanning systems are the three main parts of an ALS system (Tse et al., 2008). Recently, there has been more interest for 3D building modeling based on LiDAR data, but extracting buildings from huge LiDAR datasets is difficult and time consuming and requires experienced technicians.
Laser scanning technology started in the 1990s (Amato et al., 2003) and it can measure a 3D object surface with a high speed pulse. This technology is considered as a tool for remote and rapid data collection and it can be used in many different applications from urban and regional planning to architecture. A scanner can directly measure distance and reflection intensity of 3D object surfaces and automatically store collected data in a spatial database. Recent TLS technology can collect more than 500,000 points in a second with an accuracy of ±6 mm (Dongzhen et al., 2009).
Nowadays, most of scanners can export collected point clouds in the range image format. An important issue of TLS is that scanners can only acquire points within the direct or reflected line of sight. As a result, in order to acquire full data from a given scene, multiple scans from different viewpoints have to be done, and then they have to be registered accurately in a common coordinate system.

RANGEFINDER CALIBRATION
Coordinates measured by rangefinder are not as precise as laser scanner or total station measurements. As seen in Figure 2 and Figure 3, results of Trimble LaserAce 1000 shows deformation of building geometry.   According to the device specifications, the accuracies of the Leica scanstation C10, Trimble LaserAce 1000 are as shown in Table 1.  The 3D building measured by the Trimble LaserAce 1000 can be calibrated and reconstructed from the Leica scanstation C10 based on the least square adjustment algorithm, in the form of absolute orientation. Least square adjustment is a well-known algorithm in surveying engineering which is used widely by engineers to get the best solution in the sense of the minimization of the sum of the squares of the residuals, which is obtained as in the following normal equations, which express that the total differential of the sum of squares of residuals is zero. Least square adjustment for linear (Equation (1)) system was used to reconstruct 3D objects.
Considering two points, Pa= (XA, YA, ZA) from the Leica scanstation C10 and Pc= (XC, YC, ZC) from the Trimble LaserAce 1000, the absolute orientation problem can be defined as the transformation between two coordinates systems (Leica scanstation C10 and Trimble LaserAce 1000). The relationship between measuring devices, such as a range camera or binocular stereo system can be solved by using absolute orientation. Absolute orientation can be found by a set of conjugate pairs: {(Pc,l, Pa,l), (Pc,2 Pa,2), ... , (Pc,n, Pa,n)}. For a pair of common points in both (camera coordinates and absolute coordinates) systems; rotation, scale and translation components can be calculated by Equations 2 to 4, where the matrix R with coefficients RXX, RXY, RXZ, RYX, RYY, RYZ, RZX, RZY and RZZ, is the matrix of a linear transformation combining a 3D rotation (that can be decomposed into the combinations of 3 rotations along the x, y and z axes) and a scaling, and its determinant is the scaling parameter (since the determinant of a rotation matrix must equal 1).

XA=RXX XC + RXY YC + RXZ ZC + PX
(2) YA=RYX XC + RYY YC + RYZ ZC + PY (3) ZA=RZX XC + RZY YC + RZZ ZC + PZ Twelve unknown parameters, including nine linear transformation (combined rotation and scaling) parameters and three translations components need to be solved. Each conjugate pair yields three equations. The minimum number of required points to solve for the absolute orientation is thus four common points. Practically, to get better results with higher accuracy, a higher number of points need to be used. The coefficients of the unknown matrix A, which is a 4*4 matrix, have been calculated. The coordinates of the points measured by the rangefinder can be adjusted, or their maximum error can be minimized, by adjusting the coefficients of matrix A. Room number nine has been selected by the researcher to calculate its absolute orientation parameters. Table 2 shows the calculated rotation, scale and transformation parameters in three axes for the selected room. Absolute orientation can be found by computing the matrix A for any given point. Any points measured by the rangefinder can be transferred or absolutely oriented by using the corresponding matrix A arrays. Results from calibrating the Trimble LaserAce 1000 based on the least square adjustment (Absolute orientation) using the Leica scanstation C10 data were calculated (see Table 3). Considering the Leica scanstation C10 data as absolute coordinates, differences between two coordinate systems can be referred as the Trimble LaserAce 1000 accuracy. The accuracy achieved by the least square adjustment was calculated using Equations 5 to 8.
σX=X LaserAce -X Leica C10 (5) σY=YLaserAce -YLeica C10 (6) σZ=X LaserAce -ZLeica C10 (7) σXYZ=(σX 2 +σY 2 +σZ 2 ) 1/2 Where σXYZ =accuracy of LaserAce 1000 σX =accuracy of LaserAce 1000 in the X Axis σY =accuracy of LaserAce 1000 in the Y Axis σZ =accuracy of LaserAce 1000 in the Z Axis Table 4 shows the accuracy of the LaserAce 1000 achieved by calibration using the Leica scanstation C10 for six selected points. Point number four has a maximum error of ±13 centimeters and there is minimum error of ±6 centimeters for point number one (see Table 4). The model calibrated and reconstructed using the Leica scanstation C10 is shown in Figure. 5. Model in black lines represents model reconstructed from raw data of Trimble LaserAce 1000 and model in blue lines represents model reconstructed from Leica scanstation C10. Calibrated model of Trimble LaserAce 1000 based on the least square adjustment algorithm from Leica scanstation C10 data can be seen as red dash line model (see Figure 5). The least squares methods used in this section assume a linear statistical model of propagation of the errors and a normal probability distribution function of the measurements. However, in any real measurement experiment, one can observe that no probability distribution function actually fits the data set to any desired degree of accuracy. In the next section, we will see how we can relax these assumptions and only assume the continuity of the mathematical models being used to achieve the calibration of our range finder.

INTERVAL ANALYSIS AND HOMOTOPY CONTINUATION
Interval analysis is a well-known method for computing bounds of a function, being given bounds on the variables of that function (E. Ramon Moore and Cloud, 2009). The basic mathematical object in interval analysis is the interval instead of the variable. The operators need to be redefined to operate on intervals instead of real variables. This leads to an interval arithmetic. In the same way, most usual mathematical functions are redefined by an interval equivalent. Interval analysis allows one to certify computations on intervals by providing bounds on the results. The uncertainty of each measure can be represented using an interval defined either by a lower bound and an higher bound or a midpoint value and a radius. In this paper, we use interval analysis to model the uncertainty of each measurement of horizontal angle and horizontal distance done by the range finder. We represent the geometric loci corresponding to each surveyed point as functions of the bounds of each measurement. Thus, for distances observed from a position of the range finder, we represent the possible position of the surveyed point by two concentric circles centered on the position of the range finder and of radii the measured distance plus and minus the uncertainty on the distance respectively (see Figure 6). For horizontal angles observed from a position of the range finder, we represent the possible position of the surveyed point by two rays emanating from the position of the range finder and whose angles with respect to a given point or the North are the measured angle plus and minus the uncertainty on the horizontal angle respectively (see Figure 6). Therefore, the surveyed point must be within a region bounded by these 4 loci: in between 2 concentric circles and 2 rays. Proceeding in the same way for each room, we get the geometric loci for each room and for the union of the surveyed rooms (see Figure 7).
A homotopy is a continuous deformation of geometric figures or paths or more generally functions: a function (or a path, or a geometric Figurer) is continuously deformed into another one (Allgower and Georg, 1990). Such functions or paths are then considered equivalent: i.e., homotopic. Originally, homotopy was used as a tool to decide whether two paths with same endpoints would lead to the same result of integration. The use of homotopies can be tracked back to works of Poincaré (1881-1886), Klein (1882-1883), and Berstein (1910) (Allgower and Georg, 1990).
A homotopy is defined as a continuous map between two continuous functions in a topological space. A homotopy can, therefore, be viewed as a continuous deformation. The use of deformations to solve non-linear systems of equations may be traced back at least to Lahaye (1934) (Allgower and Georg, 1990).
A homotopy between two continuous functions f and f from a topological space X to a topological space Y is defined as a continuous map H: X × [0, 1] → Y from the Cartesian product of the topological space X with the unit interval [0, 1] to Y such that H(x, 0) = f0, and H(x, 1) = f1, where x ∈ X. The two functions f0 and f1 are called respectively the initial and terminal maps. The second parameter of H, also called the homotopy parameter, allows for a continuous deformation of f0 to f1 (Allgower and Georg, 1990). Two continuous functions f0 and f1 are said to be homotopic, denoted by f0 ≃ f1, if, and only if, there is a homotopy H taking f0 to f1. Being homotopic is an equivalence relation on the set C(X, Y) of all continuous functions from X to Y.
In this paper, we used homotopy to calibrate the range finder.
The main idea is that instead of using least squares that assume a linear model and a normal probability distribution function, we only assume that the calibration of the set of our range finder measurements with respect to the set of measurements of our total station can be done continuously, because there is no discontinuity in the n-dimensional space corresponding to the space of measurements performed using the range finder and the total station. Even though, not all real numbers are representable in a digital measurement device, we can assume that all the real numbers corresponding to measurements can be obtained physically, and it is just the fixed point notation used by the digital measurement device, that limits the set of representable real numbers to a discrete subset of the set of real numbers. Thus, we can compute the calibration of the range finder as a continuous function mapping our measurements obtained using our range finder to the measurements obtained using our total station.
The results of the linear homotopy continuation are presented in Figure 8 and Table 5. Since the main observed uncertainties lie in the horizontal angles measured by the magnetometer of the rangefinder, we wanted to calibrate the magnetometer measurements of horizontal angles performed by the rangefinder, one can calibrate the differences of horizontal angles observed with the rangefinder to the differences of horizontal angles observed with the theodolite. One can start from any point and point and assume that the measurement of the horizontal angle by the rangefinder will not be changed by the calibration process. Without loose of generality, this point can be the first observed point. Now the idea for the calibration is that we are using each one of the intervals between measurements of horizontal angles made with the rangefinder, and we calibrate the new measurements of horizontal angles made by the rangefinder in each one of these intervals as a linear or non-linear homotopy, where the homotopy parameter is the relative position of the measured horizontal angle in between the bounds of the enclosing interval of rangefinder horizontal angles. The initial and terminal maps correspond respectively to the mappings between the uncalibrated and calibrated horizontal angles at the start point and the end point of the enclosing interval of horizontal angles measured by the range finder. We can observe that, contarary to the least squares calibration, the only limitation of this interval analysis and homotopy continuation based calibration is the precision of the fixed point arithmetic used by the computing device used for the calibration.

CONCLUSIONS
This research has been done to investigate a technique of rapid indoor surveying and its accuracy in an indoor environment. The main objective of this research was to propose a methodology for data capturing in indoor building environment. A rangefinder was compared to a high accurate surveying device (Leica scanstation C10) using weighted least squares and a novel technique based on interval analysis and homotopy continuation. In an indoor environment, the Trimble LaserAce 1000 showed inconsistencies within the uncertainty ranges claimed by the manufacturer for short distances in the horizontal angle. Rangefinder data was calibrated by least square adjustment (absolute orientation) which shows a maximum error of ±13 centimeters and a minimum error of ±6 centimeters using the Leica scanstation C10 as a benchmark. By opposition, the combined interval analysis and homotopy continuation technique calibration obtained by continuous deformation of the function mapping the rangefinder measurements to the theodolite measurements allows a much better match, whose only limitation is the fixed point arithmetic of the computing device used to perform the computation.
This research showed that reconstruction of 3D Buildings based on the geometry using Trimble LaserAce 1000 is inadequate and topology needs to be considered. The authors of this paper intend to investigate model reconstruction algorithms in the near future based on the geometry and topology modelling. Authors of this paper believe that proposed surveying technique can be employed for basic indoor environment modelling to decrease cost and time of 3D city modelling. Proposed surveying technique can be useful and affordable for most of municipalities.