The OpenVX Specification  dba1aa3
Thresholding

## Detailed Description

Thresholds an input image and produces an output Boolean image. The output image dimensions should be the same as the dimensions of the input image.

In VX_THRESHOLD_TYPE_BINARY, the output is determined by:

$dst(x,y) = \begin{cases} true\ value & \text{if } src(x,y) > threshold \cr false\ value & \text{otherwise } \end{cases}$

In VX_THRESHOLD_TYPE_RANGE, the output is determined by:

$dst(x,y) = \begin{cases} false\ value & \text{if } src(x,y) > upper \cr false\ value & \text{if } src(x,y) < lower \cr true\ value & \text{otherwise } \end{cases}$

Where 'false value' and 'true value' are defined by the of the thresh parameter dependent upon the threshold output format with default values as discussed in the description of vxCreateThresholdForImage or as set by a call to vxCopyThresholdOutput with the thresh parameter as the first argument.

## Functions

vx_node VX_API_CALL vxThresholdNode (vx_graph graph, vx_image input, vx_threshold thresh, vx_image output)
[Graph] Creates a Threshold node and returns a reference to it. More...

vx_status VX_API_CALL 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 VX_API_CALL vxThresholdNode ( vx_graph graph, vx_image input, vx_threshold thresh, vx_image output )

[Graph] Creates a Threshold node and returns a reference to it.

Parameters
 [in] graph The reference to the graph in which the node is created. [in] input The input image. Only images with format VX_DF_IMAGE_U8 and VX_DF_IMAGE_S16 are supported. [in] thresh The thresholding object that defines the parameters of the operation. The VX_THRESHOLD_INPUT_FORMAT must be the same as the input image format and the VX_THRESHOLD_OUTPUT_FORMAT must be the same as the output image format. [out] output The output image, that will contain as pixel value true and false values defined by thresh. Only images with format VX_DF_IMAGE_U8 are supported. The dimensions are the same as the input image.
Returns
vx_node.
Return values
 vx_node A node reference. Any possible errors preventing a successful creation should be checked using vxGetStatus
 vx_status VX_API_CALL 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] context The reference to the overall context. [in] input The input image. Only images with format VX_DF_IMAGE_U8 and VX_DF_IMAGE_S16 are supported. [in] thresh The thresholding object that defines the parameters of the operation. The VX_THRESHOLD_INPUT_FORMAT must be the same as the input image format and the VX_THRESHOLD_OUTPUT_FORMAT must be the same as the output image format. [out] output The output image, that will contain as pixel value true and false values defined by thresh. Only images with format VX_DF_IMAGE_U8 are supported.
Returns
A vx_status_e enumeration.
Return values
 VX_SUCCESS Success * An error occurred. See vx_status_e.