1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-30 07:43:03 +04:00

Merge pull request #8098 from chrizandr:Tree_load_Wrapper

Add wrappers for load functions for DTrees and Boost classifiers
This commit is contained in:
Alexander Alekhin
2017-01-30 17:25:23 +03:00
committed by GitHub
3 changed files with 33 additions and 0 deletions
+22
View File
@@ -1137,6 +1137,17 @@ public:
file using Algorithm::load\<DTrees\>(filename).
*/
CV_WRAP static Ptr<DTrees> create();
/** @brief Loads and creates a serialized DTrees from a file
*
* Use DTree::save to serialize and store an DTree to disk.
* Load the DTree from this file again, by calling this function with the path to the file.
* Optionally specify the node for the file containing the classifier
*
* @param filepath path to serialized DTree
* @param nodeName name of node containing the classifier
*/
CV_WRAP static Ptr<DTrees> load(const String& filepath , const String& nodeName = String());
};
/****************************************************************************************\
@@ -1251,6 +1262,17 @@ public:
/** Creates the empty model.
Use StatModel::train to train the model, Algorithm::load\<Boost\>(filename) to load the pre-trained model. */
CV_WRAP static Ptr<Boost> create();
/** @brief Loads and creates a serialized Boost from a file
*
* Use Boost::save to serialize and store an RTree to disk.
* Load the Boost from this file again, by calling this function with the path to the file.
* Optionally specify the node for the file containing the classifier
*
* @param filepath path to serialized Boost
* @param nodeName name of node containing the classifier
*/
CV_WRAP static Ptr<Boost> load(const String& filepath , const String& nodeName = String());
};
/****************************************************************************************\