-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathclassifier_bt.h
More file actions
46 lines (40 loc) · 1.09 KB
/
Copy pathclassifier_bt.h
File metadata and controls
46 lines (40 loc) · 1.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#ifndef CLASSIFIER_BT_H
#define CLASSIFIER_BT_H
#include "classifierinterface.h"
// BOOST::TYPE
static const int bt_type_idx[] = {
cv::Boost::DISCRETE,
cv::Boost::REAL,
cv::Boost::LOGIT,
cv::Boost::GENTLE,
};
static const char* bt_type_name[] = {
"Boost::DISCRETE",
"Boost::REAL",
"Boost::LOGIT",
"Boost::GENTLE",
};
static const int bt_type_num = sizeof(bt_type_idx)/sizeof(bt_type_idx[0]);
/////////////////////////////////////////////////
class ClassifierBT : public ClassifierInterface
{
public:
ClassifierBT();
//
void trainData(const std::vector<cv::Point>& data, const std::vector<int>& labels);
int classify(int x, int y);
QString toQString() const;
int getMaxClassNum() {
return 2;
}
//
void setParameters(int type, int weakCount, double weightTrimRate, int maxDepth, bool useSurrogates);
private:
cv::Boost cls;
int par_Type;
int par_WeakCount;
double par_WeightTrimRate;
int par_MaxDepth;
bool par_IsUseSurrogates;
};
#endif // CLASSIFIER_BT_H