The OpenVX Specification  a73e458
Object: Threshold

Detailed Description

Defines the Threshold Object Interface.

Modules

 The Threshold types.
 The Threshold types.
 
 The threshold attributes.
 The threshold attributes.
 

Typedefs

typedef struct _vx_threshold * vx_threshold
 The Threshold Object. A thresholding object contains the types and limit values of the thresholding required.
 

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 [R01029]. 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 [R01044]. More...
 
vx_status VX_API_CALL vxReleaseThreshold (vx_threshold *thresh)
 Releases a reference to a threshold object [R01034]. 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 [R01038]. More...
 

Function Documentation

◆ vxCreateThreshold()

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 [R01029].

Parameters
[in]cThe reference to the overall context [R01030].
[in]thresh_typeThe type of threshold to create [R01031].
[in]data_typeThe data type of the threshold's value(s) [R01032].
Returns
A threshold reference vx_threshold [R01033]. Any possible errors preventing a successful creation should be checked using vxGetStatus.

◆ vxReleaseThreshold()

vx_status VX_API_CALL vxReleaseThreshold ( vx_threshold thresh)

Releases a reference to a threshold object [R01034]. The object may not be garbage collected until its total reference count is zero.

Parameters
[in]threshThe pointer to the threshold to release [R01035].
Postcondition
After returning from this function the reference is zeroed [R01036].
Returns
A The vx_status Constants value.
Return values
VX_SUCCESSNo errors; any other value indicates failure [R01037].
VX_ERROR_INVALID_REFERENCEthresh is not a valid vx_threshold reference.

◆ vxSetThresholdAttribute()

vx_status VX_API_CALL vxSetThresholdAttribute ( vx_threshold  thresh,
vx_enum  attribute,
const void *  ptr,
vx_size  size 
)

Sets attributes on the threshold object [R01038].

Parameters
[in]threshThe threshold object to set [R01039].
[in]attributeThe attribute to modify. Use a The threshold attributes. value [R01040].
[in]ptrThe pointer to the value to which to set the attribute [R01041].
[in]sizeThe size of the data pointed to by ptr [R01042].
Returns
A The vx_status Constants value.
Return values
VX_SUCCESSNo errors; any other value indicates failure [R01043].
VX_ERROR_INVALID_REFERENCEthresh is not a valid vx_threshold reference.

◆ vxQueryThreshold()

vx_status VX_API_CALL vxQueryThreshold ( vx_threshold  thresh,
vx_enum  attribute,
void *  ptr,
vx_size  size 
)

Queries an attribute on the threshold object [R01044].

Parameters
[in]threshThe threshold object to set [R01045].
[in]attributeThe attribute to query. Use a The threshold attributes. value [R01046].
[out]ptrThe location at which to store the resulting value [R01047].
[in]sizeThe size of the container to which ptr points [R01048].
Returns
A The vx_status Constants value.
Return values
VX_SUCCESSNo errors; any other value indicates failure [R01049].
VX_ERROR_INVALID_REFERENCEthresh is not a valid vx_threshold reference.