aihot  2017-04-27 09:49:19  OpenCV |   查看评论   
( box.height < 0 ){  
  •         box.y += box.height;  
  •         box.height *= -1;  
  •     }  
  •     gotBB = true;   //已经获得bounding box  
  •     break;  
  •   }  
  • }  
  •   
  • void print_help(char** argv){  
  •   printf("use:\n     %s -p /path/parameters.yml\n",argv[0]);  
  •   printf("-s    source video\n-b        bounding box file\n-tl  track and learn\n-r     repeat\n");  
  • }  
  •   
  • //分析运行程序时的命令行参数  
  • void read_options(int argc, char** argv, VideoCapture& capture, FileStorage &fs){  
  •   for (int i=0;i<argc;i++){  
  •       if (strcmp(argv[i],"-b")==0){  
  •           if (argc>i){  
  •               readBB(argv[i+1]);  //是否指定初始的bounding box  
  •               gotBB = true;  
  •           }  
  •           else  
  •             print_help(argv);  
  •       }  
  •       if (strcmp(argv[i],"-s")==0){   //从视频文件中读取  
  •           if (argc>i){  
  •               video = string(argv[i+1]);  
  •               capture.open(video);  
  •               fromfile = true;  
  •           }  
  •           else  
  •             print_help(argv);  
  •   
  •       }  
  •       //类似于格式到XML,Yahoo!标记语言(YML)提供了打开的功能
  •       //应用安全,标准化。 您在HTML代码中包含YML标签
  •       //的开放赢咖4平台。
  •       if
  •  

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

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