
Last chance! 50% off unlimited learning
Sale ends in
erode.owin(w, r, shrink.frame=TRUE, ...)
"owin"
.TRUE
, erode the bounding
rectangle as well.as.mask
controlling the pixel resolution"owin"
representing the
eroded window. This function computes the erosion of the window w
.
If w
is not
a rectangle, it must be approximated by a binary pixel image,
and the arguments "..."
are passed to as.mask
to determine the pixel resolution. There is a sensible default.
If shrink.frame
is false, the resulting window is given the
same outer, bounding rectangle as the original window w
.
If shrink.frame
is true, the original bounding rectangle
is also eroded by the same distance r
.
To simply compute the area of the eroded window,
use eroded.areas
.
owin
,
as.owin
,
eroded.areas
library(spatstat)
w <- owin(c(0,1),c(0,1))
v <- erode.owin(w, 0.1)
# returns rectangle [0.1, 0.9] x [0.1,0.9]
v <- erode.owin(w, 0.6)
#fails - erosion is empty
Run the code above in your browser using DataLab