Support
Search:     Advanced search
Browse by category:
Contact Us



Image Arithmetics

Add comment
Views: 456
Votes: 1
Comments: 0
Posted: 20 Jul, 2008
by: Admin A.
Updated: 20 Jul, 2008
by: Admin A.
ImgArithmetic
Applies an arithmetic operation to an image having as operand a second image or a constant.
 
 
Description

This operation applies an arithmetic, boolean or logic operation to the image pixels by operating each image pixel with the pixel at the same position of a second image or with a constant. The second image should be of the same size and color depth than the primary image. Below you'll find a table of available operations for ImgArithmetic.

Operator
Meaning
Color Image
Add
Calculates per pixel addition of two images or image and scalar.
  yes
Subtract
Calculates per pixel subtraction of two images or image and scalar.
yes
Absolute Subtract
Calculates per pixel addition of two images or image and scalar. The calculated pixel value is the absolute value of the subtraction.
yes
Multiply
Calculates per pixel multiplication of two images or image and scalar.
yes
Divide
Calculates per pixel division of two images or image and scalar.
yes
And
Calculates per pixel bitwise AND of two images or image and scalar.
yes
Or
Calculates per pixel bitwise OR of two images or image and scalar.
yes
XOr
Calculates per pixel bitwise XOR of two images or image and scalar.
yes
Not
Calculates per pixel bitwise NOT of two images or image and scalar.
yes
Equal
Compares per pixel two images or image and scalar. If pixel of ImageA(x,y) is EQUAL to ImageB(x,y) or Scalar, then pixel of Result(x,y) is set to 255 else Result(x,y) is set to 0.
no
 no
Greater
Compares per pixel two images or image and scalar. If pixel of ImageA(x,y) is GREATER than ImageB(x,y) or Scalar, then pixel of Result(x,y) is set to 255 else Result(x,y) is set to 0.

 
Greater or Equal
Compares per pixel two images or image and scalar. If pixel of ImageA(x,y) is GREATER or EQUAL to ImageB(x,y) or Scalar, then pixel of Result(x,y) is set to 255 else Result(x,y) is set to 0.

 
Less
Compares per pixel two images or image and scalar. If pixel of ImageA(x,y) is LESS than ImageB(x,y) or Scalar, then pixel of Result(x,y) is set to 255 else Result(x,y) is set to 0.

 
Less or Equal
Compares per pixel two images or image and scalar. If pixel of ImageA(x,y) is LESS or EQUAL to ImageB(x,y) or Scalar, then pixel of Result(x,y) is set to 255 else Result(x,y) is set to 0.

 
Not Equal
Compares per pixel two images or image and scalar. If pixel of ImageA(x,y) is NOT EQUAL to ImageB(x,y) or Scalar, then pixel of Result(x,y) is set to 255 else Result(x,y) is set to 0.

 
Maximum
The resulting image pixels get the maximum value of two images or image and scalar.

 
Minimum
The resulting image pixels get the minimum value of two images or image and scalar.

 

 

Static Properties
Operation
Set the desired operation to apply.
Image
Specifies the image to use as second operand. Should be the same size and color depth as InputImage dynamic property. Equivalent to OperandImage of dynamic properties.
Scalar
Specifies the constant to use as scalar operand for gray level images. Equivalent to Scalar of dynamic properties.
Scalar R
Specifies the constant to use as scalar operand for color images in the red channel. Equivalent to RedScalar of dynamic properties.
Scalar G
Specifies the constant to use as scalar operand for color images in the green channel. Equivalent to GreenScalar of dynamic properties.
Scalar B
Specifies the constant to use as scalar operand for color images in the blue channel. Equivalent to BlueScalar of dynamic properties.
Display Operation
Specifies whether or not to display the image resulting from the operation.
Dynamic Properties
Input Properties
InputImage
Holds the image or ROI to be processed by the operation. Can be gray level or color image depending on the selected operator (see table above).
OperandImage
Holds the image to use as second operand. Should be the same size and color depth as InputImage. Equivalent to Image static property.
Scalar
Specifies the constant to use as scalar operand for gray level images. Equivalent to Scalar static property.
RedScalar
Specifies the constant to use as scalar operand for color images in the red channel. Equivalent to Scalar R static property.
GreenScalar
Specifies the constant to use as scalar operand for color images in the green channel. Equivalent to Scalar G static property.
BlueScalar
Specifies the constant to use as scalar operand for color images in the blue channel. Equivalent to Scalar B static property.
Output Properties
OutputImage
Holds the resulting image from the operation.
See also:
Sample 
 
Others in this Category
document Image Threshold
document Morphological Operator
document Image Adjustments
document Gradient filters
document Convolution
document Smoothing Filters



RSS