View source: R/ssim_constant.R
ssim_constant | R Documentation |
This function calculates rescaled constants (k1 and k2) for the SSIM index based on the global maximum value of the maps.
ssim_constant(shape, map1, map2, standardize = TRUE)
shape |
a |
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. |
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.
The rescaled constants (k1 and k2).
# 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")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.