GKernelPackage
import { GKernelPackage } from '@banou/opencv-wasm'Use after await initOpenCV(). See the initialization and named imports guide.
Native object: release it with using or delete(). Factories can return null; check before calling methods.
namespace gapi \addtogroup gapi_compile_args
FIXME: Hide implementation A container class for heterogeneous kernel implementation collections and graph transformations.
GKernelPackage is a special container class which stores kernel implementations and graph transformations. Objects of this class are created and passed to cv::GComputation::compile() to specify which kernels to use and which transformations to apply in the compiled graph. GKernelPackage may contain kernels of different backends, e.g. be heterogeneous.
The most easy way to create a kernel package is to use function cv::gapi::kernels(). This template functions takes kernel implementations in form of type list (variadic template) and generates a kernel package atop of that.
Kernel packages can be also generated programmatically, starting with an empty package (created with the default constructor) and then by populating it with kernels via call to GKernelPackage::include(). Note this method is also a template one since G-API kernel and transformation implementations are types, not objects.
Finally, two kernel packages can be combined into a new one with function cv::gapi::combine().
Constructors and members
clone
Create another handle to the same native object. This retains the object without copying its pixels or algorithm state; dispose both handles separately.
clone(): this;The this result.
size
Returns total number of kernels in the package (across all backends included)
size(): number;a number of kernels in the package
These signatures describe this package. Upstream documentation can mention optional backends that are absent from this build. Check runtime compatibility before choosing a backend or file format.