if (FALSE) {
library(terra)
library(ForestTools)
chm <- rast(kootenayCHM)
# Set function for determining variable window radius
winFunction <- function(x){x * 0.06 + 0.5}
# Set minimum tree height (treetops below this height will not be detected)
minHgt <- 2
# Detect treetops in demo canopy height model
ttops <- vwf(chm, winFunction, minHgt)
}
Run the code above in your browser using DataLab