-
Notifications
You must be signed in to change notification settings - Fork 0
/
cascadeobject.h
109 lines (82 loc) · 2.67 KB
/
cascadeobject.h
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
#ifndef CASCADEOBJECT_H
#define CASCADEOBJECT_H
#include <QObject>
#include <QList>
#include "stage.h"
#include "feature.h"
class CascadeObject : public QObject
{
Q_OBJECT
Q_PROPERTY(QString stageType READ stageType WRITE setStageType)
Q_PROPERTY(QString featureType READ featureType WRITE setFeatureType)
Q_PROPERTY(int height READ height WRITE setHeight)
Q_PROPERTY(int width READ width WRITE setWidth)
Q_PROPERTY(int stageNum READ stageNum WRITE setStageNum)
Q_PROPERTY(QString boostType READ boostType WRITE setBoostType)
public:
explicit CascadeObject(QObject *parent = 0);
CascadeObject(const CascadeObject &other);
CascadeObject& operator =(const CascadeObject &other);
QString stageType() const;
void setStageType(const QString &type);
QString featureType() const;
void setFeatureType(const QString &type);
int height() const;
void setHeight(const int height);
int width() const;
void setWidth(const int width);
int stageNum() const;
void setStageNum(const int stageNum);
// stageParams start
QString boostType() const;
void setBoostType(const QString &type);
double minHitRate() const;
void setMinHitRate(const double minHitRate);
double maxFalseAlarm() const;
void setMaxFalseAlarm(const double maxFalseAlarm);
double weightTrimRate() const;
void setWeightTrimRate(const double weightTrimRate);
int maxDepth() const;
void setMaxDepth(const int maxDepth);
int maxWeakCount() const;
void setMaxWeakCount(const int maxWeakCount);
// stageParams end
// featureParams start
int maxCatCount() const;
void setMaxCatCount(const int maxCatCount);
int featSize() const;
void setFeatSize(const int featSize);
QString mode() const;
void setMode(const QString &mode);
// featureParams end
Stage getStage(int index) const;
void setStage(const Stage &stage, const int index);
void appendStage(const Stage &stage);
Feature getFeature(int index) const;
void setFeature(const Feature &feature, const int index);
void appendFeature(const Feature &feature);
int featureNum() const;
void prune(int percentage);
private:
QString m_stageType;
QString m_featureType;
int m_height;
int m_width;
int m_stageNum;
// stageParams
QString m_boostType;
double m_minHitRate;
double m_maxFalseAlarm;
double m_weightTrimRate;
int m_maxDepth;
int m_maxWeakCount;
// featureParams
int m_maxCatCount;
int m_featSize;
QString m_mode;
// stage object
QList<Stage> m_stagesList;
// feature object
QList<Feature> m_featuresList;
};
#endif // CASCADEOBJECT_H