The Pixel Math command allows you to perform a pixel-by-pixel mathematical operation on either a single image or two images.
Availability of this feature depends on Product Level.
The Image A and Image B fields allow you to specify the images; only Image A is available if the Operation is None. Scale Factors (in percent) can be applied to each image before the operation, and a Constant can be added after the operation. After the constant is added, any negative values are forced to zero.
When performing Pixel Math on a single image, the only operation available to be performed on it is Scale Factor. A value of 100% results in no change, while 50% and 200% would change pixel values to one-half and double their original values, respectively.
When working with two images, the order of operations proceeds as follows:
Pixel values in both Image A and Image B are multiplied by their respective Scale Factors.
Depending on the operand selected in Operation, the mathematical operation is performed as either A plus B (Add), A minus B (Subtract), A times B (Multiply), A divided by B (Divide), smallest pixel of A or B (Minimum), or largest pixel of A or B (Maximum).
The value in Add Constant (which can be made negative) is added to the result obtained by the preceding Operation.
If the Operation is division, zero values in Image B result in zero values on output (before the addition of the Constant).