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 watershed algorithm from lidR, calculates a ratio of crown diameter to tree height for each tree, and converts this into a raster.
# S4 method for LAS
li_diameter_raster(
point_cloud,
crown_diameter_constant = 0,
limits = c(0, 1),
ground_height = NULL,
smoothing_radius = 5,
...
)# S4 method for data.frame
li_diameter_raster(
point_cloud,
crown_diameter_constant = 0,
limits = c(0, 1),
ground_height = NULL,
smoothing_radius = 5,
...
)
# S4 method for LAScatalog
li_diameter_raster(
point_cloud,
crown_diameter_constant = 0,
limits = c(0, 1),
ground_height = NULL,
smoothing_radius = 5,
...
)
watershed_diameter_raster(
point_cloud,
crown_diameter_constant = 0,
limits = c(0, 1),
ground_height = NULL,
smoothing_radius = 5,
...
)
# S4 method for LAS
watershed_diameter_raster(
point_cloud,
crown_diameter_constant = 0,
limits = c(0, 1),
ground_height = NULL,
smoothing_radius = 5,
...
)
# S4 method for data.frame
watershed_diameter_raster(
point_cloud,
crown_diameter_constant = 0,
limits = c(0, 1),
ground_height = NULL,
smoothing_radius = 5,
...
)
# S4 method for LAScatalog
watershed_diameter_raster(
point_cloud,
crown_diameter_constant = 0,
limits = c(0, 1),
ground_height = NULL,
smoothing_radius = 5,
...
)
a 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::watershed()
li_diameter_raster(LAS): Calculate a raster of crown diameter
for tree height using li2012 segmentation
li_diameter_raster(data.frame): Calculate a raster of crown diameter
for tree height using li2012 segmentation
li_diameter_raster(LAScatalog): Calculate a raster of crown diameter
for tree height using li2012 segmentation
watershed_diameter_raster(LAS): Calculate a raster of crown diameter
for tree height using watershed segmentation
watershed_diameter_raster(data.frame): Calculate a raster of crown diameter
for tree height using watershed segmentation
watershed_diameter_raster(LAScatalog): Calculate a raster of crown diameter
for tree height using watershed segmentation
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 watershed segmentation. The Bioconductor package "EBImage" is required to use this function.