OpenTLD原理网址:
TLD学习篇之算法框架
https://blog.csdn.net/qq_25716575/article/details/50935485
TLD(Tracking-Learning-Detection)学习笔记
https://wangzi6147.github.io/2014/11/14/TLD-5.html
OpenTLD代码下载:https://github.com/arthurv/OpenTLD/tree/master
将四个头文件中的#include< >都修改为#include" "
//int n = floor(v.size() / 2); 报错
int n = floor(float(v.size() / 2));
在TLD.h中我们会发现PatchGenerator会出错。
在VS中在引入opencv的legacy时出现了无法打开,opencv3.0以及后续版本弃用legacy模块了,另外还有其他地方报错,因此我重新使用OpenCV2.4.9
设置包含目录
即【通用属性】 ->【VC++目录】 ->【包含目录】
D:\opencv-2.4.9\opencv\build\include
D:\opencv-2.4.9\opencv\build\include\opencv
D:\opencv-2.4.9\opencv\build\include\opencv2
即【通用属性】 ->【VC++目录】 ->【库目录】
D:\opencv-2.4.9\opencv\build\x86\vc10\lib
D:\opencv-2.4.9\opencv\build\x86\vc10\staticlib
1、Debug下的OpenCV2.4.9依赖项lib文件
opencv_calib3d249d.lib
opencv_contrib249d.lib
opencv_core249d.lib
opencv_features2d249d.lib
opencv_flann249d.lib
opencv_gpu249d.lib
opencv_highgui249d.lib
opencv_imgproc249d.lib
opencv_legacy249d.lib
opencv_ml249d.lib
opencv_nonfree249d.lib
opencv_objdetect249d.lib
opencv_ocl249d.lib
opencv_photo249d.lib
opencv_stitching249d.lib
opencv_superres249d.lib
opencv_ts249d.lib
opencv_video249d.lib
opencv_videostab249d.lib
2、Release下的OpenCV2.4.9依赖项lib文件
opencv_calib3d249.lib
opencv_contrib249.lib
opencv_core249.lib
opencv_features2d249.lib
opencv_flann249.lib
opencv_gpu249.lib
opencv_highgui249.lib
opencv_imgproc249.lib
opencv_legacy249.lib
opencv_ml249.lib
opencv_nonfree249.lib
opencv_objdetect249.lib
opencv_ocl249.lib
opencv_photo249.lib
opencv_stitching249.lib
opencv_superres249.lib
opencv_ts249.lib
opencv_video249.lib
opencv_videostab249.lib
因此在TLD.h添加就不会报错。
#include “opencv2/legacy/legacy.hpp”
ceil错误的解决:
int stepx = ceil(float((bb.width-2*margin_h)/max_pts));
内存分配问题:
float *L = new float [c-1]; //Level
int **nodes = new int *[c-1];
for(int i = 0; i < 2 ;i ++)
nodes[i] = new int [c-1];
int *belongs = new int [c];
L[m]=min_d;
nodes[it][0] = belongs[node_a];
nodes[it][1] = belongs[node_b];
for (int k=0;k
belongs[k]=m;
}
cannot open file 'uiAccess=‘false’
填入的依赖库目录引号对不匹配,会报如题错误。
然后编译成功。
在debug模式下:
warning: Error opening file (…/…/modules/highgui/src/cap_ffmpeg_impl.hpp:545)
在link里debug模式下面使用opencv_highgui249d.lib代替opencv_highgui249.lib
输入参数:
-s david.mpg -p parameters.yml
参考:https://blog.csdn.net/FRD2009041510/article/details/42028399