The OpenVX Specification  a73e458
Absolute Difference

Detailed Description

Computes the absolute difference between two images.

Absolute Difference is computed by [R00001]:

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

If one of the input images is of type VX_DF_IMAGE_S16, all values are converted to vx_int32 and the overflow policy VX_CONVERT_POLICY_SATURATE is used [R00002].

\[ out(x,y) = saturate_{int16} ( |(int32)in_1(x,y) - (int32)in_2(x,y)| ) \]

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 [R00003]. It is otherwise VX_DF_IMAGE_S16 [R00004].

Functions

vx_node VX_API_CALL vxAbsDiffNode (vx_graph graph, vx_image in1, vx_image in2, vx_image out)
 [Graph] Creates an AbsDiff node. More...
 

Function Documentation

◆ vxAbsDiffNode()

vx_node VX_API_CALL vxAbsDiffNode ( vx_graph  graph,
vx_image  in1,
vx_image  in2,
vx_image  out 
)

[Graph] Creates an AbsDiff node.

Parameters
[in]graphThe reference to the graph [R00202].
[in]in1An input image in VX_DF_IMAGE_U8 or VX_DF_IMAGE_S16 format [R00203].
[in]in2An input image in VX_DF_IMAGE_U8 or VX_DF_IMAGE_S16 format [R00204].
[out]outThe output image in VX_DF_IMAGE_U8 or VX_DF_IMAGE_S16 format [R00205].
Returns
vx_node [R00206].
Return values
vx_nodeA node reference. Any possible errors preventing a successful creation should be checked using vxGetStatus