12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485 |
- /*M
- #ifndef OPENCV_DNN_LAYER_HPP
- #define OPENCV_DNN_LAYER_HPP
- #include <opencv2/dnn.hpp>
- namespace cv {
- namespace dnn {
- CV__DNN_EXPERIMENTAL_NS_BEGIN
- /** @brief %Layer factory allows to create instances of registered layers. */
- class CV_EXPORTS LayerFactory
- {
- public:
-
- typedef Ptr<Layer>(*Constuctor)(LayerParams ¶ms);
-
- static void registerLayer(const String &type, Constuctor constructor);
-
- static void unregisterLayer(const String &type);
- /** @brief Creates instance of registered layer.
- * @param type type name of creating layer.
- * @param params parameters which will be used for layer initialization.
- * @note Thread-safe.
- */
- static Ptr<Layer> createLayerInstance(const String &type, LayerParams& params);
- private:
- LayerFactory();
- };
- CV__DNN_EXPERIMENTAL_NS_END
- }
- }
- #endif
|