Skip to content

matFromArray

TypeScript helpershelperOpenCV 5.0.0
import { matFromArray } from '@banou/opencv-wasm'
ARGUMENTSSee signature below
HELPERmatFromArray
RETURN TYPEMat
Call structure. A void return can still write to destination arguments. The parameter descriptions define inputs, outputs and ownership.

Copy row-major interleaved values into an owned native matrix on the shared engine. Await initOpenCV() first. Length must equal rows × cols × channels; use bigint for 64-bit integers.

export declare function matFromArray(rows: number, cols: number, type: number, data: PixelValues): Mat;
Returns

An owned matrix to release with using or delete(). Borrowed heap views are copied before allocation.

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.