Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv_contrib
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_contrib
Commits
6f138e50
Commit
6f138e50
authored
Jul 03, 2014
by
Vlad Shakhuro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add private header
parent
a8f9344e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
62 additions
and
0 deletions
+62
-0
private.hpp
modules/xobjdetect/include/opencv2/xobjdetect/private.hpp
+62
-0
No files found.
modules/xobjdetect/include/opencv2/xobjdetect/private.hpp
0 → 100644
View file @
6f138e50
#ifndef __OPENCV_XOBJDETECT_PRIVATE_HPP__
#define __OPENCV_XOBJDETECT_PRIVATE_HPP__
#ifndef __OPENCV_BUILD
# error this is a private header, do not include it outside OpenCV
#endif
#include <opencv2/core.hpp>
namespace
cv
{
namespace
xobjdetect
{
class
CV_EXPORTS
Stump
{
public
:
/* Initialize zero stump */
Stump
()
:
threshold_
(
0
),
polarity_
(
1
),
pos_value_
(
1
),
neg_value_
(
-
1
)
{}
/* Initialize stump with given threshold, polarity
and classification values */
Stump
(
int
threshold
,
int
polarity
,
float
pos_value
,
float
neg_value
)
:
threshold_
(
threshold
),
polarity_
(
polarity
),
pos_value_
(
pos_value
),
neg_value_
(
neg_value
)
{}
/* Train stump for given data
data — matrix of feature values, size M x N, one feature per row
labels — matrix of sample class labels, size 1 x N. Labels can be from
{-1, +1}
weights — matrix of sample weights, size 1 x N
Returns chosen feature index. Feature enumeration starts from 0
*/
int
train
(
const
Mat
&
data
,
const
Mat
&
labels
,
const
Mat
&
weights
);
/* Predict object class given
value — feature value. Feature must be the same as was chosen
during training stump
Returns real value, sign(value) means class
*/
float
predict
(
int
value
)
const
;
private
:
/* Stump decision threshold */
int
threshold_
;
/* Stump polarity, can be from {-1, +1} */
int
polarity_
;
/* Classification values for positive and negative classes */
float
pos_value_
,
neg_value_
;
};
}
/* namespace xobjdetect */
}
/* namespace cv */
#endif // __OPENCV_XOBJDETECT_PRIVATE_HPP__
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