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
3c74c23b
Commit
3c74c23b
authored
Dec 15, 2014
by
Vadim Pisarevsky
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3473 from TobyWanKenobi:master
parents
d54b069a
b35f5d11
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
0 deletions
+15
-0
ml.hpp
modules/ml/include/opencv2/ml.hpp
+15
-0
No files found.
modules/ml/include/opencv2/ml.hpp
View file @
3c74c23b
...
...
@@ -827,6 +827,20 @@ public:
return
model
->
isTrained
()
?
model
:
Ptr
<
_Tp
>
();
}
/** @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> svm = StatModel::loadFromString<SVM>(myStringModel);
*/
template
<
typename
_Tp
>
static
Ptr
<
_Tp
>
loadFromString
(
const
String
&
strModel
)
{
FileStorage
fs
(
strModel
,
FileStorage
::
READ
+
FileStorage
::
MEMORY
);
Ptr
<
_Tp
>
model
=
_Tp
::
create
();
model
->
read
(
fs
.
getFirstTopLevelNode
());
return
model
->
isTrained
()
?
model
:
Ptr
<
_Tp
>
();
}
template
<
typename
_Tp
>
static
Ptr
<
_Tp
>
train
(
const
Ptr
<
TrainData
>&
data
,
const
typename
_Tp
::
Params
&
p
,
int
flags
=
0
)
{
Ptr
<
_Tp
>
model
=
_Tp
::
create
(
p
);
...
...
@@ -1511,6 +1525,7 @@ public:
};
/** @brief The class represents a decision tree node. It has public members:
- member double value
Value at the node: a class label in case of classification or estimated function value in case
of regression.
...
...
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