Processing math: 100%
ImageDev

Arithmetical Operations

This group contains pointwise arithmetical operators.
The Arithmetical Operations group contains operations like sum, difference, blending, minimum or maximum between two images or between an image and a constant.

Rules for Arithmetic Image Type

There are four rules governing output image types for arithmetic operations. The aim is to provide the smallest type without loss of precision.
In the following tables:

Operand interpretation

In the case of ArithmeticOperationWithValue, the type of the output image is deduced from the type of the input image and the smallest type able to contain the operand without loss of precision.

Basic Rule


This rule is used for addition, subtraction and division operations.
Some operators with a single input also use this rule by taking the same type for both row and column header. For instance, GradientOperator2d and GradientOperator3d also follow this rule.

BasicRuleDOUBLEFLOATUINT32INT32UINT16INT16UINT8INT8DOUBLEDOUBLEDOUBLEDOUBLEDOUBLEDOUBLEDOUBLEDOUBLEDOUBLEFLOATDOUBLEFLOATFLOATFLOATFLOATFLOATFLOATFLOATUINT32DOUBLEFLOATINT32INT32INT32INT32INT32INT32INT32DOUBLEFLOATINT32INT32INT32INT32INT32INT32UINT16DOUBLEFLOATINT32INT32INT32INT32INT32INT32INT16DOUBLEFLOATINT32INT32INT32INT16INT16INT16UINT8DOUBLEFLOATINT32INT32INT32INT16INT16INT16INT8DOUBLEFLOATINT32INT32INT32INT16INT16INT16

Promotion Rule


This rule is used for multiplication operation.

PromotionRuleDOUBLEFLOATUINT32INT32UINT16INT16UINT8INT8DOUBLEDOUBLEDOUBLEDOUBLEDOUBLEDOUBLEDOUBLEDOUBLEDOUBLEFLOATDOUBLEFLOATFLOATFLOATFLOATFLOATFLOATFLOATUINT32DOUBLEFLOATUINT32INT32UINT32INT32UINT32INT32INT32DOUBLEFLOATINT32INT32INT32INT32INT32INT32UINT16DOUBLEFLOATUINT32INT32UINT32INT32UINT32INT32INT16DOUBLEFLOATINT32INT32INT32INT16INT16INT16UINT8DOUBLEFLOATUINT32INT32UINT32INT16UINT16INT16INT8DOUBLEFLOATINT32INT32INT32INT16INT16INT16

Rule for minimum operation


MinimumRuleDOUBLEFLOATUINT32INT32UINT16INT16UINT8INT8DOUBLEDOUBLEDOUBLEDOUBLEDOUBLEDOUBLEDOUBLEDOUBLEDOUBLEFLOATDOUBLEFLOATFLOATFLOATFLOATFLOATFLOATFLOATUINT32DOUBLEFLOATUINT32INT32UINT16INT16UINT8INT8INT32DOUBLEFLOATINT32INT32INT32INT32INT32INT32UINT16DOUBLEFLOATUINT16INT32UINT16INT16UINT8INT8INT16DOUBLEFLOATINT16INT32INT16INT16INT16INT16UINT8DOUBLEFLOATUINT8INT32UINT8INT16UINT8INT8INT8DOUBLEFLOATINT8INT32INT8INT16INT8INT8

Rule for maximum operation


MaximumRuleDOUBLEFLOATUINT32INT32UINT16INT16UINT8INT8DOUBLEDOUBLEDOUBLEDOUBLEDOUBLEDOUBLEDOUBLEDOUBLEDOUBLEFLOATDOUBLEFLOATFLOATFLOATFLOATFLOATFLOATFLOATUINT32DOUBLEFLOATUINT32UINT32UINT32UINT32UINT32UINT32INT32DOUBLEFLOATUINT32INT32UINT16INT32INT32INT32UINT16DOUBLEFLOATUINT32UINT16UINT16UINT16UINT16UINT16INT16DOUBLEFLOATUINT32INT32UINT16INT16UINT8INT16UINT8DOUBLEFLOATUINT32INT32UINT16UINT8UINT8UINT8INT8DOUBLEFLOATUINT32INT32UINT16INT16UINT8INT8