The OpenVX Specification
dba1aa3
|
An opaque array object that could be an array of any data-object (not data-type) of OpenVX except Delay and ObjectArray objects.
ObjectArray is a strongly-typed container of OpenVX data-objects. ObjectArray refers to the collection of similar data-objects as a single entity that can be created or assigned as inputs/outputs and as a single entity. In addition, a single object from the collection can be accessed individually by getting its reference. The single object remains as part of the ObjectArray through its entire life cycle.
Typedefs | |
typedef struct _vx_object_array * | vx_object_array |
The ObjectArray Object. ObjectArray is a strongly-typed container of OpenVX data-objects. | |
Enumerations | |
enum | vx_object_array_attribute_e { VX_OBJECT_ARRAY_ITEMTYPE = ((( VX_ID_KHRONOS ) << 20) | ( VX_TYPE_OBJECT_ARRAY << 8)) + 0x0, VX_OBJECT_ARRAY_NUMITEMS = ((( VX_ID_KHRONOS ) << 20) | ( VX_TYPE_OBJECT_ARRAY << 8)) + 0x1 } |
The ObjectArray object attributes. More... | |
Functions | |
vx_object_array VX_API_CALL | vxCreateObjectArray (vx_context context, vx_reference exemplar, vx_size count) |
Creates a reference to an ObjectArray of count objects. More... | |
vx_object_array VX_API_CALL | vxCreateVirtualObjectArray (vx_graph graph, vx_reference exemplar, vx_size count) |
Creates an opaque reference to a virtual ObjectArray with no direct user access. More... | |
vx_reference VX_API_CALL | vxGetObjectArrayItem (vx_object_array arr, vx_uint32 index) |
Retrieves the reference to the OpenVX Object in location index of the ObjectArray. More... | |
vx_status VX_API_CALL | vxQueryObjectArray (vx_object_array arr, vx_enum attribute, void *ptr, vx_size size) |
Queries an atribute from the ObjectArray. More... | |
vx_status VX_API_CALL | vxReleaseObjectArray (vx_object_array *arr) |
Releases a reference of an ObjectArray object. More... | |
The ObjectArray object attributes.
Enumerator | |
---|---|
VX_OBJECT_ARRAY_ITEMTYPE |
The type of the ObjectArray items. Read-only. Use a |
VX_OBJECT_ARRAY_NUMITEMS |
The number of items in the ObjectArray. Read-only. Use a |
Definition at line 1159 of file vx_types.h.
vx_object_array VX_API_CALL vxCreateObjectArray | ( | vx_context | context, |
vx_reference | exemplar, | ||
vx_size | count | ||
) |
Creates a reference to an ObjectArray of count objects.
It uses the metadata of the exemplar to determine the object attributes, ignoring the object data. It does not alter the exemplar or keep or release the reference to the exemplar. For the definition of supported attributes see vxSetMetaFormatAttribute
. In case the exemplar is a virtual object it must be of immutable metadata, thus it is not allowed to be dimensionless or formatless.
[in] | context | The reference to the overall Context. |
[in] | exemplar | The exemplar object that defines the metadata of the created objects in the ObjectArray. |
[in] | count | Number of Objects to create in the ObjectArray. This value must be greater than zero. |
vx_object_array
. Any possible errors preventing a successful creation should be checked using vxGetStatus
. Data objects are not initialized by this function. vx_object_array VX_API_CALL vxCreateVirtualObjectArray | ( | vx_graph | graph, |
vx_reference | exemplar, | ||
vx_size | count | ||
) |
Creates an opaque reference to a virtual ObjectArray with no direct user access.
This function creates an ObjectArray of count objects with similar behavior as vxCreateObjectArray
. The only difference is that the objects that are created are virtual in the given graph.
[in] | graph | Reference to the graph where to create the virtual ObjectArray. |
[in] | exemplar | The exemplar object that defines the type of object in the ObjectArray. Only exemplar type of vx_image , vx_array and vx_pyramid are allowed. |
[in] | count | Number of Objects to create in the ObjectArray. |
vx_object_array
. Any possible errors preventing a successful creation should be checked using vxGetStatus
. vx_reference VX_API_CALL vxGetObjectArrayItem | ( | vx_object_array | arr, |
vx_uint32 | index | ||
) |
Retrieves the reference to the OpenVX Object in location index of the ObjectArray.
This is a vx_reference, which can be used elsewhere in OpenVX. A call to vxRelease<Object> or vxReleaseReference
is necessary to release the Object for each call to this function.
[in] | arr | The ObjectArray. |
[in] | index | The index of the object in the ObjectArray. |
vxGetStatus
. vx_status VX_API_CALL vxReleaseObjectArray | ( | vx_object_array * | arr | ) |
Releases a reference of an ObjectArray object.
The object may not be garbage collected until its total reference and its contained objects count is zero. After returning from this function the reference is zeroed/cleared.
[in] | arr | The pointer to the ObjectArray to release. |
vx_status_e
enumeration. VX_SUCCESS | No errors; any other value indicates failure. |
VX_ERROR_INVALID_REFERENCE | arr is not a valid vx_object_array reference. |
vx_status VX_API_CALL vxQueryObjectArray | ( | vx_object_array | arr, |
vx_enum | attribute, | ||
void * | ptr, | ||
vx_size | size | ||
) |
Queries an atribute from the ObjectArray.
[in] | arr | The reference to the ObjectArray. |
[in] | attribute | The attribute to query. Use a vx_object_array_attribute_e . |
[out] | ptr | The location at which to store the resulting value. |
[in] | size | The size in bytes of the container to which ptr points. |
vx_status_e
enumeration. VX_SUCCESS | No errors; any other value indicates failure. |
VX_ERROR_INVALID_REFERENCE | arr is not a valid vx_object_array reference. |
VX_ERROR_NOT_SUPPORTED | If the attribute is not a value supported on this implementation. |
VX_ERROR_INVALID_PARAMETERS | If any of the other parameters are incorrect. |