The OpenVX Specification  a73e458

Detailed Description

Defines the Parameter Object interface.

An abstract input, output, or bidirectional data object passed to a computer vision function. This object contains the signature of that parameter's usage from the kernel description. This information includes:

Modules

 Parameter direction enumeration
 An indication of how a kernel will treat the given parameter.
 
 The Parameter Attributes Constants
 The parameter attributes list.
 
 The parameter state type constants.
 

Typedefs

typedef struct _vx_parameter * vx_parameter
 An opaque reference to a single parameter. More...
 

Functions

vx_parameter VX_API_CALL vxGetKernelParameterByIndex (vx_kernel kernel, vx_uint32 index)
 Retrieves a vx_parameter from a vx_kernel [R00703]. More...
 
vx_parameter VX_API_CALL vxGetParameterByIndex (vx_node node, vx_uint32 index)
 Retrieves a vx_parameter from a vx_node [R00805]. More...
 
vx_status VX_API_CALL vxQueryParameter (vx_parameter parameter, vx_enum attribute, void *ptr, vx_size size)
 Allows the client to query a parameter to determine its meta-information [R00822]. More...
 
vx_status VX_API_CALL vxReleaseParameter (vx_parameter *param)
 Releases a reference to a parameter object [R00810]. The object may not be garbage collected until its total reference count is zero. More...
 
vx_status VX_API_CALL vxSetParameterByIndex (vx_node node, vx_uint32 index, vx_reference value)
 Sets the specified parameter data for a kernel on the node [R00813]. More...
 
vx_status VX_API_CALL vxSetParameterByReference (vx_parameter parameter, vx_reference value)
 Associates a parameter reference and a data reference with a kernel on a node [R00818]. More...
 

Typedef Documentation

◆ vx_parameter

typedef struct _vx_parameter* vx_parameter

An opaque reference to a single parameter.

See also
vxGetParameterByIndex

Definition at line 205 of file vx_types.h.

Function Documentation

◆ vxGetKernelParameterByIndex()

vx_parameter VX_API_CALL vxGetKernelParameterByIndex ( vx_kernel  kernel,
vx_uint32  index 
)

Retrieves a vx_parameter from a vx_kernel [R00703].

Parameters
[in]kernelThe reference to the kernel [R00704].
[in]indexThe index of the parameter [R00705].
Returns
A vx_parameter reference [R00706]. Any possible errors preventing a successful completion of the function should be checked using vxGetStatus [R00707].

◆ vxGetParameterByIndex()

vx_parameter VX_API_CALL vxGetParameterByIndex ( vx_node  node,
vx_uint32  index 
)

Retrieves a vx_parameter from a vx_node [R00805].

Parameters
[in]nodeThe node from which to extract the parameter [R00806].
[in]indexThe index of the parameter to which to get a reference [R00807].
Returns
A parameter reference vx_parameter [R00808]. Any possible errors preventing a successful completion of the function should be checked using vxGetStatus [R00809].

◆ vxReleaseParameter()

vx_status VX_API_CALL vxReleaseParameter ( vx_parameter param)

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

Parameters
[in]paramThe pointer to the parameter to release [R00811].
Postcondition
After returning from this function the reference is zeroed.
Returns
A The vx_status Constants value.
Return values
VX_SUCCESSNo errors; any other value indicates failure [R00812].
VX_ERROR_INVALID_REFERENCEparam is not a valid vx_parameter reference.

◆ vxSetParameterByIndex()

vx_status VX_API_CALL vxSetParameterByIndex ( vx_node  node,
vx_uint32  index,
vx_reference  value 
)

Sets the specified parameter data for a kernel on the node [R00813].

Parameters
[in]nodeThe node that contains the kernel [R00814].
[in]indexThe index of the parameter desired [R00815].
[in]valueThe desired value of the parameter [R00816].
Note
A user may not provide a NULL value for a mandatory parameter of this API.
Returns
A The vx_status Constants value.
Return values
VX_SUCCESSNo errors; any other value indicates failure [R00817].
VX_ERROR_INVALID_REFERENCEnode is not a valid vx_node reference, or value is not a valid vx_reference reference.
See also
vxSetParameterByReference

◆ vxSetParameterByReference()

vx_status VX_API_CALL vxSetParameterByReference ( vx_parameter  parameter,
vx_reference  value 
)

Associates a parameter reference and a data reference with a kernel on a node [R00818].

Parameters
[in]parameterThe reference to the kernel parameter [R00819].
[in]valueThe value to associate with the kernel parameter [R00820].
Note
A user may not provide a NULL value for a mandatory parameter of this API.
Returns
A The vx_status Constants value.
Return values
VX_SUCCESSNo errors; any other value indicates failure [R00821].
VX_ERROR_INVALID_REFERENCEparameter is not a valid vx_parameter reference, or value is not a valid vx_reference reference..
See also
vxGetParameterByIndex

◆ vxQueryParameter()

vx_status VX_API_CALL vxQueryParameter ( vx_parameter  parameter,
vx_enum  attribute,
void *  ptr,
vx_size  size 
)

Allows the client to query a parameter to determine its meta-information [R00822].

Parameters
[in]parameterThe reference to the parameter [R00823].
[in]attributeThe attribute to query. Use a The Parameter Attributes Constants [R00824].
[out]ptrThe location at which to store the resulting value [R00825].
[in]sizeThe size in bytes of the container to which ptr points [R00826].
Returns
A The vx_status Constants value.
Return values
VX_SUCCESSNo errors; any other value indicates failure [R00827].
VX_ERROR_INVALID_REFERENCEparameter is not a valid vx_parameter reference.