The OpenVX Specification  dba1aa3
Accumulate Squared

Detailed Description

Accumulates a squared value from an input image to an output image. The accumulation image dimensions should be the same as the dimensions of the input image.

Accumulate squares is computed by:

\[ accum(x,y) = saturate_{int16} ( (uint16) accum(x,y) + (((uint16)(input(x,y)^2)) >> (shift)) ) \]

Where \( 0 \le shift \le 15 \)

The overflow policy used is VX_CONVERT_POLICY_SATURATE.

Functions

vx_node VX_API_CALL vxAccumulateSquareImageNode (vx_graph graph, vx_image input, vx_scalar shift, vx_image accum)
 [Graph] Creates an accumulate square node. More...
 
vx_status VX_API_CALL vxuAccumulateSquareImage (vx_context context, vx_image input, vx_scalar shift, vx_image accum)
 [Immediate] Computes a squared accumulation. More...
 

Function Documentation

vx_node VX_API_CALL vxAccumulateSquareImageNode ( vx_graph  graph,
vx_image  input,
vx_scalar  shift,
vx_image  accum 
)

[Graph] Creates an accumulate square node.

Parameters
[in]graphThe reference to the graph.
[in]inputThe input VX_DF_IMAGE_U8 image.
[in]shiftThe input VX_TYPE_UINT32 with a value in the range of \( 0 \le shift \le 15 \).
[in,out]accumThe accumulation image in VX_DF_IMAGE_S16, which must have the same dimensions as the input image.
Returns
vx_node.
Return values
vx_nodeA node reference. Any possible errors preventing a successful creation should be checked using vxGetStatus
vx_status VX_API_CALL vxuAccumulateSquareImage ( vx_context  context,
vx_image  input,
vx_scalar  shift,
vx_image  accum 
)

[Immediate] Computes a squared accumulation.

Parameters
[in]contextThe reference to the overall context.
[in]inputThe input VX_DF_IMAGE_U8 image.
[in]shiftA VX_TYPE_UINT32 type, the input value with the range \( 0 \le shift \le 15 \).
[in,out]accumThe accumulation image in VX_DF_IMAGE_S16
Returns
A vx_status_e enumeration.
Return values
VX_SUCCESSSuccess
*An error occurred. See vx_status_e.