Last chance! 50% off unlimited learning
Sale ends in
Individual tree segmentation with several possible algorithms. The returned point cloud has a new
extra byte attribute named after the parameter attribute
independently of the algorithm used.
lastrees(las, algorithm, attribute = "treeID")
An object of class LAS.
function. An algorithm of individual tree segmentation. lidR
has:
dalponte2016, watershed, mcwatershed, li2012 and silva2016.
More experimental algorithms may be found in the package lidRplugins
character. The returned LAS object as a new extra byte attribute (in a new column).
This parameter controls the name of the new attribute. Default is "treeID"
.
An object of the class LAS
# NOT RUN {
LASfile <- system.file("extdata", "MixedConifer.laz", package="lidR")
las <- readLAS(LASfile, select = "xyz", filter = "-drop_z_below 0")
col <- pastel.colors(200)
# Using Li et al. (2012)
las <- lastrees(las, li2012(R = 3, speed_up = 5))
plot(las, color = "treeID", colorPalette = col)
# }
Run the code above in your browser using DataLab