Original contributor
TLD is an award-winning, real-time algorithm for
tracking of unknown objects in video streams. The object of interest is
defined by a bounding box in a single frame. TLD simultaneously Tracks
the object, Learns its appearance and Detects it
whenever it appears in the video. The result is a real-time tracking that
typically improves over time.
Due to its learning abilities, TLD
has been advertised under name Predator. The video to the left
introduces Predator and proposes several potential applications.
Key Features
·
TLD
tracks currently only a single object
·
Input:
video stream from single monocular camera, bounding box defining the object
·
Output:
object location in the stream, object detector
·
Implementation:
Matlab + C, single thread, no GPU
·
No
offline training stage
·
Real-time
performance on QVGA video stream
·
Ported
to Windows, Mac OS X and Linux
两个中国人的博客关于TLD的理解
Zouxy09 |
yang_xian521
TLD code on windows
ReplyDelete配置好vs2008的opencv编译环境,添加函数库和头文件,新建一个win32 console空项目,然后直接把https://github.com/alantrrs/OpenTLD下载的OpenTLD源代码的include和src下面的文件复制到工程文件下,添加代码和头文件进工程,编译一下就okey。至于编译过程会遇到的错误修正总结如下:
1、TLD::bbPoints函数调用的ceil函数强制把参数类型转换为double。
2、vs2008不存在round函数,重新写一个
int round(float f)
{
if ((int)f+0.5>f)
return (int)f;
else
return (int)f + 1;
}
3、TLD::clusterBB函数中,vs不支持这种动态数组分配。
float L[c-1]; //Level
int nodes[c-1][2];
int belongs[c];
改成指针和动态分配内存
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];
记得在函数末释放分配的内存
delete [] L;
L = NULL;
for (int i = 0; i < 2; ++i)
{
delete [] nodes[i];
nodes[i] = NULL;
}
delete []nodes;
nodes = NULL;
delete [] belongs;
belongs = NULL;
4、调用floor函数的地方,把参数强制类型转换为double
编译运行是米有太大的问题,就想了解一下真实的算法过程,摆脱opencv的函数库,和加入多线程、directx、cpu增强指令集以及gpu的支持。以提高程序的执行效率。