data(chm_chablais3)
chm_chablais3 <- terra::rast(chm_chablais3)
# maxima detection
maxi <- maxima_detection(chm_chablais3)
# plot original image
terra::plot(chm_chablais3, main = "Initial image")
# plot maxima image
terra::plot(maxi, main = "Local maxima")
Run the code above in your browser using DataLab