# Toolbox_liKalmanTracker
#### A toolbox using OpenCV 2.4.9 to do point multi-target Kalman tracking.
#### Author: Haozheng Li
#### Email: sai-2008@qq.com or akaHaozhengLi@gmail.com
## 0 Why we need liKalmanTracker?
It's hard to do multi-target Kalman tracking in OpenCV because it only provides a single-target version.
All of us know the process of Kalman tracking, it needs a measurement state and a prediction state in each iteration.
The filter actually mix these two states into one state, then it considers the mix-state as the optimal estimate of targets' position.
Now the key problem is:
#### In each step/frame, the size/count of measurement state and prediction state are not equal.
For example, in (k-1)-th frame, we got N targets, which means we got N Kalman Filters. So we now have N prediction states.
Suppose in k-th frame, we have detected/measured M targets(M != N), then these M measurement states can not match N prediction states.
The result of that is the Kalman Filter iteration can not continue.
That's why "liKalmanTracker" is here.
## 1 How to use liKalmanTracker?
The algorithm is coded by C++, OpenCV 2.4.9 in Visual Studio 2013.
I coded it as a Class called liKalmanTracker.
Just open the project and run main.cpp, a multi-target Kalman tracking demo will run.
All you need to do is as followed:
#### 1) Initialize a liKalmanTracker
API: liKalmanTracker(targetSize, targetName);
#### 2) Feed it with measurement sequence which is detected by your classifier or other algorithm
API: tracker.track(measurement);
#### 3) Print or show the result image, or directly get the tracking sequence
APIs: tracker.print(nFrameCount); tracker.show(dst_tracking, 0); tracker.trackment();
## 2 What does liKalmanTracker do?
As a result, liKalmanTracker deal with several problems in multi-target Kalman tracking as followed:
#### 1) When new targets appear, M will increase, how to match them with N? (M > N)
#### 2) When targets leave, M will decreased, how to match them with N? (M < N)
#### 3) Even if M == N, how to deal with false detected targets?
In one word, <liKalmanTracker> deal with false-rejected and false-accepted problems in multi-target Kalman tracking problem.
It will automatically match measurement states and prediction states, mix them and output the optimal estimate of targets' position.
## 3 How does liKalmanTracker work?
I build a confidence model for all targets.
The confidence/score means how important one target is. It determins the level of a target to be tracked.
For example, a new appearance target's confidence should be 0.
Another example, if one target can not be detected by the classifier or other algorithm, its confidence should be decreased.
As a result, I manage to build such a model to let liKalmanTracker decise which target should be tracked.
#### 1) M > N
It means new targets appear.
Match N Kalman Filters with N measurement based on mini L2 distance. Targets which successfully matched, confidence increase.
Extend and initialize (M - N) new Kalman Filters, confidence = 0.
Now M == N, cool!
#### 2) M < N
It means targets is leaving or false rejected.
Match M measurement with M Kalman Filters based on mini L2 distance. Targets which successfully matched, confidence increase.
Extend (N - M) measurement with N's prediction states, but confidence decrease.
Now M == N, cool!
#### 3) M == N
It means M match N, cool!
#### 4)/0) Opps! Wait! From 1) to 3), false accepted may occur!
So before 1) to 3), firstly we must deal with false accepted problem.
If some measurement are really far from every Kalman Filters, then just consider them as new Kalman Filters.
So now make 4) as 0). Finish it before step 1).
After all of these step, M measurement states can match N prediction states, and all the Kalman Filters will work well.
## 4 Does liKalmanFilter work well?
Sure!
You can run the demo and get result as the gif below, the liKalmanTracker is tracking 4 targets.
![image](https://github.com/HaozhengLi/Toolbox_liKalmanTracker/blob/master/result/result.gif)
The white rectangle is the ROI, when targets leave the ROI, they will not be detected.
If you want to know more details about the multi-target Kalman traking algorithm, or want to know more about my work,
#### please read the pdf paper "Video monitoring method of escalator entrance area based on Adaboost and codebook model" in this project.
# Have fun!! :)
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
基于C++使用OpenCV 2.4.9做点多目标卡尔曼跟踪源码.zip (149个子文件)
liFunction.cpp 14KB
liKalmanTracker.cpp 9KB
main.cpp 5KB
liKalmanTracker.exe 277KB
liKalmanTracker.vcxproj.filters 1KB
result.gif 372KB
liKalmanTracker.h 1KB
liFunction.h 1KB
vc120.idb 891KB
liKalmanTracker.ilk 2.51MB
22.jpg 47KB
23.jpg 45KB
20.jpg 44KB
21.jpg 44KB
19.jpg 44KB
18.jpg 41KB
17.jpg 40KB
16.jpg 39KB
15.jpg 36KB
24.jpg 36KB
25.jpg 35KB
12.jpg 35KB
14.jpg 35KB
13.jpg 35KB
11.jpg 35KB
10.jpg 33KB
8.jpg 30KB
9.jpg 30KB
5.jpg 29KB
6.jpg 28KB
7.jpg 28KB
4.jpg 28KB
26.jpg 23KB
27.jpg 22KB
3.jpg 21KB
28.jpg 21KB
29.jpg 19KB
30.jpg 18KB
23.jpg 16KB
21.jpg 16KB
13.jpg 15KB
15.jpg 15KB
16.jpg 15KB
16.jpg 15KB
22.jpg 15KB
8.jpg 15KB
5.jpg 15KB
8.jpg 15KB
10.jpg 15KB
7.jpg 15KB
14.jpg 15KB
20.jpg 15KB
15.jpg 15KB
5.jpg 15KB
11.jpg 15KB
7.jpg 15KB
3.jpg 15KB
10.jpg 15KB
12.jpg 15KB
6.jpg 15KB
12.jpg 15KB
9.jpg 14KB
4.jpg 14KB
11.jpg 14KB
6.jpg 14KB
4.jpg 14KB
24.jpg 14KB
9.jpg 14KB
14.jpg 14KB
13.jpg 14KB
3.jpg 14KB
20.jpg 13KB
23.jpg 13KB
2.jpg 13KB
22.jpg 13KB
18.jpg 13KB
21.jpg 13KB
19.jpg 13KB
25.jpg 13KB
1.jpg 13KB
17.jpg 12KB
18.jpg 12KB
17.jpg 12KB
19.jpg 12KB
24.jpg 12KB
20.jpg 12KB
15.jpg 11KB
11.jpg 11KB
4.jpg 11KB
22.jpg 11KB
1.jpg 11KB
7.jpg 11KB
16.jpg 11KB
10.jpg 11KB
12.jpg 11KB
18.jpg 11KB
17.jpg 11KB
9.jpg 11KB
19.jpg 11KB
5.jpg 11KB
共 149 条
- 1
- 2
资源评论
熬夜写代码的平头哥
- 粉丝: 3422
- 资源: 7310
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 基于PHP+swoole实现的微信机器人,依赖vbot和微信网页版的功能,帮助管理微信群/聊天/踢人等+源码+开发文档+运行教程
- com.xunmeng.pinduoduo_Release_cd290ca9_ARM64.apk
- 2788727d-25a0-41b2-b6b4-265d193edb95.doc
- 基于AVR单片机的伺服电机系统研究
- Lab-Electronic Craft Practicum-2-Simulation of a Single Tube Com
- 贪吃蛇基于TypeScript
- CS-CP1-2C3WF固件
- 软件测试测试用例设计方法大全
- 计算机与网络基础知识要点学习
- 移动通信(RC-YDTX-III)实验指导书
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功