Local maxima extraction on image
maxima_detection.RdVariable 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.
Arguments
- dem
cimg object (e.g. as created by
cimg) or SpatRaster object (e.g. obtained withrast)- dem.res
numeric. image resolution, in case
demis a SpatRaster object,dem.resis extracted from the object byres- max.width
numeric. maximum kernel width to check for local maximum, in pixels if
demis a cimg, in SpatRaster units otherwise- jitter
boolean. indicates if noise should be added to image values to avoid adjacent maxima due to the adjacent pixels with equal values
Value
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)

