
Last chance! 50% off unlimited learning
Sale ends in
border(w, r, outside=FALSE, ...)
"owin"
)
or something acceptable to as.owin
.w
."owin"
).outside=FALSE
),
the border region is the subset of w
lying within a distance r
of the boundary of w
.
It is computed by eroding w
by the distance r
(using
erosion
) and
subtracting this eroded window from the original window w
. If outside=TRUE
, the border region is the set of locations
outside w
lying within a distance r
of w
.
It is computed by dilating w
by the distance r
(using dilation
) and
subtracting the original window w
from the dilated window.
erosion
,
dilation
# rectangle
u <- unit.square()
border(u, 0.1)
border(u, 0.1, outside=TRUE)
# polygon
data(letterR)
plot(letterR)
plot(border(letterR, 0.1), add=TRUE)
plot(border(letterR, 0.1, outside=TRUE), add=TRUE)
Run the code above in your browser using DataLab