RANSAC APPROACH FOR AUTOMATED REGISTRATION OF TERRESTRIAL LASER SCANS USING LINEAR FEATURES

The registration process of terrestrial laser scans (TLS) targets the problem of how to combine several laser scans in order to attain better information about features than what could be obtained through single scan. The main goal of the registration process is to estimate the parameters which determine geometrical variation between the origins of datasets collected from different locations. Scale, shifts, and rotation parameters are usually used to describe such variation. This paper presents a framework for the registration of overlapping terrestrial laser scans by establishing an automatic matching strategy that uses 3D linear features. More specifically, invariant separation characteristics between 3D linear features extracted from laser scans will be used to establish hypothesized conjugate linear features between the laser scans. These candidate matches are then used to geo-reference scans relative to a common reference frame. The registration workflow simulates the well-known RANndom Sample Consensus method (RANSAC) for determining the registration parameters, whereas the iterative closest projected point (ICPP) is utilized to determine the most probable solution of the transformation parameters from several solutions. The experimental results prove that the proposed methodology can be used for the automatic registration of terrestrial laser scans using linear features.


Introduction
Terrestrial laser scanning systems have been repeatedly employed for 3D documentation of building models and proven to be effective in terms of data acquisition and processing.However, a complete 3D model of a building cannot be derived from a single scan.Therefore, several scans with significant overlaps are required to guarantee full coverage of the entire building.A set of point clouds acquired by successive scans are referenced to different local frames that are associated with the individual scanner locations.Therefore, a registration process should be established to realign the different scans with respect to a common reference frame.The registration process should address four issues: registration primitives, transformation parameters between the different coordinate systems, similarity measure, and matching strategy (Habib and Al-Ruzouq, 2004).The registration primitives are the features that will be identified in the individual scans and used for the co-alignment of the different scans.Points, linear, and/or planar features can be used as the registration primitives.The transformation parameters are those that describe the relationship between the reference frames of different scans.In general, two 3D models are related to each other through a 3D-Helmert transformation (three shifts, three rotations, and a scale factor).For a well-calibrated terrestrial laser scanner, three shifts and three rotations are enough to relate the reference frames of the different scans since laser ranging by principle preserves scale.The similarity measure is a mathematical constraint that describes the coincidence of conjugate primitives after registering the different scans to a common reference frame.The formulation of the similarity measure depends on the type of the utilized primitives.Finally, the matching strategy is the controlling framework used for manipulating the primitives, transformation parameters, and similarity measure to automatically register the different scans.To date, several approaches have been established for the registration of laser scans which have various target functions and objectives.For instance, the Iterative Closest Point (ICP) is based on minimizing point-to-point distances in the overlapping areas between the different terrestrial laser scans (Besl and McKay, 1992).The Iterative Closest Patch (ICPatch) is a variant of the ICP where points in one scan and triangular irregular network (TIN) patches in another scan serve as the geometric primitives (Habib et al., 2010).Another variation of the ICP, the Iterative Closest Projected Point (ICPP) aims at minimizing the distance between a point in one scan and its projection on the plane defined by the closest three points in the other scan (Al-Durgham et al., 2011).All of the aforementioned methodologies are point-based methods and have been proven to be effective in terms of accuracy.However, point-based registration methodologies require accurate initial approximations of the transformation parameters and need a lot of manual interaction.Therefore, geometric features such as linear and planar features have alternatively been utilized since they provide strong link between laser scans for reliable estimation of the transformation parameters.Furthermore, these features can be extracted and identified automatically and a good initial approximation of transformation parameters is not required.During the last decade, many studies focused on the registration using geometric features.For instance, Jaw and Chuang (2008) used linear and planar features to register TLS by using the different features individually and also by combining some of them.Yao et al. (2010) also introduced an automatic registration method of laser scans using the extracted linear and planar features from the scans.In addition, photogrammetric data is incorporated to take advantage of additional information (Canaz and Habib, 2013).A 3D linear feature has four degrees of freedom (Miraliakbari et al., 2008).Therefore, a single straight line that could be identified in two terrestrial laser scans enables the estimation of four transformation parameters relating these scans (i.e., the two shifts across the line direction and two rotation angles defined by the line direction).Another parallel line would allow for the estimation of the relative scale between the two scans as well as the rotation across the lines (i.e., the seven transformation parameters with the exception of the shift along the lines' ISPRS Annals of the Photogrammetry, Remote Sensing and Spatial Information Sciences, Volume II-5/W2, 2013ISPRS Workshop Laser Scanning 2013, 11 -13 November 2013, Antalya, Turkey direction can be estimated using two parallel lines).Two coplanar and non-parallel lines would allow for the estimation of the three shifts and three rotation angles among the two scans (i.e., only the scale parameter cannot be estimated using such lines).Therefore, two non-coplanar lines which can be identified in both scans will allow for the estimation of the relative scale, three shifts, and three rotation angles between the two scans.Thus, considering that there is no relative scale difference between two overlapping TLS scans, the minimum number of linear features for the estimation of shifts and rotation angles are two non-parallel lines.As for the incorporation of linear features for the estimation of transformation parameters, one could implement one of the following procedures: line-based approach (Habib et al., 2005) or point-based approach through a weight-modification process (Renaudin et al., 2011).

Proposed methodology
In this section, a new methodology for the automatic registration of terrestrial laser scans is introduced.This methodology is established based on determining hypothesized conjugate pairs of linear features in two overlapping laser scans.
The utilized hypothesized conjugate pairs in this approach are defined by calculating the spatial separation and angular deviation between all the existing line pairs in each scan.Candidate conjugate pairs of lines are selected as those which have similar spatial separation and angular deviation values.
Candidate matches are then used to estimate transformation parameters through a weight modification process along the line direction.The estimated transformation parameters are then used in order to identify compatible matches among other linear features within the scans.Once compatible matches of linear features are identified, all the established matches are used to estimate a new set of transformation parameters.In the final step, the estimated transformation parameters are refined through the ICPP procedure which is also used to check if the scans are properly aligned by determining the number of matched points in the overlapping area.This process is carried out for all line pairs that have similar spatial separation and angular deviation in both scans.Finally, the most probable solution for the transformation parameters is selected as the one with the highest number of matched points in the ICPP step.

Segmentation and linear feature extraction
The process of extracting linear features starts with the identification of planar features in the TLS data.In order to detect existing planar features from TLS scans, a parameterdomain segmentation procedure proposed by Lari et al. ( 2011) is utilized.For the segmentation of point cloud into planar or non-planar surfaces, first, the local point density within the laser scan is quantified.Then, an adaptive cylinder is used to define the neighbourhood of each point.The points will be classified into planar/non planar according to their deviation from a fitted plane.Once the points are classified into planar or non-planar objects, the planar points are grouped according to their 3D distance.Then, a clustering procedure using the attributes of individual points within the different planar groups is performed.
The segmented planar features are then intersected to extract linear features.The intersection of such planes provides infinite lines.Therefore, the end points of TLS linear features are established through a projection of the point cloud in the neighbouring planes within a given buffer around their intersection onto the infinite linear feature.The planar features do not need to be physically connected.However, the intersection procedure will look for nearby planar features to avoid excessive extrapolation for the derivation of linear features.

Identifying candidate matched pairs
The conceptual basis for the identification of conjugate linear features in two neighbouring scans is figuring out invariant characteristics among conjugate linear features.First, the angular deviation between two lines is invariant to shift, rotation, and scale differences between two different scans.As seen in Figure 1, the angular deviation ( ) between two 3D lines (e.g., and ) can be derived through the dot product of their direction vectors according to Equation (1).
Figure 1.Angular deviation between two lines in 3D Secondly, in the absence of scale differences between two neighbouring scans, the spatial separation between lines and in Figure 2 is invariant to shift and rotation differences.The spatial separation (S) will represent the length of the common perpendicular line between two lines in 3D.
The following write-up will discuss the required equations for the derivation of the spatial separation which is denoted by in Figure 2. It starts with defining the coordinates of point "e" along line according to Equation (2).Also, the coordinates of point "f" along line can be defined in the same way according to Equation (3). (2) Where , and are the X, Y, Z coordinates of point "a" which is the beginning of the vector ⃗ and is an unknown scale factor along the vector ⃗ ( , , ).
(3) Where , and are the coordinates of point "c" and is another unknown scale factor along the vector ⃗ ( , , ).The cross product of any two non-parallel vectors will produce a third vector perpendicular to both vectors being multiplied.Therefore, vector ⃗⃗ which is derived from the cross product of vectors ⃗ and ⃗ will be used to define three more equations as seen in Equation ( 4).Where is an unknown scale factor along the vector ⃗⃗ and , , and are the components of vector ⃗⃗ in the X,Y,Z directions.These nine equations are then used to solve for the nine unknowns: scale factors ( and coordinates of points "e" and "f".Once the coordinates of points "e" and "f" are estimated, the spatial separation can be determined by calculating the 3D distance between them.In this paper, the angular deviation and spatial separation between all pairs of lines in a given scan are used to identify potential conjugate linear features in overlapping scans.Therefore, if we have linear features in the first scan and m linear features in the second scan, we will have and angular deviations and spatial separations that we need to estimate in these scans, respectively.Then, we need to identify the line pairs in both scans that have the same angular deviation and spatial separation.For example, if the angular deviation and spatial separation between lines and in the first scan are similar to those between lines and in the second scan, then one can make the hypothesis that these line pairs are conjugate to each other.However, there will be an ambiguity in this match (i.e., line in the first scan could be conjugate to either line or line in the second scan while line in the first scan would correspond to either line or line in the second scan).Such ambiguity can be solved by considering both cases when solving for the transformation parameters using the RANSAC approach.

Solving for the transformation parameters
In the absence of systematic errors and provided that laser scanners will preserve true scale, three translations and three rotations need to be determined for the co-alignment of different laser scans.In order to solve for the transformation parameters, any pair of linear features that is selected from the first scan can be considered as a potential match to a randomly selected pair from the other scan if theses pairs have similar spatial separation and angular deviation values.Please note that only the pairs that have angular deviation exceeding a predefined threshold (e.g., 35°) will be considered.This condition is necessary to avoid selecting parallel pairs since such lines are not able to determine the shift along the lines' direction.Another pre-specified threshold in this algorithm, is to select the lines with lengths of more than (e.g., 0.5 m) since the attributes of short lines are less accurate.However, conjugate linear features will not have conjugate ending points due to the nature of the linear future extraction procedure.Therefore, the weight modification process introduced in Renaudin et al.( 2011) is utilized in this research.Please refer to Renaudin et al. (2011) for more detailed information about how the modified weight can be used to deal with non-conjugate points along corresponding lines for the estimation of involved transformation parameters.

Compatibility check using transformed lines
Following the estimation of the transformation parameters from a given pair, we transform the linear features in one scan to the reference frame of the other one.The compatibility among other linear features is then checked by identifying which linear features in the two scans would become collinear following the transformation.To clarify this step, let's assume that we have a pair of lines such as and in scan "a" and this pair has candidate matches in scan "b" such as lines " and " as shown in Figure 3.These pairs will be used to estimate the transformation parameters between the scans.Then, the transformation parameters are used to transform all lines in one scan to the reference frame of the other scan as shown in Figure 4.
Figure 4 shows that conjugate lines become collinear after transforming all the lines in scan "a" into the reference frame of scan "b" provided that the proper transformation parameters have been estimated.Therefore, at this stage, it is assumed that all collinear lines are conjugate to each other and will be used to solve for a new set of transformation parameters.The question now is how to check if a certain linear feature will have any other collinear mates.For this purpose we establish a local coordinate system (U, V, W) as shown in Figure 5 for a given line.
The U axis is defined using the unit vector along the line direction and the V and W axes are arbitrarily defined in a way that they should be perpendicular to each other and to the U axis.If any line such as line "n" is collinear with line "j", it will not have any components along the (V, W) axes when line "n" is transformed into the local coordinate system (U,V,W).Therefore, using this property, the number of collinear lines can be determined.One can make an assumption that the right transformation parameters are those that provide the highest number of collinear lines after the registration.However, this assumption is not always satisfied.In some situations one might have different pairs of lines in one scan that have similar spatial separation and angular deviation values.This might lead to a situation in which the check for the number of matched lines after the registration process is not sufficient to determine the right solution of the transformation parameters.(i.e., nonconjugate lines might become collinear with each other).To clarify this point in more detail, simulated scans over a CAD model are introduced as an example which can be seen in Figure 6.Linear features are extracted after the segmentation process for two simulated scans as seen in Figure 7.In spite of the fact of being non-conjugate line pairs, the angular deviation and spatial separation between lines "b1" and "b2" are similar to the ones between lines "a1" and "a4" due to the cubic shape of the building sides.The use of these pairs in the registration process will give false compatible matches between non-conjugate linear features such as lines "a2" and "b4" as shown in Figure 8.
The scenario in Figure 8 indicates that the compatibility check using the number of matched lines does not guarantee that the correct matches have been achieved.Therefore, the automatic registration methodology needs to add another compatibility check at the point level through the ICPP registration method.

Compatibility check using the ICPP method to refine and verify the validity of the estimated transformation parameters
As previously mentioned, the compatibility check using linear features does not always assure the correct matches.In addition, the accuracy of the estimated transformation parameters using linear features depends on the quality of the segmentation and linear feature extraction procedure.Therefore, the estimated transformation parameters using the matched linear features will be introduced as initial approximation for a point based registration of the scans under consideration.The ICPP method developed by Al-Durgham ( 2011) is utilized to avoid the possible ambiguity and to improve the linear feature-based registration result.The ICPP can be used to derive the compatible matches among points in the scans.Therefore, the most probable solution for the transformation parameters is determined as the one with the highest number of matched points.

Workflow summary
In summary, the proposed automatic registration procedure of overlapping laser scans taken two at the time proceeds as follows: Step 1.The linear features are extracted from the scans by utilizing the parameter domain segmentation described in subsection 2.1.
Step 2. Spatial separation and angular deviation values are calculated for all the existing line pairs in the scans to determine candidate conjugate line pairs.
Step 3. Line pairs with similar angular deviation and spatial separation values are randomly selected to estimate the transformation parameters between the scans.One should note that parallel lines cannot be used.The weight modification procedure is utilized to overcome the non-correspondence of ending points between the conjugate lines.
Step 4. The number of matched lines using the estimated transformation parameters in the previous step is determined (i.e., collinear lines).For this purpose, a local coordinate system (U, V, and W) is established for each line in a scan to check for its collinear mates after the registration process.
Step 5.The transformation parameters which have matched lines more than a predefined threshold (e.g., three lines) are selected as initial values to run the ICPP registration.This step ensures that majority of wrong matches is filtered out thus minimizing the ICPP trials.
Step 6.The ICPP registration procedure refines the estimated transformation parameters using linear features.Also, it determines the number of matched points between the scans.
Step 7. Steps 3 to 6 are repeated for all the possible candidate matches between the scans.
Step 8.The most probable transformation parameters are selected based on the solution that provides the highest number of matched points from step 6.

Dataset used
The proposed methodology for performing automatic registration was tested using a terrestrial dataset.The dataset comprises six laser scans.These scans are acquired using a Leica HDS6100 laser scanner over the Ronald McDonald house in Calgary, Alberta (Canada).The average overlap between the selected neighbouring scans is roughly 70%.This building, which has complex architecture, is chosen since linear features with various angular deviations and spatial separations between lines can be extracted.This will be an ideal scenario to evaluate the performance of the proposed automatic registration process.
Table 1 shows the number of points and the number of extracted linear features from each scan.Figures 9(a

Results and discussion
For the automatic registration process, two scans were taken at a time.The initial approximations of transformation parameters to start the registration process were derived by roughly evaluating the position and orientation of the scans with respect to each other.The process starts by selecting line pairs that have the same angular deviation and spatial separation values to solve for the transformation parameters.These transformation parameters are then used to check for the alignment among the linear features in the scans.When the number of aligned lines is more than three, the ICPP procedure is applied using the estimated parameters as initial values.Since the two lines used to estimate transformation parameters are always aligned during the compatibly check, a minimum of three aligned lines are used to filter out the majority of the estimated transformation parameters form non-conjugate line pairs.Among the refined transformation parameters after the ICPP procedure, the one with the highest number of matched points is selected as the right one.Due to space limitation, the outcome of the registration process from three overlapping scan pairs is presented as an example.First, scans 11 and 20 are selected to demonstrate the proposed methodology.Using the 90 and 82 extracted lines from each scan, the angular deviation and spatial separations were checked.Among all the possible conjugate line pairs with the same angular deviation and spatial separation, 740 were selected after the compatibility check (i.e., more than three lines were aligned after the registration).The initial transformation parameters for the ICPP were derived using the matched lines.The maximum number of matched points after the ICPP procedure among the 740 solutions was 26,143 and this transformation parameter is selected as the most probable solution.The estimated transformation parameters using the linear features and the ICPP method are presented in Table 2.One can see the slight changes in the estimated parameters between the scans using the matched lines and the ICPP method.To check the quality of the registration using the linear features and the ICPP method, one of the scans (i.e., scan 11) is transformed into the reference frame of the other scan (i.e., scan 20) using the estimated transformation parameters in Table 2.
(a) (b) Figure 10.Registration using the matched linear features (a) and registration using the ICPP (b) Figure 10 shows a part of the registered scans (a) using all the matched linear features and (b) using the ICPP method.One can observe some discrepancies between the two scans on the gable roof in Figure 10  ICPP can improve the quality of the estimated transformation parameters.Also, the estimated parameters using linear features provide very good initial values which will reduce the number of iterations during the ICPP procedure.Tables 3 and 4 show the automatic registration results for scans (23, 24) and (62, 64), respectively.The tables confirm the fact that the registration using linear features provide reasonable solution since there were slight changes in the transformation parameters after the ICPP procedure.

Conclusions and recommendations for future work
The proposed research outlined a methodology for the automatic registration of terrestrial laser scans.Linear features were extracted from the scans and they are used for the estimation of the transformation parameters.Conjugate linear features were selected based on random selection of line pairs that have similar spatial separation and angular deviation values.A weight modification process was applied to overcome the non-correspondence of the end points representing conjugate linear features.The focus then moved to measure the compatibility among the linear features after the registration process by establishing local coordinate system for individual linear features.The compatibility check using a minimum of three aligned lines reduces the number of trials that the ICPP registration is performed.However, in some situations one might have only two conjugate line pairs in the overlapping scans and this will require performing the ICPP registration for all pairs that have same angular deviation and spatial separation values.The ICPP registration method helped in identifying the most probable solution for the transformation parameters among several solutions by determining the solution that will have the largest number of matched points.The derived transformation parameters using linear features provided very good approximation values for the ICPP procedure.
The synergistic integration of two different registration methodologies (i.e., linear features and ICPP) helps in overcoming the drawbacks of each method.The proposed method provides a good solution to automate the registration of terrestrial laser scans.Finally, future work will focus on reducing the time cost of the automatic registration process.More specifically, an association matrix procedure will be used to prioritize the matching pairs which will be used for the ICPP refinement and validation of the line-based transformation parameters.The association matrix is based on a voting scheme that identifies the most probable matches among the scans.

Acknowledgement
This work was supported by the National Science and Engineering Council of Canada (Discovery Grant) and a Tecterra grant (www.tecterra.com).

Figure 7 .
Figure 7. Two simulated scans "a" and "b" over the CAD model after the segmentation and extraction of linear features Scan 11 displayed according to the intensity values (a), scan 20 displayed according to the intensity values (b), extracted linear features from scan 11 (c), and extracted linear features from scan 20 (d) Figure10shows a part of the registered scans (a) using all the matched linear features and (b) using the ICPP method.One can observe some discrepancies between the two scans on the gable roof in Figure10(a).Figure10(b)shows an improved registration result using the estimated parameters after the ICPP procedure for the same area.Figure10proves that utilizing the Figure10shows a part of the registered scans (a) using all the matched linear features and (b) using the ICPP method.One can observe some discrepancies between the two scans on the gable roof in Figure10(a).Figure10(b)shows an improved registration result using the estimated parameters after the ICPP procedure for the same area.Figure10proves that utilizing the

Table 1 .
Dataset Information

Table 2 .
Automatic registration results for scans 11 and 20