The argument W
specifies a region of space, typically
consisting of several clumps that are not connected to each other.
The algorithm randomly deletes or retains each clump. The fate of
each clump is independent of other clumps.
If W
is a spatial window (class "owin"
) then
it will be divided into clumps using
connected.owin
. Each clump will either be
retained (with probability p
) or deleted in its entirety
(with probability 1-p
).
If W
is a pixel image (class "im"
) then its domain
will be divided into clumps using connected.im
. The default
behaviour depends on the type of pixel values. If the pixel values are
logical, then the spatial region will be taken to consist of all
pixels whose value is TRUE
. Otherwise, the spatial region is
taken to consist of all pixels whose value is defined (i.e. not equal
to NA
). This behaviour can be changed using the argument
background
passed to connected.im
.
The result is a window comprising all the clumps that were retained.