Morphology: Erosion or Dilatation of Features on a Raster Map
Morphology: Erosion or Dilatation of Features on a Raster Map
morphology performs morphological operations on images of class SpatialPixelsDataFrame.
morphology(x, operation = c("erode","dilate"), nt =5)
Arguments
x: a matrix of class SpatialPixelsDataFrame with one column
operation: a character string indicating the operation to be processed: either "erode" or "dilate"
nt: the number of times that the operation should be processed
Returns
Returns an object of class SpatialPixelsDataFrame with one column, containing 1 when the pixel belong to one feature of the image and NA otherwise (see examples).