opening.owin(w, r, ..., polygonal=TRUE)
"owin"
.as.mask
controlling the pixel resolution, if a pixel approximation is usedpolygonal=TRUE
) or
a pixel grid approximation (polygonal=FALSE
)."owin"
representing the
opened window.W
.For a small radius $r$, the opening operation has the effect of smoothing out irregularities in the boundary of $W$. For larger radii, the opening operation removes promontories in the boundary. For very large radii, the opened set is empty.
This function computes the opening of the window w
as a binary pixel mask. If w
is not already a mask, it is first
converted to a mask by as.mask
. The arguments
"..."
determine the pixel resolution. There is a sensible
default.
The algorithm simply applies erode.owin
followed by
dilate.owin
.
closing.owin
for the opposite operation. dilate.owin
, erode.owin
for the basic
operations.
owin
,
as.owin
for information about windows.
data(letterR)
v <- opening.owin(letterR, 0.3, dimyx=256)
plot(v, main="opening.owin")
plot(letterR, add=TRUE)
Run the code above in your browser using DataCamp Workspace