5
#ifndef OPENCV_DNN_LAYER_DETAILS_HPP
6
#define OPENCV_DNN_LAYER_DETAILS_HPP
8
#include <opencv2/dnn/layer.hpp>
12CV__DNN_INLINE_NS_BEGIN
19
#define CV_DNN_REGISTER_LAYER_FUNC(type, constructorFunc) \
20
cv::dnn::LayerFactory::registerLayer(#type, constructorFunc);
27
#define CV_DNN_REGISTER_LAYER_CLASS(type, class) \
28
cv::dnn::LayerFactory::registerLayer(#type, cv::dnn::details::_layerDynamicRegisterer<class>);
35
#define CV_DNN_REGISTER_LAYER_FUNC_STATIC(type, constructorFunc) \
36
static cv::dnn::details::_LayerStaticRegisterer __LayerStaticRegisterer_##type(#type, constructorFunc);
43
#define CV_DNN_REGISTER_LAYER_CLASS_STATIC(type, class) \
44
Ptr<Layer> __LayerStaticRegisterer_func_##type(LayerParams ¶ms) \
45
{ return Ptr<Layer>(new class(params)); } \
46
static cv::dnn::details::_LayerStaticRegisterer __LayerStaticRegisterer_##type(#type, __LayerStaticRegisterer_func_##type);
50
template<
typename
LayerClass>
51Ptr<Layer> _layerDynamicRegisterer(LayerParams ¶ms)
53
return
Ptr<Layer>(LayerClass::create(params));
64
this->type = layerType;
static void unregisterLayer(const String &type)
Unregisters registered layer with specified type name. Thread-safe.
static void registerLayer(const String &type, Constructor constructor)
Registers the layer class with typename type and specified constructor. Thread-safe.
Ptr< Layer >(* Constructor)(LayerParams ¶ms)
Each Layer class must provide this function to the factory
Definition:
layer.hpp:61
Definition:
layer.details.hpp:58
"black box" representation of the file storage associated with a file on disk.
Definition:
aruco.hpp:75