Skip to content

UMatData_MemoryFlag

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

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

ARGUMENTSConstructor or factory
CLASSUMatData_MemoryFlag
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.

Comma-separated Matrix Initializer

The class instances are usually not created explicitly. Instead, they are created on "matrix << firstValue" operator.

The sample below initializes 2x2 rotation matrix:

 double angle = 30, a = cos(angle*CV_PI/180), b = sin(angle*CV_PI/180);
 Mat R = (Mat_<double>(2,2) << a, -b, b, a);
 

\deprecated Use constructors with std::initializer_list instead:

 Mat_<int> m1({1, 2, 3, 4}); // 4x1 Mat
 Mat_<uchar> m2({2, 3}, {1, 2, 3, 4, 5, 6}); // 2x3 Mat

 Mat_<double> R({2, 2}, {a, -b, b, a}); // from example

Constructors and members

static COPY_ON_MAP

copy on map constant (1), defined by OpenCV for cv::UMatData.

COPY_ON_MAP: UMatData_MemoryFlagValue<1>,

static HOST_COPY_OBSOLETE

host copy obsolete constant (2), defined by OpenCV for cv::UMatData.

HOST_COPY_OBSOLETE: UMatData_MemoryFlagValue<2>,

static DEVICE_COPY_OBSOLETE

device copy obsolete constant (4), defined by OpenCV for cv::UMatData.

DEVICE_COPY_OBSOLETE: UMatData_MemoryFlagValue<4>,

static TEMP_UMAT

temp umat constant (8), defined by OpenCV for cv::UMatData.

TEMP_UMAT: UMatData_MemoryFlagValue<8>,

static TEMP_COPIED_UMAT

temp copied umat constant (24), defined by OpenCV for cv::UMatData.

TEMP_COPIED_UMAT: UMatData_MemoryFlagValue<24>,

static USER_ALLOCATED

user allocated constant (32), defined by OpenCV for cv::UMatData.

USER_ALLOCATED: UMatData_MemoryFlagValue<32>,

static DEVICE_MEM_MAPPED

device mem mapped constant (64), defined by OpenCV for cv::UMatData.

DEVICE_MEM_MAPPED: UMatData_MemoryFlagValue<64>,

static ASYNC_CLEANUP

async cleanup constant (128), defined by OpenCV for cv::UMatData.

ASYNC_CLEANUP: UMatData_MemoryFlagValue<128>

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.