Skip to content

DataLayout

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

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

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

Enum of data layout for model inference. See: Image2BlobParams

Constructors and members

static DATA_LAYOUT_UNKNOWN

data layout unknown constant (0), defined by OpenCV for cv.

DATA_LAYOUT_UNKNOWN: DataLayoutValue<0>,

static DATA_LAYOUT_ND

OpenCV data layout for 2D data.

DATA_LAYOUT_ND: DataLayoutValue<1>,

static DATA_LAYOUT_NCHW

OpenCV data layout for 4D data.

DATA_LAYOUT_NCHW: DataLayoutValue<2>,

static DATA_LAYOUT_NCDHW

OpenCV data layout for 5D data.

DATA_LAYOUT_NCDHW: DataLayoutValue<3>,

static DATA_LAYOUT_NHWC

Tensorflow-like data layout for 4D data.

DATA_LAYOUT_NHWC: DataLayoutValue<4>,

static DATA_LAYOUT_NDHWC

Tensorflow-like data layout for 5D data.

DATA_LAYOUT_NDHWC: DataLayoutValue<5>,

static DATA_LAYOUT_PLANAR

Tensorflow-like data layout, it should only be used at tf or tflite model parsing.

DATA_LAYOUT_PLANAR: DataLayoutValue<6>,

static DATA_LAYOUT_BLOCK

Block layout (also referred to as 'NC1HWC0'), which some accelerators need and even on CPU a better performance may be achieved.

DATA_LAYOUT_BLOCK: DataLayoutValue<7>,

static DNN_LAYOUT_UNKNOWN

Block layout (also referred to as 'NC1HWC0'), which some accelerators need and even on CPU a better performance may be achieved. for compatibility with the old code in DNN

DNN_LAYOUT_UNKNOWN: DataLayoutValue<0>,

static DNN_LAYOUT_ND

OpenCV data layout for 2D data.

DNN_LAYOUT_ND: DataLayoutValue<1>,

static DNN_LAYOUT_NCHW

OpenCV data layout for 4D data.

DNN_LAYOUT_NCHW: DataLayoutValue<2>,

static DNN_LAYOUT_NCDHW

OpenCV data layout for 5D data.

DNN_LAYOUT_NCDHW: DataLayoutValue<3>,

static DNN_LAYOUT_NHWC

Tensorflow-like data layout for 4D data.

DNN_LAYOUT_NHWC: DataLayoutValue<4>,

static DNN_LAYOUT_NDHWC

Tensorflow-like data layout for 5D data.

DNN_LAYOUT_NDHWC: DataLayoutValue<5>,

static DNN_LAYOUT_PLANAR

Tensorflow-like data layout, it should only be used at tf or tflite model parsing.

DNN_LAYOUT_PLANAR: DataLayoutValue<6>,

static DNN_LAYOUT_BLOCK

Block layout (also referred to as 'NC1HWC0'), which some accelerators need and even on CPU a better performance may be achieved.

DNN_LAYOUT_BLOCK: DataLayoutValue<7>

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.