The OpenVX Specification
a73e458
|
Defines the Kernel Object and Interface.
A Kernel in OpenVX is the abstract representation of an computer vision function, such as a “Sobel Gradient” or “Lucas Kanade Feature Tracking”. A vision function may implement many similar or identical features from other functions, but it is still considered a single unique kernel as long as it is named by the same string and enumeration and conforms to the results specified by OpenVX. Kernels are similar to function signatures in this regard.
In each of the cases, a client of OpenVX could request the kernels in nearly the same manner. There are two main approaches, which depend on the method a client calls to get the kernel reference. The first uses enumerations.
The second method depends on using strings to get the kernel reference.
Modules | |
The list of available libraries | |
The standard list of available libraries [R00400]. | |
The list of available kernels | |
The standard list of available vision kernels. | |
Data Structures | |
struct | vx_kernel_info_t |
The Kernel Information Structure. This is returned by the Context to indicate which kernels are available in the OpenVX implementation. More... | |
Macros | |
#define | VX_MAX_KERNEL_NAME (256) |
Defines the length of a kernel name string to be added to OpenVX, including the trailing zero [R01652]. | |
Typedefs | |
typedef struct _vx_kernel * | vx_kernel |
An opaque reference to the descriptor of a kernel. More... | |
Functions | |
vx_kernel VX_API_CALL | vxGetKernelByEnum (vx_context context, vx_enum kernel) |
Obtains a reference to the kernel [R00656]. More... | |
vx_kernel VX_API_CALL | vxGetKernelByName (vx_context context, const vx_char *name) |
Obtains a reference to a kernel using a string to specify the name [R00650]. More... | |
vx_status VX_API_CALL | vxQueryKernel (vx_kernel kernel, vx_enum attribute, void *ptr, vx_size size) |
This allows the client to query the kernel to get information about the number of parameters, enum values, etc [R00661]. More... | |
vx_status VX_API_CALL | vxReleaseKernel (vx_kernel *kernel) |
Release the reference to the kernel [R00667]. The object may not be garbage collected until its total reference count is zero. More... | |
struct vx_kernel_info_t |
The Kernel Information Structure. This is returned by the Context to indicate which kernels are available in the OpenVX implementation.
Definition at line 1635 of file vx_types.h.
Data Fields | ||
---|---|---|
vx_enum | enumeration |
The kernel enumeration value from The list of available kernels (or an extension thereof).
|
vx_char | name[VX_MAX_KERNEL_NAME] |
The kernel name in dotted hierarchical format. e.g. "org.khronos.openvx.sobel_3x3".
|
typedef struct _vx_kernel* vx_kernel |
An opaque reference to the descriptor of a kernel.
Definition at line 198 of file vx_types.h.
vx_kernel VX_API_CALL vxGetKernelByName | ( | vx_context | context, |
const vx_char * | name | ||
) |
Obtains a reference to a kernel using a string to specify the name [R00650].
User Kernels follow a "dotted" heirarchical syntax. For example: "com.company.example.xyz". The following are strings specifying the kernel names:
org.khronos.openvx.color_convert
org.khronos.openvx.channel_extract
org.khronos.openvx.channel_combine
org.khronos.openvx.sobel_3x3
org.khronos.openvx.magnitude
org.khronos.openvx.phase
org.khronos.openvx.scale_image
org.khronos.openvx.table_lookup
org.khronos.openvx.histogram
org.khronos.openvx.equalize_histogram
org.khronos.openvx.absdiff
org.khronos.openvx.mean_stddev
org.khronos.openvx.threshold
org.khronos.openvx.integral_image
org.khronos.openvx.dilate_3x3
org.khronos.openvx.erode_3x3
org.khronos.openvx.median_3x3
org.khronos.openvx.box_3x3
org.khronos.openvx.gaussian_3x3
org.khronos.openvx.custom_convolution
org.khronos.openvx.gaussian_pyramid
org.khronos.openvx.accumulate
org.khronos.openvx.accumulate_weighted
org.khronos.openvx.accumulate_square
org.khronos.openvx.minmaxloc
org.khronos.openvx.convertdepth
org.khronos.openvx.canny_edge_detector
org.khronos.openvx.and
org.khronos.openvx.or
org.khronos.openvx.xor
org.khronos.openvx.not
org.khronos.openvx.multiply
org.khronos.openvx.add
org.khronos.openvx.subtract
org.khronos.openvx.warp_affine
org.khronos.openvx.warp_perspective
org.khronos.openvx.harris_corners
org.khronos.openvx.fast_corners
org.khronos.openvx.optical_flow_pyr_lk
org.khronos.openvx.remap
org.khronos.openvx.halfscale_gaussian
org.khronos.openvx.laplacian_pyramid
org.khronos.openvx.laplacian_reconstruct
org.khronos.openvx.non_linear_filter
[in] | context | The reference to the implementation context [R00651]. |
[in] | name | The string of the name of the kernel to get [R00652]. |
vxGetStatus
[R00654].vxLoadKernels
if the kernel is not provided by the OpenVX implementation. vx_kernel VX_API_CALL vxGetKernelByEnum | ( | vx_context | context, |
vx_enum | kernel | ||
) |
Obtains a reference to the kernel [R00656].
Enum values above the standard set are assumed to apply to loaded libraries.
[in] | context | The reference to the implementation context [R00657]. |
[in] | kernel | A value from The list of available kernels or a vendor or client-defined value [R00658]. |
vx_kernel
reference [R00659]. Any possible errors preventing a successful completion of the function should be checked using vxGetStatus
[R00660].vxLoadKernels
if the kernel is not provided by the OpenVX implementation. vx_status VX_API_CALL vxQueryKernel | ( | vx_kernel | kernel, |
vx_enum | attribute, | ||
void * | ptr, | ||
vx_size | size | ||
) |
This allows the client to query the kernel to get information about the number of parameters, enum values, etc [R00661].
[in] | kernel | The kernel reference to query [R00662]. |
[in] | attribute | The attribute to query. Use a The Kernel Attribute Constants [R00663]. |
[out] | ptr | The pointer to the location at which to store the resulting value [R00664]. |
[in] | size | The size of the container to which ptr points [R00665]. |
The vx_status Constants
value. VX_SUCCESS | No errors; any other value indicates failure [R00666]. |
VX_ERROR_INVALID_REFERENCE | kernel is not a valid vx_kernel reference. |
VX_ERROR_INVALID_PARAMETERS | If any of the other parameters are incorrect. |
VX_ERROR_NOT_SUPPORTED | If the attribute value is not supported in this implementation. |
vx_status VX_API_CALL vxReleaseKernel | ( | vx_kernel * | kernel | ) |
Release the reference to the kernel [R00667]. The object may not be garbage collected until its total reference count is zero.
[in] | kernel | The pointer to the kernel reference to release [R00668]. |
The vx_status Constants
value. VX_SUCCESS | No errors; any other value indicates failure [R00670]. |
VX_ERROR_INVALID_REFERENCE | kernel is not a valid vx_kernel reference. |