Skip to content

UMatUsageFlags

Core and matricesclassOpenCV 5.0.0
import { UMatUsageFlags } from '@banou/opencv-wasm'

Use after await initOpenCV(). See the initialization and named imports guide.

ARGUMENTSConstructor or factory
CLASSUMatUsageFlags
RETURN TYPEOwned native handle
Call structure. A void return can still write to destination arguments. The parameter descriptions define inputs, outputs and ownership.

Native object: release it with using or delete(). Factories can return null; check before calling methods.

MatAllocator ////////////////////////////////////// Usage flags for allocator

Warning: All flags except USAGE_DEFAULT are experimental.

Warning: For the OpenCL allocator, USAGE_ALLOCATE_SHARED_MEMORY depends on OpenCV's optional, experimental integration with OpenCL SVM. To enable this integration, build OpenCV using the WITH_OPENCL_SVM=ON CMake option and, at runtime, call cv::ocl::Context::getDefault().setUseSVM(true); or similar code. Note that SVM is incompatible with OpenCL 1.x.

Constructors and members

static USAGE_DEFAULT

buffer allocation policy is platform and usage specific

USAGE_DEFAULT: UMatUsageFlagsValue<0>,

static USAGE_ALLOCATE_HOST_MEMORY

It is not equal to: USAGE_ALLOCATE_HOST_MEMORY | USAGE_ALLOCATE_DEVICE_MEMORY

USAGE_ALLOCATE_HOST_MEMORY: UMatUsageFlagsValue<1>,

static USAGE_ALLOCATE_DEVICE_MEMORY

It is not equal to: USAGE_ALLOCATE_HOST_MEMORY | USAGE_ALLOCATE_DEVICE_MEMORY

USAGE_ALLOCATE_DEVICE_MEMORY: UMatUsageFlagsValue<2>,

static USAGE_ALLOCATE_SHARED_MEMORY

It is not equal to: USAGE_ALLOCATE_HOST_MEMORY | USAGE_ALLOCATE_DEVICE_MEMORY

USAGE_ALLOCATE_SHARED_MEMORY: UMatUsageFlagsValue<4>,

static __UMAT_USAGE_FLAGS_32BIT

Binary compatibility hint

__UMAT_USAGE_FLAGS_32BIT: UMatUsageFlagsValue<2147483647>

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.