1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-31 08:13:04 +04:00

Add Ptr KNearest::load and python binding

This commit is contained in:
LaurentBerger
2019-04-15 15:51:30 +02:00
parent c9a76ede94
commit 621e3eaed8
3 changed files with 32 additions and 0 deletions
+8
View File
@@ -505,6 +505,14 @@ public:
The static method creates empty %KNearest classifier. It should be then trained using StatModel::train method.
*/
CV_WRAP static Ptr<KNearest> create();
/** @brief Loads and creates a serialized knearest from a file
*
* Use KNearest::save to serialize and store an KNearest to disk.
* Load the KNearest from this file again, by calling this function with the path to the file.
*
* @param filepath path to serialized KNearest
*/
CV_WRAP static Ptr<KNearest> load(const String& filepath);
};
/****************************************************************************************\