rsMove (version 0.2.1)

segRaster: segRaster

Description

Connencte-region based raster segmentation.

Usage

segRaster(prob, pt = 0.1, mp = 0.5)

Arguments

prob

Object of class RasterLayer.

pt

Difference threshold. Default is 0.05.

mp

Minimum value. Default is 0.5.

Value

A list object.

Details

The function segments an input layer using a connected component region labeling approach. For each pixel, the function estimates the difference between it and its imediate 8 neighbors. The pixels where the difference is below the defined threshold (ct) are aggregated into a single region. The user can define a minimum pixel value using mp which will limit the range of pixels under evaluation. The result contains a raster with unique values for each segment region region ($segment) as well as a data frame ($stats) with statistics for each region. The data frame report on the minimum (min), maximum (max), mean (mean) and standard deviation (sd) of the pixels contained in each region.

See Also

moveModel modelApply

Examples

Run this code
# NOT RUN {
{
 
 require(raster)
 
 # load example probability image
 file <- system.file('extdata', 'konstanz_probabilities.tif', package="rsMove")
 probImg <- raster(file)
 
 # segment probabilities
 rs <- segRaster(probImg)
 
}
# }

Run the code above in your browser using DataCamp Workspace