TLD(Tracking-Learning-Detection)学习与源码理解之(七)
下面是自己在看论文和这些大牛的分析过程中,对进行了一些理解,但是由于自己接触图像处理和机器视觉没多久,另外由于自己能力比较弱,所以分析过程可能会有不少的错误,希望各位不吝指正。而且,因为很多地方不懂,所以注释得非常乱,还海涵。
FerNNClassifier.h
- /*
- * FerNNClassifier.h
- */
- #include <opencv2/opencv.hpp>
- #include <stdio.h>
- class FerNNClassifier{
- private:
- //下面这些参数通过开始运行时读入parameters.yml文件进行初始化
- float thr_fern;
- int structSize;
- int nstructs;
- float valid;
- float ncc_thesame;
- float thr_nn;
- int acum;
- public:
- //Parameters
- float thr_nn_valid;
- void read(const cv::FileNode& file);
- void prepare(const std::vector<cv::Size>& scales);
- void getFeatures(const cv::Mat& image,const int& scale_idx,std::vector<int>& fern);
- void update(const std::vector<int>& fern, int C, int N);
- float measure_forest(std::vector<int> fern);
- void trainF(const std::vector<std::pair<std::vector<