PreviousNext

Operator Set to ADD, COPY, DIFF or SUB

ImageArith Tool allows editing through the ImageArith Tool properties page, with default settings, as shown in Figure 13-6.

FIGURE 13-6. 

ImageArith Tool Properties Page

  • Input Gain / Input Offset - Specify the gain and/or offset to be applied to the input image before the arithmetic operation.

Input Gain range: -255 to 255 (allows for fractional numbers)
Input Offset range: -255 to 255 (using whole numbers only)

  • Signed Input Image and Clip Input Overflow - When the input image is unsigned, you can clip overflows when they occur. When the input image is signed, this parameter name changes to Clip Input Overflow. Clip Input Overflow default is enabled.
  • Operator - 15 operator settings allow arithmetic operations to be applied to the pre-processed input image.

Where: a and b represent the input pixel values in the first and the
second pro-processed input buffers, respectively.
C represents the arithmetic-operated output value for
the corresponding pixel.

One-Operand Operators

  • ABS - This operator treats its input pixels as signed to perform the Absolute operation on the pixel.

C = (255 - a) + 1 if the input pixel value is less than 0;
C = a if the input pixel value is greater than 0.

Both input images are unsigned. Clip Input Overflow is provided. Arithmetic-operated image is as unsigned.

C = 1, if a falls on the range from Low Threshold and High Threshold.
C = 0, if a falls outside the range from Low Threshold and
High Threshold.

Both input images are unsigned. Clip Input Overflow is provided.
Arithmetic-operated image is as unsigned.

  • COPY - The default setting.

C = a.
Input image is unsigned or signed.
Clip Input Overflow is provided when the input image is unsigned
Clip Input Negative is provided when the input image is signed.
Arithmetic-operated image is unsigned or signed.
Clip Output Overflow is provided when the arithmetic-operated image is unsigned.
Clip Output Negative is provided when the arithmetic-operated image is signed.

  • MASKSHIFT - When selected, MaskShiftSetup is inserted into the Job by the ImageArith Tool. The MaskShiftSetup step allows you to specify a mask value to bitwise-operate on each pixel. The bitwise operation can be either AND or OR. You can also specify a left shift by a negative entry in the Shift field, or a right shift by a positive entry in the Shift field. The shift should be a number from -7 to 7. The shift operation, multiplies (left shift) or divides (right shift) the masked result by 2 the number of shift times.

Mask denotes the mask value, shift denotes the number of shift, then,

C = (a & mask) »shift for mask AND and right shift;
C = (a | mask) »shift for mask OR and right shift;
C = (a & mask) «shift for mask AND and left shift;
C = (a | mask) «shift for mask OR and left shift;

Both input images are unsigned. Clip Input Overflow is provided.
Arithmetic-operated image is as unsigned.

  • NEGATE - This operator treats its input pixels as signed and negates
    their values.

C=(255-a)+ 1.
Input image is unsigned.
Arithmetic-operated image is unsigned.

  • NOT - C=255-a.
    Input image is unsigned.
    Arithmetic-operated image is unsigned
  • PASSRANGE - When selected, BinarizationSetup is inserted into the Job by the ImageArith Tool. BinarizationSetup provides editing for the Low Threshold and High Threshold. The binarization operation is:

C = Low Threshold if a falls on or below the Low Threshold.
C = a if a falls inside the range from Low Threshold and
High Threshold.
C = High Threshold if a falls on or above the High Threshold.

Both input images are unsigned. Clip Input Overflow is provided. Arithmetic-operated image is as unsigned.

Two-Operand Operators

  • ADD, SUB, DIFF, MULTIPLY - These operators perform arithmetic add, subtract, and difference on the input pixels 0 the two input ROIs, respectively.

C = a+b for ADD
C = a-b for SUB
C = abs(a-b) for DIFF
C = a*b for MULTIPLY

Both input images are unsigned or signed.
Clip Input Overflow is provided when the input images are unsigned
Clip Input Negative is provided when the input images are signed.
Arithmetic-operated image is unsigned or signed.
Clip Output Overflow is provided when the arithmetic-operated image is unsigned.
Clip Output Negative is provided when the arithmetic-operated image is signed.

  • AND, OR, XOR - Perform bitwise AND, OR, or XOR operation on the pixels from the two input ROIs.

C = a&b for AND
C = a|b for OR
C = a^b for XOR

Both input images are unsigned. Clip Input Overflow is provided. Arithmetic-operated image is as unsigned.

  • MAX - Compares the pixels of the two input ROls making the output value the greater one of the two.

C = a if a>b
C = b if a<b

Both input images are unsigned. Clip Input Overflow is provided. Arithmetic-operated image is as unsigned.

  • MIN - Compares the pixels of the two input ROIs making the output value the smaller one of the two.

C = a if a<b
C = b if a>b

Both input images are unsigned. Clip Input Overflow is provided. Arithmetic-operated image is as unsigned.

  • Output Gain and Output Offset - Apply gain and offset to the arithmetically operated resultant image.

Output Gain a floating point value from -255.0 to 255.0
Output Offset a number from -255 to 255.

  • Signed Output Image and Clip Output Overflow - Specify whether the arithmetic-operated image is signed or unsigned. When signed and the Clip Output Negative is checked, any negative value in the operated image will be clipped to 0. When unsigned and the Clip Output Overflow is checked, any value larger than 255 after the operation will be clipped to 255.

PreviousNext