# NOT RUN {
LASfile = system.file("extdata", "Tree.laz", package="lidR")
las = readLAS(LASfile, Classification = FALSE, Intensity = FALSE, filter = "-drop_z_below 0")
# Basic triangulation and rasterization
chm1 = grid_tincanopy(las, thresholds = 0, max_edge = 0)
# Khosravipour et al. pitfree algorithm
chm2 = grid_tincanopy(las, thresholds = c(0,2,5,10,15), max_edge = c(0, 1.5))
plot(chm1)
plot(chm2)
# }
Run the code above in your browser using DataLab