ssim: Calculate SSIM from two rasters

Description Usage Arguments Value

View source: R/ssim.R

Description

adopted from package 'spatialcompare'

Usage

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

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

gauss_filter

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.

global_values

a binary flag whether overall index values should be returned or else raster stack with cell-by-cell values

Value

A list of length 4 or a raster stack with 4 bands. List objects / layer contain the composite index, luminance, contrast, and structure components respectively.


juoe/spatialtoolbox documentation built on May 7, 2019, 9:37 a.m.