Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv
Commits
6c8bc6a2
Commit
6c8bc6a2
authored
Jan 07, 2016
by
Christoph Spörk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed ABI incompatibilities as proposed by alalek
related to issue 4969 fixes issue 5891 fixes issue 5922
parent
a7aa198b
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
6 deletions
+11
-6
ml.hpp
modules/ml/include/opencv2/ml.hpp
+8
-3
svm.cpp
modules/ml/src/svm.cpp
+3
-3
No files found.
modules/ml/include/opencv2/ml.hpp
View file @
6c8bc6a2
...
...
@@ -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
);
};
/****************************************************************************************\
...
...
modules/ml/src/svm.cpp
View file @
6c8bc6a2
...
...
@@ -2261,14 +2261,14 @@ Ptr<SVM> SVM::create()
return
makePtr
<
SVMImpl
>
();
}
Ptr
<
SVM
>
SVM
::
load
(
const
String
&
file
name
)
Ptr
<
SVM
>
SVM
::
load
(
const
String
&
file
path
)
{
FileStorage
fs
;
fs
.
open
(
file
name
,
FileStorage
::
READ
);
fs
.
open
(
file
path
,
FileStorage
::
READ
);
Ptr
<
SVM
>
svm
=
makePtr
<
SVMImpl
>
();
svm
->
read
(
fs
.
getFirstTopLevelNode
());
((
SVMImpl
*
)
svm
.
get
())
->
read
(
fs
.
getFirstTopLevelNode
());
return
svm
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment