diff --git a/modules/ml/include/opencv2/ml.hpp b/modules/ml/include/opencv2/ml.hpp index 8e61c63a1..619664ba3 100644 --- a/modules/ml/include/opencv2/ml.hpp +++ b/modules/ml/include/opencv2/ml.hpp @@ -827,15 +827,15 @@ public: return model->isTrained() ? model : Ptr<_Tp>(); } - /** @brief Loads model from an XML String - @param strModel The string variable containing the model (in an XML format) you want to load. + /** @brief Loads model from a String + @param strModel The string variable containing the model you want to load. This is static template method of StatModel. It's usage is following (in the case of SVM): - Ptr svm = StatModel::loadFromString(myXMLStringModel); + Ptr svm = StatModel::loadFromString(myStringModel); */ template static Ptr<_Tp> loadFromString(const String& strModel) { - FileStorage fs(strModel, FileStorage::READ + FileStorage::MEMORY + FileStorage::FORMAT_XML); + FileStorage fs(strModel, FileStorage::READ + FileStorage::MEMORY); Ptr<_Tp> model = _Tp::create(); model->read(fs.getFirstTopLevelNode()); return model->isTrained() ? model : Ptr<_Tp>();