OpenCV  3.2.0
Open Source Computer Vision
Classes | Macros
Utilities for New Layers Registration

Classes

class  cv::dnn::LayerFactory
 Layer factory allows to create instances of registered layers. More...
 

Macros

#define REG_RUNTIME_LAYER_CLASS(type, class)   cv::dnn::LayerFactory::registerLayer(#type, _layerDynamicRegisterer<class>);
 Registers layer class in runtime. More...
 
#define REG_RUNTIME_LAYER_FUNC(type, constuctorFunc)   cv::dnn::LayerFactory::registerLayer(#type, constuctorFunc);
 Registers layer constructor in runtime. More...
 
#define REG_STATIC_LAYER_CLASS(type, class)
 Registers layer class on module load time. More...
 
#define REG_STATIC_LAYER_FUNC(type, constuctorFunc)   static cv::dnn::_LayerStaticRegisterer __LayerStaticRegisterer_##type(#type, constuctorFunc);
 Registers layer constructor on module load time. More...
 

Detailed Description

Macro Definition Documentation

§ REG_RUNTIME_LAYER_CLASS

#define REG_RUNTIME_LAYER_CLASS (   type,
  class 
)    cv::dnn::LayerFactory::registerLayer(#type, _layerDynamicRegisterer<class>);

Registers layer class in runtime.

Parameters
typestring, containing type name of the layer.
classC++ class, derived from Layer.

This macros must be placed inside the function code.

§ REG_RUNTIME_LAYER_FUNC

#define REG_RUNTIME_LAYER_FUNC (   type,
  constuctorFunc 
)    cv::dnn::LayerFactory::registerLayer(#type, constuctorFunc);

Registers layer constructor in runtime.

Parameters
typestring, containing type name of the layer.
constuctorFuncpointer to the function of type LayerRegister::Constuctor, which creates the layer.

This macros must be placed inside the function code.

§ REG_STATIC_LAYER_CLASS

#define REG_STATIC_LAYER_CLASS (   type,
  class 
)
Value:
Ptr<Layer> __LayerStaticRegisterer_func_##type(LayerParams &params) \
{ return Ptr<Layer>(new class(params)); } \
static _LayerStaticRegisterer __LayerStaticRegisterer_##type(#type, __LayerStaticRegisterer_func_##type);

Registers layer class on module load time.

Parameters
typestring, containing type name of the layer.
classC++ class, derived from Layer.

This macros must be placed outside the function code.

§ REG_STATIC_LAYER_FUNC

#define REG_STATIC_LAYER_FUNC (   type,
  constuctorFunc 
)    static cv::dnn::_LayerStaticRegisterer __LayerStaticRegisterer_##type(#type, constuctorFunc);

Registers layer constructor on module load time.

Parameters
typestring, containing type name of the layer.
constuctorFuncpointer to the function of type LayerRegister::Constuctor, which creates the layer.

This macros must be placed outside the function code.