The function calculates a raster with values for crown_diameter_to_tree_height as input for the AMS3D algorithm. It segments the tree crowns with the Li2012 algorithm, calculates a ratio of crown diameter to tree height for each tree, and converts this into a raster.
li_diameter_raster(
point_cloud,
crown_diameter_constant = 0,
limits = c(0, 1),
ground_height = NULL,
smoothing_radius = 5,
...
)terra SpatRaster
the input point cloud, either as LAS or as data.frame.
a fixed value for crown_diameter_constant, which reduces the crown diameters by the given value before calculating the ratio of crown diameter to tree height
a numeric vector with minimum and maximum values for the ratio, at which every tree's ratio will be capped
(optional) either
NULL, indicating that the point cloud is normalized, or
a SpatRaster digital terrain model, or
a list of arguments to the lidR rasterize_terrain() function to normalize the point cloud.
The radius of the filter used for smoothing the diameter-to-height ratio from individual trees.
further parameters will be passed to the function lidR::li2012()
The output raster can serve as input for the parameter "crown_diameter_to_tree_height" for the function segment_tree_crowns. It averages the ratio of crown diameter to tree height for a given radius, for trees that were detected with the Li2012 tree segmentation algorithm.