The OpenVX Specification  dba1aa3
Accumulate Weighted

Detailed Description

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

Weighted accumulation is computed by:

\[ accum(x,y) = (1 - \alpha)*accum(x,y) + \alpha*input(x,y) \]

Where \( 0 \le \alpha \le 1 \) Conceptually, the rounding for this is defined as:

\[ output(x,y)= uint8( (1 - \alpha) * float32( int32( output(x,y) ) ) + \alpha * float32( int32( input(x,y) ) ) ) \]

Functions

vx_node VX_API_CALL vxAccumulateWeightedImageNode (vx_graph graph, vx_image input, vx_scalar alpha, vx_image accum)
 [Graph] Creates a weighted accumulate node. More...
 
vx_status VX_API_CALL vxuAccumulateWeightedImage (vx_context context, vx_image input, vx_scalar alpha, vx_image accum)
 [Immediate] Computes a weighted accumulation. More...
 

Function Documentation

vx_node VX_API_CALL vxAccumulateWeightedImageNode ( vx_graph  graph,
vx_image  input,
vx_scalar  alpha,
vx_image  accum 
)

[Graph] Creates a weighted accumulate node.

Parameters
[in]graphThe reference to the graph.
[in]inputThe input VX_DF_IMAGE_U8 image.
[in]alphaThe input VX_TYPE_FLOAT32 scalar value with a value in the range of \( 0.0 \le \alpha \le 1.0 \).
[in,out]accumThe VX_DF_IMAGE_U8 accumulation image, 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 vxuAccumulateWeightedImage ( vx_context  context,
vx_image  input,
vx_scalar  alpha,
vx_image  accum 
)

[Immediate] Computes a weighted accumulation.

Parameters
[in]contextThe reference to the overall context.
[in]inputThe input VX_DF_IMAGE_U8 image.
[in]alphaA VX_TYPE_FLOAT32 type, the input value with the range \( 0.0 \le \alpha \le 1.0 \).
[in,out]accumThe VX_DF_IMAGE_U8 accumulation image.
Returns
A vx_status_e enumeration.
Return values
VX_SUCCESSSuccess
*An error occurred. See vx_status_e.