The measure between two windows formula_1 and formula_2 of common size "N"×"N" is::formula_3with* formula_4 the average of formula_5;* formula_6 the average of formula_7;* formula_8 the variance of formula_5;* formula_10 the variance of formula_7;* formula_12 the covariance of formula_5 and formula_7;* formula_15, formula_16 two variables to stabilize the division with weak denominator;* formula_17 the dynamic range of the pixel-values (typically this is formula_18);* formula_19 and formula_20 by default.
Разница между двумя окнами formula_1 и formula_2 имеющими одинаковый размер "N"×"N"::formula_3* formula_4 — среднее formula_1,* formula_6 — среднее formula_2,* formula_8 — дисперсия formula_9,* formula_10 — дисперсия formula_2,* formula_12 — ковариация formula_1 и formula_2,* formula_15, formula_16 — две переменных:** formula_17 — динамический диапазон пикселей (обычно formula_18),** formula_19 и formula_20 — константы.