BinaryImageConstantOperator

Applies a binary point operation between an image and a constant. Possible operations can be grouped into arithmetic, logic and comparison fields. Binary point operations are applied pixel by pixel, the same way for every pixel.

Arithmetic Operators

The following operators are available:

Add

Add with saturation.

Image + Constant -> Result

Subtract

Subtract with saturation.

Image - Constant -> Result

Difference

Difference with saturation.

abs ( Image - Constant ) -> Result

Multiply

Multiply without saturation.

Image * Constant -> Result

Divide

Divide without saturation.

Image / Constant -> Result

Multiply (Blend)

Multiply with saturation.

Image * Constant -> Result

Divide (Blend)

Divide with saturation.

Image / Constant -> Result

Logic Operators

The following operators are available:

And

Logical And.

Image & Constant -> Result

Or

Logical Or.

Image | Constant -> Result

Xor

Logical Xor.

Image ^ Constant -> Result

Comparison Operators

The following operators are available:

Smaller

Compare smaller.

Image < Constant -> Result

Smaller or Equal

Compare smaller or equal.

Image <= Constant -> Result

Equal

Compare equal.

Image == Constant -> Result

Bigger or Equal

Compare bigger or equal.

Image >= Constant -> Result

Bigger

Compare bigger.

Image > Constant -> Result

Min/Max Operators

The following operators are available:

Min

Minimum.

min( Image, Constant) -> Result

Max

Maximum.

max( Image, Constant) -> Result

Inputs

Image (Type: Image)

The input image.

Constant (Type: object)

The constant.

Operator (Type: string)

Specifies the operator.

operator operation
+ add
- subtract
diff difference
* multiply
/ divide
*_blend multiply (blend)
/_blend divide (blend)
& and
| or
^ xor
< smaller
<= smaller or equal
== equal
>= bigger or equal
> bigger
min minimum
max maximum

Outputs

Result (Type: Image)

The result image.