AN EFFICIENT , HIERARCHICAL VIEWPOINT PLANNING STRATEGY FOR TERRESTRIAL LASER SCANNER NETWORKS

Terrestrial laser scanner (TLS) techniques have been widely adopted in a variety of applications. However, unlike in geodesy or photogrammetry, insufficient attention has been paid to the optimal TLS network design. It is valuable to develop a complete design system that can automatically provide an optimal plan, especially for high-accuracy, large-volume scanning networks. To achieve this goal, one should look at the “optimality” of the solution as well as the computational complexity in reaching it. In this paper, a hierarchical TLS viewpoint planning strategy is developed to solve the optimal scanner placement problems. If one targeted object to be scanned is simplified as discretized wall segments, any possible viewpoint can be evaluated by a score table representing its visible segments under certain scanning geometry constraints. Thus, the design goal is to find a minimum number of viewpoints that achieves complete coverage of all wall segments. The efficiency is improved by densifying viewpoints hierarchically, instead of a “brute force” search within the entire workspace. The experiment environments in this paper were simulated from two buildings located on University of Calgary campus. Compared with the “brute force” strategy in terms of the quality of the solutions and the runtime, it is shown that the proposed strategy can provide a scanning network with a compatible quality but with more than a 70% time saving.


INTRODUCTION
Terrestrial laser scanners (TLSs) provide a remote sensing surveying technique to model objects with very high speed, density, and accuracy.In other words, they quickly capture rich details of an entire scene with 3D positioning accuracy as high as a few millimetres.Thus, TLS applications are widespread in various fields within recent decades.Civil engineers, plant designers, CAD professionals, architects, contractors, forensic investigators, archaeologists, and owner/operators can all reap the cost and added-value benefits that TLS provides (Leica, 2017).For TLS projects, 100% surface coverage is usually required (Scott et al., 2003).However, the large volume of many scanning objects, together with occlusion/self-occlusion make it impossible to acquire a complete object model from a single location.Thus, a scanning network consisting of multiple scan placements is usually required to achieve the greatest possible coverage.This incurs increased time and labour cost in the field as well as processing and production time in the office.More importantly, the redundant scans are subject to registration error, which will jeopardize the quality of the final products.An optimal TLS network design, where optimal implies the minimum number of scans as well as a complete coverage of the object, is highly recommended.
Surveying network design is an issue that has been widely discussed.A commonly-accepted category is proposed by Grafarend (1974), where the network design problem is divided into four interrelated sub-problems.They are: zero-order design (ZOD), which is to define a datum for the network (Kuang, 1991); first-order design (FOD), which is to determine a configuration provided the weighting matrix is known (Kuang, 1991); second-order design (SOD), the purpose of which is to optimize the stochastic model for observations (Kuang, 1991;Schmitt, 1985a), i.e., their precision; and, finally, third-order design (TOD), which is about further improvement to the * Corresponding author network (Schmitt, 1985b), e.g., the densification of the network.As only scan locations are to be designed in this paper, and the registration is done with signalized targets, the concern here is the FOD of TLS networks.
The optimal network design problem has been proposed and well addressed in geodesy (Kuang, 1991 and1996;Schmitt, 1982) and photogrammetry (Fraser, 1982(Fraser, , 1984)).Unfortunately, the same issue has not received equal attention for terrestrial laser scanner networks.Usually, the TLS viewpoints are determined empirically based on the operators' experience and the knowledge of the scanning area.The most direct impact of this is to place unnecessary scans, which however, may still not guarantee complete coverage of the object.
One commonly used strategy is called the Next Best Viewpoint (NBV) planning strategy (Blaer and Allen, 2007;Biswas et al., 2015;Kawashima et al., 2014;Pito, 1996 and1999).This type of method starts from a set of randomly-selected locations within the scanning region, and the scans will be acquired at those locations to get an approximate initial model.The targeted object is labelled as occupied space and free space that indicate the parts have been covered or not.Based on the boundary and surface trend of the existing model, the new scan will be placed in the free space using a voxel-based occupancy methodology.After that, the model is renewed by the new point cloud until the object is fully covered.
Another type of method focuses on the visibility and occlusion analysis to obtain the complete coverage, based on the scanning geometry between the object and the scan locations.Much research has demonstrated that scanning geometry impacts the TLS observation quality.A good example is proposed by Soudarissanane and Lindenbergh (2011), where the scanning geometry is defined as the incidence angle between the laser beam and the object, as well as the range between the scanner and the object.Under these two constraints, the visibility of the object is evaluated depends on the location and orientation of the discretised object, with respect to the scan candidates.Known as the Greedy Algorithm, this strategy picks the viewpoint candidate that covers the most uncovered part of the object in each step, until the complete coverage is achieved.
It is concluded that the aforementioned methods mainly have two limitations: 1. Optimality of the solution.The solution from the NBV method is subject to the bias of the previous scanner placement, where no global optimum is guaranteed.Also, this type of method is mainly used for robotics/mobile mapping.For the Greedy Algorithm, it provides good and fast, but only a near optimal solution; 2. Computation complexity.For either of the methods, the analysis is based on the entire targeted object and candidate workspace, which causes lots of unnecessary computations.
The technique proposed in this paper tries to avoid those two problems.It adopts a new viewpoint selection method called the Weighted Greedy Algorithm with the aim to improve the optimality of the solution.It also proposes a hierarchical strategy to generate viewpoint candidates, which can improve the computational efficiency.The proposed strategy will be described in detail and validated in the following sections.
An optimal network design with minimum number of scans and high efficiency is especially necessary for the network of large size, like a network consists of thousands of scans (e.g., Hullo. 2016), which leads to the major motivation of this study.Starting from the simple building simulations in this paper, the methodology applied here is expected to be extended into more realistic and complicated networks.This paper is structured as follows: the background of network design problems and the literature review for TLS network design are provided in this section.In the subsequent section, the research problem in this paper is stated, followed by the introduction of an improved optimization method in Section 3. The proposed algorithm, the hierarchical viewpoint planning strategy, is described in Section 4. The performances of the methodology on two TLS networks are evaluated and examined in Section 5. Finally, the conclusions are drawn and some future topics are suggested in Section 6.

STATEMENT OF PROBLEMS
The purpose of this research is the optimal design of the TLS networks, where the problem is stated as to minimize the number of necessary scanner locations to obtain a full coverage of a given environment.The entire process in getting the final viewpoints follows a hierarchical strategy with an improved optimization method, which will be introduced in next two sections.

Data Preparation
This new network optimization strategy works on a discretized dataset based on Soudarissanane and Lindenbergh (2011).Before applying the new method, some prior information, data preparation and pre-processing are required: 1.The plan of a scanning scene.This can be a floor map, or a quick scan from which the walls can be extracted; 2. The discretized wall segments.They can be simply created by discretizing the extracted walls into separate segments based on a certain unit length, e.g., 1 m; 3. The discretized viewpoint (VP) candidates.They are simulated within the area of interest with a certain step length between each other; 4. Scanning geometry constraints.The incidence angle of the incident laser ray, and the scanner-to-object range, are two constraints adopted to evaluate the visibility of each VP; 5. Boolean score table.It is created under the constraints to indicate which wall segments are visible/invisible from which viewpoints.Essentially this table includes the coverage information per VP, where 1 means a visible wall segment and 0 stands for an invisible one.

Statement of Sub Problems
The process to solve the optimal design problem in this research can be divided into four sub problems, which are stated as: Problem 1: The walls of a given construction will be detected and discretized into wall segments; Problem 2: VP candidates will be created in some way, from which the final optimal solution will be generated; Problem 3: Under certain scanning geometry constraints, incidence angle and range adopted here, any VP candidate will be evaluated by their visibility to all wall segments; Problem 4: An optimization method will be applied on existing candidates to provide fast and good solutions.
Problems 1 and 3 have been previously addressed in Soudarissanane and Lindenbergh (2011).The remaining issues are the means to obtain VP candidates and the optimization method to obtain optimal solution.These two aspects are introduced next.

OPTIMIZATION METHODS
With the Boolean score table, the optimization problem is to find a minimum set of VPs so that each wall segment can be covered (i.e., scored as 1) at least once.In the work of Soudarissanane and Lindenbergh (2011), the solution is sought with the Greedy Algorithm (GA).In this section, an improved method named the Weighted Greedy Algorithm (WGA) is proposed.A simple example indicating the visibility of 8 wall segments from 4 VPs is illustrated in Figure 1.VPs and their visible segments are represented by different colours.The Greedy Algorithm and the proposed Weighted Greedy Algorithm are applied to this example to show how they work on this type of problem.

Greedy Algorithm
In the Greedy Algorithm, the VPs are selected in a few computation steps.The VP with the highest score, the one covering the most uncovered wall segments, is always selected in each step.This method is good and fast but provides suboptimal solutions (Slavik, 1996), as will be demonstrated later.
Table 1 is the Boolean score table for Example 1.In this case, VP2, VP1 and VP3 are selected in 3 steps to achieve full coverage.

Weighted Greedy Algorithm
For Example 1, the solution from Greedy Algorithm is a group of 3 VPs, which contains one redundant VP.To achieve better result, a Weighted Greedy Algorithm is developed in this paper.
In the Greedy Algorithm, the scores are binary, either 0 or 1, and are equally weighted in a VP's score, i.e., the numbers in the last column in Table 1.However, if one segment is visible from fewer scans, it should contribute greater weight to the scans' scores.Accordingly, those scans will be given higher priority for selection.
This principle is an integral part of the Weighted Greedy Algorithm, where the score for each segment is weighted by the times it can be covered (i.e., the last row in Table 2.a).Table 2.b is the weighted score table, then the following process is the same as Greedy Algorithm that the VP with the highest weighted score is selected step by step.
a. Scanned times for segments from the Boolean score table We name the wall segments visible from less VPs as uncommon segments and the VPs covers those segments are called necessary VPs.One can tell from Table 2 that two necessary VPs, VP1 and VP3, covering uncommon segments S1 and S8, are selected in the first two steps.The redundant VP2 that is selected first by the Greedy Algorithm is actually removed.It is obvious that with the Weighted Greedy Algorithm, the priorities of VPs are reordered, which increase the speed of selecting the necessary VPs and removes redundant VPs in the final solution.

THE HIERARCHICAL VIEWPOINT PLANNING STRATEGY
To obtain full coverage of an object, VP candidates should be distributed throughout the surrounding environment.One straightforward way is to have the VP candidates evenly distributed with fixed step length, after which the score table is generated by searching through all candidates and wall segments.
Clearly, the number of VP candidates varies with the step length, which also impacts the efficiency in building the score table.

Assumptions
A real example is illustrated in Figure 2.This is a building located on the University of Calgary campus.It was discretised into 328 wall segments with the unit length of 1 m. Figure 2 shows the heatmaps of VP candidates created with different step lengths.Blue represents lower WGA scores and yellow represents higher ones.We may consider the step length between neighbouring VPs as the sampling resolution, symbolized by σ.The scores in all figures are weighted scores for the WGA, while in It is obvious that VP candidates are denser with higher resolution, which causes the scores to be weighted differently in each resolution, as indicated by the different score ranges of the colour bar.However, the heatmaps of different resolutions appear with the similar patterns.This means that neighbouring VP candidates tend to cover the similar part of the object.Thus, the VPs of the optimal solution under different resolutions tend to concentrate at the same spots.It provides us the following assumption: To validate this assumption, corresponding solutions from the Weighted Greedy Algorithm are illustrated in Figure 3.We can tell that the overall geometries of the solutions are the same.With increasing σ, VPs can be located at more detailed positions.
Redundant VPs can be removed by slightly adjusting the locations of existing VPs.For example, the VP1, VP3 and VP4 in Figure 3.a have been reduced to VP1 and VP2 in Figure 3.c.
It is evident that with higher resolution, near-optimal solutions are sought at the cost of evaluating many unnecessary VPs, such as the large number of VPs southeast of the building.Since the locations of some VPs, e.g., VP1, don't change significantly with resolutions, it is reasonable to propose another assumption: Assumption 2: VPs can be hierarchically selected by starting at a globally coarse resolution and continuously increasing local resolution.

The hierarchical viewpoint planning strategy
Based on the assumptions, a hierarchical viewpoint planning strategy is proposed in this subsection.
An idea called distinguishable VP is proposed here.It is defined as a VP that has no neighbouring VPs within a certain area.VPs here represent the viewpoints in the solutions that are selected by the Weighted Greedy Algorithm.This is to say that once the solution is created, the VPs are grouped by distance.VPs that are not grouped with other VPs are distinguishable VP, while VPs grouped together are called indistinguishable VPs.The goal of the hierarchical viewpoint planning strategy is to search for the optimal solution as a set of VPs that are all distinguishable.
As mentioned, VPs close to each other tend to cover the same part of the object or scene.Thus, if one VP is distinguishable, it is considered necessary for scene coverage.In other words, redundant VPs are more likely to exist in the groups of indistinguishable VPs.In this case if we increase the local resolution, redundant VPs are likely to be replaced by necessary ones along with more detailed location and better coverage.
The process of this hierarchical viewpoint planning strategy is summarized into 7 steps: 1. Initial resolution.In summary, this hierarchical strategy starts with a coarse resolution over the entire area, and increases the resolution only at local areas of interest.The current optimal solution under each resolution is always determined by the proposed Weighted Greedy Algorithm until the stop criterion is met. Figure 4 is a flowchart corresponding to the above 6 steps.

Figure 4. Flowchart of the hierarchical viewpoint planning strategy
There are three advantages for using this hierarchical strategy: 1. Coverage rate.The general geometry of VPs in the solutions is preserved during the entire process, which guarantees the object is scanned from all directions and full coverage is achieved; 2. Minimal VPs.Wherever possible, redundant VPs are to be removed by relocating existing VPs to finer local resolution.Thus, this method can provide a solution with minimal number of VPs; 3. Computational efficiency.This is realized by avoiding the time waste on large amount of useless VP candidates, i.e., the VP candidates created under the finest resolution over the entire workspace.

APPLICATIONS AND ANALYSIS
In this section, the proposed hierarchical viewpoint planning strategy is used in the problem of optimizing two outdoor TLS networks.The performance is compared with the nonhierarchical strategy in terms of the quality of the solutions and runtime.All methods are conducted on an Intel ® Core TM i5-7500, 3.40GHz, 24 GB RAM computer in the Microsoft Visual Studio 2017 environment.

Experiment environments
Two buildings, Crowsnest Hall and CCIT, located on the University of Calgary campus are tested here as experiment environments.They each cover an approximate area of 80×80 m .The walls of the two buildings were extracted from the 2D floor map public on the University of Calgary website.With a unit length of 1 m, the building walls were discretized into 358 segments for Crowsnest and 328 segments for CCIT.CCIT is the same one as in the earlier example in Section 4. The layout of experiment environments is depicted in Figure 5.

Results and discussions
In this section, the hierarchical viewpoint planning strategy is evaluated by a comparison with the non-hierarchical strategy.
The two methods compared are the "Hierarchical + WGA" strategy and the "Non-hierarchical + GA" strategy.Their performance is compared in terms of the quality of the solutions and runtime.

Quality of the Solutions:
In this part, the quality of the solutions from two methods are compared.As the goal is to obtain the minimal number of viewpoints for optimal design, it is used as the quality criterion.
The hierarchical solutions for Crowsnest are illustrated in Figure 6.For this case, we started with the resolution of 8 m and the method stopped at σ = 2 m .In each figure, the optimal VPs  Figure 8 shows the hierarchical solution from the "Hierarchical + WGA" strategy on CCIT.In this case, the method works from σ = 10 m to σ = 2.5 m.Similarly, the solutions update from 8 VPs to 7 VPs.Its non-hierarchical solutions are shown in Figure 9, where the number of VPs reduces from 9 to 7 with increased resolutions.The final number of VPs for the two strategies is the same.It is notable that the examples here are relatively simple structures, thus the number of viewpoints does not decrease considerably with our method.A more dramatic decrease is expected for more complex scenes, which is the final goal of our research.5.2.2 Runtime for the proposed "Hierarchical + WGA" strategy is compared with the "Non-hierarchical + GA" strategy.The corresponding runtime are provided in Table 4.The "Non-hierarchical + GA" strategy was repeated three times for each dataset with resolutions shown in the second column in Table 4.These resolutions correspond to the three levels of resolutions continuously applied in the "Hierarchical + WGA" strategy.
From the last subsection, we know that the solution from the "Non-hierarchical + GA" strategy is compatible with the "Hierarchical + WGA" strategy when the finest resolution is applied.Upon this, one can tell that with compatible results, the computation efficiency is improved by more than 70%, i.e., time that is bolded in Table 4.

Sensitivity tests
Regardless of which strategy a user chooses, both strategies described above provide solutions consisting of a set of viewpoints with complete scene coverage.The sensitivity of the solutions to actual VP placement is of concern in future studies.
Here as a start, a test has been applied on the "Hierarchical + WGA" strategy results.The coverage rate for 100 random solutions was tested and is summarized in

CONCLUSIONS AND FUTURE WORK
Compared to geodesy and photogrammetry, optimal network design for TLS hasn't received the same attention in current research.In this paper, the first-order design of TLS networks, i.e., the configuration of scanner locations, is of interest.The experiment environment was simulated with discretized wall segments and possible viewpoints.A minimum number of viewpoints with complete coverage was found by adopting the hierarchical viewpoint planning strategy with the Weighted Greedy Algorithm as the optimization method.The experiment environment were two buildings located on the University of Calgary campus.
Comparisons were made with the original non-hierarchical strategy and the Greedy Algorithm regarding the quality of the solutions and runtime.It was demonstrated that our proposed hierarchical strategy can provide solutions with at least compatible solutions, but with less computation cost.
The main problem we need to solve in future is the number and the configuration of targets for optimal performance of point cloud registration, which also makes the constraint of overlap between adjacent scans necessary.As mentioned, the sensitivity of the solution is to be explored as well.In addition, this problem is currently considered in 2D space, which can be further extended to more complex 3D problems.This may be realized by extending the 2D wall segments into 3D wall patches distributed in the building façades.Moreover, more complex environments with occlusions will be simulated.Finally, it is notable that the strategy has been developed without reference to a specific scanner system, which means that one can modify the constraints in planning according to the properties of different instruments, e.g., the range capacity, the scanning window, etc.In summary, a full design system that can automatically provide an optimal plan for the high-accuracy and large-volume scanning network is to be developed in this research.

Figure 1 .
Figure 1.Example 1: S1 to S8 are wall segments to be scanned, VP1 to VP4 are VP candidates to be selected.The visible zones for VPs are represented by different colors of dashed lines.
Figure 2. WGA score heatmaps for Example 2: VP candidates were created with various resolutions σ .Colours represent weighted scores in a, b and c, and binary scores in d.

Assumption 1 :Figure 3 .
Figure 3. Solutions for Example 2: WGA is applied to get solutions under three resolutions.

Figure 5 .
Figure 5. 2D floor maps of the experiment environments

Figure 6 .
Figure 6.Solutions from the proposed "Hierarchical + WGA" strategy for Crowsnest: three levels of resolutions are applied before the stop criterion is met.

Figure 7 Figure 8 .
Figure7shows results from three experiments with the "Nonhierarchical + GA" strategy on Crowsnest.The resolutions are set as 8 m, 4 m and 2 m, which are the three levels of resolution in the "Hierarchical + WGA" strategy.It is shown the number of viewpoints reduces with the increased resolution, from 10 VPs to 9 VPs, which is reasonable as the scanner can be placed to more detailed locations.From Figure6and Figure7, one can tell that the hierarchical solution is better than the non-hierarchical solution in terms of the number of VPs.

Figure 9 .
Figure 9. Solutions from the "Non-hierarchical + GA" strategy for CCIT: three resolutions corresponding to three levels of resolutions in Figure 8 are applied.

Figure 11 .
Figure 11.Invisible segments of 100 random solutions Figure 11 shows all the invisible wall segments in 100 random tests.The different colours represent how many times an individual segment is missed in 100 tests.This provides a tool to probe the sensitive parts of the network in view of the solution.It indicates which areas the user should pay more attention to, e.g., by putting an extra scan to be on the safe side, which is more of a TOD problem as introduced in Section 1. Detailed studies are planned as future work.
Group VPs.VPs in the solution are grouped by distance.A certain distance threshold is required in this step.VPs then are labelled as either distinguishable VPs or indistinguishable VPs; 4. Increase local resolution.There may be more than one group of indistinguishable VPs after step 3. VPs in each group are bounded to define a new local area.Stop criterion.The process ends if all VPs in the solution are labelled as distinguishable VPs.Now all VPs are the necessary VPs to get the full coverage of the construction.All distinguishable VPs are saved to the final solution.
The process starts from a low initial resolution, e.g., 10 m.A small number of VP candidates are created and evaluated with low runtime; 2. Solution from WGA.A weighted score table is generated, and a solution is provided by WGA as introduced in Section 3.2;3.

Table 4 .
Runtime for methods with different resolutions

Table 5 .
The coverage rate is calculated as the percentage of walls covered by the random solution.Over the 100 cases, the average coverage rate for both two datasets are around 98%.

Table 5 .
Coverage tests of 100 random cases