Last chance! 50% off unlimited learning
Sale ends in
Perform morphological closing of a window, a line segment pattern or a point pattern.
closing(w, r, …) # S3 method for owin
closing(w, r, …, polygonal=NULL)
# S3 method for ppp
closing(w, r, …, polygonal=TRUE)
# S3 method for psp
closing(w, r, …, polygonal=TRUE)
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 closing.
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
closed region. If r=0
, the result is identical to w
.
The morphological closing (Serra, 1982)
of a set
For a small radius
Serra, J. (1982) Image analysis and mathematical morphology. Academic Press.
opening
for the opposite operation.
# NOT RUN {
v <- closing(letterR, 0.25)
plot(v, main="closing")
plot(letterR, add=TRUE)
plot(closing(cells, 0.1))
points(cells)
# }
Run the code above in your browser using DataLab