Learn R Programming

rsMove (version 0.2.4)

segRaster: segRaster

Description

Connected-region based raster segmentation that preserves spatial gradients.

Usage

segRaster(x, break.point = 0.1, min.value = 0.5)

Arguments

x

Object of class RasterLayer.

break.point

Difference threshold. Default is 0.05.

min.value

Minimum value. Default is 0.5.

Value

A list object.

Details

The function segments an input raster layer (x) using a connected component region labeling approach. For each pixel, the function estimates the difference between it and its immediate neighbors. If the difference is below the threshold defined by break.point these are aggregated into a single region. Moreover, the user can define a minimum pixel value using min.value which will ignore all pixels below that value. The output of this function consists of:

  • regions - Region raster image.

  • stats - Basic statistics for each pixel region.

See Also

predictResources

Examples

Run this code
# 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