Defines the Image Convolution Object interface.
|
typedef struct _vx_convolution * | vx_convolution |
| The Convolution Object. A user-defined convolution kernel of MxM elements [R01411].
|
|
|
vx_status VX_API_CALL | vxCopyConvolutionCoefficients (vx_convolution conv, void *user_ptr, vx_enum usage, vx_enum user_mem_type) |
| Copy coefficients from/into a convolution object [R01114]. More...
|
|
vx_convolution VX_API_CALL | vxCreateConvolution (vx_context context, vx_size columns, vx_size rows) |
| Creates a reference to a convolution matrix object [R01090]. 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 [R01102]. More...
|
|
vx_status VX_API_CALL | vxReleaseConvolution (vx_convolution *conv) |
| Releases the reference to a convolution matrix [R01098]. 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 [R01108]. More...
|
|
◆ vxCreateConvolution()
Creates a reference to a convolution matrix object [R01090].
- Parameters
-
[in] | context | The reference to the overall context [R01091]. |
[in] | columns | The columns dimension of the convolution [R01092]. Must be odd and greater than or equal to 3 and less than the value returned from VX_CONTEXT_CONVOLUTION_MAX_DIMENSION [R01093]. |
[in] | rows | The rows dimension of the convolution [R01094]. Must be odd and greater than or equal to 3 and less than the value returned from VX_CONTEXT_CONVOLUTION_MAX_DIMENSION [R01095]. |
- Returns
- A convolution reference
vx_convolution
[R01096]. Any possible errors preventing a successful creation should be checked using vxGetStatus
[R01097].
◆ vxReleaseConvolution()
Releases the reference to a convolution matrix [R01098]. The object may not be garbage collected until its total reference count is zero.
- Parameters
-
[in] | conv | The pointer to the convolution matrix to release [R01099]. |
- Postcondition
- After returning from this function the reference is zeroed [R01100].
- Returns
- A
The vx_status Constants
value.
- Return values
-
VX_SUCCESS | No errors; any other value indicates failure [R01101]. |
VX_ERROR_INVALID_REFERENCE | conv is not a valid vx_convolution reference. |
◆ vxQueryConvolution()
Queries an attribute on the convolution matrix object [R01102].
- Parameters
-
[in] | conv | The convolution matrix object to set [R01103]. |
[in] | attribute | The attribute to query. Use a The convolution attributes. value [R01104]. |
[out] | ptr | The location at which to store the resulting value [R01105]. |
[in] | size | The size in bytes of the container to which ptr points [R01106]. |
- Returns
- A
The vx_status Constants
value.
- Return values
-
VX_SUCCESS | No errors; any other value indicates failure [R01107]. |
VX_ERROR_INVALID_REFERENCE | conv is not a valid vx_convolution reference. |
◆ vxSetConvolutionAttribute()
Sets attributes on the convolution object [R01108].
- Parameters
-
[in] | conv | The coordinates object to set [R01109]. |
[in] | attribute | The attribute to modify. Use a The convolution attributes. value [R01110]. |
[in] | ptr | The pointer to the value to which to set the attribute [R01111]. |
[in] | size | The size in bytes of the data pointed to by ptr [R01112]. |
- Returns
- A
The vx_status Constants
value.
- Return values
-
VX_SUCCESS | No errors; any other value indicates failure [R01113]. |
VX_ERROR_INVALID_REFERENCE | conv is not a valid vx_convolution reference. |
◆ vxCopyConvolutionCoefficients()
Copy coefficients from/into a convolution object [R01114].
- Parameters
-
[in] | conv | The reference to the convolution object that is the source or the destination of the copy [R01115]. |
[in] | user_ptr | The address of the memory location where to store the requested coefficient data if the copy was requested in read mode, or from where to get the coefficient data to store into the convolution object if the copy was requested in write mode [R01116]. In the user memory, the convolution coefficient data is structured as a row-major 2D array with elements of the type corresponding to VX_TYPE_CONVOLUTION , with a number of rows corresponding to VX_CONVOLUTION_ROWS and a number of columns corresponding to VX_CONVOLUTION_COLUMNS [R01117]. The accessible memory must be large enough to contain this 2D array: accessible memory in bytes >= sizeof(data_element) * rows * columns [R01118]. |
[in] | usage | This declares the effect of the copy with regard to the convolution object. Only VX_READ_ONLY and VX_WRITE_ONLY are supported [R01119]:
VX_READ_ONLY means that data are copied from the convolution object into the user memory.
VX_WRITE_ONLY means that data are copied into the convolution object from the user memory.
|
[in] | user_mem_type | A Memory import type constants. value that specifies the memory type of the memory referenced by the user_addr [R01120]. |
- Returns
- A
The vx_status Constants
value.
- Return values
-
VX_SUCCESS | No errors; any other value indicates failure [R01121]. |
VX_ERROR_INVALID_REFERENCE | conv is not a valid vx_convolution reference. |
VX_ERROR_INVALID_PARAMETERS | An other parameter is incorrect. |