@@ -393,6 +393,17 @@ class CV_EXPORTS_W NormalBayesClassifier : public StatModel
393
393
/* * Creates empty model
394
394
Use StatModel::train to train the model after creation. */
395
395
CV_WRAP static Ptr<NormalBayesClassifier> create ();
396
+
397
+ /* * @brief Loads and creates a serialized NormalBayesClassifier from a file
398
+ *
399
+ * Use NormalBayesClassifier::save to serialize and store an NormalBayesClassifier to disk.
400
+ * Load the NormalBayesClassifier from this file again, by calling this function with the path to the file.
401
+ * Optionally specify the node for the file containing the classifier
402
+ *
403
+ * @param filepath path to serialized NormalBayesClassifier
404
+ * @param nodeName name of node containing the classifier
405
+ */
406
+ CV_WRAP static Ptr<NormalBayesClassifier> load (const String& filepath , const String& nodeName = String());
396
407
};
397
408
398
409
/* ***************************************************************************************\
@@ -927,6 +938,17 @@ class CV_EXPORTS_W EM : public StatModel
927
938
can use one of the EM::train\* methods or load it from file using Algorithm::load\<EM\>(filename).
928
939
*/
929
940
CV_WRAP static Ptr<EM> create ();
941
+
942
+ /* * @brief Loads and creates a serialized EM from a file
943
+ *
944
+ * Use EM::save to serialize and store an EM to disk.
945
+ * Load the EM from this file again, by calling this function with the path to the file.
946
+ * Optionally specify the node for the file containing the classifier
947
+ *
948
+ * @param filepath path to serialized EM
949
+ * @param nodeName name of node containing the classifier
950
+ */
951
+ CV_WRAP static Ptr<EM> load (const String& filepath , const String& nodeName = String());
930
952
};
931
953
932
954
/* ***************************************************************************************\
@@ -1512,6 +1534,17 @@ class CV_EXPORTS_W LogisticRegression : public StatModel
1512
1534
Creates Logistic Regression model with parameters given.
1513
1535
*/
1514
1536
CV_WRAP static Ptr<LogisticRegression> create ();
1537
+
1538
+ /* * @brief Loads and creates a serialized LogisticRegression from a file
1539
+ *
1540
+ * Use LogisticRegression::save to serialize and store an LogisticRegression to disk.
1541
+ * Load the LogisticRegression from this file again, by calling this function with the path to the file.
1542
+ * Optionally specify the node for the file containing the classifier
1543
+ *
1544
+ * @param filepath path to serialized LogisticRegression
1545
+ * @param nodeName name of node containing the classifier
1546
+ */
1547
+ CV_WRAP static Ptr<LogisticRegression> load (const String& filepath , const String& nodeName = String());
1515
1548
};
1516
1549
1517
1550
@@ -1627,6 +1660,17 @@ class CV_EXPORTS_W SVMSGD : public cv::ml::StatModel
1627
1660
*/
1628
1661
CV_WRAP static Ptr<SVMSGD> create ();
1629
1662
1663
+ /* * @brief Loads and creates a serialized SVMSGD from a file
1664
+ *
1665
+ * Use SVMSGD::save to serialize and store an SVMSGD to disk.
1666
+ * Load the SVMSGD from this file again, by calling this function with the path to the file.
1667
+ * Optionally specify the node for the file containing the classifier
1668
+ *
1669
+ * @param filepath path to serialized SVMSGD
1670
+ * @param nodeName name of node containing the classifier
1671
+ */
1672
+ CV_WRAP static Ptr<SVMSGD> load (const String& filepath , const String& nodeName = String());
1673
+
1630
1674
/* * @brief Function sets optimal parameters values for chosen SVM SGD model.
1631
1675
* @param svmsgdType is the type of SVMSGD classifier.
1632
1676
* @param marginType is the type of margin constraint.
0 commit comments