Skip to content

dnn_LayerParams

Deep neural networksclassOpenCV 5.0.0
import { dnn_LayerParams } from '@banou/opencv-wasm'

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

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

A DNN layer's instance name, type, learned blobs and named configuration values.

Constructors and members

static new

This class provides all data needed to initialize layer.

It includes dictionary with scalar params (which can be read by using Dict interface), blob params #blobs and optional meta information: #name and #type of layer instance.

new(): dnn_LayerParams;
Returns

The dnn_LayerParams result.

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.

name

Instance name identifying this layer within the network.

set name(value: EmbindString);
2 available overloads
get name(): string;
set name(value: EmbindString);
value

value argument (EmbindString).

Returns

The string result.

type

Registered layer implementation name, such as ReLU or a custom TypeScript layer type.

set type(value: EmbindString);
2 available overloads
get type(): string;
set type(value: EmbindString);
value

value argument (EmbindString).

Returns

The string result.

blobs

Learned parameter tensors associated with this layer.

blobs: MatVector;

setInt

Store a named int configuration value for this DNN layer.

setInt(_0: EmbindString, _1: number): void;
_0

0 argument (EmbindString).

_1

1 argument (number).

setReal

Store a named real configuration value for this DNN layer.

setReal(_0: EmbindString, _1: number): void;
_0

0 argument (EmbindString).

_1

1 argument (number).

setString

Store a named string configuration value for this DNN layer.

setString(_0: EmbindString, _1: EmbindString): void;
_0

0 argument (EmbindString).

_1

1 argument (EmbindString).

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.