aihot  2017-04-27 09:49:19  OpenCV |   查看评论   

 TLD(Tracking-Learning-Detection)学习与源码理解之(四)


TLD(Tracking-Learning-Detection)学习与源码理解之(四)

 

       下面是自己在看论文和这些大牛的分析过程中,对进行了一些理解,但是由于自己接触图像处理和机器视觉没多久,另外由于自己能力比较弱,所以分析过程可能会有不少的错误,希望各位不吝指正。而且,因为很多地方不懂,所以注释得非常乱,还海涵。

run_tld.cpp

  1. #include <opencv2/opencv.hpp>  
  2. #include <tld_utils.h>  
  3. #include <iostream>  
  4. #include <sstream>  //c++中的sstream类,提供了和string对象之间的I/O,可以通过ostringstream  
  5.                     //和instringstream两个类来声明对象,分别对应输出流和输入流  
  6. #include <TLD.h>  
  7. #include <stdio.h>  
  8. using namespace cv;  
  9. using namespace std;  
  10. // 全局变量
  11. Rect box;  
  12. bool drawing_box = false;  
  13. bool gotBB = false;  
  14. bool tl = true;  
  15. bool rep = false;  
  16. bool fromfile=false;  
  17. string video;  
  18.   
  19. //读取记录bounding box的文件,获得bounding box的四个参数:左上角坐标x,y和宽高  
  20. /*如在\datasets\06_car\init.txt中:记录了初始目标的bounding box,内容如下 
  21. 142,125,232,164    
  22. */  
  23. void readBB(char* file){  
  24.   ifstream bb_file (file);  //以输入方式打开文件  
  25.   string line;  
  26.   //istream& getline ( istream& , string& );  
  27.   //将输入流is中读到的字符存入str中,终结符默认为 '\n'(换行符)   
  28.   getline(bb_file, line);  
  29.   istringstream linestream(line); 
     1/9    1 2 3 4 5 6 下一页 尾页
 

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

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