View source: R/tree_detection.R
maxima_detection | R Documentation |
Variable window size maxima detection is performed on the image to extract local maxima position and calculate the window size where they are global maxima. Gaussian white noise is added to the image to avoid adjacent maxima due to neighbor pixels with identical value.
maxima_detection(dem, dem.res = 1, max.width = 11, jitter = TRUE)
dem |
cimg object (e.g. as created by |
dem.res |
numeric. image resolution, in case |
max.width |
numeric. maximum kernel width to check for local maximum, in
pixels if |
jitter |
boolean. indicates if noise should be added to image values to avoid adjacent maxima due to the adjacent pixels with equal values |
A cimg object / SpatRaster object which values correspond to the radius
(n) in pixels / meters of the square window (width 2n+1) where the center pixel is global
maximum (tested up to the max.width
parameter)
dem_filtering
, maxima_selection
,
tree_segmentation
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")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.