The following is their own in the study of the paper and the analysis of these Daniel, some understanding of the code, but because of their exposure to image processing and machine vision not long, in addition to their own programming ability is weaker, so the analysis process may be a lot of mistakes, I hope you do not hesitate to correct. Moreover, because the programming many places do not understand, therefore the annotation is very messy, also haihan.
TLD.h
[CPP] View plain copy #include <opencv2/opencv.hpp> #include <tld_utils.h> #include <LKTracker.h> #include <FerNNClassifier.h> #include <fstream> //bounding boxes struct boundingbox : public cv::rect { boundingbox () {} boundingbox (Cv::rect r): cv::rect (r) {} //inheritance requires initialization of the base class public: float overlap; //Overlap with current bounding box int sidx; //scale index }; //detection structure struct detstruct { &NBSP;&NBSP;&NBSP;&NBSP;STD::VECTOR<INT>&Nbsp;bb; std::vector<std::vector<int> > patt; std::vector<float> conf1; &NBSP;&NBSP;&NBSP;&NBSP;STD:: vector<float> conf2; std::vector<std::vector<int> > isin; std::vector<cv::Mat> patch; }; //temporal structure struct tempstruct { std::vector<std::vector<int> > patt; std::vector<float> conf; }; struct ocomparator{ //Compare the coincidence degree ocomparator (const std::vector< Boundingbox>& _grid): Grid (_grid) {} std::vector<boundingbox> grid ; &nbsP bool operator () (INT&NBSP;IDX1,INT&NBSP;IDX2) { return grid[idx1].overlap > grid[idx2].overlap; } }; struct ccomparator{ //compares the two degrees of certainty. ccomparator (const std::vector<float>& _conf): Conf (_conf) {} std::vector<float> conf; bool operator () (int IDX1,INT&NBSP;IDX2) { return conf[idx1]> conf[idx2]; } }; class tld{