The TREETOPS package provides functions utilizing a growing tree region (GTR) treetop identification algorithm using low point density LiDAR data derived Canopy Height Model (CHM).The package is meant to be used within the framework of the lidR package and intends to be coupled with CHM-based tree segmentation methods.
A new method for individual treetop detection with low-resolution aerial laser scanned data
https://doi.org/10.1007/s40808-024-02060-w
tidyverse, terra, sf, data.table, crayon
devtools::install_github("DijoG/TREETOPS")
Demonstration of how to use TREETOPS.
TREETOPS::check_PACKS()
# Either:
> No need, packages already installed.
# or:
> All packages installed.
require(lidR)
# Forest point cloud (low resolution example data)
LASfile <- system.file("extdata", "MixedConifer.laz", package = "lidR")
Alas <- readLAS(LAS, filter = "-drop_z_below 0")
# Black, white and green color palette for visualizing CHM
bgcol <- function(x)
{
col = grDevices::colorRampPalette(c("grey1", "white", "forestgreen"))
return(col(x))
}
CHM <- rasterize_canopy(Alas, 0.5, pitfree(subcircle = 0.25))
treetops <- TREETOPS::get_TREETOPS(CHM, min_H = 5)
plot(CHM, main = "CHM 0.5 pitfree ~ treetops", col = bgcol(50), axes = F)
plot(sf::st_geometry(treetops), add = T, pch = 1, col = "firebrick3")
?TREETOPS::finalize_TREETOPS
fin_treetops <- TREETOPS::finalize_TREETOPS(treetops, distance = 5, min_H = 5)
plot(CHM, main = "CHM 0.5 pitfree ~ filtered treetops", col = bgcol(50), axes = F)
plot(sf::st_geometry(fin_treetops), add = T, pch = 16, col = "firebrick3")