The OpenVX Specification  a73e458
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 [R00017]. 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 [R00018]. It is otherwise VX_DF_IMAGE_S16 [R00019]. If one of the input images is of type VX_DF_IMAGE_S16, all values are converted to VX_DF_IMAGE_S16 [R00020]. The overflow handling is controlled by an overflow-policy parameter [R00021]. For each pixel value in the two input images [R00022]:

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


vx_node VX_API_CALL vxSubtractNode (vx_graph graph, vx_image in1, vx_image in2, vx_enum policy, vx_image out)
 [Graph] Creates an arithmetic subtraction node. More...

Function Documentation

◆ vxSubtractNode()

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

[Graph] Creates an arithmetic subtraction node.

[in]graphThe reference to the graph [R00326].
[in]in1An input image, VX_DF_IMAGE_U8 or VX_DF_IMAGE_S16, the minuend [R00327].
[in]in2An input image, VX_DF_IMAGE_U8 or VX_DF_IMAGE_S16, the subtrahend [R00328].
[in]policyUse a The Conversion Policy Enumeration. value [R00329].
[out]outThe output image, a VX_DF_IMAGE_U8 or VX_DF_IMAGE_S16 image [R00330].
vx_node [R00331].
Return values
vx_nodeA node reference. Any possible errors preventing a successful creation should be checked using vxGetStatus