![]() |
The OpenVX Specification
r31169
|
Defines the Threshold Object Interface.
Typedefs | |
| typedef struct _vx_threshold * | vx_threshold |
| The Threshold Object. A thresholding object contains the types and limit values of the thresholding required. | |
Enumerations | |
| enum | vx_threshold_attribute_e { VX_THRESHOLD_ATTRIBUTE_TYPE = ((( VX_ID_KHRONOS ) << 20) | ( VX_TYPE_THRESHOLD << 8)) + 0x0, VX_THRESHOLD_ATTRIBUTE_THRESHOLD_VALUE = ((( VX_ID_KHRONOS ) << 20) | ( VX_TYPE_THRESHOLD << 8)) + 0x1, VX_THRESHOLD_ATTRIBUTE_THRESHOLD_LOWER = ((( VX_ID_KHRONOS ) << 20) | ( VX_TYPE_THRESHOLD << 8)) + 0x2, VX_THRESHOLD_ATTRIBUTE_THRESHOLD_UPPER = ((( VX_ID_KHRONOS ) << 20) | ( VX_TYPE_THRESHOLD << 8)) + 0x3, VX_THRESHOLD_ATTRIBUTE_TRUE_VALUE = ((( VX_ID_KHRONOS ) << 20) | ( VX_TYPE_THRESHOLD << 8)) + 0x4, VX_THRESHOLD_ATTRIBUTE_FALSE_VALUE = ((( VX_ID_KHRONOS ) << 20) | ( VX_TYPE_THRESHOLD << 8)) + 0x5, VX_THRESHOLD_ATTRIBUTE_DATA_TYPE = ((( VX_ID_KHRONOS ) << 20) | ( VX_TYPE_THRESHOLD << 8)) + 0x6 } |
| The threshold attributes. More... | |
| enum | vx_threshold_type_e { VX_THRESHOLD_TYPE_BINARY = ((( VX_ID_KHRONOS ) << 20) | ( VX_ENUM_THRESHOLD_TYPE << 12)) + 0x0, VX_THRESHOLD_TYPE_RANGE = ((( VX_ID_KHRONOS ) << 20) | ( VX_ENUM_THRESHOLD_TYPE << 12)) + 0x1 } |
| The Threshold types. More... | |
Functions | |
| vx_threshold VX_API_CALL | vxCreateThreshold (vx_context c, vx_enum thresh_type, vx_enum data_type) |
| Creates a reference to a threshold object of a given type. More... | |
| vx_status VX_API_CALL | vxQueryThreshold (vx_threshold thresh, vx_enum attribute, void *ptr, vx_size size) |
| Queries an attribute on the threshold object. More... | |
| vx_status VX_API_CALL | vxReleaseThreshold (vx_threshold *thresh) |
| Releases a reference to a threshold object. The object may not be garbage collected until its total reference count is zero. More... | |
| vx_status VX_API_CALL | vxSetThresholdAttribute (vx_threshold thresh, vx_enum attribute, const void *ptr, vx_size size) |
| Sets attributes on the threshold object. More... | |
| enum vx_threshold_type_e |
The Threshold types.
| Enumerator | |
|---|---|
| VX_THRESHOLD_TYPE_BINARY |
A threshold with only 1 value. |
| VX_THRESHOLD_TYPE_RANGE |
A threshold with 2 values (upper/lower). Use with Canny Edge Detection. |
Definition at line 872 of file vx_types.h.
The threshold attributes.
| Enumerator | |
|---|---|
| VX_THRESHOLD_ATTRIBUTE_TYPE |
The value type of the threshold. Use a |
| VX_THRESHOLD_ATTRIBUTE_THRESHOLD_VALUE |
The value of the single threshold. Use a |
| VX_THRESHOLD_ATTRIBUTE_THRESHOLD_LOWER |
The value of the lower threshold. Use a |
| VX_THRESHOLD_ATTRIBUTE_THRESHOLD_UPPER |
The value of the higher threshold. Use a |
| VX_THRESHOLD_ATTRIBUTE_TRUE_VALUE |
The value of the TRUE threshold. Use a |
| VX_THRESHOLD_ATTRIBUTE_FALSE_VALUE |
The value of the FALSE threshold. Use a |
| VX_THRESHOLD_ATTRIBUTE_DATA_TYPE |
The data type of the threshold's value. Use a |
Definition at line 882 of file vx_types.h.
| vx_threshold VX_API_CALL vxCreateThreshold | ( | vx_context | c, |
| vx_enum | thresh_type, | ||
| vx_enum | data_type | ||
| ) |
Creates a reference to a threshold object of a given type.
| [in] | c | The reference to the overall context. |
| [in] | thresh_type | The type of threshold to create. |
| [in] | data_type | The data type of the threshold's value(s). |
VX_TYPE_UINT8. vx_threshold. Any possible errors preventing a successful creation should be checked using vxGetStatus. | vx_status VX_API_CALL vxReleaseThreshold | ( | vx_threshold * | thresh | ) |
Releases a reference to a threshold object. The object may not be garbage collected until its total reference count is zero.
| [in] | thresh | The pointer to the threshold to release. |
vx_status_e enumeration. | VX_SUCCESS | No errors. |
| VX_ERROR_INVALID_REFERENCE | If thresh is not a vx_threshold. |
| vx_status VX_API_CALL vxSetThresholdAttribute | ( | vx_threshold | thresh, |
| vx_enum | attribute, | ||
| const void * | ptr, | ||
| vx_size | size | ||
| ) |
Sets attributes on the threshold object.
| [in] | thresh | The threshold object to set. |
| [in] | attribute | The attribute to modify. Use a vx_threshold_attribute_e enumeration. |
| [in] | ptr | The pointer to the value to which to set the attribute. |
| [in] | size | The size of the data pointed to by ptr. |
vx_status_e enumeration. | vx_status VX_API_CALL vxQueryThreshold | ( | vx_threshold | thresh, |
| vx_enum | attribute, | ||
| void * | ptr, | ||
| vx_size | size | ||
| ) |
Queries an attribute on the threshold object.
| [in] | thresh | The threshold object to set. |
| [in] | attribute | The attribute to query. Use a vx_threshold_attribute_e enumeration. |
| [out] | ptr | The location at which to store the resulting value. |
| [in] | size | The size of the container to which ptr points. |
vx_status_e enumeration.