Comparing positioning accuracy of mobile laser scanning systems under a forest canopy

In this paper, we compare the positioning accuracy of commercial, mobile laser scanning systems operating under a forest canopy. The accuracy was evaluated on a 800-m-long positioning track, using tree locations from both a traditional field reference, collected with total station, and a high-density airborne laser scanning (ALS) system as a reference. Tree locations were used since mobile lasers are studied for automation of field reference for forest inventory and location of individual trees with high accuracy is required. We also developed a novel method for evaluating the ground level around the trees, as it not only affects the z -coordinate, but the horizontal position as well if the tree is tilted. In addition to the accuracy that could only be evaluated for systems equipped with a GNSS receiver, we evaluate the consistency of laser scanning systems by registering the tree locations extracted from the mobile systems to both the field reference and ALS. We demonstrated that the high-density ALS has similar accuracy (RMSE of approximately 6 cm) and precision as the total station field reference, while being much faster to collect. Furthermore, the completeness of the high-density ALS was over 80 %, which is more than enough to register the other methods to it in a robust manner, providing a global position for laser scanners without an inherit way of georeferencing themselves, such as a GNSS receiver. The positioning of all the mobile systems were based on the Simultaneous Localization and Mapping (SLAM) algorithm integrated with an inertial measurement unit (IMU), and they showed a similar precision; planar positioning error of less than 15 cm and vertical error of 10 – 30 cm. However, the accuracy of the only commercial system in this test whose positioning methods included a GNSS receiver, was order of several meters, indicating a demand for better methods for GNSS-based global positioning inside a dense forest canopy.


Introduction
Accurate forest inventory is important for both economic and ecological reasons (Prasad et al., 2020).Many studies have identified laser scanning as a good way of collecting an accurate large-area forest inventory, that would be too laborious to collect by traditional field measurements (Hyyppä and Inkinen, 1999;Persson et al., 2002;Naesset et al., 2004).Studies have shown that even the individual tree level forest inventory including tree attributes, such as the diameter at breast height (DBH), height, stem volume and species can be acquired at sufficient accuracy (Bienert et al., 2018;Chen et al., 2019;Hyyppä et al., 2020aHyyppä et al., , 2022;;Mokroš et al., 2021;Vatandas ¸lar et al., 2023).Such inventories would need reference data collected at individual tree level, including the position of each reference trees with sub-meter accuracy (Hyyppä et al., 2020b).The positioning accuracy of automated reference data collection methods studied has remained relatively uncharted.Today reference plots including position of individual trees are done e.g. using compass and tape from a GNSS-measured plot center or using pseudolite technology, such as (Savolainen, 2017).Highly accurate tree maps are critical also for making future individual-tree level harvesting plans, allowing multi-functional forestry, in which economical value extracted from the forest is optimized, without compromising biodiversity of its ability to function as a carbon sink.
However, positioning inside a forest is a challenge due to canopy obstructing the Global Navigation Satellite System (GNSS) signal (Kaartinen et al., 2015;Feng et al., 2021;Murgas et al., 2018;Kurum et al., 2022;Naesset and Jonmeister, 2002;Sigrist et al., 1999), causing the inertial measurement unit (IMU) to start drifting, and lack of stable and well defined features, such as buildings and traffic signs commonly used with the simultaneous localization and mapping (SLAM) algorithm and photogrammetry for localization in an urban environment.Despite these challenges, there are multiple solutions to them, including augmented GNSS, radio telemetry, and forest specific SLAM methods (Keefe et al., 2019;Aguiar et al., 2020).
Laser scanning methods can be divided into stationary terrestrial laser scanning (TLS), mobile laser scanning (MLS), that moves under the forest canopy, and airborne laser scanning (ALS), that flies above the canopy.An unmanned aerial vehicle (UAV) can be considered either MLS or ALS (or both) depending whether it flies under or above the canopy.While TLS can provide highly accurate point clouds (Liang et al., 2018), it is too laborious to produce a large-area forest inventory with it.
ALS circumvents the issue of the canopy obstructing the GNSS signal, and thus the global position of the system can be acquired accurately, which translates to accurate tree locations, as demonstrated in this study.However, the main problem with ALS is not the localization, but the difficulty in acquiring the under-canopy tree attributes from the data due to increased beam width attributed to long scanning distance, and canopy obstruction causing omission errors, and partial coverage of the trunks.Still, a recent study has shown that the tree attributes, such as stem curve and diameter breast height, can be estimated fairly accurately from high-density ALS data (Hyyppä et al., 2022).Furthermore, the tree height can be acquired at high precision (Hyyppä and Inkinen, 1999), and even at higher precision than traditional field measurements (Wang et al., 2019;Jurjević et al., 2020), if a high-density ALS data set is used.
On the contrary, the MLS has much less obstructions hindering the measurements, and can get closer to the stems and they are typically measured from various viewing directions, but MLS suffers from the degradation of the GNSS signal.The most common solution to positioning problem inside a forest canopy is using the robotic SLAM algorithm.The Robotic SLAM can be used with a GNSS receiver (Kukko et al., 2017;Qian et al., 2017;Tang et al., 2015;Xie et al., 2022;Faitli et al., 2023) or without (Gollob et al., 2020;Cabo et al., 2018;Bauwens et al., 2016;Proudman et al., 2022) one.While the acquisition of the stem attributes from the MLS has been extensively studied in recent years, the positioning accuracy, especially the capability to locate the stems, have seen few studies.Chudá et al. (2020) evaluated positioning accuracy of a Zeb Horizon and Zeb Revo handheld scanners in a small forest stand.However, a large-area forest inventory using a MLS requires a good positioning accuracy over longer distance.Refs.(Xie et al., 2022;Qian et al., 2017) investigated the accuracy of a backpack, and all terrain vehicle mounted scanner, respectively, where the positioning was based on SLAM, IMU and GNSS, on a long track inside a natural forest.
To our best knowledge, studies comparing the positioning accuracy of several different mobile laser scanners for tree measurements has not been previously performed.Additionally, the positioning accuracy of autonomously-flying under-canopy drone laser scanning, providing field reference, is limitedly reported.Furthermore, the status of the field measurements as the most accurate reference remains unchallenged in the literature.Use of high-density ALS point clouds for providing geodetic-level positioning reference and accuracy in forest areas has not been previously proposed.
In this paper, we compared the MLS positioning solutions from under-canopy drone and hand-held laser scanners to a high-density ALS data and a total station-based field reference on a 800-m-long positioning track in a natural boreal forest.The main goal of the study was to compare the positioning accuracy and precision of tree locations extracted automatically from MLS point clouds in order to evaluate their suitability for large-area forest inventory.Furthermore, we evaluated the quality of the ALS based reference, and the possibility of using it as a position reference in the future studies, as it is several orders of magnitude faster to gather from a large area compared to a traditional field reference measured with a total station.

Test site
The test site was located in Evo in southern Finland (61.19 • N, 25.11 • E) as part of SCAN FOREST research infrastructure www.scanforest.fi.The track used in this study was approximately 800 m long, with a maximum displacement of 300 m from the starting location.The track is illustrated in Fig. 1.Elevation change of the track is approximately 11 m.The dominant tree species in the area were Scots pine (Pinus sylvestris) and Norway spruce (Picea abies).The field reference contained almost equal number of pines and spruces along with a couple of birches (Betula pendula and Betula pubescens).

Data collection methods
For this work, we measured the test site with three different mobile 3D laser scanners, and a helicopter mounted scanner for the main comparison, along with a field reference acquired with a total station.Furthermore, we also performed the measurements with a conventional surveying-grade mobile mapping system based on a 2D scanner that relied solely on inertial measurement unit (IMU), and a GNSS receiver for positioning.This was done to demonstrate the difficulty in acquiring a accurate global position inside a forest canopy with conventional means.In this section, we briefly describe how each data set was acquired.
For the field reference, 224 trees located within approximately 10 m from the route were measured to the center of the stem at breast height (1.3 m above ground level) using a Trimble 5602 DR200+ total station.The total station orientations were determined using ground control points measured in open areas with a good GNSS visibility around the test site using a VRS-GPS device.The location accuracy of the field reference was estimated to be better than 10 cm horizontally (East--North) and approximately 10 cm vertically.
The airborne laser scanning data was collected with a helicopterbased system called HeliALS-TW, abbreviated as HeliALS in this work.It was developed in-house, and was equipped with a Riegl VUX-1HA scanner (Riegl GmbH, Austria), a NovAtel (LITEF) ISA-100C inertial measurement unit, a NovAtel PwrPak7 GNSS receiver and a NovAtel (Vexxis) GNSS-850 antenna.The helicopter flew approximately 80 m above the ground at 9.5 m/s in a grid pattern, where vertical lines were separated by 50 m.The scanner was tilted 15 • forwards with respect to the vertical plane in order to maximize hits to the tree stems.The laser scanner had an exit beam size of 4.5 mm and a divergence of 0.5 mrad.Average return point density was 1844 points per square meter.The trajectory was calculated using Waypoint Inertial Explorer (version 8.9, NovAtel Inc., Canada), and a single virtual GNSS base station from Trimnet VRS service (RINEX 3.04), positioned approximately in the middle of the site.
The commercial scanners used in this work were Zeb Horizon (GeoSLAM, UK), Hovermap (Emesent, Australia), and Deep Forestry (Deep Forestry, Sweden).Deep forestry and Hovermap scanners were mounted to a drone flying under the forest canopy, while Zeb Horizon is a hand held device.The Hovermap data was captured in September 2021 by AMKVO (Sweden), and Deep Forestry in September 2022 by Deep Forestry both under our supervision.We performed the measurement with Zeb Horizon in June 2021.Hovermap and Zeb Horizon were equipped with a rotating Velodyne VLP-16 laser scanner, while Deep Forestry utilized an Ouster OS0-32 Rev. 5 sensor.The Ouster OS0-32 had a beam width of 5 mm at the exit and divergence of 6.1 mrad, and the Velodyne VLP-16 had beam width of 9.5(12.7)mm and divergence of 1.5(3.0)mrad vertically (horizontally).Only Hovermap was equipped with both a GNSS receiver and IMU, while others relied solely on IMU, and thus were unable to provide the point cloud in a global reference frame.All systems relied on some version of a simultaneous localization and mapping (SLAM) algorithm for correcting drifts in the IMU.Overview of the laser scanners properties is presented in Table 1.
Lastly, for a comparison we measured the test site with the same sensor suite as the HeliALS mounted to a backpack.This sensor is referred to as Inertial-GNSS in this paper.Like with the HeliALS, the trajectory was based solely on the GNSS and IMU, fused with the Waypoint Inertial Explorer software.For further details, the reader is directed to (Hyyppä et al., 2020a).Point densities, trajectory lengths and measurements times for all scanners is presented in Table 2.

Stem extraction
We extracted the stem locations by utilizing a previously developed algorithm described in (Hyyppä et al., 2020a(Hyyppä et al., , 2020c(Hyyppä et al., , 2022)).We measured the stem position at the height of 1.3 m, based on the stem curve given by the algorithm.The algorithm is based on first segmenting the point cloud both spatially and temporally, and then extracting arcs corresponding to hits to the tree trunks.The growth direction of the tree is calculated using principal component analysis and circles are fitted to the arcs in the growth direction in order to acquire stem radii at different heights.Some of radii are rejected if the arcs do not meet the set quality criteria, which is based on the central angle, and the amount of noise points.Finally, a smoothing spline is fitted to the radii for the final stem curve.For more details, the reader is directed to (Hyyppä et al., 2020c).All MLS devices are processed with the same parameters, similar to what was used in (Hyyppä et al., 2020c).Due to fewer trunk hits, the HeliALS data was process with more lenient stem extraction parameters, which allow for less points and more noise in the accepted arcs.These parameters are described in (Hyyppä et al., 2022) under a name as many trees as possible.It should be noted that the algorithm only works if the positioning precision of the laser scanner is smaller than the distance between the trees.This criteria was fulfilled by all scanners in this comparison, except for the Inertial-GNSS due to IMU drift caused by GNSS outages.For this reason the Inertial-GNSS data was segmented into 18 1-min segments, and each segment was processed individually.In these 1-min segments the drift was not severe enough to cause duplicated trees in the point cloud, and thus the tree extraction algorithm was able to determine an unambiguous location for each tree.
Because the digital terrain model (DTM) used for the stem extraction prioritized consistent, and hole free model over high precision at tree locations, we refined the vertical tree position estimate in order to improve the position estimate, and to eliminate trees whose surrounding ground is poorly visible.We classified all points within 15 cm of the   initial DTM as ground points.We calculated the location of the tree at ground level using the leaning direction given by the principal component analysis computed as a part of the stem extraction process, and removed all ground points within the largest radius of the tree +10 cm of that location, in order to get rid of any stem points that were classified as ground.We also removed any far away points, so that a 40 cm thick ring of points remains.An illustration of the process in presented in Fig. 2 (a)-(b).Fig. 2 (c) illustrates a typical height distribution among the ground points.The positive skew of the distribution is explained by the ground vegetation, and other objects laying on the forest floor such as rocks and roots.In order to negate their influence on the ground elevation, we smoothed the distribution with a kernel density estimation with normal distribution kernel and adaptive bandwidth, and used the mode as a ground elevation under the tree.If the ground observation for a tree contained less than 50 (25 for HeliALS) points, it was discarded.After updating the vertical positions, we re-calculated the horizontal position at 1.3 m.

Georeferencing
In order to evaluate precision of the methods, data were georeferenced by registering the tree locations to the reference by using a method demonstrated in (Hyyppä et al., 2021).The code is available from a public repository (Hyyppä and Muhojoki, 2021).We used a search radius of 7 m and registration threshold of 75 cm for the algorithm, meaning that only trees that are closer than 75 cm to a reference tree location after the optimal transformation has been found are registered as a matching tree pair.The registration method performs a 2D coarse registration, giving the matching tree pairs, followed by a fine registration, where the tree location are optimized by using the iterative closest point algorithm (Besl and McKay, 1992).After the optimal 2D transformation was acquired, the vertical shift was optimized as well, by minimizing the mean distance between the z-coordinates of the trees.We decided to not optimize the roll and pitch of the data, as well levelled point clouds were already required by the tree extraction algorithm (see section 2.3), and producing levelled data is an important attribute for a MLS system.Therefore, any inaccuracies in the levelling of the point clouds would show as additional positioning errors.However, we did not notice any major issues with the levelling of the point clouds.Furthermore, the trees were also registered to the HeliALS trees, in order to test the hypothesis, that the ALS is as accurate as the field reference.The devices that included a build-in GNSS sensors (HeliALS, Hovermap and inertial-GNSS) were also evaluated using the initial georeferencing.

Evaluation metrics
We evaluated the positioning accuracy of the tested methods based on tree stem locations both horizontally in the xy-plane and vertically, as the error in one direction can be significantly higher than the other direction.The methods were compared both in precision and global accuracy.In the global accuracy category the systematic errors in the point clouds were not removed based on the HeliALS point cloud or the field reference.Naturally the systems that did not have a GNSS receiver for build in georerefencing, were not evaluated with this metric.The xyplane fitting used as a part of the georeferencing method described in 2.4 was still used to acquire the matching trees.For the precision evaluation, point clouds were georeferenced using the above-mentioned georeferencing technique, which eliminates all systematic errors from the tree locations, assuming that the reference is accurate.The deviations between the stem locations in both cases were compared using the rootmean-square-error (RMSE), and mean-absolute-error (MAE): where N is the total number of matching trees, and ‖r ,i − r ref,i ‖ 2 the euclidean distance between the coordinate of a tree stem r ,i = {x i , y i } and the corresponding reference location, r ref,i .The results were also evaluated in terms of completeness, defined as: where N matched is number of matched trees with the reference and N ref is the number of reference trees.The correctness was not measured, as the number of reference trees is relatively small compared to the total number of trees in the test site.It should be noted, that RMSE and completeness are not completely independent variables.Increasing the quality criteria in the stem extraction process will cause some of the trees to be not detected, thus decreasing the completeness, but those trees tend to be ones whose position is difficult to determine due obstruction or other reasons, and thus the RMSE decreases.We aimed for a completeness of at least 90 % for the mobile devices with our quality parameters.
In addition, we use bias for global accuracy evaluation in the z-direction, given by As discussed in section 2.3, the Inertial-GNSS was processed in 1-min segments, and thus the georeferencing was also performed segment wise.Therefore, is likely that trees from multiple files corresponds to same reference tree.In this case the farthest distance among the conflicting trees was taken as r i .The farthest distance was calculated individually for planar and vertical distance.

Results and discussion
Tables 3 and 3 presents the results for consistency in comparison to the field reference, and to HeliALS, respectively.As the results are almost identical for both references and RMSE and MAE (Eq.( 1) and ( 2), respectively) between the field reference and HeliALS is similar to the approximated precision of the field reference, it suggests that HeliALS is as precise as the field reference.The results also show that the precision of the point clouds provided by all the commercial, mobile SLAM based scanners is similar in the xy-direction, approximately 13-14 cm RMSE.In the vertical direction, Hovermap is slightly worse at approximately 30 cm while the other scanners have a RMSE of 10 cm.Completeness (Eq.( 3)) of the HeliALS and Inertial-GNSS is approximately 80 %, and it is 90 % for Zeb Horizon and Deep Forestry, and 95 % for Hovermap.
As the results for the commercial, mobile scanners are close to each other, and the trajectory length is significantly shorter for Deep forestry than the other scanners, we performed the comparison using only the reference trees that were within 10 m from the Deep forestry trajectory.Furthermore, we registered the tree locations of the commercial MLS devices to each other.The results are presented in Table 4.With the reduced trajectory, the horizontal RMSE was reduced to 6.5 and 7.5 cm for Zeb Horizon and Hovermap, respectively.The completeness and the vertical RMSE remained roughly the same except that the vertical RMSE of the Hovermap was reduced to 13.5 cm, bringing it to more in line with the other scanners.The cross comparison showed vertical RMSE of 8-9 cm for, and planar RMSE of 15-16 cm of all comparisons involving the Deep Forestry.These were expected results based on the previous results.However, the comparison between Zeb Horizon and Hovermap yielded a planar RMSE of only 2.39 cm.It is therefore possible, that MLS measurements could augment ALS measurements not only in terms of completeness and tree attributes, but in localization accuracy as well.However, it is also possible that they could have had similar SLAM systems, and that combined with similar sensors led to similar drift, and without a better reference it is impossible to know whether the high correlation was based on actually high precision, similar drift, or combination of both.The completeness was approximately 90 % for Deep Forestry and Zeb Horizon and 95 % for Hovermap, which was similar to our previous studies with the same tree detection algorithm (Hyyppä et al., 2020a(Hyyppä et al., , 2020c)), even though the trajectories in this study were much more linear, and thus did not go around the trees as much as they usually do on more traditional small test sites.This indicates that for tree detection purposes, the more straightforward trajectories could speed up the collection of the forest inventory.However, impact of the linear trajectories on the collected tree attributes has not been studied to our best knowledge.
The accuracy results, when the field reference was used as a reference, are presented in Table 5.The results in the xy-direction for HeliALS are almost identical to the precision.However, in the z-direction there seems to be significant negative bias (Eq.( 4)) indicating that the ground is perceived to be higher in the field measurements.Curiously, when we tried simpler ground algorithm, where we calculated the mean z-coordinate of the ground points within 40 cm radius of the stem, without removing the stem points, and not trying to compensate for the ground vegetation hits, the bias disappears.As this method probably overestimates the ground, it is likely that the observed bias is due to field reference overestimating the ground as well.Therefore, both accuracy and precision are within the approximated error of the total station field reference (5-10 cm horizontal, 10 cm vertical), and thus trees location extracted from a high-density ALS are at least as accurate and precise as the field reference.It should be noticed that we extracted stem position at the height of 1.3 m based on the stem curve given by the algorithm (Hyyppä et al., 2022).Conventional way of providing tree positions based on the tip of the ALS point cloud results typically in 0.7-2.0m accuracy (Kaartinen et al., 2012) compared to sub-decimeter accuracy obtained in this paper.Even though a total station can provide an accurate and complete reference, it is prohibitively laborious to collect, especially at large scale, and thus a high-density ALS can provide a location reference in the future studies, moving towards automated large scale forest inventory.Even though a completeness of 84 % is sufficient for a position reference, improvements in the tree detection techniques would be beneficial.
Out of the commercial sensors, only Hovermap was able to georeference itself with a GNSS receiver.The accuracy was approximately 4 m and 1 m in horizontal and vertical direction, respectively.The accuracy was somewhat lower than the Inertial-GNSS system, that had accuracy of approximately 1 m in both directions, despite Hovermap having significantly higher precision.As demonstrated, the accuracy issues can be fixed by fitting the tree locations to ALS data.However, even though collecting ALS is fast, it is still an extra cost, and not always practical.As the Hovermap was already mounted to a drone, an alternative solutions could be to fly above the canopy, and remeasure at least a subset of trees measured below the canopy, and perform a registration between the above-and under canopy trees.A potential issue with this method, and under-canopy drones in general, is that they are difficult to fly in a very dense forest.The tree density in this study varied along the track, but remained well below 1000 trees/ha, and the trees were mostly conifers with a large part of their lower stem free of branches.However, some of the other test sites in Evo were much denser, up to 2000 trees/ha, and Fig. 2. Illustration of the ground estimation method.The point cloud from the Zeb Horizon was used for this illustration with z-coordinate dependent coloring.(a) depicts points that are within a R max + 50 cm the stem location at ground level, where R max is the largest measured stem radius.Furthermore, only points within 15 cm of the DTM in a vertical direction are included.In (b) the stem points are removed by removing all points within R max + 10 of the stem center.This is illustrated with a red circle in the insert (c) shows the height distribution of the remaining points as a histogram and the kernel density estimate as a red line.The mode of the density estimate was used as the starting point of the tree.

Table 3
Precision of the methods compared to the field reference (a) and HeliALS (b).Each data set was coarsely registered to the respective reference to find the initial matching pairs.Then the tree locations were optimized by iteratively minimizing the RMSE, and nearest neighbours between the data set and the reference were considered a match, if they were less than 75 cm apart, as discussed in Section 2.4.The completeness for Deep Forestry is measured with respect to the trees that are withing 10 m of the trajectory, as the data did not cover the whole track.The completeness with respect to all reference trees is presented in parenthesis.A more fair comparison between the commercial MLS scanners is presented in Table 4.It should be noted that the Inertial-GNSS was evaluated segmented, as described in section 2.5 and thus the results are not fully comparable with others.

Table 5
Global accuracy of the methods that included a GNSS receiver compared to the field reference.The data sets were registered in order to obtain the matching pairs, but the initial locations were used to calculate the statistics.Negative bias indicates that the reference perceived the ground to be higher than the method and vice versa.contained more deciduous trees, and thus were inaccessible by the tested drones.In forests that contain trees with wide branches and broad leaves, or dense understory vegetation, the limit can be significantly lower than in a boreal forest.A dense, broad-leaved forest can also hinder the above-canopy measurements if leaf-on measurements are needed.

Conclusions
Individual tree level inventories requires reference data collected at individual tree level, including the position of each reference tree with sub-meter accuracy.We demonstrated that by using high-density ALS data and the tree trunk extraction approach presented in (Hyyppä et al., 2022), we can provide position of reference trees with accuracy comparable to a total station.Therefore, ALS can be used as a reference for future studies.Furthermore, the result support the idea of georeferencing MLS data at object level by registering it to ALS tree locations, that we presented in (Hyyppä et al., 2021).
All the tested commercial MLS devices also had a sufficient precision to uniquely identify each tree, and are thus potentially suitable for collecting or supplementing a forest inventory, even when the measurement distance is approximately 1 km.However, we detected a moderate drift present in the MLS trajectories that could become problematic in longer measurements.Furthermore, the capability for positioning in a global frame was found lacking, as accuracy of Hovermap was at the level of several meters, and the others did not even have a GNSS receiver for global georeferencing.We proposed that a drone flying both above and below canopy could get the benefits of both MLS and ALS in order to acquire accurate and precise point cloud from which tree attributes could be measured at sufficient accuracy for a forest inventory, while only marginally increasing the measurement time.

Fig. 1 .
Fig. 1.Trajectories of the MLS devices with tree locations extracted from the HeliALS data as green dots and field reference tree locations as black crosses.Zeb Horizon hand-held scanner, Deep Forestry under-canopy drone, Hovermap under-canopy drone, and Inertial-GNSS are abbreviated as Zeb, DF, Hover, and Inertial, respectively.The MLS trajectories are presented individually in the bottom right corner.The axis of the inserted figures are the same as the main axis.Coordinates are centered around the mean HeliALS tree location for clarity.

Table 2
Point cloud statistics.Point Density is the mean density and the range is given in parenthesis.

Table 4
Statistics for the commercial MLS scanners using only the trees that match the field reference trees that were within 10 m of the Deep Forestry trajectory.Completeness for MLS pairs is calculated as a number of matching trees divided by the number of reference trees.