You are here: Start » AVL.NET » Function Reference » Image » Image Combinators » AVL.DifferenceImage_Shifted

AVL.DifferenceImage_Shifted

Computes the non-negative distances between corresponding pixel values.

Namespace:AvlNet
Assembly:AVL.NET.dll

Syntax

C++
C#
 
public static void DifferenceImage_Shifted
(
	AvlNet.Image inImage1,
	AvlNet.Image inImage2,
	AvlNet.Box inBox1,
	AvlNet.Box inBox2,
	AvlNet.Image outImage
)

Parameters

Name Type Range Default Description
inImage1AvlNet.ImageFirst input image.
inImage2AvlNet.ImageSecond input image.
inBox1AvlNet.Box
inBox2AvlNet.Box
outImageAvlNet.ImageOutput image.

Description

The operation computes the absolute difference between image pixels inside the input boxes. Each outImage pixel is equal to the absolute value of difference between corresponding pixels of the input images:

\[\forall_{i,j} \text{OutImage}_{i,j} = |\text{InImage1}_{i + box1.x,j + box1.y} - \text{InImage2}_{i + box2.x,j + box2.y}|\]

In multichannel (color) images each pixel channel is processed separately.

The operation requires that the images being processed have equal format and the input boxes have equal dimensions, otherwise an error with appropriate description occurs. To alter the pixel type of an image one can use ConvertPixelType filter. ConvertToMultichannel and AverageChannels filters allow to alter the number of image channels.

Examples

DifferenceImage_Shifted performed on the sample images.

Hardware Acceleration

This operation is optimized for SSE2 technology for pixels of types: UINT8, SINT8, UINT16, SINT16, REAL.

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

This operation supports automatic parallelization for multicore and multiprocessor systems.

Hardware acceleration settings may be manipulated with Settings class.

Errors

List of possible exceptions:

Error type Description
DomainError Image formats are not the same in DifferenceImage_Shifted.
DomainError Input boxes are not completely inside the input images in DifferenceImage_Shifted.
DomainError Not equal box dimensions in DifferenceImage_Shifted.

See also