42
#ifndef __OPENCV_ONLINEBOOSTING_HPP__
43
#define __OPENCV_ONLINEBOOSTING_HPP__
45
#include "opencv2/core.hpp"
49
inline
namespace
tracking {
54
inline
namespace
online_boosting {
60
class
WeakClassifierHaarFeature;
61
class
EstimatedGaussDistribution;
62
class
ClassifierThreshold;
73
void
initBaseClassifier();
75
bool
update(
const
Mat& image,
int
target,
float
importance = 1.0 );
76
float
eval(
const
Mat& response );
77
std::vector<int> getSelectedWeakClassifier();
78
float
classifySmooth(
const
std::vector<Mat>& images,
const
Rect& sampleROI,
int& idx );
79
int
getNumBaseClassifier();
80
Size
getPatchSize()
const;
82
bool
getUseFeatureExchange()
const;
83
int
getReplacedClassifier()
const;
85
void
replaceWeakClassifier(
int
idx );
86
int
getSwappedClassifier()
const;
90
int
numBaseClassifier;
91
int
numAllWeakClassifier;
92
int
numWeakClassifier;
95
std::vector<float> alpha;
98
bool
useFeatureExchange;
101
std::vector<bool> m_errorMask;
102
std::vector<float> m_errors;
103
std::vector<float> m_sumErrors;
108
int
replacedClassifier;
109
int
swappedClassifier;
121
return
weakClassifier;
124
void
trainClassifier(
const
Mat& image,
int
target,
float
importance, std::vector<bool>& errorMask );
125
int
selectBestClassifier( std::vector<bool>& errorMask,
float
importance, std::vector<float> & errors );
126
int
computeReplaceWeakestClassifier(
const
std::vector<float> & errors );
127
void
replaceClassifierStatistic(
int
sourceIndex,
int
targetIndex );
128
int
getIdxOfNewWeakClassifier()
130
return
m_idxOfNewWeakClassifier;
133
int
eval(
const
Mat& image );
135
float
getError(
int
curWeakClassifier );
136
void
getErrors(
float* errors );
137
int
getSelectedClassifier()
const;
138
void
replaceWeakClassifier(
int
index );
142
void
generateRandomClassifier();
144
bool
m_referenceWeakClassifier;
145
int
m_numWeakClassifier;
146
int
m_selectedClassifier;
147
int
m_idxOfNewWeakClassifier;
148
std::vector<float> m_wCorrect;
149
std::vector<float> m_wWrong;
161
void
update(
float
value );
164
void
setValues(
float
mean,
float
sigma );
184
bool
update(
float
value,
int
target );
185
int
eval(
float
value );
207
classifySmooth(
const
std::vector<Mat>& image,
float
minMargin = 0 );
212
getConfidence(
int
patchIdx );
214
getConfidenceOfDetection(
int
detectionIdx );
216
float
getConfidenceOfBestDetection()
218
return
m_maxConfidence;
222
getPatchIdxOfBestDetection();
225
getPatchIdxOfDetection(
int
detectionIdx );
227
const
std::vector<int> &
228
getIdxDetections()
const
230
return
m_idxDetections;
233
const
std::vector<float> &
234
getConfidences()
const
236
return
m_confidences;
241
getConfImageDisplay()
const
243
return
m_confImageDisplay;
249
prepareConfidencesMemory(
int
numPatches );
251
prepareDetectionsMemory(
int
numDetections );
254
std::vector<float> m_confidences;
255
int
m_sizeConfidences;
257
std::vector<int> m_idxDetections;
258
int
m_sizeDetections;
259
int
m_idxBestDetection;
260
float
m_maxConfidence;
273
void
update(
float
value,
int
target );
274
int
eval(
float
value );
276
void* getDistribution(
int
target );
Template matrix class derived from Mat
Definition:
mat.hpp:2199
n-dimensional dense array class
Definition:
mat.hpp:802
Template class for 2D rectangles
Definition:
core/types.hpp:421
Template class for specifying the size of an image or rectangle.
Definition:
core/types.hpp:316
Definition:
onlineBoosting.hpp:113
Definition:
onlineBoosting.hpp:267
Definition:
onlineBoosting.hpp:199
Definition:
onlineBoosting.hpp:155
Definition:
onlineBoosting.hpp:66
Definition:
onlineBoosting.hpp:177
"black box" representation of the file storage associated with a file on disk.
Definition:
aruco.hpp:75