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} \]
[Graph] Creates a Threshold node.
- Parameters
-
[in] | graph | The reference to the graph. |
[in] | input | The input image. VX_DF_IMAGE_U8 is supported. |
[in] | thresh | The thresholding object that defines the parameters of the operation. |
[out] | output | The output Boolean image. Values are either 0 or 255. |
- Returns
vx_node
.
- Return values
-
vx_node | A node reference. Any possible errors preventing a successful creation should be checked using vxGetStatus |
[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. VX_DF_IMAGE_U8 is supported. |
[in] | thresh | The thresholding object that defines the parameters of the operation. |
[out] | output | The output Boolean image. Values are either 0 or 255. |
- Returns
- A
vx_status_e
enumeration.
- Return values
-