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.
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:
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