powered by
This function computes the structural similarity index (SSIM) proposed by Wang et al. (2004).
SSIM(x, y, alpha = 1, beta = 1, gamma = 1, eps = c(0.01, 0.03), L = 255)
A list containing the following components:
structural similarity index between images x and y.
x
y
weights (alpha, beta, gamma) associated with each component of SSIM
alpha
beta
gamma
SSIM
components of SSIM, that is luminance, contrast and structure
luminance
contrast
structure
sample statistics (means, variances and covariance) for each image.
Running time taken by the procedure.
reference image matrix (grayscale)
distorted image matrix (grayscale)
weight associated with luminance, default value is alpha = 1.
alpha = 1
weight associated with contrast, default value is beta = 1.
beta = 1
weight associated with structure, default value is gamma = 1.
gamma = 1
rescaling constants, by default eps = c(0.01, 0.03)
eps = c(0.01, 0.03)
dynamic range of the images, by default L = 255.
L = 255
Wang, Z., Bovik, A.C. (2002). A universal image quality index. IEEE Signal Processing Letters 9, 81-84.
Wang, Z., Bovik, A.C., Sheikh, H.R., Simoncelli, E.P. (2004). Image quality assessment: From error visibility to structural similarity. IEEE Transactions on Image Processing 13, 600-612.
data(texmos2) y <- imnoise(texmos2, type = "gaussian") plot(as.raster(y)) o <- SSIM(texmos2, y) o y <- imnoise(texmos2, type = "speckle") plot(as.raster(y)) o <- SSIM(texmos2, y) o
Run the code above in your browser using DataLab