closing(w, r, ...)
## S3 method for class 'owin':
closing(w, r, \dots, polygonal=NULL)
## S3 method for class 'ppp':
closing(w, r, \dots, polygonal=TRUE)
## S3 method for class 'psp':
closing(w, r, \dots, polygonal=TRUE)
"owin"
or a line segment pattern (object of class "psp"
)
or a point pattern (object of class "ppp"
).as.mask
controlling the pixel resolution, if a pixel approximation is usedpolygonal=TRUE
) or
a pixel grid approximation (polygonal=FALSE
).r > 0
, an object of class "owin"
representing the
closed region. If r=0
, the result is identical to w
.For a small radius $r$, the closing operation has the effect of smoothing out irregularities in the boundary of $W$. For larger radii, the closing operation smooths out concave features in the boundary. For very large radii, the closed set $W*$ becomes more and more convex.
opening
for the opposite operation. dilation
, erosion
for the basic
operations.
owin
,
as.owin
for information about windows.
data(letterR)
v <- closing(letterR, 0.25, dimyx=256)
plot(v, main="closing")
plot(letterR, add=TRUE)
Run the code above in your browser using DataLab