MatVector
import { MatVector } from '@banou/opencv-wasm'Use after await initOpenCV(). See the initialization and named imports guide.
Native object: release it with using or delete(). Factories can return null; check before calling methods.
An owned native vector. Append values with push_back, read them with get, and release the vector with using or delete(). Native object elements returned by get require separate disposal.
Constructors and members
static new
Create an empty owned native vector. Dispose it with using or delete().
new(): MatVector;The MatVector result. Release returned native handles with using or delete(), including handles nested in results.
clone
Create another handle to the same native object. This retains the object without copying its pixels or algorithm state; dispose both handles separately.
clone(): this;The this result.
size
Return the number of elements in this native vector.
size(): number;The number result.
get
Read an element by index. Object elements are returned as owned native handles that require disposal.
get(_0: number): Mat | undefined;_00 argument (number).
The Mat | undefined result. Release returned native handles with using or delete(), including handles nested in results.
push_back
Append one element, copying its native value into this vector.
push_back(_0: Mat): void;_00 argument (Mat).
resize
Change the vector length, filling new entries with the supplied value.
resize(_0: number, _1: Mat): void;_00 argument (number).
_11 argument (Mat).
set
Replace an element by index and return whether the assignment succeeded.
set(_0: number, _1: Mat): boolean;_00 argument (number).
_11 argument (Mat).
The boolean result.
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.