TLD(Tracking-Learning-Detection) 编译

来源:互联网 发布:知乎 编程电脑配置要求 编辑:程序博客网 时间:2024/06/04 06:18

在Windows下编译TLD:

系统和软件说明:

Windows7 64位

OpenCV 2.4.9

VS2013

matlab 64位

说明:

参考了几个,感觉好几个版本的软件都可以,只要根据软件版本修改就可以了。


1、修改TLD_source根目录中修改compile.m文件:

include = ' -IC:\opencv\build\include\opencv -IC:\opencv\build\include';      %我的opencv是直接解压到C盘中

libpath = 'C:\opencv\build\x64\vc12\lib\'; %vc12对应VS2013,x64对应matlab 64位


2、mex文件夹下的 lk.cpp, fern.cpp, bb_overlap.cpp文件

lk.cpp:

#include "opencv2/opencv.hpp" // cv.h 修改为这个头文件

#include "highgui.hpp" // highgui.h 修改为这个头文件

//#ifdef _CHAR16T // 注释掉以下三行

//#define CHAR16_T

//#endif//


fern.cpp:

//#ifdef _CHAR16T // 注释掉以下三行

//#define CHAR16_T

//#endif//


bb_overlap.cpp:
#include <algorithm> // 添加头文件

//#ifdef _CHAR16T // 注释掉以下三行

//#define CHAR16_T

//#endif//


将opencv下的highgui.hpp文件拷贝到TLD下的mex文件夹下

3、img文件夹下img_blur.m文件

h = fspecial('gaussian',csize,sigma);% FSPECIAL 改为 fspecial

Done it !


参考文献:

https://github.com/zk00006/OpenTLD/wiki/Installation

http://mcximing.github.io/2015/09/24/mexOpenTLD/

0 0