The OpenVX Specification  r28647
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
Thresholding

Detailed Description

Thresholds an input image and produces an output Boolean image.

In VX_THRESHOLD_TYPE_BINARY, the output is determined by:

\[ dst(x,y) = \begin{cases} 255 & \text{if } src(x,y) > threshold \cr 0 & \text{otherwise } \end{cases} \]

In VX_THRESHOLD_TYPE_RANGE, the output is determined by:

\[ dst(x,y) = \begin{cases} 0 & \text{if } src(x,y) > upper \cr 0 & \text{if } src(x,y) < lower \cr 255 & \text{otherwise } \end{cases} \]

Functions

vx_node vxThresholdNode (vx_graph graph, vx_image input, vx_threshold thresh, vx_image output)
 [Graph] Creates a Threshold node. More...
 
vx_status vxuThreshold (vx_context context, vx_image input, vx_threshold thresh, vx_image output)
 [Immediate] Threshold's an input image and produces a VX_DF_IMAGE_U8 * boolean image. More...
 

Function Documentation

vx_node vxThresholdNode ( vx_graph  graph,
vx_image  input,
vx_threshold  thresh,
vx_image  output 
)

[Graph] Creates a Threshold node.

Parameters
[in]graphThe reference to the graph.
[in]inputThe input image. VX_DF_IMAGE_U8 is supported.
[in]threshThe thresholding object that defines the parameters of the operation.
[out]outputThe output Boolean image. Values are either 0 or 255.
Returns
vx_node.
Return values
0Node could not be created.
*Node handle.
vx_status vxuThreshold ( vx_context  context,
vx_image  input,
vx_threshold  thresh,
vx_image  output 
)

[Immediate] Threshold's an input image and produces a VX_DF_IMAGE_U8 * boolean image.

Parameters
[in]contextThe reference to the overall context.
[in]inputThe input image. VX_DF_IMAGE_U8 is supported.
[in]threshThe thresholding object that defines the parameters of the operation.
[out]outputThe output Boolean image. Values are either 0 or 255.
Returns
A vx_status_e enumeration.
Return values
VX_SUCCESSSuccess
*An error occurred. See vx_status_e.