Single Tree Stem Profile Detection Using Terrestrial Laser Scanner Data, Flatness Saliency Features and Curvature Properties

A method for automatic stem detection and stem profile estimation based on terrestrial laser scanning (TLS) was validated. The root-mean-square error was approximately 1 cm for stem diameter estimations. The method contains a new way of extracting the flatness saliency feature using the centroid of a subset of a point cloud within a voxel cell that approximates the point by point calculations. The loss of accuracy is outweighed by a much higher computational speed, making it possible to cover large datasets. The algorithm introduces a new way to connect surface patches belonging to a stem and investigates if they belong to curved surfaces. Thereby, cylindrical objects, like stems, are found in the pre-filtering stage. The algorithm uses a new cylinder fitting method that estimates the axis direction by transforming the TLS points into a radial-angular coordinate system and evaluates the deviations by a moving window convex hull algorithm. Once the axis direction is found, the cylinder center is chosen as the position with the smallest radial deviations. The cylinder fitting method works on a point cloud in both the single-scan setup, as well as a multiple scan setup of a TLS system.


Introduction
In recent years, there has been an increasing interest in using terrestrial laser scanning (TLS) methods to detect forest variables in field plots or with mobile systems [1].The main advantage of using such systems would be to retrieve an increased amount of information from the field plot sampling and to have a fast and reliable automatic solution devoid of human error.
The stem profile, or stem taper, is the stem diameter of a tree measured as a function of the height.It is an important forest variable used both to acquire merchantable volume, as well as to calculate the stem biomass in ecological studies [2].
The stem profile can be estimated by allometric functions and the calipered values of the stem diameter at breast height (DBH).These functions are limited to particular climatic, geographic and silvicultural conditions and are developed at the national or local level.Automatic methods for the estimation of stem profiles are motivated because the taper functions can vary greatly in particular regions, as stated by Liang et al. [2].An overview of recent efforts made to develop locally-adjusted taper functions is given by Trincado and Burkhart [3].A non-destructive and efficient measurement technique for single-tree stem profile estimation is needed.TLS is such a technique that could be used to develop locally-suitable taper functions [4].Stem profile estimations from TLS could also be useful to predict between and within forest stand variations in order to plan forest operations and match demands from the forest industry.
Using TLS systems for measuring tree stems has been present for a number of years; however, there are not that many studies that evaluate the performance of measuring stem curves.One early paper by Thies et al. [5] describes a system that fits cylinders along the stem and measure taper, sweep and lean.Henning and Radtke [6] did detailed stem measurements in laser range images on nine pine trees, and Maas et al. [7] measured the stem profile of a spruce.Liang et al. [2] describe a system for automatic stem measurement using TLS, and Mengesha et al. [8] validated the performance of the Autostem TM software.
Using saliency features of a point dataset to classify different parts of a TLS dataset of a forest plot into, for instance, stems and canopy is a way to pre-filter the data before modeling the trees.There are a number of authors that use this technique, for instance: Lalonde et al. 2006 [9], Liang et al. [10,11] and Raumonen et al. [12] Saliency features can be extracted from the eigenvectors and eigenvalues of a point cloud (Lalonde et al., 2006 [9]) and describe if the points are distributed linearly, planarly or spherically.The saliency features of a point in a point cloud are found by calculating the distribution properties of the neighbor points within a small region (usually spherical or cubical).This is however time consuming, and for performance reasons, a good approximation with a faster execution time is needed.One way could be to calculate the saliency features of all of the points in the pre-sorted grid cells and to set all points within a cell to the same saliency values.There is however a risk that some cells only contain data points in one corner or along an edge, giving distributions that do not represent the true shape of the dataset.The information about the data points in the neighbor cells needs to be incorporated, as well, in order to avoid edge effects.
When pre-filtering the TLS data to find points that belong to a stem, one way of excluding outliers is to assume that stem points lie on a curved cylindrical surface.Simonse et al. [13], Rabbani and van den Heuvel [14] and Olofsson et al. [15], for instance, used the Hough transform to find circles or cylinders in the dataset.The drawback of the Hough transform method is that it is often raster based, and therefore, radius classes have to be used, which gives a lower resolution than when operating directly on the TLS point cloud data.The RANSAC method [15][16][17] is a way of finding circles directly in point cloud data.The drawback with this method is that it is iterative, which often leads to performance problems depending on the size and density of the dataset.One way to increase performance can be to save the TLS data in a 3D voxel space for easy access as in the studies by Gorte and Pfeiffer [18], Gorte and Winterhalder [19] and Vonderach et al. [20].An efficient method that works directly on the point cloud data and assumes that the stem points lie on a cylindrical surface is needed.
There are some challenges when designing an algorithm that circle/cylinder fits tree stems in TLS data: (1) Trees in a plot do not grow exactly straight.The tree might grow towards an opening in the canopy or some wind damage might have caused the tree to incline.When using the assumption that trees grow vertically, diameter errors depending on the wrong coordinate transform will occur.One solution to overcome this problem could be to give the axis of the cylinder extra degrees of freedom to follow the leaning tree.In this case, the iterative numerical method must be designed in a robust way to overcome the problem of having many degrees of freedom.(2) Tree stems might be curved and have a high degree of taper.When curve fitting circles/cylinders to a TLS dataset, there should not be too large pieces of point data on which to operate.
Otherwise the curvature of the stem or the taper of the stem might introduce large errors.
If the cut out of the point dataset is too narrow, the slice might be more like a ring than a cylinder, giving problems when estimating the direction of the cylinder axis.In this case, the direction of the largest elongation of the point data cannot be used as a first assumption of the direction of the cylinder axis, since the diameter of the dataset is larger than or equal to the cylinder height.
(3) TLS data might have shaded regions.In the case of a single scan setup, the TLS data of a tree stem are only visible from one side, giving semi-cylinder point data to adjust circles/cylinders.Heavy branching of the trees and high density stands also give shaded areas with missing data.The iterative numerical method must be robust enough to cope with cylinder data that have missing regions.(4) The filtering of the stem point data might be incomplete and contain parts of branches and twigs, giving outliers in the dataset.The circle/cylinder fitting algorithm must be robust enough to work on TLS data that contain more than just the stem points.
Apart from all of these technical challenges, the method of using TLS data in field plot sampling also needs a sampling design that takes into account that some trees might be occluded from view, especially in the single scan setup, where some trees are shaded by others.This study concentrates on a number of technical challenges when designing a TLS-based stem profile sampling system, and the objectives are to: (1) find a computationally-efficient way to calculate the flatness saliency feature; (2) find the optimal parameter settings for the proposed single-tree detection algorithm that gives the highest stem detection accuracy, using a weight-based method to select point clusters; (3) evaluate the accuracy of stem profile estimates from the proposed method with the chosen parameter settings by comparison with manual measurements.

Field Plot Used When Selecting Parameters
The test site is located in a hemi-boreal forest at the Remningstorp estate in southwestern Sweden (latitude 58 • N, longitude 13 • E); see Figure 1.The dominating tree species were Norway spruce (Picea abies L. Karst.)95.5% and birch (Betula spp.) 4.5%.A plot with a 20-m radius was measured the summer of 2011.The stem diameter at breast height (DBH) was measured 1.3 m above the ground level in two directions: towards the plot center and perpendicular to that direction.The mean value from these two directions was used for the validation of the TLS measurements.Only trees with a DBH ≥ 40 mm were manually measured in the field.The plot centers and tree positions were measured with a total station relative to reference points that were placed in open areas.The positions of the reference points were measured with a real-time kinematic global positioning system (RTK-GPS), with an expected accuracy of a few centimeters.The plot had 156 trees with an average DBH of 220 mm and tree height of 19.5 m.The co-registration with the TLS data was performed using field plot matching software described in Olofsson et al. [15].
All calipered trees in the plot were used in the evaluation of the parameter settings.The pre-filter calculations are however computationally heavy if the full point cloud is used, and therefore, a small stem sample was chosen from the field plot to be used in the filter selection evaluation.The stem sample was used to find an approximate method that can pre-filter the data at a reasonable computational speed.The chosen stem sample for the pre-filter evaluation was a spruce with DBH 264 mm and height 23 m.The sample tree was chosen with a few twigs that would influence the filtering calculations.

Trees Used in the Stem Profile Evaluation
The trees used in the stem profile evaluation were selected from the Svartberget test site in Northern Sweden (latitude 64 • N, longitude 19 • E); see Figure 1.Six plots dominated by Scots pine (Pinus sylvestris L.) or Norway spruce (Picea abies L. Karst.) were measured in the period October-December 2013; see Table 1.
Within each plot, the stem diameters of three trees were measured manually; see Table 2.The trees were selected to get a variation of stem diameters and distances to the sensor.The trees were calipered along the stem with a height distance of approximately 1 m; starting from the ground level to the maximum reach of the sky-lift >15 m above the ground.The trees were calipered in two directions at each height level, and the average diameter was used for comparison with the laser data.
A tape measure was used to record the height from the ground of the calipered diameters, and an ID card with the tree number was used for the co-registration with the TLS data.The height above the ground of the ID card was registered, and by identifying the card in the intensity data from the laser scanner, it was possible to co-register the two datasets.In August 2011, a Leica ScanStation C10 was used to scan the field plot.The instrument was set to the high scanning mode with a distance of 0.5 cm between measurements in the horizontal and vertical direction, at a distance of 10 m.The scanner had a green laser, 532 nm, a beam divergence of 0.1 mrad, a scanning pulse rate up to 50 kHz and a horizontal and vertical field of view of 360 and 270 degrees, respectively.A single scan setup was used with the scanner in the center of the field plot.
All LiDAR points within 22 m from the plot center were used in the parameter selection evaluation.For the computationally-heavy filter selection evaluation, a small sample of point cloud data was cut out at a height interval from 1.05-1.55m above the ground from the sample tree described above.

Trees Used in the Stem Profile Evaluation
The stem profile evaluation trees at the Svartberget test site were scanned 22-23 August 2013, with the same equipment and scan settings as in the training field plot.A multiple scan setup was used with three scan positions at each plot placed on or near a small trail in the forest and with approximately 25 m between each scanner position.Markers visible from several scan positions were positioned in the plot and were used to co-register the different scanner position datasets.

Outline
The tree extraction algorithm is a 3D-voxel grid-based solution using eigenvectors to define the flatness of surface patches as suggested by Lalonde et al., 2006 [9], Liang et al., 2009Liang et al., , 2012 [10,11] [10,11], and Raumonen et al., 2013 [12].The algorithm connects these small patches by looking for curved objects.If several connected patches have the same radius of curvature and originate from the same center, they are assumed to be part of a tree stem or a large branch.The points that belong to these curved objects are modeled as cylinders by using a curve fitting method described below.Cylinders that are connected and nearly vertical are assumed to be part of a tree stem.Single cylinders are assumed to be noise and are removed from further calculations.The remaining connected vertical cylinders are used to calculate the stem curve and DBH of each stem using interpolation and a ground model.The algorithm of the extraction of the ground model is described in Olofsson et al. [15] and Lindberg et al. [22].
The outline of the algorithm is to: • extract a digital terrain model from the LiDAR data; • fill a three-dimensional grid of cells with LiDAR data; • find the cells that contain flat objects; • connect the flat objects that are aligned and positioned on a cylindrical surface; • extract the diameter and the position of the cylindrical objects using the points in the cells that are connected; • connect cylinders to stem segments; • connect stem segments to stems.

Ground Model
The algorithm of the extraction of the ground model is based on the idea of using minimum height rasters of different resolutions to find the overall shape of the ground and the detailed shape of the ground.The raster cell sizes in this investigation were chosen to be 2 m and 0.5 m, respectively.First, a raster is produced with a larger cell size, which saves the lowest height found within this cell.This produces a low resolution ground model.The same is done with the high resolution raster to produce a high resolution ground model.Due to missing data, some of the cell height values of the high resolution raster might not be part of the ground, but rather part of low hanging branches.To filter out these false ground values, the high resolution ground raster was compared to the low resolution raster.If the values differed more than 1 m, they were removed from the high resolution raster and replaced by an interpolated value.For a detailed description of the algorithm, see Lindberg et al. [22].

Voxel Grid
The LiDAR point dataset is saved in a 3D grid for easy access during processing.The size of each 3D cell is set to be in the order of the smallest tree diameter: from 2 × 2 × 2 cm 3 -5 × 5 × 5 cm 3 in this study.The size of the 3D grid is the plot area times the highest tree height.At each position, the level of the ground model defines the lowest level of the 3D grid.

Flatness Saliency Feature
As a saliency feature, the flatness of the points in each cell in the 3D grid were calculated to determine if a point in the TLS-data is part of a tree stem or not.The assumption is that tree stems have nearly flat surfaces if the extracted patches are much smaller than the radius of the tree.Twigs are linear at this resolution level.
The flatness saliency feature is calculated by extracting the eigenvectors and the corresponding eigenvalues of all of the points in a spherical or cubical neighborhood of the point of investigation.The choice of cell point cloud neighborhood is described in the Filter Selection Section.
The eigenvectors and the corresponding eigenvalues of the cell point clouds were calculated by the QR-algorithm (Olver 2010 [30]), and the flatness F was defined as: where e3 is the smallest eigenvalue, e2 is the second smallest eigenvalue and e1 is the largest eigenvalue.
The eigenvector corresponding to e3 gives the direction of the normal of the flat surface.The centroid of the point dataset and the normal of the flat surface is used to derive a plane in each grid cell (Figure 2).

Finding Data Points on Cylinders
To look for cylindrical objects, the algorithm connects the small flat surfaces in each cell.If several connected patches have a similar radius of curvature and originate from the same center, they are assumed to be part of a tree stem or large branch.Curved objects can be either nearly spherical or nearly cylindrical.Nearly-spherical objects were assumed to be stones or bumps on the ground, and nearly-cylindrical objects were assumed to be tree stems or large branches.
The flatness value F and a plane P through the centroid were calculated for each filled cell (>2 points) in the grid.The planes in all cells were compared to the planes in their neighbor cells to see if the edges were connected, with the assumption that they belong to the same flat surface if they connect.A link weight E was defined to give an amount of how well the two planes P1 and P2 of Cells 1 and 2 connect; see Equation ( 2), (Figure 3).
where D is the sum of the distances between the two intersections and dx is the cell side length.
To get the sum of the distances D, a plane C was defined that separates the two cell centroids at equal distance to both of them.The intersection line between plane P1 and plane C is defined as L1, and the intersection line between plane P2 and plane C is defined as L2.A circle S on plane C with radius 0.5dx and centered between the two cell centroids was used to get four intersection points.The two intersection points between circle S and L1 are a1 and b1, and the two intersection points between circle S and line L2 are a2 and b2.The shortest distance between line L1 and point a2 is d1a, and the shortest distance between line L1 and point b2 is d1b.The shortest distance between line L2 and point a1 is d2a, and the shortest distance between line L2 and point b1 is d2b.Then, D is defined as: To get the curvature of the two connecting planes P1 and P2, their normals and centroids were used to calculate lines N1 and N2.If the shortest distance between lines N1 and N2 were <1.5 cm and the distance from the cell centroid to the intersection point is smaller than 30 (cm), they were considered to be part of a curved object.The intersection distance threshold was chosen to make sure that the intersection would fit inside a voxel cell.If the lines are too far apart, they are not intersecting.The distance to the centroid threshold was chosen so that measurements from other trees would not interfere with the tree of investigation.Trees with DBH >60 cm are very rare in a Scandinavian production forest.A curvature weight w defined as: was calculated for the two connected planes, where E is the link weight Equation (2), and f1 and f2 for Cells 1 and 2 are defined as: where θ is the angle in degrees between the zenith direction and the normal of the plane and F is the flatness Equation (1).The angle correction in Equation (5) gives larger weight values for flat surfaces perpendicular to the zenith direction, which is the case for stem surfaces of standing trees.
The value of the curvature weight w was added to the grid cell positioned at the intersection point.If several curvature weight values are added to the same grid cell, it indicates that a possible center of a curved object is positioned at this location.
The grid cells of possible cylinder centers that are neighbors and have a curvature weight ∑ w larger than a pre-chosen threshold t are connected and given a unique cylinder center ID number.The size of this threshold is selected in the parameter study.All of the accumulated curvature weights in these connected clusters of cylinder centers are summed to a cluster weight W defined as: All of the cells in the grid are tested once more to find which cylinder surface objects belong to a certain cylinder center cluster (Figure 4).If the flat surfaces of a cell and one neighbor has a valid curvature intersection that points to a cylinder center with a cluster weight W larger than a pre-chosen threshold T, they are candidates for the final designation.The size of this threshold is selected in the parameter study.The curvature intersection that gives the highest cluster weight W is chosen as the designated curvature center.All cells that are connected to the same cylinder center cluster are saved in a list of cylinder surface cells.If all values of a cell are below the chosen thresholds, the cell is discarded from further calculations.After these calculations, a number of lists to cylinder surface cells filled with point cloud data are used by the cylinder fitting algorithm; see Figure 5.

Cylinder Fitting and Stem Models
Half meter segments of the curved objects were modeled by brute force cylindrical fitting.The algorithm is a three-stage process where first, the direction of the axis is found and, then, the position of the cylinder center is found and, last, the radius of the cylinder is calculated.
The centroid of the filtered point dataset is calculated to give a starting point when calculating the direction of the axis.The centroid of a cylindrical point dataset is positioned inside the cylinder both in the case of semi-cylinders and cylinders, making the algorithm work for both single-scan and multiple scan setups.
All possible directions of the axis originating from the centroid of the point dataset are tested, first with an angle resolution of 3 • and for fine tuning an angle resolution of 0.5 • .A moving window convex hull is used to evaluate how optimal an axis direction is; see Figure 6.The purpose of this convex hull is to follow the innermost part of the point dataset for the chosen axis direction as a function of the angle; see Figure 7B,D.A moving window of size 45 • , when calculating the convex hull, was chosen since the dataset is not continuous for semi-cylinders.The average absolute deviation from this convex hull was used as a measure of how optimal an axis direction is.Small deviations like in Figure 7D are an indication that the axis is aligned close to the true direction of the cylinder.The moving window convex hull algorithm starts the search at the point at the far left with the smallest distance to the current axis.All of the points to the right of the current point, within the search window, are connected to the first point by lines, and the degree of tilt is calculated; see Figure 6.A line connected to a point located to the right gives an angle within the range of 0-π radians measured from the y-axis.The point connected to the line with the smallest angle is chosen as the next starting point.The search window is moved to the new starting point, and all points to the right within the search window are investigated.This process continues iteratively until the far right of the diagram is reached.All chosen starting points are then interconnected by lines that define the moving window convex hull.
The position of the center of the cylinder must be determined in order to estimate the radius.The axis direction with the smallest deviation was chosen as the most likely cylinder axis.This axis was tested with a number of different positions by moving the axis parallel to the original direction originating from the centroid of the dataset.First, with a grid spacing of 1 cm and, then, for fine tuning with a grid spacing of 1 mm.The position that gave the smallest standard deviation in the radial direction was considered to be the most probable cylinder center position; see Figure 7E,F.The radius of the cylinder was estimated by the median of the radial distances; see Figure 7F.
The cylinders that where almost vertical, from a 0 • -45 • zenith angle, were kept for further processing.Cylinders positioned above each other with a direction difference of less than 20 • were assumed to be part of the same tree stem.Connected segments of nearly vertical cylinders passing the height span of 1-2 m or with a length of more than 3 m were assumed to be stems.Remaining cylinder segments on the ground level or up in the canopy were removed from further processing.The remaining connected vertical cylinders were used to calculate the stem profile and DBH of each stem using interpolation and a ground model.

Filter Selection
The point-wise-flatness-algorithm calculates the saliency features for each point in the dataset.Two radii were tested: one giving the same volume as the cubical grid cell, R vol , Equation (7), and one where the radius of the sphere reaches the edge of the cubical grid cell if placed in the center, R side Equation ( 8) (Table 3).dx is the cell side length.The choice of radii was based on the assumption that a too small neighborhood would not give enough data points to calculate a true shape, whereas a too large neighborhood would contain a whole tree rather than a small surface patch of a stem that is approximately flat.The radius of the neighborhood must be smaller than the smallest tree that the method is designed to detect.The density of the point cloud must be high enough for the cells to contain a minimum of four points, but preferably many more.
Calculating the flatness, Equation ( 1), of each point using a spherical neighborhood like in the point-wise-flatness-algorithm is time consuming.Therefore, three approximate algorithms to calculate the flatness were investigated in order to find a technique with good computational performance and reasonable accuracy:

•
The cell-flatness-algorithm uses all points in one voxel cell to calculate the flatness, Equation ( 1).All points within this cell were set to the same value.

•
The center-flatness-algorithm uses all points within a sphere from the center of the voxel cell.Two radii were used; see Table 3.All points within this cell were set to the same value.

•
The centroid-flatness-algorithm uses all points within a sphere from the centroid of the point data of the voxel cell.Two radii were used; see Table 3.All points within this cell were set to the same value.
The third version has the advantage that if the points in the cell are located in a corner or along an edge, the center of the spherical neighborhood will be located close to the position of the data points.For the three approximations, all data points within a cell are set to the same property.The versions with a spherical definition of the neighborhood need to test neighbor cell points for proximity, leading to slightly longer processing times.
The three approximate algorithms were compared to the point-wise-flatness reference algorithm.The flatness value, Equation (1), differences were calculated for each point giving the residuals in the calculation of the root mean square error (RMSE), Equation (9); see Table 3.

Choosing Parameters by Grid Search
To find the optimal parameter settings of the tree stem detection algorithm, a number of settings was tested on the Remningstorp field plot dataset.The curvature weight threshold was tested in the range of 0.1-1.0 and an increment of 0.05.The cluster weight threshold was tested in the range of 0-20 and an increment of 2.5.Four different grid cell sides of 2, 3, 4 and 5 cm were tested and two different plot radii of 10 and 20 m.
The Remningstorp dataset did not have the stem profiles measured in the field plot as in the Svartberget dataset, and therefore, the RMSE, Equation ( 9), of the diameter difference between consecutive estimated stem profile circles was used as a measure of how well the algorithm finds a stem profile, with the assumption that the difference between two consecutive diameters on a real tree is small.For every two consecutive cylinder pairs, the first diameter was considered as the predicted value, and the second diameter was considered to be the observed value, Equation (9).
The tree detection accuracy was defined as: where N is the number of found trees, Com is the number of commission errors and Om is the number of omission errors.

Stem Profile Evaluation
The diameters of the cylinder models extracted from the TLS data were compared to the stem circles calipered manually.For each height level above the ground and for each tree, a circle was extracted from the TLS data.The diameter difference between the TLS models and the field calipered values was used to calculate the RMSE, Equation ( 9).If it was not possible to extract a TLS model where a field measurement was present, it was considered to be an omission error.This case usually appears high in the canopy where the TLS-based method cannot build a cylinder model due to sparse data.

Filter Selection
The flatness value algorithm using the centroid and the larger radius was the approximation that gave the smallest RMSE compared to the full point by point calculations (Table 3).The processing time is also much smaller than in the pointwise calculations and only slightly larger than the other approximative algorithms.Therefore, this approximative algorithm was chosen for the parameter selection study and the stem profile investigation.

Choosing Parameters by Grid Search
The results from the parameter selection grid search are presented in Figures 8-13.In general, high thresholds give a good stem profile estimation, but at the price of losing stem profile data high up in the canopy.The tree detection accuracy for 10-m plots is high with high threshold values (Figure 8), whereas the optimal settings for the tree detection accuracy for 20-m plots is achieved with different parameter settings for different grid cell sizes (Figure 9).High threshold values give smooth stem profiles for both 10-m and 20-m plots (Figures 10 and 11).High detected stem length is achieved with low settings of the cluster weight threshold (Figures 12 and 13).
The parameter settings that gave the highest tree detection accuracy for each voxel cell size and plot size are presented in Tables 4 and 5.It is easier to detect trees in a smaller plot radius than in a larger one, probably depending on the nature of TLS data, which are denser closer to the scanner, and the fact that more trees are shaded in a large plot (in a single scan setup).A voxel size of 3 cm gave the highest tree detection accuracies, whereas a voxel size of 2 cm gave the lowest for the plot size of 10 m.For the 20-m plot size, the voxel size of 4 cm gave the highest tree detection accuracies.

Stem Profile Evaluation
Since the trees used in the stem profile evaluation have a distance range from 5-15 m from the sensor positions, max accuracy parameter settings from both the 10-m plot (Table 4) and the 20-m plot (Table 5) were used in the stem profile evaluation (Table 6).The omission rate is around 10% for most settings, and the diameter estimate RMSE is as low as 1 cm for the best cases (Table 6).
The voxel size of 3 cm had the best tree detection accuracy (Table 4), and for this voxel size, the curve weight of 0.75 and the cluster weight of 15 gave the smallest profile RMSE (Table 6).For the voxel size of 4 cm, there are a number of settings with slightly smaller profile RMSEs at the cost of a lower tree detection accuracy.For large plot sizes, the voxel size of 4 cm seems to be better (Table 5).For this reason, the parameter settings voxel cell size of 3 cm, curve weight of 0.75 and cluster weight of 15 were used in an analysis of how the profile RMSE depends on the distance from the ground (Table 7).
The TLS-based stem profiles follow the manual measurements quite well (Figures 14-16).The accuracy of the stem profile diameters seems to be equal along the height of the trees (Table 7; Figure 16), indicating that sparse TLS data high up in the canopy probably led to omission errors rather than errors in the radius estimation.There is a small overestimation bias of around half a centimeter, and the omission errors increase above the 10-m height level (Table 7).There are only small differences between the tree species (Tables 8 and 9).Pine trees have a slightly less amount of omission errors, whereas spruce trees have slightly smaller RMSE and bias.7. The parameter settings used in the stem profile detection method were: voxel size of 3 cm, curvature weight of 0.75 and cluster weight of 15.

Discussion
The method for stem profile estimation gives results comparable to the manually-calipered measurements and is probably a method feasible for industrial use; see Figures 14-16 and Tables 6-9.The RMSE of the stem profile diameter estimations, 1 cm, is of the same magnitude as reported by Liang et al. [2].There does not seem to be any trend in the data giving higher errors high in the canopy, which could be an effect of the evaluation key.The reach of the sky-lift made manual measurements reach no more than 16 m.Diameter errors higher in the canopy were not evaluated by this study.This is consistent with the findings of Mengesha et al. [8], where the stem profile diameter errors were small below 15 m.The diameter estimates above 15 m gave higher errors in their study.Henning and Radtke [6] received stem profile estimated RMSE of loblolly pine of <2 cm up to the 13-m level, and Maas et al. [7] had a stem profile diameter RMSE of 4.7 cm for a Sitka spruce to the height level of 12 m.This case would probably be comparable to the heavily-branched Norway spruce trees in this study.There are only small differences between the two tree species of pine and spruce; see Tables 8 and 9.
The flatness saliency feature calculations of the dataset are computationally efficient and take around a minute per tree, and with a stem detection accuracy of more than 0.9 and a stem profile RMSE of around 1 cm, the method seems to be able to accurately describe the stems in a field plot.The part of the software that needs to be improved is the cylinder fit method.The computational speed is too slow since the method is a brute force technique.The calculations take several minutes per tree.To improve performance on this technique, a heuristic method could be used instead.The same radial-angular-transform and moving-window-convex-hull-base-level could be used, but the minimizing of the energy of the system could use some gradient method instead.
A voxel grid is a memory-consuming data type, since empty voxel cells also are allocated in the memory.To overcome this problem, a tiled solution was chosen for this study.Only part of the field plot was calculated, and the results were merged afterwards.A memory-efficient solution that still has high computational speed could be to use the octree data type.The octree is a data type that subdivides a cell into eight sub-cells.These sub-cells are also divided into sub-cells giving a search tree that quickly can look for areas that contain data.The first cell covers the whole field plot, and subsequently, it is possible to search for data to the smallest resolution, the smallest voxel cell size.There is no need to allocate empty voxel cells in this setup.Implementing the method using the octree data type could probably make it possible to calculate large field plots on a standard office desktop computer.
It was shown in this study that stem diameters can be estimated with high accuracy up to a distance of approximately 15 m from the ground.The lowest part of the tree stem is most important for the prediction of wood assortments because this part includes the highest timber value of the tree.Stem diameter estimation errors from algorithms based on TLS data are expected to have higher magnitudes further up in the canopy [8].However, there are new methods to improve predictions of the stem taper by including several stem diameter measurements at different heights as explanatory variables in the model [3].It was difficult earlier to implement these new methods because stem diameters at heights above the reach of a person standing on the ground are difficult to measure with manual methods.However, algorithms that estimate stem diameters along tree stems of standing trees using TLS data make these models more useful.

Conclusions
In this study, a new TLS-based stem profile measurement method is proposed.The method contains: a flatness saliency feature extraction algorithm; a pre-filtering method of high density TLS data that works directly on the point data and extracts points that are positioned on a curved surface, a cylinder fitting method of a point cloud that works in the single scan setup, as well as a multiple scan setup of a TLS system.The search for optimal parameter settings was performed on a dataset separated from the evaluation dataset.The stem profile measurement method was validated using manual measurements of stem diameters at heights between 0 and 15 m above the ground level, and RMSE values of approximately 1 cm were obtained.

Figure 1 .
Figure 1.Location of the test sites in Sweden.A: Remningstorp test site; B: Svartberget test site.

Figure 2 .
Figure 2. Two-dimensional view of the three-dimensional grid.Cells 1-9 contain laser data points.In each grid cell, a plane (thick line) is derived from the laser data points using the eigenvectors and eigenvalues.The centers c1-c3 are derived from the normals (thin lines) of two connected planes.The plane in Cell 4 is connected to two centers.Planes with several possible centers are connected to the center with the highest weight.The planes in Cells 7 and 8 are not connected to any neighbor and, therefore, not connected to possible tree stem centers.

Figure 3 .
Figure 3. Plane P1 and plane P2 are derived from point clouds with Centroid 1 and Centroid 2.An intersecting plane C with a circle is positioned in between the two point cloud centroids.L1 is the intersecting line between plane P1 and plane C. L2 is the intersecting line between plane P2 and plane C. a1 and b1 are the intersecting points between the circle and L1.a2 and b2 are the intersecting points between the circle and L2.A measure of how well the two planes connect is evaluated by measuring the distances from points a1,b1 and a2, b2 to the opposite intersecting line.

Figure 4 .
Figure 4. Synthetic data points of a semi-cylinder of height 7 cm and radius 15 cm.The blue voxels, containing cylinder surface points, are connected to the cylinder center voxels in red.All cylinder surface points that are connected to the cylinder center cluster in red are used in the estimate of the stem diameter.The data points in this example are filtered with a cluster weight of 15 and a curve weight of 0.75.The grid cell size is 3 × 3 × 3 cm 3 .

Figure 5 .
Figure 5. Lidar data points of a tree with a diameter at breast height of 26.35 cm cut out from 1.05-1.55m above the ground.The data points in this example are filtered with a cluster weight of 15 and a curve weight of 0.75.The grid cell size is 3 × 3 × 3 cm 3 .The red data points have values above the threshold and are used when cylinder fitting the data.

Figure 6 .
Figure 6.Illustration of the moving window convex hull algorithm designed to find the innermost part of the point dataset.The blue lines are found in earlier iteration steps.The red points are within the current search window.The point that gives the smallest angle θ measured from the y-axis is chosen as the next starting point.The thick red line is the line that is chosen by the algorithm.The thin grey lines are discarded.The search window is then moved to the new starting point for the following iteration steps.

Figure 7 .
Figure 7. Cylinder fitting of a synthetic point dataset with radius 0.10 m. (A,C,E) The perspective views of semi-cylinder point data with different axis positions.The axis positions are marked in red.(A) The axis is positioned at the centroid of the point dataset and tilted 10 • ; (C) the axis is positioned at the centroid of the point dataset and is aligned with the true cylinder axis; (E) the axis is positioned at the true center of the cylinder and is aligned with the true cylinder axis.(B,D,F) The radial displacement as a function of the angle of the axis positions in (A,C,E); the red lines in (B,D) are calculated by a moving window convex hull algorithm and are used as a base level from which to calculate the deviation of the dataset.

Figure 8 .
Figure 8. Tree detection accuracy evaluated on a plot of a radius of 10 m and different parameter settings.White areas indicate missing data.High threshold parameter settings give high tree detection accuracy, with the exception of a voxel size of 5 cm, which is optimal with medium threshold parameter settings.

Figure 9 .
Figure 9. Tree detection accuracy evaluated on a plot of a radius of 20 m and different parameter settings.White areas indicate missing data.The optimum for high tree detection accuracy is achieved with different parameter settings for different voxel sizes.

Figure 10 .
Figure 10.Profile consecutive diameter RMSE evaluated on a plot of a radius of 10 m and different parameter settings.White areas indicate missing data.High parameter threshold values give smooth stem profiles.

Figure 11 .
Figure 11.Profile consecutive diameter RMSE evaluated on a plot of a radius of 20 m and different parameter settings.White areas indicate missing data.High parameter threshold values give smooth stem profiles.

Figure 12 .
Figure 12.Average detectable stem length evaluated on a plot of a radius of 10 m and different parameter settings.White areas indicate missing data.Low threshold parameter values give many estimated stem diameters along the tree.

Figure 13 .
Figure 13.Average detectable stem length evaluated on a plot of a radius of 20 m and different parameter settings.White areas indicate missing data.Low threshold parameter values give many estimated stem diameters along the tree.

Figure 15 .
Figure 15.Stem profiles of the trees in Plots 4-6.The parameter settings used in the stem profile detection method were: voxel size of 3 cm, curvature weight of 0.75 and of cluster weight 15.

Figure 16 .
Figure 16.Scatter plot of the stem diameters estimated by TLS versus the stem diameters measured in the field survey for all of the trees in Plots 1-6.The identity line is blue.For stem profile diameters RMSE, bias and omission errors, see Table7.The parameter settings used in the stem profile detection method were: voxel size of 3 cm, curvature weight of 0.75 and cluster weight of 15.

Table 2 .
Stem profile evaluation trees.

Table 3 .
Performance of different algorithms for calculating the flatness of the neighborhood of each point in a point cloud.The cell size is 3 × 3 × 3 cm 3 .

Table 4 .
Maximum accuracy values for each voxel size and a plot of a radius of 10 m.For each voxel size, there are a number of weight settings from the parameter study that gave equally large maximum accuracy values.

Table 5 .
Maximum accuracy values for each voxel size and a plot of a radius of 20 m.For this plot radius only, one weight setting per voxel size from the parameter study gave the maximum accuracy values.

Table 6 .
Stem profile diameter RMSE and omission errors of the trees in Plots 1-6 at the Svartberget test site for the chosen parameter settings in Tables4 and 5.The total number of manually-calipered stem profile diameters is 305.

Table 7 .
Stem profile diameter RMSE and omission errors for different height spans of the trees in Plots 1-6 at the Svartberget test site.The parameter settings used in the stem profile detection method were: voxel size of 3 cm, curvature weight of 0.75 and cluster weight of 15.The total number of manually-calipered stem profile diameters is 305.