its_dalponte2016: Individual Tree Segmentation Algorithm

its_dalponte2016R Documentation

Individual Tree Segmentation Algorithm

Description

This function is made to be used in segment_trees. It implements an algorithm for tree segmentation based on Dalponte and Coomes (2016) algorithm (see reference). This is a seeds + growing region algorithm. This algorithm exists in the package itcSegment. This version has been written from the paper in C++. Consequently it is hundreds to millions times faster than the original version. Note that this algorithm strictly performs a segmentation, while the original method as implemented in itcSegment and described in the manuscript also performs pre- and post-processing tasks. Here these tasks are expected to be done by the user in separate functions.

Usage

dalponte2016(
  chm,
  treetops,
  th_tree = 2,
  th_seed = 0.45,
  th_cr = 0.55,
  max_cr = 10,
  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

th_tree

numeric. Threshold below which a pixel cannot be a tree. Default is 2.

th_seed

numeric. Growing threshold 1. See reference in Dalponte et al. 2016. A pixel is added to a region if its height is greater than the tree height multiplied by this value. It should be between 0 and 1. Default is 0.45.

th_cr

numeric. Growing threshold 2. See reference in Dalponte et al. 2016. A pixel is added to a region if its height is greater than the current mean height of the region multiplied by this value. It should be between 0 and 1. Default is 0.55.

max_cr

numeric. Maximum value of the crown diameter of a detected tree (in pixels). Default is 10.

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 with 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 <- dalponte2016(chm, ttops)()

References

Dalponte, M. and Coomes, D. A. (2016), Tree-centric mapping of forest carbon density from airborne laser scanning and hyperspectral data. Methods Ecol Evol, 7: 1236–1245. doi:10.1111/2041-210X.12575.

See Also

Other individual tree segmentation algorithms: its_li2012, its_silva2016, its_watershed

Other raster based tree segmentation algorithms: its_silva2016, its_watershed

Examples

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, 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, dalponte2016(chm, ttops))
#plot(las, color = "treeID", colorPalette = col)

lidR documentation built on Sept. 11, 2024, 5:21 p.m.