OpenCV  4.1.1-pre
Open Source Computer Vision
Looking for a C++ dev who knows OpenCV?
I'm looking for work. Hire me!

Layer factory allows to create instances of registered layers. More...

#include <opencv2/dnn/layer.hpp>

Public Types

typedef Ptr< Layer >(* Constructor) (LayerParams &params)
 Each Layer class must provide this function to the factory. More...
 

Static Public Member Functions

static Ptr< LayercreateLayerInstance (const String &type, LayerParams &params)
 Creates instance of registered layer. More...
 
static void registerLayer (const String &type, Constructor constructor)
 Registers the layer class with typename type and specified constructor. Thread-safe. More...
 
static void unregisterLayer (const String &type)
 Unregisters registered layer with specified type name. Thread-safe. More...
 

Detailed Description

Layer factory allows to create instances of registered layers.

Member Typedef Documentation

◆ Constructor

typedef Ptr<Layer>(* cv::dnn::LayerFactory::Constructor) (LayerParams &params)

Each Layer class must provide this function to the factory.

Member Function Documentation

◆ createLayerInstance()

static Ptr<Layer> cv::dnn::LayerFactory::createLayerInstance ( const String type,
LayerParams params 
)
static

Creates instance of registered layer.

Parameters
typetype name of creating layer.
paramsparameters which will be used for layer initialization.
Note
Thread-safe.

◆ registerLayer()

static void cv::dnn::LayerFactory::registerLayer ( const String type,
Constructor  constructor 
)
static

Registers the layer class with typename type and specified constructor. Thread-safe.

Referenced by cv::dnn::details::_LayerStaticRegisterer::_LayerStaticRegisterer().

Here is the caller graph for this function:

◆ unregisterLayer()

static void cv::dnn::LayerFactory::unregisterLayer ( const String type)
static

Unregisters registered layer with specified type name. Thread-safe.

Referenced by cv::dnn::details::_LayerStaticRegisterer::~_LayerStaticRegisterer().

Here is the caller graph for this function:

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