Skip to content

GMatDesc

gapiclassOpenCV 5.0.0
import { GMatDesc } from '@banou/opencv-wasm'

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

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

\addtogroup gapi_meta_args

Constructors and members

static new

FIXME: Maybe it's real questionable to have it here

new(): GMatDesc;
4 available overloads
new(d: number, c: number, s: Size): GMatDesc;
new(d: number, c: number, s: Size, p: boolean): GMatDesc;
new(d: number, dd: IntVector): GMatDesc;
new(): GMatDesc;
d

d argument (number).

c

c argument (number).

s

s argument (Size).

p

p argument (boolean).

dd

dd argument (IntVector).

Returns

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

static from2

Create an owned GMatDesc instance with the supplied configuration.

\addtogroup gapi_meta_args

from2(_0: number, _1: IntVector): GMatDesc | null;
_0

0 argument (number).

_1

1 argument (IntVector).

Returns

The GMatDesc | null 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;
Returns

The this result.

depth

FIXME: Default initializers in C++14

depth: number;

chan

chan value for GMatDesc.

chan: number;

size

NB.: no multi-dimensional cases covered yet

size: Size;

planar

NB.: no multi-dimensional cases covered yet

planar: boolean;

dims

FIXME: Maybe it's real questionable to have it here

dims: IntVector;

withSizeDelta

Meta combinator: return a new GMatDesc which differs in size by delta (all other fields are taken unchanged from this GMatDesc) FIXME: a better name?

withSizeDelta(delta: Size): GMatDesc;
delta

delta argument (Size).

Returns

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

withSizeDelta1

Meta combinator: return a new GMatDesc which differs in size by delta (all other fields are taken unchanged from this GMatDesc)

This is an overload.

withSizeDelta1(dx: number, dy: number): GMatDesc;
dx

dx argument (number).

dy

dy argument (number).

Returns

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

withSize

Return a matrix descriptor with a new image width and height, retaining its other layout attributes.

withSize(sz: Size): GMatDesc;
sz

sz argument (Size).

Returns

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

withDepth

Meta combinator: return a new GMatDesc with specified data depth. (all other fields are taken unchanged from this GMatDesc)

withDepth(ddepth: number): GMatDesc;
ddepth

ddepth argument (number).

Returns

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

withType

Meta combinator: return a new GMatDesc with specified data depth and number of channels. (all other fields are taken unchanged from this GMatDesc)

withType(ddepth: number, dchan: number): GMatDesc;
ddepth

ddepth argument (number).

dchan

dchan argument (number).

Returns

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

asPlanar

Meta combinator: return a new GMatDesc with planar flag set (no size changes are performed, only channel interpretation is changed (interleaved -> planar)

asPlanar(): GMatDesc;
Returns

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

asPlanar1

Meta combinator: return a new GMatDesc reinterpreting 1-channel input as planar image (size height is divided by plane number)

asPlanar1(planes: number): GMatDesc;
planes

planes argument (number).

Returns

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

asInterleaved

Meta combinator: return a new GMatDesc with planar flag set to false (no size changes are performed, only channel interpretation is changed (planar -> interleaved)

asInterleaved(): GMatDesc;
Returns

The GMatDesc 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.