# NOT RUN {
LASfile <- system.file("extdata", "MixedConifer.laz", package="lidR")
poi = "-drop_z_below 0 -inside 481280 3812940 481320 3812980"
las = readLAS(LASfile, select = "xyz0", filter = poi)
# NOTE: This dataset is already segmented
#plot(las, color = "treeID", colorPalette = pastel.colors(200))
# Only the hulls
convex_hulls = delineate_crowns(las)
plot(convex_hulls)
# The hulls + some user-defined metrics
convex_hulls = delineate_crowns(las, func = ~list(Zmean = mean(Z)))
convex_hulls
# The bounding box
bbox_hulls = delineate_crowns(las, "bbox")
plot(bbox_hulls)
# With concave hull
concave_hulls = delineate_crowns(las, "concave")
plot(concave_hulls)
spplot(convex_hulls, "ZTOP")
spplot(convex_hulls, "Zmean")
# }
Run the code above in your browser using DataLab