Compute the distance map of an object, and return it as a pixel image. Generic.
distmap(X, ...)
A pixel image (object of class "im"
) whose grey scale values
are the values of the distance map.
Any suitable dataset representing a two-dimensional
object, such as a point pattern (object of class "ppp"
),
a window (object of class "owin"
) or a
line segment pattern (object of class "psp"
).
Arguments passed to as.mask
to control pixel resolution.
Adrian Baddeley Adrian.Baddeley@curtin.edu.au and Rolf Turner r.turner@auckland.ac.nz
The “distance map” of a set of points f(x)
is defined for any two-dimensional
location
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
),
line segment patterns (distmap.psp
)
and windows (distmap.owin
).
distmap.ppp
,
distmap.psp
,
distmap.owin
,
distfun
U <- distmap(cells)
V <- distmap(letterR)
if(interactive()) {
plot(U)
plot(V)
}
Run the code above in your browser using DataLab