rename Stage to Weak because there is no such term for Soft Cascades
This commit is contained in:
parent
2d0fc80c95
commit
7b6da394f0
@ -85,17 +85,17 @@ const char *const Octave::SC_OCT_SCALE = "scale";
|
|||||||
const char *const Octave::SC_OCT_STAGES = "stageNum";
|
const char *const Octave::SC_OCT_STAGES = "stageNum";
|
||||||
const char *const Octave::SC_OCT_SHRINKAGE = "shrinkingFactor";
|
const char *const Octave::SC_OCT_SHRINKAGE = "shrinkingFactor";
|
||||||
|
|
||||||
struct Stage
|
struct Weak
|
||||||
{
|
{
|
||||||
float threshold;
|
float threshold;
|
||||||
|
|
||||||
static const char *const SC_STAGE_THRESHOLD;
|
static const char *const SC_STAGE_THRESHOLD;
|
||||||
|
|
||||||
Stage(){}
|
Weak(){}
|
||||||
Stage(const cv::FileNode& fn) : threshold((float)fn[SC_STAGE_THRESHOLD]){}
|
Weak(const cv::FileNode& fn) : threshold((float)fn[SC_STAGE_THRESHOLD]){}
|
||||||
};
|
};
|
||||||
|
|
||||||
const char *const Stage::SC_STAGE_THRESHOLD = "stageThreshold";
|
const char *const Weak::SC_STAGE_THRESHOLD = "stageThreshold";
|
||||||
|
|
||||||
struct Node
|
struct Node
|
||||||
{
|
{
|
||||||
@ -277,7 +277,7 @@ struct cv::SoftCascade::Filds
|
|||||||
int shrinkage;
|
int shrinkage;
|
||||||
|
|
||||||
std::vector<Octave> octaves;
|
std::vector<Octave> octaves;
|
||||||
std::vector<Stage> stages;
|
std::vector<Weak> stages;
|
||||||
std::vector<Node> nodes;
|
std::vector<Node> nodes;
|
||||||
std::vector<float> leaves;
|
std::vector<float> leaves;
|
||||||
std::vector<Feature> features;
|
std::vector<Feature> features;
|
||||||
@ -305,7 +305,7 @@ struct cv::SoftCascade::Filds
|
|||||||
|
|
||||||
dprintf("index: %d\n", st);
|
dprintf("index: %d\n", st);
|
||||||
|
|
||||||
const Stage& stage = stages[st];
|
const Weak& stage = stages[st];
|
||||||
{
|
{
|
||||||
int nId = st * 3;
|
int nId = st * 3;
|
||||||
|
|
||||||
@ -481,7 +481,7 @@ struct cv::SoftCascade::Filds
|
|||||||
for (; st != st_end; ++st )
|
for (; st != st_end; ++st )
|
||||||
{
|
{
|
||||||
fns = *st;
|
fns = *st;
|
||||||
stages.push_back(Stage(fns));
|
stages.push_back(Weak(fns));
|
||||||
|
|
||||||
fns = fns[SC_WEEK];
|
fns = fns[SC_WEEK];
|
||||||
FileNodeIterator ftr = fns.begin(), ft_end = fns.end();
|
FileNodeIterator ftr = fns.begin(), ft_end = fns.end();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user