Description Usage Arguments Value Examples
The categorical structural similarity index measure for 2D categorical or binary images for multiple scales. The default is to compute over 5 scales.
1 2 3 4 5 6 7 8 9 10 |
x, y |
a binary or categorical image |
levels |
how many levels of downsampling to use. By default, 5. If
|
weights |
a vector of weights for the different scales. By default,
equal to |
window |
by default 11 for 2D and 5 for 3D images,
but can be specified as a
vector if the window sizes differ by dimension.
The vector must have the same number of
dimensions as the inputted |
method |
whether to use Cohen's kappa ( |
... |
additional constants can be passed to internal functions. |
random |
whether to have deterministic PRNG ( |
a value less than 1 indicating the similarity between the images.
1 2 3 4 5 6 7 8 | set.seed(20181207)
x <- matrix(sample(0:3, 128^2, replace = TRUE), nrow = 128)
y <- x
for (i in 1:128) y[i, i] <- 0
for (i in 1:127) y[i, i + 1] <- 0
catmssim_2d(x, y, method = "Cohen", levels = 2) # the default
# now using a different similarity score (Jaccard Index)
catmssim_2d(x, y, method = "NMI")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.