fixed ABI incompatibilities as proposed by alalek
related to issue 4969 fixes issue 5891 fixes issue 5922
This commit is contained in:
parent
a7aa198b4c
commit
6c8bc6a25b
@ -720,9 +720,14 @@ public:
|
||||
find the best parameters for your problem, it can be done with SVM::trainAuto. */
|
||||
CV_WRAP static Ptr<SVM> create();
|
||||
|
||||
CV_WRAP virtual void read( const FileNode& fn ) = 0;
|
||||
|
||||
CV_WRAP static Ptr<SVM> load(const String& fs);
|
||||
/** @brief Loads and creates a serialized svm from a file
|
||||
*
|
||||
* Use SVM::save to serialize and store an SVM to disk.
|
||||
* Load the SVM from this file again, by calling this function with the path to the file.
|
||||
*
|
||||
* @param fs Filename
|
||||
*/
|
||||
CV_WRAP static Ptr<SVM> load(const String& filepath);
|
||||
};
|
||||
|
||||
/****************************************************************************************\
|
||||
|
@ -2261,14 +2261,14 @@ Ptr<SVM> SVM::create()
|
||||
return makePtr<SVMImpl>();
|
||||
}
|
||||
|
||||
Ptr<SVM> SVM::load(const String& filename)
|
||||
Ptr<SVM> SVM::load(const String& filepath)
|
||||
{
|
||||
FileStorage fs;
|
||||
fs.open(filename, FileStorage::READ);
|
||||
fs.open(filepath, FileStorage::READ);
|
||||
|
||||
Ptr<SVM> svm = makePtr<SVMImpl>();
|
||||
|
||||
svm->read(fs.getFirstTopLevelNode());
|
||||
((SVMImpl*)svm.get())->read(fs.getFirstTopLevelNode());
|
||||
return svm;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user