if (FALSE) {
library(terra)
library(ForestTools)
chm <- rast(kootenayCHM)
image <- rast(kootenayOrtho)[[1]]
# Generate raster segments
segs <- mcws(kootenayTrees, chm, minHeight = 0.2, format = "raster")
# Get textural metrics for ortho's red band
tex <- glcm(image, segs)
}
Run the code above in your browser using DataLab