Learn R Programming

lidR (version 4.1.2)

its_silva2016: Individual Tree Segmentation Algorithm

Description

This functions is made to be used in segment_trees. It implements an algorithm for tree segmentation based on Silva et al. (2016) (see reference). This is a simple method based on seed + voronoi tesselation (equivalent to nearest neighbour). This algorithm is implemented in the package rLiDAR. This version is not the version from rLiDAR. It is code written from the original article by the lidR authors and is considerably (between 250 and 1000 times) faster.

Usage

silva2016(chm, treetops, max_cr_factor = 0.6, exclusion = 0.3, ID = "treeID")

Arguments

chm

`RasterLayer`, `SpatRaster` or `stars`. Canopy height model. Can be computed with rasterize_canopy or read from an external file.

treetops

`SpatialPoints*` or `sf/sfc_POINT` with 2D or 3D coordinates. Can be computed with locate_trees 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.

ID

character. If treetops contains an attribute with the ID for each tree, the name of this attribute. This way, original IDs will be preserved.

Details

Because this algorithm works on a CHM only there is no actual need for a point cloud. Sometimes the user does not even have the point cloud that generated the CHM. lidR is a point cloud-oriented library, which is why this algorithm must be used in segment_trees to merge the result into the point cloud. However, the user can use this as a stand-alone function like this:


 chm <- raster("chm.tif")
 ttops <- locate_trees(chm, lmf(3))
 crowns <- silva2016(chm, ttops)()

References

Silva, C. A., Hudak, A. T., Vierling, L. A., Loudermilk, E. L., O’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–573. https://doi.org/10.1080/07038992.2016.1196582.

See Also

Other individual tree segmentation algorithms: its_dalponte2016, its_li2012, its_watershed

Other raster based tree segmentation algorithms: its_dalponte2016, its_watershed

Examples

Run this code
LASfile <- system.file("extdata", "MixedConifer.laz", package="lidR")
poi <- "-drop_z_below 0 -inside 481280 3812940 481320 3812980"
las <- readLAS(LASfile, select = "xyz", filter = poi)
col <- pastel.colors(200)

chm <- rasterize_canopy(las, res = 0.5, p2r(0.3))
ker <- matrix(1,3,3)
chm <- terra::focal(chm, w = ker, fun = mean, na.rm = TRUE)

ttops <- locate_trees(chm, lmf(4, 2))
las   <- segment_trees(las, silva2016(chm, ttops))
#plot(las, color = "treeID", colorPalette = col)

Run the code above in your browser using DataLab