Image.zsad#

Image.zsad(image2: Any) float[source]#

Zero-mean sum of absolute differences

Parameters:

image2 (Image) – second image

Raises:

ValueError – image2 shape is not equal to self

Returns:

sum of absolute differences

Return type:

scalar

Returns a simple image disimilarity measure which is the zero-mean sum of absolute differences between the image and image2. The result is a scalar and a value of 0 indicates identical pixel patterns (relative to their mean values) and is increasingly positive as image dissimilarity increases.

Example:

>>> from machinevisiontoolbox import Image
>>> img1 = Image([[10, 11], [12, 13]])
>>> img2 = Image([[10, 11], [10, 13]])
>>> img1.zsad(img2)
np.float64(3.0)
>>> img1.zsad(img2+10)
np.float64(3.0)
>>> img1.zsad(img2*2)
np.float64(6.0)

Note

  • The zsad similarity measure is invariant to changes in image brightness offset.

References:
Seealso:

zsad ssd ncc