dilate.owin {spatstat} | R Documentation |
Perform morphological dilation of a window
dilation.owin(w, r, ..., polygonal=TRUE, tight=TRUE) dilate.owin(w, r, ..., polygonal=TRUE, tight=TRUE)
w |
A window (object of class "owin" . |
r |
positive number: the radius of dilation. |
... |
extra arguments to as.mask
controlling the pixel resolution, if the pixel approximation is
used.
|
polygonal |
Logical flag indicating whether to compute a polygonal
approximation to the erosion (polygonal=TRUE ) or
a pixel grid approximation (polygonal=FALSE ).
|
tight |
Logical flag indicating whether the bounding frame of the window
should be taken as the smallest rectangle enclosing the dilated region
(tight=TRUE ), or should be the
dilation of the bounding frame of w (tight=FALSE ).
|
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.
The functions dilate.owin
and dilation.owin
are
identical, and compute the dilation of the window w
.
If polygonal=TRUE
and w
is a rectangle or a polygonal
window, then a polygonal approximation to the dilation is computed.
Otherwise, the window w
is first approximated by a binary pixel image,
and the arguments "..."
are passed to as.mask
to determine the pixel resolution. There is a sensible default.
Another object of class "owin"
representing the
dilated window.
Adrian Baddeley adrian@maths.uwa.edu.au http://www.maths.uwa.edu.au/~adrian/ and Rolf Turner r.turner@auckland.ac.nz
erode.owin
for the opposite operation.
w <- owin(c(0,1),c(0,1)) v <- dilate.owin(w, 0.1)