aihot  2017-04-27 20:10:03  OpenCV |   查看评论   
  
  •   float thrN; //Negative threshold  
  •   float thrP;  //Positive thershold  
  •     
  •   //NN Members  
  •   std::vector<cv::Mat> pEx; //NN positive examples  
  •   std::vector<cv::Mat> nEx; //NN negative examples  
  • }; 
  • FerNNClassifier.cpp
    1. /* 
    2.  * FerNNClassifier.cpp
    3.  */  
    4.   
    5. #include <FerNNClassifier.h>  
    6.   
    7. using namespace cv;  
    8. using namespace std;  
    9.   
    10. void FerNNClassifier::read(const FileNode& file){  
    11.   ///Classifier Parameters  
    12.   //下面这些参数通过程序开始运行时读入parameters.yml文件进行初始化  
    13.   valid = (float)file["valid"];  
    14.   ncc_thesame = (float)file["ncc_thesame"];  
    15.   nstructs = (int)file["num_trees"];   //树木(由一个特征组构建,每组特征代表图像块的不同视图表示)的个数  
    16.   structSize = (int)file["num_features"];  //每棵树的特征个数,也即每棵树的节点个数;树上每一个特征都作为一个决策节点  
    17.   thr_fern = (float)file["thr_fern"];  
    18.   thr_nn = (float)file["thr_nn"];  
    19.   thr_nn_valid = (float)file["thr_nn_valid"];  
    20. }  
    21.   
    22. void FerNNClassifier::prepare(const vector<Size>& scales){  
    23.   acum = 0;  
    24.   //Initialize test locations for features  
    25.   int totalFeatures = nstructs * structSize;  
    26.   //二维向量  包含全部尺度(scales)的扫描窗口,每个尺度包含totalFeatures个特征  
     

    除特别注明外,本站所有文章均为 赢咖4注册 原创,转载请注明出处来自TLD(Tracking-Learning-Detection)学习与源码理解之(七)

    留言与评论(共有 0 条评论)
       
    验证码:
    [lianlun]1[/lianlun]