distmap {spatstat} | R Documentation |
Compute the distance map of an object. Generic.
distmap(X, ...)
X |
Any suitable dataset representing a two-dimensional
object, such as a point pattern (object of class "ppp" ),
or a window (object of class "owin" ).
|
... |
Arguments passed to as.mask
to control pixel resolution.
|
The ``distance map'' of a set of points A is the function
f whose value f(x)
is defined for any two-dimensional
location x as the shortest distance from x to A.
This function computes the distance map of the set X
and returns the distance map as a pixel image.
This is generic. Methods are provided for
point patterns (distmap.ppp
)
and windows (distmap.owin
).
A pixel image (object of class "im"
) whose grey scale values
are the values of the distance map.
Adrian Baddeley adrian@maths.uwa.edu.au http://www.maths.uwa.edu.au/~adrian/ and Rolf Turner rolf@math.unb.ca http://www.math.unb.ca/~rolf
data(cells) U <- distmap(cells) data(letterR) V <- distmap(letterR) ## Not run: plot(U) plot(V) ## End(Not run)