Calculate the connectivity index of an image.
Cindex(x, thresh = NULL, connect.method = "C", ...)# S3 method for default
Cindex(x, thresh = NULL, connect.method = "C", ...)
# S3 method for SpatialVx
Cindex(x, thresh = NULL, connect.method = "C", ...,
time.point = 1, obs = 1, model = 1)
numeric giving the connectivity index.
Default: m by n numeric matrix giving the field for which the connectivity index is to be calculated.
Sindex.SpatialVx
: list object of class “SpatialVx”.
Set values under (strictly less than) this threshold to zero, and calculate the connectivity index for the resulting image. If NULL, no threshold is applied.
character string giving the method
argument for the connected
function of package spatstat. This must be one of “C” or “interpreted”. See the help file for connected
for more details.
numeric or character indicating which time point from the “SpatialVx” verification set to select for analysis.
numeric indicating which observation/forecast model to select for the analysis.
Not used.
Eric Gilleland
The connectivity index is introduced in AghaKouchak et al. (2011), and is designed to automatically determine how connected an image is. It is defined by
Cindex = 1 - (NC - 1)/(sqrt(NP) + NC),
where 0 <= Cindex <= 1 is the connectivity index (values close to zero are less connected, and values close to 1 are more connected), NP is the number of nonzero pixels, and NC is the number of isolated clusters.
The function connected
from package spatstat is used to identify the number of isolated clusters.
AghaKouchak, A., Nasrollahi, N., Li, J., Imam, B. and Sorooshian, S. (2011) Geometrical characterization of precipitation patterns. J. Hydrometerology, 12, 274--285, doi:10.1175/2010JHM1298.1.
connected
, as.im
, Sindex
, Aindex
# Re-create Fig. 7a from AghaKouchak et al. (2011).
tmp <- matrix(0, 8, 8)
tmp[3,2:4] <- 1
tmp[5,4:6] <- 1
tmp[7,6:7] <- 1
Cindex(tmp)
Run the code above in your browser using DataLab