View source: R/traits_from_point_cloud.R
| segment_crown | R Documentation |
This function labels all points with $Z > 'crown_base_height'$ and returns a labled LAS. If 'crown_base_height' is not specified, it is estimated with [get_crown_base()] using default parameters.
segment_crown(las, crown_base_height = NULL)
las |
'LAS' object from 'lidR' package representing individually segmented tree |
crown_base_height |
numeric - height of crown base for segmentation. 'NULL', it is estimated with [get_crown_base()] using default parameters. |
The input 'LAS' object with a new attribute 'Crown' (1 = crown, 0 = non-crown).
library(lidR)
las = readLAS(system.file("extdata", "tree_0744.laz", package="tReeTraits"))
las = clean_las(las)
las = segment_crown(las)
#Plot with color based on crown
plot(las, color='Crown')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.