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
d22df8c4
Commit
d22df8c4
authored
Jan 29, 2017
by
chrizandr
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add wrappers for load functions for DTrees and Boost classifiers
parent
aa5caf83
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
0 deletions
+33
-0
ml.hpp
modules/ml/include/opencv2/ml.hpp
+22
-0
boost.cpp
modules/ml/src/boost.cpp
+5
-0
tree.cpp
modules/ml/src/tree.cpp
+6
-0
No files found.
modules/ml/include/opencv2/ml.hpp
View file @
d22df8c4
...
...
@@ -1115,6 +1115,17 @@ public:
file using Algorithm::load\<DTrees\>(filename).
*/
CV_WRAP
static
Ptr
<
DTrees
>
create
();
/** @brief Loads and creates a serialized DTrees from a file
*
* Use DTree::save to serialize and store an DTree to disk.
* Load the DTree from this file again, by calling this function with the path to the file.
* Optionally specify the node for the file containing the classifier
*
* @param filepath path to serialized DTree
* @param nodeName name of node containing the classifier
*/
CV_WRAP
static
Ptr
<
DTrees
>
load
(
const
String
&
filepath
,
const
String
&
nodeName
=
String
());
};
/****************************************************************************************\
...
...
@@ -1229,6 +1240,17 @@ public:
/** Creates the empty model.
Use StatModel::train to train the model, Algorithm::load\<Boost\>(filename) to load the pre-trained model. */
CV_WRAP
static
Ptr
<
Boost
>
create
();
/** @brief Loads and creates a serialized Boost from a file
*
* Use Boost::save to serialize and store an RTree to disk.
* Load the Boost from this file again, by calling this function with the path to the file.
* Optionally specify the node for the file containing the classifier
*
* @param filepath path to serialized Boost
* @param nodeName name of node containing the classifier
*/
CV_WRAP
static
Ptr
<
Boost
>
load
(
const
String
&
filepath
,
const
String
&
nodeName
=
String
());
};
/****************************************************************************************\
...
...
modules/ml/src/boost.cpp
View file @
d22df8c4
...
...
@@ -507,6 +507,11 @@ Ptr<Boost> Boost::create()
return
makePtr
<
BoostImpl
>
();
}
Ptr
<
Boost
>
Boost
::
load
(
const
String
&
filepath
,
const
String
&
nodeName
)
{
return
Algorithm
::
load
<
Boost
>
(
filepath
,
nodeName
);
}
}}
/* End of file. */
modules/ml/src/tree.cpp
View file @
d22df8c4
...
...
@@ -1941,6 +1941,12 @@ Ptr<DTrees> DTrees::create()
return
makePtr
<
DTreesImpl
>
();
}
Ptr
<
DTrees
>
DTrees
::
load
(
const
String
&
filepath
,
const
String
&
nodeName
)
{
return
Algorithm
::
load
<
DTrees
>
(
filepath
,
nodeName
);
}
}
}
...
...
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