Skip to content

matWithShape

Core and matricesfunctionOpenCV 5.0.0
import { matWithShape } from '@banou/opencv-wasm'

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

ARGUMENTS_0, _1
FUNCTIONmatWithShape
RETURN TYPEMat
Call structure. A void return can still write to destination arguments. The parameter descriptions define inputs, outputs and ownership.

Allocate an owned matrix with arbitrary tensor dimensions supplied in an IntVector and an OpenCV element type. Fill it through the typed pixel views.

matWithShape(_0: IntVector, _1: number): Mat;
_0

0 argument (IntVector).

_1

1 argument (number).

Returns

The Mat result. Release returned native handles with using or delete(), including handles nested in results.

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.