The OpenVX Specification
r31169
|
Defines the Image Convolution Object interface.
Typedefs | |
typedef struct _vx_convolution * | vx_convolution |
The Convolution Object. A user-defined convolution kernel of MxM elements. | |
Enumerations | |
enum | vx_convolution_attribute_e { VX_CONVOLUTION_ATTRIBUTE_ROWS = ((( VX_ID_KHRONOS ) << 20) | ( VX_TYPE_CONVOLUTION << 8)) + 0x0, VX_CONVOLUTION_ATTRIBUTE_COLUMNS = ((( VX_ID_KHRONOS ) << 20) | ( VX_TYPE_CONVOLUTION << 8)) + 0x1, VX_CONVOLUTION_ATTRIBUTE_SCALE = ((( VX_ID_KHRONOS ) << 20) | ( VX_TYPE_CONVOLUTION << 8)) + 0x2, VX_CONVOLUTION_ATTRIBUTE_SIZE = ((( VX_ID_KHRONOS ) << 20) | ( VX_TYPE_CONVOLUTION << 8)) + 0x3 } |
The convolution attributes. More... | |
Functions | |
vx_convolution VX_API_CALL | vxCreateConvolution (vx_context context, vx_size columns, vx_size rows) |
Creates a reference to a convolution matrix object. More... | |
vx_status VX_API_CALL | vxQueryConvolution (vx_convolution conv, vx_enum attribute, void *ptr, vx_size size) |
Queries an attribute on the convolution matrix object. More... | |
vx_status VX_API_CALL | vxReadConvolutionCoefficients (vx_convolution conv, vx_int16 *array) |
Gets the convolution data (copy). More... | |
vx_status VX_API_CALL | vxReleaseConvolution (vx_convolution *conv) |
Releases the reference to a convolution matrix. The object may not be garbage collected until its total reference count is zero. More... | |
vx_status VX_API_CALL | vxSetConvolutionAttribute (vx_convolution conv, vx_enum attribute, const void *ptr, vx_size size) |
Sets attributes on the convolution object. More... | |
vx_status VX_API_CALL | vxWriteConvolutionCoefficients (vx_convolution conv, const vx_int16 *array) |
Sets the convolution data (copy) More... | |
The convolution attributes.
Enumerator | |
---|---|
VX_CONVOLUTION_ATTRIBUTE_ROWS |
The number of rows of the convolution matrix. Use a |
VX_CONVOLUTION_ATTRIBUTE_COLUMNS |
The number of columns of the convolution matrix. Use a |
VX_CONVOLUTION_ATTRIBUTE_SCALE |
The scale of the convolution matrix. Use a
|
VX_CONVOLUTION_ATTRIBUTE_SIZE |
The total size of the convolution matrix in bytes. Use a |
Definition at line 916 of file vx_types.h.
vx_convolution VX_API_CALL vxCreateConvolution | ( | vx_context | context, |
vx_size | columns, | ||
vx_size | rows | ||
) |
Creates a reference to a convolution matrix object.
[in] | context | The reference to the overall context. |
[in] | columns | The columns dimension of the convolution. Must be odd and greater than or equal to 3 and less than the value returned from VX_CONTEXT_ATTRIBUTE_CONVOLUTION_MAXIMUM_DIMENSION . |
[in] | rows | The rows dimension of the convolution. Must be odd and greater than or equal to 3 and less than the value returned from VX_CONTEXT_ATTRIBUTE_CONVOLUTION_MAXIMUM_DIMENSION . |
vx_convolution
. Any possible errors preventing a successful creation should be checked using vxGetStatus
. vx_status VX_API_CALL vxReleaseConvolution | ( | vx_convolution * | conv | ) |
Releases the reference to a convolution matrix. The object may not be garbage collected until its total reference count is zero.
[in] | conv | The pointer to the convolution matrix to release. |
vx_status_e
enumeration. VX_SUCCESS | No errors. |
VX_ERROR_INVALID_REFERENCE | If conv is not a vx_convolution . |
vx_status VX_API_CALL vxQueryConvolution | ( | vx_convolution | conv, |
vx_enum | attribute, | ||
void * | ptr, | ||
vx_size | size | ||
) |
Queries an attribute on the convolution matrix object.
[in] | conv | The convolution matrix object to set. |
[in] | attribute | The attribute to query. Use a vx_convolution_attribute_e enumeration. |
[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_status VX_API_CALL vxSetConvolutionAttribute | ( | vx_convolution | conv, |
vx_enum | attribute, | ||
const void * | ptr, | ||
vx_size | size | ||
) |
Sets attributes on the convolution object.
[in] | conv | The coordinates object to set. |
[in] | attribute | The attribute to modify. Use a vx_convolution_attribute_e enumeration. |
[in] | ptr | The pointer to the value to which to set the attribute. |
[in] | size | The size in bytes of the data pointed to by ptr. |
vx_status_e
enumeration. vx_status VX_API_CALL vxReadConvolutionCoefficients | ( | vx_convolution | conv, |
vx_int16 * | array | ||
) |
Gets the convolution data (copy).
[in] | conv | The reference to the convolution. |
[out] | array | The array to place the convolution. |
VX_CONVOLUTION_ATTRIBUTE_SIZE
to get the needed number of bytes of the array. vx_status_e
enumeration. vx_status VX_API_CALL vxWriteConvolutionCoefficients | ( | vx_convolution | conv, |
const vx_int16 * | array | ||
) |
Sets the convolution data (copy)
[in] | conv | The reference to the convolution. |
[in] | array | The array containing the convolution to be written. |
vxQueryConvolution
and VX_CONVOLUTION_ATTRIBUTE_SIZE
to get the needed number of bytes of the array. vx_status_e
enumeration.