catmssim_2d: Multiscale Categorical Structural Similarity Index Measure...

Description Usage Arguments Value Examples

View source: R/catsim.R

Description

The categorical structural similary index measure for 2D categorical or binary images for multiple scales. The default is to compute over 5 scales.

Usage

1
2
catmssim_2d(x, y, weights = c(0.0448, 0.2856, 0.3001, 0.2363, 0.1333),
  window = 11, method = "Cohen", ...)

Arguments

x

a binary or categorical image

y

a binary or categorical image

weights

a vector of weights for the different scales. By default, five different scales are used.

window

window size, by default 11.

method

whether to use Cohen's kappa, Jaccard Index, or Adjusted Rand Index as the similarity index. Note Jaccard should only be used on binary data.

...

additional constants can be passed to internal functions.

Value

a value less than 1 indicating the similarity between the images.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
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)
# now using a different similarity score (Jaccard Index)
catmssim_2d(x,y, method = "Jaccard")
# now using a different similarity score (Adjusted Rand Index)
 catmssim_2d(x,y, method = "Rand")

gzt/catsim documentation built on July 28, 2019, 10:36 p.m.