Mean-Shift is a region-based segmentation algorithm that groups pixels with
similar characteristics. It's a non-parametric clustering technique that groups
pixels based on spatial proximity and feature similarity (color, intensity). This
method is particularly effective for preserving edges and defailt while simplifying
textures in high-resolution images. Steps:
Initialization: Each pixel is treated as a point in a multi-dimensional space
(combining spatial and color features).
Mean Shift Iterations: For each pixel, a search window moves toward the region
with the highest data density (local maxima) by calculating the mean of neighboring
pixels within the window.
Convergence: The process repeats until the movement of the window becomes
negligible, indicating convergence.
Label Assignment: Pixels that converge to the same mode (local maxima) are
grouped into the same region.
The most important parameters are:
spatialr: defines the size of the neighborhood
ranger: determines similarity in the feature space
maxiter: limits the number of iterations for convergence
thresh: defines the convergence criterion based on pixel movement
The processing mode 'vector' will output a vector file, and process the input
image piecewise. This allows performing segmentation of very large images. IN
contrast, 'raster' mode will output a labeled raster, and it cannot handle
large data. If mode is 'raster', all the 'vector_*' arguments are ignored.