The OpenVX Specification  r28647
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
Arithmetic Subtraction

Detailed Description

Performs subtraction between two images.

Arithmetic subtraction is performed between the pixel values in two VX_DF_IMAGE_U8 or two VX_DF_IMAGE_S16 images. The output image can be VX_DF_IMAGE_U8 only if both source images are VX_DF_IMAGE_U8 and the output image is explicitly set to VX_DF_IMAGE_U8. It is otherwise VX_DF_IMAGE_S16. If one of the input images is of type VX_DF_IMAGE_S16, all values are converted to VX_DF_IMAGE_S16. The overflow handling is controlled by an overflow-policy parameter. For each pixel value in the two input images:

\[ out(x,y) = in_1(x,y) - in_2(x,y) \]

Functions

vx_node vxSubtractNode (vx_graph graph, vx_image in1, vx_image in2, vx_enum policy, vx_image out)
 [Graph] Creates an arithmetic subtraction node. More...
 
vx_status vxuSubtract (vx_context context, vx_image in1, vx_image in2, vx_enum policy, vx_image out)
 [Immediate] Performs arithmetic subtraction on pixel values in the input images. More...
 

Function Documentation

vx_node vxSubtractNode ( vx_graph  graph,
vx_image  in1,
vx_image  in2,
vx_enum  policy,
vx_image  out 
)

[Graph] Creates an arithmetic subtraction node.

Parameters
[in]graphThe reference to the graph.
[in]in1An input image, VX_DF_IMAGE_U8 or VX_DF_IMAGE_S16, the minuend.
[in]in2An input image, VX_DF_IMAGE_U8 or VX_DF_IMAGE_S16, the subtrahend.
[in]policyA VX_TYPE_ENUM of the vx_convert_policy_e enumeration.
[out]outThe output image, a VX_DF_IMAGE_U8 or VX_DF_IMAGE_S16 image.
Returns
vx_node.
Return values
0Node could not be created.
*Node handle.
vx_status vxuSubtract ( vx_context  context,
vx_image  in1,
vx_image  in2,
vx_enum  policy,
vx_image  out 
)

[Immediate] Performs arithmetic subtraction on pixel values in the input images.

Parameters
[in]contextThe reference to the overall context.
[in]in1A VX_DF_IMAGE_U8 or VX_DF_IMAGE_S16 input image, the minuend.
[in]in2A VX_DF_IMAGE_U8 or VX_DF_IMAGE_S16 input image, the subtrahend.
[in]policyA vx_convert_policy_e enumeration.
[out]outThe output image in VX_DF_IMAGE_U8 or VX_DF_IMAGE_S16 format.
Returns
A vx_status_e enumeration.
Return values
VX_SUCCESSSuccess
*An error occurred. See vx_status_e.