Detects trees from point clouds corresponding to TLS multi-scan approaches and SLAM devices. For each tree detected, the function calculates the central coordinates and estimates the diameter at 1.3 m above ground level (which is known as dbh, diameter at breast height) and classifies it as fully visible or partially occluded. Finally, the function obtains the number of points belonging to normal sections of trees (those corresponding to dbh +/- 5 cm) and estimates them for both original and reduced (with random selection process) point clouds.
tree.detection.multi.scan(data, single.tree = NULL,
dbh.min = 4, dbh.max = 200, h.min = 1.3,
ncr.threshold = 0.1,
tls.precision = NULL,
density.reduction = 2,
stem.section = c(0.7, 3.5), stem.range = NULL, breaks = NULL,
slice = 0.1, understory = NULL, bark.roughness = 1,
den.type = 1, d.top = NULL,
segmentation = NULL,
plot.attributes = NULL, plot = TRUE,
dir.data = NULL, save.result = TRUE, dir.result = NULL)
Data frame with the following columns for every tree detected (each row corresponds to one tree detected):
Optional plot identification encoded as a character string or numeric. If this argument is not specified by the user, it will be set to NULL by default and, as a consequence, the plot will be encoded as 1.
Optional file name identification encoded as character string or numeric. If it is null, the file will be encoded as id
by default.
tree numbering
Cartesian (according to https://en.wikipedia.org/wiki/Cartesian_coordinate_system notation):
x
: distance on x axis (m) of tree centre.
y
: distance on y axis (m) of tree centre.
Azimuthal angles:
phi
: angular coordinate (rad) of tree centre.
horizontal distance (m) from plot centre to tree centre.
estimated tree diameter (cm) at breast height (1.3 m).
estimated tree total height (m).
estimated commercial tree height (m) according to the top diameter defined in the argument d.top
.
estimated tree stem volume (m^3).
estimated commercial tree stem volume (m^3) according to the top diameter defined in the argument d.top
.
number of points corresponding to a normal section (+/- 5 cm) in the original point cloud.
number of points corresponding to a normal section (+/- 5 cm) in the point cloud reduced by the point cropping process.
number of points estimated for a normal section (+/- 5 cm) in the original point cloud.
number of points estimated for a normal section (+/- 5 cm) in the point cloud reduced by the point cropping process.
yes (1) or no (0)
Data frame with same description and format as indicated for normalize
‘Value’.
Optional argument to indicate if there is only one tree.
Optional minimum dbh (cm) considered for detecting trees. By default it will be set at 4 cm.
Optional maximum dbh (cm) considered for detecting trees. By default it will be set at 200 cm.
Optional minimum h (m) considered for detecting trees. By default it will be set at 1.3 m.
Local surface variation (also known as normal change rate, NCR). By default it will be set as 0.1. For better understanding of this argument see ‘Details’.
Average point cloud precision in cm.
Density reduction intensity.
Section free of noise (shurb, branches, etc.) considered to detect trees. If not specified, an automatic internal algorithm will be applied (see ‘Details’).
Section considered to estimate straightness tree attributes.
Height above ground level (m) of slices considered for detecting trees. By default it will be considered all possible sections from 0.4 m to maximum height by 0.3 m intervals (+/- 5 cm).
Slice width considered for detecting trees. By default it will be considered as 0.1 m.
Optional argument to indicate if there is dense understory vegetation.
Bark roughness established in 3 degrees (1 < 2 < 3). By default it will be considered as 1.
Numeric argument indicating the dendrometic type used to estimate volumen when there are not sections enough to fit a taper equation. Dendrometrics types available are the following: cylinder = 0, paraboloid = 1 (by default), cone = 2 and neiloid = 3.
Top stem diameter (cm) considered to estimate commercial timber volume.
Tree segmentation.
Data frame with attributes at plot level. It must contain a column named id
(character string or numeric value) with encoding coinciding with that used in id
argument of normalize
for identifying plots. If there are strata, another column named ‘stratum’ (numeric) will be required for other functionalities of FORTLS (see, for instance, estimation.plot.size
or metrics.variables
). If this argument is not specified by the user, it will be set to NULL by default and, as a consequence, the function will not add these possible plot attributes.
Optional logical which indicates whether or not the normalized point cloud will be plot. If this argument is not specified by the user, it will be set to TRUE
by default and, as consequence, the normalized point cloud will be plot.
Optional character string naming the absolute path of the directory where LAS files containing TLS point clouds are located. .Platform$file.sep
must be used as the path separator in dir.data
. If this argument is not specified by the user, it will be set to NULL
by default and, as a consequence, the current working directory of the R process will be assigned to dir.data
during the execution.
Optional logical which indicates whether or not the output files described in ‘Output Files’ section should be saved in dir.result
. If this argument is not specified by the user, it will be set to TRUE
by default and, as a consequence, the output files will be saved.
Optional character string naming the absolute path of an existing directory where the files described in ‘Output Files’ section will be saved. .Platform$file.sep
must be used as the path separator in dir.result
. If this argument is not specified by the user, and the save.result
is TRUE
, it will be set to NULL
by default and, as a consequence, the current working directory of the R process will be assigned to dir.result
during the execution.
At the end of the tree detection process, if the save.result
argument is TRUE
, the function will save the data frame described in ‘Value’ as a CSV file named ‘tree.tls.csv’. The data frame will be written without row names in the dir.result
directory by using write.csv
function from the utils package.
Juan Alberto Molina-Valero and Adela Martínez-Calvo.
Slices determined by breaks
argument are clustered using the DBSCAN algorithm (Ester et al., 1996) on the horizontal plane according to Cartesian coordinates (x, y). Before and after this process, several algorithms are used to remove noisy points and apply classification criteria to select the clusters of trees.
dbh is directly estimated for the section of 1.3 m above ground level, and estimated from other sections using dbh~breaks linear regression. Finally, the mean value of all estimates is provided in ‘Value’ as the dbh of the tree section.
Volume is estimated modelling stem profile as a paraboloid and calculating the volumes of revolution; where trees dbh are estimated in tree.detection.single.scan
, and total heights are estimated as percentile 99 of z coordinate of points delimited by Voronoi polygons.
The number of points corresponding to a normal section (+/- 5 cm) is estimated in proportion to dbh, using the average number of points per radius unit as reference. In this respect, only tree sections fully visible at 1.3 m above ground level will be considered for estimating the average number of points.
Local surface variation (also known as normal change rate ,NCR), is a quantitative measure of curvature feature (Pauly et al., 2002). This is useful for distinguishing points belonging to fine branches and foliage (e.g. leaves, shrubs) and stem points (e.g. Jin et al., 2016; Zhang et al., 2019). Just as we considered 5 cm as suitable for calculating local surface variation for the stem separation in forests, according to other authors (Ma et al., 2015; Xia et al., 2015), we also established the NCR threshold as 0.1, according to Zhang et al. (2019). However, this argument (ncr.threshold
) may be modified in order to use more appropriate values.
Ester, M., Kriegel, H. P., Sander, J., & Xu, X. (1996). A density-based algorithm for discovering clusters in large spatial databases with noise. In Kdd (Vol. 96, No. 34, pp. 226-231).
Jin, S., Tamura, M., & Susaki, J. (2016). A new approach to retrieve leaf normal distribution using terrestrial laser scanners. J. Journal of Forestry Research, 27(3), 631-638. tools:::Rd_expr_doi("https://doi.org/10.1007/s11676-015-0204-z")
Ma, L., Zheng, G., Eitel, J. U., Moskal, L. M., He, W., & Huang, H. (2015). Improved salient feature-based approach for automatically separating photosynthetic and nonphotosynthetic components within terrestrial lidar point cloud data of forest canopies. IEEE Transactions Geoscience Remote Sensing, 54(2), 679-696. tools:::Rd_expr_doi("https://doi.org/10.1109/TGRS.2015.2459716")
Pauly, M., Gross, M., & Kobbelt, L. P., (2002). Efficient simplification of point-sampled surfaces. In IEEE Conference on Visualization. (pp. 163-170). Boston, USA. tools:::Rd_expr_doi("https://doi.org/10.1109/VISUAL.2002.1183771")
Xia, S., Wang, C., Pan, F., Xi, X., Zeng, H., & Liu, H. (2015). Detecting stems in dense and homogeneous forest using single-scan TLS. Forests. 6(11), 3923-3945. tools:::Rd_expr_doi("https://doi.org/10.3390/f6113923")
Zhang, W., Wan, P., Wang, T., Cai, S., Chen, Y., Jin, X., & Yan, G. (2019). A novel approach for the detection of standing tree stems from plot-level terrestrial laser scanning data. Remote Sens. 11(2), 211. tools:::Rd_expr_doi("https://doi.org/10.3390/rs11020211")
normalize
, tree.detection.single.scan
, tree.detection.several.plots
, distance.sampling
, estimation.plot.size
, simulations
, metrics.variables
# \donttest{
# Establishment of working directories (optional)
# By default here we propose the current working directory of the R process
dir.data <- getwd()
dir.result <- getwd()
# Loading example data of TLS multi-scan approach point cloud (LAZ file) to dir.data
download.file(
"www.dropbox.com/scl/fi/es5pfj87wj0g6y8414dpo/PiceaAbies.laz?rlkey=ayt21mbndc6i6fyiz2e7z6oap&dl=1",
destfile = file.path(dir.data, "PiceaAbies.laz"),
mode = "wb")
# Normalizing the whole point cloud data without considering arguments
pcd <- normalize(las = "PiceaAbies.laz",
id = "PiceaAbies",
scan.approach = "multi",
voxel_size = 0.01,
dir.data = dir.data, dir.result = dir.result)
# Tree detection without considering arguments
tree.tls <- tree.detection.multi.scan(data = pcd,
slice = 0.2,
dir.result = dir.result)
# }
Run the code above in your browser using DataLab