ssim_constant {SSIMmap}R Documentation

Constants for the SSIM Index for polygon maps.

Description

This function calculates rescaled constants (k1 and k2) for the SSIM index based on the global maximum value of the maps.

Usage

ssim_constant(shape, map1, map2, standardize = TRUE)

Arguments

shape

a sf polygon containing the attributes that can create polygon-based maps.

map1

The name of the first map to compare as a column in the shape.

map2

The name of the second map to compare as a column in the shape.

standardize

If TRUE, standardize the variables before computing the SSIM. Default is TRUE.

Details

This function calculates the rescaled constants (k1 and k2) for the SSIM index. k1 and k2 in the original SSIM method, which are for the 8-bit grey scale images, are 0.01 and 0.03 respectively. The SSIM for maps can use the rescaled k1 and k2 based on the global maximum value of two maps.

Value

The rescaled constants (k1 and k2).

Examples

# Load example sf class Toronto Area with attributes for maps:
# Toronto Areas with attributes for maps:Pampalon Index,CIMD Index,
# and percentage of household commuting within the same Census Sub-Division of residence.
data("Toronto")
ssim_constant(Toronto,"PP_SDD","CIMD_SDD")


[Package SSIMmap version 0.1.1 Index]