The OpenVX Specification  r31169
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
Absolute Difference

Detailed Description

Computes the absolute difference between two images.

Absolute Difference is computed by:

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

When the two input parameters have type s16, the conceptual definition describing the overflow is:

uint16 uresult = (uint16) abs((int32) (a) - (int32) (b));

int16 result = uresult > 32767 ? 32767 : (int16) uresult;

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...
 
vx_status VX_API_CALL vxuAbsDiff (vx_context context, vx_image in1, vx_image in2, vx_image out)
 [Immediate] Computes the absolute difference between two images. More...
 

Function Documentation

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.
[in]in1An input image in VX_DF_IMAGE_U8 or VX_DF_IMAGE_S16 format.
[in]in2An input image in VX_DF_IMAGE_U8 or VX_DF_IMAGE_S16 format.
[out]outThe output image in VX_DF_IMAGE_U8 or VX_DF_IMAGE_S16 format.
Return values
vx_nodeA node reference. Any possible errors preventing a successful creation should be checked using vxGetStatus
vx_status VX_API_CALL vxuAbsDiff ( vx_context  context,
vx_image  in1,
vx_image  in2,
vx_image  out 
)

[Immediate] Computes the absolute difference between two images.

Parameters
[in]contextThe reference to the overall context.
[in]in1An input image in VX_DF_IMAGE_U8 or VX_DF_IMAGE_S16 format.
[in]in2An input image in VX_DF_IMAGE_U8 or VX_DF_IMAGE_S16 format.
[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.