rSkeletonise: Determine the skeleton of foreground patches in a raster

Description Usage Arguments Details Value See Also Examples

View source: R/modify.operators.R

Description

The morphological skeleton of a patch is a binary skeletal remnant that preserves the extent and connectivity (i.e. the topology) of the patch.

Usage

1
2
rSkeletonise(obj, method = "hitormiss", kernel = NULL,
  background = NULL)

Arguments

obj

[RasterLayer(1)]
The object to modify.

method

[character(1)]
the method to determine the skeleton. Either "hitormiss" (default), "lantuejoul" or "beucher".

kernel

[matrix(1)]
scan the raster with this kernel (default is a 3 by 3 cells diamond kernel).

background

[integerish(1)]
the value any cell with value NA should have.

Details

For details, refer to skeletonise of which rSkeletonise is a wrapper.

Value

a RasterLayer of the same dimensions as obj, in which foreground patches have been transformed into their morphological skeletons.

See Also

rDistance

Other operators to determine objects: rCentroid, rPatches

Examples

1
2
3
4
input <- rtRasters$continuous
binarised <- rBinarise(input, thresh = 30)

visualise(raster::stack(binarised, rSkeletonise(binarised)))

EhrmannS/rasterTools documentation built on Sept. 4, 2019, 10:34 a.m.