![]() |
VisionWorks Toolkit ReferenceDecember 18, 2015 | 1.2 Release |
This section illustrates the user custom kernel registration.
Custom kernels must be registered in an OpenVX context (Object: Context) before the application can create a node that instantiates this kernel in the context.
This registration is done in 4 steps:
Once a custom kernel is registered, the application can create custom nodes that instantiates this kernel.
4.1. Kernel identifier
Each custom kernel has 2 unique identifiers that must be provided by the application:
"user.kernel.keypoint_array_sort"
) andUSER_KERNEL_KEYPOINT_ARRAY_SORT
).In order to prevent an identifier collision between kernels, there are conventions to create both the name and the enum.
4.2. Kernel object creation
In this step, identifiers, callback functions as well as the number of parameters are provided.
4.3. Kernel parameters declaration
In this step, each kernel parameter must individually be declared, providing information such as its data type, its direction (whether it is an input or output) and whether or not it is optional.
4.4. Kernel finalization
Once all kernel parameters are declared, the kernel can be finalized, which enables the creation of custom nodes that are instances of this custom kernel.