lidR (version 1.5.1)

lastrees_silva: Individual tree segmentation

Description

Individual tree segmentation using Silva et al. (2016) algorithm (see reference). This is a simple method based on local maxima + voronoi tesselation. This algorithm is implemented in the package rLiDAR. This version is not the version from rLiDAR. It is a code written from scratch by the lidR author from the original paper and is considerably (between 250 and 1000 times) faster.

Usage

lastrees_silva(las, chm, treetops, max_cr_factor = 0.6, exclusion = 0.3,
  extra = FALSE, ...)

Arguments

las

An object of the class LAS. If missing extra is turned to TRUE automatically.

chm

RasterLayer. Image of the canopy. Can be computed with grid_canopy or grid_tincanopy or read it from an external file.

treetops

RasterLayer or data.frame containing the position of the trees. Can be computed with tree_detection or read from an external file.

max_cr_factor

numeric. Maximum value of a crown diameter given as a proportion of the tree height. Default is 0.6, meaning 60% of the tree height.

exclusion

numeric. For each tree, pixels with an elevation lower than exclusion multiplied by the tree height will be removed. Thus, this number belongs between 0 and 1.

extra

logical. By default the function classifies the original point cloud by reference and return nothing (NULL) i.e. the original point cloud is automatically updated in place. If extra = TRUE an additional RasterLayer used internally can be returned.

...

Supplementary options. Currently field is supported to change the default name of the new column.

Value

Nothing (NULL), the point cloud is updated by reference. The original point cloud has a new column named treeID containing an ID for each point that refer to a segmented tree. If extra = TRUE the function returns a RasterLayer used internally.

References

Silva, C. A., Hudak, A. T., Vierling, L. A., Loudermilk, E. L., O<U+2019>Brien, J. J., Hiers, J. K., Khosravipour, A. (2016). Imputation of Individual Longleaf Pine (Pinus palustris Mill.) Tree Attributes from Field and LiDAR Data. Canadian Journal of Remote Sensing, 42(5), 554<U+2013>573. https://doi.org/10.1080/07038992.2016.1196582.

See Also

Other tree_segmentation: lastrees_dalponte, lastrees_li2, lastrees_watershed, lastrees

Examples

Run this code
# NOT RUN {
LASfile <- system.file("extdata", "MixedConifer.laz", package="lidR")
las = readLAS(LASfile, select = "xyz", filter = "-drop_z_below 0")
col = pastel.colors(200)

chm = grid_canopy(las, res = 0.5, subcircle = 0.3)
chm = as.raster(chm)
kernel = matrix(1,3,3)
chm = raster::focal(chm, w = kernel, fun = mean, na.rm = TRUE)

ttops = tree_detection(chm, 5, 2)
lastrees_silva(las, chm, ttops)
plot(las, color = "treeID", colorPalette = col)

# }

Run the code above in your browser using DataLab