dilation {spatstat} | R Documentation |
Perform morphological dilation of a window, a line segment pattern or a point pattern
dilation(w, r, ...) ## S3 method for class 'owin' dilation(w, r, ..., polygonal=NULL, tight=TRUE) ## S3 method for class 'ppp' dilation(w, r, ..., polygonal=TRUE, tight=TRUE) ## S3 method for class 'psp' dilation(w, r, ..., polygonal=TRUE, tight=TRUE)
w |
A window (object of class |
r |
positive number: the radius of dilation. |
... |
extra arguments passed to |
polygonal |
Logical flag indicating whether to compute a polygonal
approximation to the erosion ( |
tight |
Logical flag indicating whether the bounding frame of the window
should be taken as the smallest rectangle enclosing the dilated region
( |
The morphological dilation of a set W by a distance r > 0 is the set consisting of all points lying at most r units away from W. Effectively, dilation adds a margin of width r onto the set W.
If polygonal=TRUE
then a polygonal approximation
to the dilation is computed.
If polygonal=FALSE
then a pixel approximation
to the dilation is computed from the distance map of w
.
The arguments "\dots"
are passed to as.mask
to control the pixel resolution.
When w
is a window, the default (when polygonal=NULL
)
is to compute a polygonal approximation if
w
is a rectangle or polygonal window, and to compute a
pixel approximation if w
is a window of type "mask"
.
If r > 0
, an object of class "owin"
representing the
dilated region. If r=0
, the result is identical to w
.
Adrian Baddeley Adrian.Baddeley@csiro.au http://www.maths.uwa.edu.au/~adrian/ and Rolf Turner r.turner@auckland.ac.nz
erosion
for the opposite operation.
w <- owin(c(0,1),c(0,1)) v <- dilation(w, 0.1)