Last chance! 50% off unlimited learning
Sale ends in
Perform morphological opening of a window, a line segment pattern or a point pattern.
opening(w, r, …) # S3 method for owin
opening(w, r, …, polygonal=NULL)
# S3 method for ppp
opening(w, r, …)
# S3 method for psp
opening(w, r, …)
A window (object of class "owin"
or a line segment pattern (object of class "psp"
)
or a point pattern (object of class "ppp"
).
positive number: the radius of the opening.
extra arguments passed to as.mask
controlling the pixel resolution, if a pixel approximation is used
Logical flag indicating whether to compute a polygonal
approximation to the erosion (polygonal=TRUE
) or
a pixel grid approximation (polygonal=FALSE
).
If r > 0
, an object of class "owin"
representing the
opened region. If r=0
, the result is identical to w
.
The morphological opening (Serra, 1982)
of a set W
.
For a small radius
Serra, J. (1982) Image analysis and mathematical morphology. Academic Press.
closing
for the opposite operation.
# NOT RUN {
v <- opening(letterR, 0.3)
plot(letterR, type="n", main="opening")
plot(v, add=TRUE, col="grey")
plot(letterR, add=TRUE)
# }
Run the code above in your browser using DataLab