The OpenVX Specification  r28647
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
Object: Convolution

Detailed Description

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_status vxAccessConvolutionCoefficients (vx_convolution conv, vx_int16 *array)
 Gets the convolution data (copy). More...
 
vx_status vxCommitConvolutionCoefficients (vx_convolution conv, vx_int16 *array)
 Sets the convolution data (copy),. More...
 
vx_convolution vxCreateConvolution (vx_context context, vx_size columns, vx_size rows)
 Creates a reference to a convolution matrix object. More...
 
vx_status vxQueryConvolution (vx_convolution conv, vx_enum attribute, void *ptr, vx_size size)
 Queries an attribute on the convolution matrix object. More...
 
vx_status 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 vxSetConvolutionAttribute (vx_convolution conv, vx_enum attribute, void *ptr, vx_size size)
 Sets attributes on the convolution object. More...
 

Enumeration Type Documentation

The convolution attributes.

Enumerator
VX_CONVOLUTION_ATTRIBUTE_ROWS 

The number of rows of the convolution matrix. Use a vx_size parameter.

VX_CONVOLUTION_ATTRIBUTE_COLUMNS 

The number of columns of the convolution matrix. Use a vx_size parameter.

VX_CONVOLUTION_ATTRIBUTE_SCALE 

The scale of the convolution matrix. Use a vx_uint32 parameter.

Note
For 1.0, only powers of 2 are supported up to 2^31.
VX_CONVOLUTION_ATTRIBUTE_SIZE 

The total size of the convolution matrix in bytes. Use a vx_size parameter.

Definition at line 880 of file vx_types.h.

Function Documentation

vx_convolution vxCreateConvolution ( vx_context  context,
vx_size  columns,
vx_size  rows 
)

Creates a reference to a convolution matrix object.

Parameters
[in]contextThe reference to the overall context.
[in]columnsThe 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]rowsThe 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.
Returns
vx_convolution
vx_status 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.

Parameters
[in]convThe pointer to the convolution matrix to release.
Postcondition
After returning from this function the reference is zeroed.
Returns
A vx_status_e enumeration.
Return values
VX_SUCCESSNo errors.
VX_ERROR_INVALID_REFERENCEIf graph is not a vx_graph.
vx_status vxQueryConvolution ( vx_convolution  conv,
vx_enum  attribute,
void *  ptr,
vx_size  size 
)

Queries an attribute on the convolution matrix object.

Parameters
[in]convThe convolution matrix object to set.
[in]attributeThe attribute to query. Use a vx_convolution_attribute_e enumeration.
[out]ptrThe location at which to store the resulting value.
[in]sizeThe size of the container to which ptr points.
Returns
A vx_status_e enumeration.
vx_status vxSetConvolutionAttribute ( vx_convolution  conv,
vx_enum  attribute,
void *  ptr,
vx_size  size 
)

Sets attributes on the convolution object.

Parameters
[in]convThe coordinates object to set.
[in]attributeThe attribute to modify. Use a vx_convolution_attribute_e enumeration.
[in]ptrThe pointer to the value to which to set the attribute.
[in]sizeThe size of the data pointed to by ptr.
Returns
A vx_status_e enumeration.
vx_status vxAccessConvolutionCoefficients ( vx_convolution  conv,
vx_int16 array 
)

Gets the convolution data (copy).

Parameters
[in]convThe reference to the convolution.
[out]arrayThe array to place the convolution.
See also
vxQueryConvolution and VX_CONVOLUTION_ATTRIBUTE_SIZE to get the needed number of bytes of the array.
Returns
A vx_status_e enumeration.
Postcondition
vxCommitConvolutionCoefficients
vx_status vxCommitConvolutionCoefficients ( vx_convolution  conv,
vx_int16 array 
)

Sets the convolution data (copy),.

Parameters
[in]convThe reference to the convolution.
[out]arrayThe array to read the convolution.
See also
vxQueryConvolution and VX_CONVOLUTION_ATTRIBUTE_SIZE to get the needed number of bytes of the array.
Returns
A vx_status_e enumeration.
Precondition
vxAccessConvolutionCoefficients