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.