OpenCV for Unity 3.0.5
Enox Software / Please refer to OpenCV official document ( http://docs.opencv.org/5.0/index.html ) for the details of the argument of the method.
Loading...
Searching...
No Matches
OpenCVForUnity.DnnModule.Layer Class Reference

This interface class allows to build new Layers - are building blocks of networks. More...

Public Member Functions

void finalize (List< Mat > inputs, List< Mat > outputs)
 Computes and sets internal parameters according to inputs, outputs and blobs.
 
int get_preferableTarget ()
 
void run (List< Mat > inputs, List< Mat > outputs, List< Mat > internals)
 Allocates layer and computes output.
 
- Public Member Functions inherited from OpenCVForUnity.DnnModule.LayerInfo
List< Mat > get_blobs ()
 
string get_name ()
 
string get_type ()
 
IntPtr getNativeObjAddr ()
 
int outputNameToIndex (string outputName)
 
void set_blobs (List< Mat > blobs)
 
- Public Member Functions inherited from OpenCVForUnity.DisposableObject
void Dispose ()
 Releases resources used by this object.
 
void ThrowIfDisposed ()
 Throws ObjectDisposedException if this object has been disposed.
 

Static Public Member Functions

static new Layer __fromPtr__ (IntPtr addr)
 
- Static Public Member Functions inherited from OpenCVForUnity.DnnModule.LayerInfo
static LayerInfo __fromPtr__ (IntPtr addr)
 
- Static Public Member Functions inherited from OpenCVForUnity.DisposableObject
static IntPtr ThrowIfNullIntPtr (IntPtr ptr)
 Returns the native pointer, or throws CoreModule.CvException if it is zero.
 

Protected Member Functions

override void Dispose (bool disposing)
 
- Protected Member Functions inherited from OpenCVForUnity.DnnModule.LayerInfo
override void Dispose (bool disposing)
 
- Protected Member Functions inherited from OpenCVForUnity.DisposableOpenCVObject
 DisposableOpenCVObject ()
 Initializes a new instance with a zero native pointer and dispose enabled.
 
 DisposableOpenCVObject (bool isEnabledDispose)
 Initializes a new instance with a zero native pointer.
 
 DisposableOpenCVObject (IntPtr ptr)
 Initializes a new instance with the specified native pointer and dispose enabled.
 
 DisposableOpenCVObject (IntPtr ptr, bool isEnabledDispose)
 Initializes a new instance with the specified native pointer.
 
- Protected Member Functions inherited from OpenCVForUnity.DisposableObject
 DisposableObject ()
 Initializes a new instance with dispose enabled.
 
 DisposableObject (bool isEnabledDispose)
 Initializes a new instance.
 

Additional Inherited Members

- Package Functions inherited from OpenCVForUnity.DnnModule.LayerInfo
- Package Attributes inherited from OpenCVForUnity.DisposableOpenCVObject
- Properties inherited from OpenCVForUnity.DisposableObject
bool IsDisposed [get, protected set]
 
bool IsEnabledDispose [get, set]
 

Detailed Description

This interface class allows to build new Layers - are building blocks of networks.

A Layer is the executable, backend-specific counterpart of a LayerInfo node: it implements forward() (and finalize()) for a particular backend/target. In the new graph engine a Layer is created from a LayerInfo by the executor factory; shape/type inference stays on the LayerInfo node.

Each class, derived from Layer, must implement forward() method to compute outputs. Also before using the new layer into networks you must register your layer by using one of LayerFactory macros.

Member Function Documentation

◆ __fromPtr__()

static new Layer OpenCVForUnity.DnnModule.Layer.__fromPtr__ ( IntPtr addr)
static

◆ Dispose()

override void OpenCVForUnity.DnnModule.Layer.Dispose ( bool disposing)
protectedvirtual

◆ finalize()

void OpenCVForUnity.DnnModule.Layer.finalize ( List< Mat > inputs,
List< Mat > outputs )

Computes and sets internal parameters according to inputs, outputs and blobs.

Parameters
inputsvector of already allocated input blobs
outputsvector of already allocated output blobs

This method is called after network has allocated all memory for input and output blobs and before inferencing.

◆ get_preferableTarget()

int OpenCVForUnity.DnnModule.Layer.get_preferableTarget ( )

◆ run()

void OpenCVForUnity.DnnModule.Layer.run ( List< Mat > inputs,
List< Mat > outputs,
List< Mat > internals )

Allocates layer and computes output.

Deprecated
This method will be removed in the future release.

The documentation for this class was generated from the following file: