ssim: Structural similarity index

Description Usage Arguments Details Value See Also

Description

This function implements the structural similarity index of Wang et al. (2003) formulated for comparison of raster spatial objects.

Usage

1
ssim(img1, img2, w, gFIL = TRUE, edge = FALSE, ks = c(0.01, 0.03))

Arguments

img1

is a raster object to compare

img2

is a raster object to compare

w

is the width of the neighbourhood in number of pixels out from centre cell

gFIL

is a binary flag for whether a Gaussian filter should be applied as a smoothing function

edge

is a binary flag for whether a torroidal edge correction should be applied

ks

is a vector of length 2 which contains values for constants in the SSIM formula. If ignored default values will be used.

Details

The ssim function can be used to generate the three component indices of the SSIM index as well as the composite index. Two raster objects are the key arguments which will be used to compare. These two raster objects must have the same CRS, extent, and cell size.

Value

ssim returns a list with 5 objects. The first is the value of the global ssim statistic. Objects 2-5 are all raster objects that contain the composite index, luminance, contrast, and structure components respectively.

See Also

spatialcompare


gzt/rmsssim documentation built on May 15, 2019, 12:59 p.m.