Arithmetic/Logic  
Top  Previous  Next


Toolbar:   arithmet  
Menu:    Processing > Arithmetic/Logic…  

Use this command to perform arithmetic and logic operations between two images or between an image and a constant value. When using arithmetic operators, the images are processed on a pixel-by-pixel basis. If the images differ in types, the image of the lower bit depth is converted to the higher one before applying the operation, however if one of the images is a color one, the other image will be converted to a color type even if it causes the loss of the bit depth. When applied to color images, the operations will be performed separately on all three channels. For complex images ImageWarp uses the complex arithmetic treating both Re and Im channels as horizontal and vertical components in 2D complex space and processing them in combination.

The arithmetic and logic operations are performed from the upper left corner of each image or, if the images have selections, from the upper left corner of the bounding box of each selection. If the images or selections are different sizes, the larger image or selection is clipped to match the smaller one before the operation is performed.

When you choose this command, the Arithmetic/Logic dialog box will appear with two tabs.
Select one of the following functions:

Arithmetic

Click…

To…

Invert
invert pixel values in an image.
Offset
add a constant value to each pixel in an image.
Factor
multiply each pixel in an image by a constant value.
Average
find an average value for each pair of corresponding pixels in two images.
Add
add pixels in two images.
Subtract
subtract pixels of one image from pixels of another one.
Multiply
multiply pixels in two images.
Divide
divide pixels of one image by pixels of another one.
Difference
find absolute differences between pixels in two images.
Combine
apply a linear combination to pixels of two images.
Minimum
find a maximum for each pair of corresponding pixels in two images.
Maximum
find a minimum for each pair of corresponding pixels in two images.
 

Logic

Click…
To…
NOT
perform logical NOT on each pixel of an image.
AND
perform bitwise AND between pixels in two images.
OR
perform bitwise OR between pixels in two images.
XOR
perform bitwise XOR between pixels in two images.
NAND
perform bitwise NAND between pixels in two images.
NOR
perform bitwise NOR between pixels in two images.
XNOR
perform bitwise XNOR between pixels in two images.
LSHIFT
apply bitwise left shift to pixels of an image.
RSHIFT
apply bitwise right shift to pixels of an image.
Mask
apply a phase mask to an image.