FerNNClassifier.cpp
- /*
- * FerNNClassifier.cpp
- */
- #include <FerNNClassifier.h>
- using namespace cv;
- using namespace std;
- void FerNNClassifier::read(const FileNode& file){
- ///Classifier Parameters
- //下面这些参数通过程序开始运行时读入parameters.yml文件进行初始化
- valid = (float)file["valid"];
- ncc_thesame = (float)file["ncc_thesame"];
- nstructs = (int)file["num_trees"]; //树木(由一个特征组构建,每组特征代表图像块的不同视图表示)的个数
- structSize = (int)file["num_features"]; //每棵树的特征个数,也即每棵树的节点个数;树上每一个特征都作为一个决策节点
- thr_fern = (float)file["thr_fern"];
- thr_nn = (float)file["thr_nn"];
- thr_nn_valid = (float)file["thr_nn_valid"];
- }
- void FerNNClassifier::prepare(const vector<Size>& scales){
- acum = 0;
- //Initialize test locations for features
- int totalFeatures = nstructs * structSize;
- //二维向量 包含全部尺度(scales)的扫描窗口,每个尺度包含totalFeatures个特征
除特别注明外,本站所有文章均为 赢咖4注册 原创,转载请注明出处来自TLD(Tracking-Learning-Detection)学习与源码理解之(七)