This function computes the plug-in moment covariance estimate of a stationary RACS from a binary map. For a stationary RACS, \(\Xi\), the covariance for a vector \(v\) is the probability of two points separated by a vector \(v\) are covered by \(\Xi\) $$C(v) = P(\{x,x+v\}\subseteq \Xi).$$
plugincvc(xi, obswin = NULL, setcov_boundarythresh = NULL)
A SpatStat
im
object containing the estimated covariance.
An observation of a RACS of interest as a full binary map (as an im
object) or as the foreground set (as an owin
object).
In the latter case the observation window, obswin
, must be supplied.
If xi
is an owin
object then obswin
is an
owin
object that specifies the observation window.
To avoid instabilities caused by dividing by very small quantities, if the set covariance of the observation window
is smaller than setcov_boundarythresh
, then the covariance is given a value of NA.
Kassel Liam Hingee
The plug-in moment covariance estimator is (Serra, 1982)
$$ \hat{C}(v) = \frac{\gamma_{W\cap X}(v)}{\gamma_W(v)}$$
where \(\gamma_{W}(v)\) is the set covariance of the observation window \(W\)
and \(\gamma_{W\cap X}(v)\) is the set covariance of the foreground within \(W\).
plugincvc
uses Fourier transforms to calculate the set covariance (using the setcov
of the foreground and observation window.
Vectors with small \(\gamma_W(v)\) are eliminated using setcov_boundarythresh
as division by small values is numerically unstable.
Serra, J.P. (1982) Image Analysis and Mathematical Morphology. London; New York: Academic Press.
xi <- as.im(heather$coarse, na.replace = 0)
covar <- plugincvc(xi)
Run the code above in your browser using DataLab