You are here: Start » FIL.NET » Function Reference » Image » Image Combinators » FIL.DifferenceImage_Shifted
Computes the non-negative distances between corresponding pixel values.
Namespace: | FilNet |
---|---|
Assembly: | FIL.NET.dll |
Syntax
public static void DifferenceImage_Shifted ( FilNet.Image inImage1, FilNet.Image inImage2, FilNet.Box inBox1, FilNet.Box inBox2, FilNet.Image outImage )
Parameters
Name | Type | Range | Default | Description | |
---|---|---|---|---|---|
![]() | inImage1 | FilNet.Image | First input image. | ||
![]() | inImage2 | FilNet.Image | Second input image. | ||
![]() | inBox1 | FilNet.Box | |||
![]() | inBox2 | FilNet.Box | |||
![]() | outImage | FilNet.Image | Output 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 is optimized for NEON technology for pixels of types: UINT8, SINT8, UINT16, SINT16, SINT32, 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. |