call Kernelized Correlation Filters Tracker(Matab) in Qt(c++)
recently, i need call the KCF tracker in my graduation project. the KCF tracker is fast and best performance now. see http://home.isr.uc.pt/~henriques/circulant/, however, this only matlab version of KCF code in the author's homepage. i need to implement KCF in c++ version, however, i find it is hard to do it, because this is no opencv version of fhog which is used in the matlab version. and the correlation of complex number is hard too. So in the last , i build Windows Standalone Application. and it is easy to improve in matlab.
so let do it now.
build matlab Windows Standalone Application
first let make a file runKCFexe.m
function runKCFexe( base_path ,video)
%./data/Benchmark/ Boy
interp_factor = 0.02;
kernel.sigma = 0.5;
kernel.type = 'gaussian';
kernel.poly_a = 1;
kernel.poly_b = 9;
feature_type = 'hog';
features.hog = true;
features.gray = false;
features.hog_orientations = 9;
cell_size = 4;
padding = 1.5; %extra area surrounding the target
lambda = 1e-4; %regularization
output_sigma_factor = 0.1; %spatial bandwidth (proportional to target)
[img_files, pos, target_sz, ground_truth, video_path] = load_video_info(base_path, video);
[positions, time] = tracker(video_path, img_files, pos, target_sz, ...
padding, kernel, lambda, output_sigma_factor, interp_factor, ...
cell_size, features, 0);
fileID = fopen('centerPointResult.txt','w');
fprintf(fileID,'%d %d\n',positions');
fclose(fileID);
%fprintf('kcf finished %s\n','done');
end
and edit the tracker.m to the follow:

the box2[1] is the frame number and box2[2:5] is the rect box

add the reference files like follows

and then build

and we will get the KCFexe.exe
test run the KCFexe.exe

Yehh, it works

Qt C++ programming
let's build a q widget application

the OpenDir Button is used to select the dir path like

the Qlabe is used to show the image.
the project dir structure


the dirpath and video is the Parameters for KCFexe.exe
frameNo is used for read NO.image from capture , procOutput is used to get the frame num and rect box from KCFexe.exe output and store in the s_data,capturePath is used for VideoCapture.open function , program is the KCFexe.exe path,on_pushButton_clicked() is to select the dir,readyReadStandardOutput() is to read the KCFexe.exe output,processRect() is used to show image in Qlabel.RectReady() is signal for processRect.
init and connect

select dir

run the KCFexe.exe

read the output of KCFexe.exe

show image in Qlabel

Note ,because the speed of KCFexe.exe output is not the same with
readyReadStandardOutputso the code is need in theprocessRect()

finnally ,it run like this

call Kernelized Correlation Filters Tracker(Matab) in Qt(c++)的更多相关文章
- KCF:High-Speed Tracking with Kernelized Correlation Filters 的翻译与分析(一)。分享与转发请注明出处-作者:行于此路
High-Speed Tracking with Kernelized Correlation Filters 的翻译与分析 基于核相关滤波器的高速目标跟踪方法,简称KCF 写在前面,之所以对这篇文章 ...
- High-Speed Tracking with Kernelized Correlation Filters
2015年的一篇论文,可参考:http://blog.csdn.net/carrierlxksuper/article/details/46461245. 另参考:http:// ...
- High-Speed Tracking with Kernelized Correlation Filters(二)
首先看看get_features函数. 首先判断是hog特征还是gray,分两种情况. 如果是hog特征,调用fhog函数,返回x,并将矩阵 ...
- correlation filters in object tracking
http://www.cnblogs.com/hanhuili/p/4266990.html Correlation Filter in Visual Tracking系列一:Visual Objec ...
- Correlation Filter in Visual Tracking系列一:Visual Object Tracking using Adaptive Correlation Filters 论文笔记
Visual Object Tracking using Adaptive Correlation Filters 一文发表于2010的CVPR上,是笔者所知的第一篇将correlation filt ...
- Hign-Speed Tracking with Kernelzied Correlation Filters
reference:Hign-Speed Tracking with Kernelzied Correlation Filters questions: The core componet of mo ...
- Learning Spatial-Temporal Regularized Correlation Filters for Visual Tracking---随笔
Learning Spatial-Temporal Regularized Correlation Filters for Visual Tracking DCF跟踪算法因边界效应,鲁棒性较差.SRD ...
- correlation filters in object tracking2
http://www.cnblogs.com/hanhuili/p/4281077.html Correlation Filter in Visual Tracking系列二:Fast Visual ...
- Multi-hierarchical Independent Correlation Filters for Visual Tracking(MFT)略读
作者写道: 有幸在本届的VOT 2018 主赛中,我们的参赛方案Multi-solution Fusion for Visual Tracking(MFT)获得第一名的成绩,通过结果来看,MFT无论在 ...
随机推荐
- C 中数组和指针的区别
联系: 1,一个通过数组和下标实现的表达式可等价地通过指针和偏移量实现. 2,当数组名传递给一个函数时,实际上传递的是该数组第一个元素的地址. 区别: 1,指针是一个变量,因此,在C语言中,语句pa= ...
- linuxlcd驱动程序编写 mini2440(w35)
先说lcd驱动的框架吧! lcd驱动也有自己的框架,如果没有框架,要我们自己完成所有lcd驱动的代码编写那将是很痛苦的一件事. lcd驱动主要依赖于一个文件,fbmem.c 其实它还依赖几个文件 不 ...
- 正确的理解this 和 super
this和super是Java的两个关键字. 先明确一个问题,有人错误的认为它们是对象里的“属性”,这只能怪老师没有讲清楚计算机的本质了.因为计算机的处理器只能用指令去处理数据,像C语言之类的容易理解 ...
- c++ 字符串函数用法举例
1. substr() 2. replace() 例子:split() 字符串切割: substr 函数原型: , size_t n = npos ) const; 解释:抽取字符串中从pos(默认为 ...
- c++ 在客户端的GCC使用
c++ 在客户端的GCC使用 翻译自: GCC是GNU工具箱的一个功能,GNU还包括如下功能: GNU compiler collection (GCC) GNU make GNU Debugger ...
- poj 1017 Packets 裸贪心
Packets Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 43189 Accepted: 14550 Descrip ...
- hdu - 1728逃离迷宫 && hdu - 1175 连连看 (普通bfs)
http://acm.hdu.edu.cn/showproblem.php?pid=1728 这两道题花了一下午的时候调试,因为以前做过类似的题,但是判断方向的方法是错的,一直没发现啊,真无语. 每个 ...
- Android内存管理(4)*官方教程 含「高效内存的16条策略」 Managing Your App's Memory
Managing Your App's Memory In this document How Android Manages Memory Sharing Memory Allocating and ...
- Java 基础-运算符
Java运算符 算术运算符 赋值运算符 比较运算符 逻辑运算符 位运算符 运算符优先级 1. 算术运算符 运算符 运算 范例 结果 + 正号 +3 3 - 负号 b=4;-b -4 + 加 5+5 1 ...
- 《OD学算法》排序之冒泡排序
冒泡排序 一语中的:丢一把沙子,轻的物体往上浮. 基本思想:通过无序区中相邻记录关键字间的比较和位置的交换,使关键字最小的记录如气泡一般逐渐往上“漂浮”直至“水面”. 代码示例: import jav ...