Nothing
# Simple case -------------------------------------------------------------
# Load a point cloud of some trees included in the lidR package
point_cloud <- lidR::readLAS(system.file(
"extdata/MixedConifer.laz",
package = "lidR"
))
# Calculate the diameter raster
diameter_raster_1 <- li_diameter_raster(point_cloud)
# Plot
terra::plot(diameter_raster_1)
# Use the raster as input for segment_tree_crowns
segmented_point_cloud <- segment_tree_crowns(
point_cloud,
crown_diameter_to_tree_height = diameter_raster_1,
crown_length_to_tree_height = 0.5)
# Vary some arguments ---------------------------------------------------------
# Adding a crown diameter constant will reduce the raster values
diameter_raster_2 <- li_diameter_raster(
point_cloud,
crown_diameter_constant = 3
)
# Plot
terra::plot(diameter_raster_2)
# Limits will keep the raster values confined
diameter_raster_3 <- li_diameter_raster(
point_cloud,
crown_diameter_constant = 3,
limits = c(0.2,0.4)
)
# Plot
terra::plot(diameter_raster_3)
# Increasing the smoothing radius will create a more homogeneous raster
diameter_raster_4 <- li_diameter_raster(
point_cloud,
crown_diameter_constant = 3,
limits = c(0.2,0.4),
smoothing_radius = 20
)
# Plot
terra::plot(diameter_raster_4)
# Setting the smoothing radius to 0 will show the diameter to height ratio of
# each segmented crown
diameter_raster_5 <- li_diameter_raster(
point_cloud,
smoothing_radius = 0
)
# Plot
terra::plot(diameter_raster_5)
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.