The OpenVX Specification  r28647
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
Mean and Standard Deviation

Detailed Description

Computes the mean pixel value and the standard deviation of the pixels in the input image (which has a dimension width and height).

The mean value is computed as:

\[ \mu = \frac{\left(\sum_{y=0}^h \sum_{x=0}^w src(x,y) \right)} {(width * height)} \]

The standard deviation is computed as:

\[ \sigma = \sqrt{\frac{\left(\sum_{y=0}^h \sum_{x=0}^w (\mu - src(x,y))^2 \right)} {(width * height)}} \]

Functions

vx_node vxMeanStdDevNode (vx_graph graph, vx_image input, vx_scalar mean, vx_scalar stddev)
 [Graph] Creates a mean value and standard deviation node. More...
 
vx_status vxuMeanStdDev (vx_context context, vx_image input, vx_float32 *mean, vx_float32 *stddev)
 [Immediate] Computes the mean value and standard deviation. More...
 

Function Documentation

vx_node vxMeanStdDevNode ( vx_graph  graph,
vx_image  input,
vx_scalar  mean,
vx_scalar  stddev 
)

[Graph] Creates a mean value and standard deviation node.

Parameters
[in]graphThe reference to the graph.
[in]inputThe input image. VX_DF_IMAGE_U8 is supported.
[out]meanThe VX_TYPE_FLOAT32 average pixel value.
[out]stddevThe VX_TYPE_FLOAT32 standard deviation of the pixel values.
Returns
vx_node.
Return values
0Node could not be created.
*Node handle.
vx_status vxuMeanStdDev ( vx_context  context,
vx_image  input,
vx_float32 mean,
vx_float32 stddev 
)

[Immediate] Computes the mean value and standard deviation.

Parameters
[in]contextThe reference to the overall context.
[in]inputThe input image. VX_DF_IMAGE_U8 is supported.
[out]meanThe average pixel value.
[out]stddevThe standard deviation of the pixel values.
Returns
A vx_status_e enumeration.
Return values
VX_SUCCESSSuccess
*An error occurred. See vx_status_e.