
Last chance! 50% off unlimited learning
Sale ends in
Connected-region based raster segmentation that preserves spatial gradients.
segRaster(x, break.point = 0.1, min.value = 0.5)
Object of class RasterLayer.
Difference threshold. Default is 0.05.
Minimum value. Default is 0.5.
A list object.
The function segments x using a connected component region labeling approach. For each pixel, the function estimates the difference between it and its immediate neighbors. The pixels where the difference is below break.point are aggregated into a single region. Moreover, the user can define a minimum pixel value using min.value which will ignore all pixels below it. The output of this function consists of:
regions - Region raster image.
stats - Basic statistics for each pixel region.
# NOT RUN {
require(raster)
# load example probability image
file <- system.file('extdata', 'probabilities.tif', package="rsMove")
r <- raster(file)
# segment probabilities
rs <- segRaster(r)
# }
Run the code above in your browser using DataLab