Subtract  
Top  Previous  Next


Menu:   Processing > Arithmetic/Logic… > Arithmetic > Add  
Script:   subIm  

Use this function to subtract one image from another on a pixel-by-pixel basis. The following formula is used for calculating the intensity of a target pixel:

subim

If a pixel's result is negative, it will be clipped to zero or wrapped around depending on the Mode selected.

If the input images differ in types, they will be automatically converted to the type that forces conformity between the images. If the images or selections are different sizes, one or both of them will be clipped to match the minimal horizontal and vertical dimension of the images or selected regions of interests. See Arithmetic/Logic
for more details.

If you choose this command, the following options will become available:

Input1

Displays the frame number of the first input image. If you want to perform the operation on another image, type or select the corresponding value.  

Input2

Displays the frame number of the second input image. If you want to perform the operation on another image, type or select the corresponding value.  

Output

Displays the number of the frame in which the output image will be created. Depending on the Preferences. ImageWarp will set it either to the first available value or to the Input frame number. Type or select another value if you want the output image to be created in a different frame.  

Preview

Select this check box to watch the Preview of the output image.  

Mode

Lets you select the mode for the operation.  

Click Wrap to have the output pixels that have negative values to wrap around the zero level.  
Click Clip to have the output pixels that have negative values, clipped to the zero level.  
Click Normalize to have pixel values in the output image linearly scaled to the full intensity range of the image.  

If the image is of the floating point or complex type, this option is disregarded.