rthinclumps

0th

Percentile

Random Thinning of Clumps

Finds the topologically-connected clumps of a spatial region and randomly deletes some of the clumps.

Keywords
manip, spatial, datagen
Usage
rthinclumps(W, p, …)
Arguments
W

Window (object of class "owin" or pixel image (object of class "im").

p

Probability of retaining each clump. A single number between 0 and 1.

Additional arguments passed to connected.im or connected.owin to determine the connected clumps.

Details

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.

Value

Window (object of class "owin").

See Also

rthin for thinning other kinds of objects.

Aliases
  • rthinclumps
Examples
# NOT RUN {
  A <- (distmap(cells) < 0.06)
  opa <- par(mfrow=c(1,2))
  plot(A)
  plot(rthinclumps(A, 0.5))
  par(opa)
# }
Documentation reproduced from package spatstat, version 1.63-0, License: GPL (>= 2)

Community examples

Looks like there are no examples yet.