ImageDifference


Measures dissimilarity between two images.

Syntax

C++
C#
Python
 
def ImageDifference(
	inImage: Image,
	inPatternImage: Image,
	/,
	*,
	inRoi: Region | None = None,
	inDistanceMeasure: DistanceMeasure = DistanceMeasure.MeanError
)
-> outDifference: float

Parameters

Name Type Default Description
Input value inImage Image Input image
Input value inPatternImage Image Pattern to be compared with input image
Input value inRoi Region | None None Range of pixels to be processed
Input value inDistanceMeasure DistanceMeasure DistanceMeasure.MeanError Measure of distance
Output value outDifference float Value of difference between pattern and image

Hardware Acceleration

This operation is optimized for SSE2 technology for pixels of types: UINT8 (for inDistanceMeasure = MeanError).

This operation is optimized for SSE3 technology for pixels of types: UINT16 (for inDistanceMeasure = MeanError), UINT8 (for inDistanceMeasure = MeanSquaredError), REAL.

This operation is optimized for SSE4 technology for pixels of types: INT16, UINT16 (for inDistanceMeasure = MeanSquaredError).

This operation is optimized for AVX2 technology for pixels of types: UINT8, INT16, UINT16, REAL.

This operation is optimized for NEON technology for pixels of types: UINT8, UINT16 (for inDistanceMeasure = MeanError), INT16 (for inDistanceMeasure = MeanError), REAL.

This operation supports automatic parallelization for multicore and multiprocessor systems.