binssim {catsim} | R Documentation |
This computes the categorical or binary structural similarity index metric on a whole-image scale. The difference between this and the default 2-D method is that this considers the whole image at once and one scale rather than computing the index over a sliding window and downsampling to consider it at other scales.
binssim(
x,
y,
alpha = 1,
beta = 1,
gamma = 1,
c1 = 0.01,
c2 = 0.01,
method = "Cohen",
...
)
x , y |
binary or categorical image |
alpha |
normalizing parameter, by default 1 |
beta |
normalizing parameter, by default 1 |
gamma |
normalizing parameter, by default 1 |
c1 |
small normalization constant for the |
c2 |
small normalization constant for the |
method |
whether to use Cohen's kappa ( |
... |
Constants can be passed to the components of the index. |
Structural similarity index.
set.seed(20181207)
x <- matrix(sample(1:4, 10000, replace = TRUE), nrow = 100)
y <- x
for (i in 1:100) y[i, i] <- 1
for (i in 1:99) y[i, i + 1] <- 1
binssim(x, y)