OpenCV for Unity  2.6.0
Enox Software / Please refer to OpenCV official document ( http://docs.opencv.org/4.9.0/index.html ) for the details of the argument of the method.
Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
OpenCVForUnity.DnnModule.Layer Class Reference

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

Inheritance diagram for OpenCVForUnity.DnnModule.Layer:
OpenCVForUnity.CoreModule.Algorithm OpenCVForUnity.DisposableOpenCVObject OpenCVForUnity.DisposableObject

Public Member Functions

void finalize (List< Mat > inputs, List< Mat > outputs)
 Computes and sets internal parameters according to inputs, outputs and blobs. More...
 
void run (List< Mat > inputs, List< Mat > outputs, List< Mat > internals)
 Allocates layer and computes output. More...
 
int outputNameToIndex (string outputName)
 Returns index of output blob in output array. More...
 
List< Matget_blobs ()
 
void set_blobs (List< Mat > blobs)
 
string get_name ()
 
string get_type ()
 
int get_preferableTarget ()
 
- Public Member Functions inherited from OpenCVForUnity.CoreModule.Algorithm
IntPtr getNativeObjAddr ()
 
virtual void clear ()
 Clears the algorithm state. More...
 
virtual bool empty ()
 Returns true if the Algorithm is empty (e.g. in the very beginning or after unsuccessful read. More...
 
void save (string filename)
 
virtual string getDefaultName ()
 
- Public Member Functions inherited from OpenCVForUnity.DisposableObject
void Dispose ()
 
void ThrowIfDisposed ()
 

Static Public Member Functions

static new Layer __fromPtr__ (IntPtr addr)
 
- Static Public Member Functions inherited from OpenCVForUnity.CoreModule.Algorithm
static Algorithm __fromPtr__ (IntPtr addr)
 
- Static Public Member Functions inherited from OpenCVForUnity.DisposableObject
static IntPtr ThrowIfNullIntPtr (IntPtr ptr)
 

Protected Member Functions

override void Dispose (bool disposing)
 
- Protected Member Functions inherited from OpenCVForUnity.DisposableOpenCVObject
 DisposableOpenCVObject ()
 
 DisposableOpenCVObject (IntPtr ptr)
 
 DisposableOpenCVObject (bool isEnabledDispose)
 
 DisposableOpenCVObject (IntPtr ptr, bool isEnabledDispose)
 
- Protected Member Functions inherited from OpenCVForUnity.DisposableObject
 DisposableObject ()
 
 DisposableObject (bool isEnabledDispose)
 

Additional Inherited Members

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

Each class, derived from Layer, must implement allocate() methods to declare own outputs and forward() 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
[in]inputsvector of already allocated input blobs
[out]outputsvector of already allocated output blobs
       If this method is called after network has allocated all memory for input and output blobs
       and before inferencing.

◆ get_blobs()

List<Mat> OpenCVForUnity.DnnModule.Layer.get_blobs ( )

◆ get_name()

string OpenCVForUnity.DnnModule.Layer.get_name ( )

◆ get_preferableTarget()

int OpenCVForUnity.DnnModule.Layer.get_preferableTarget ( )

◆ get_type()

string OpenCVForUnity.DnnModule.Layer.get_type ( )

◆ outputNameToIndex()

int OpenCVForUnity.DnnModule.Layer.outputNameToIndex ( string  outputName)

Returns index of output blob in output array.

See also
inputNameToIndex()

◆ 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.

◆ set_blobs()

void OpenCVForUnity.DnnModule.Layer.set_blobs ( List< Mat blobs)

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