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
readyReadStandardOutput
so 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无论在 ...
随机推荐
- JavaScript ECAMScript5 新特性——get/set访问器
之前对get/set的理解一直有误,觉得get set 是对象属性方法.看了别人的博客也有很多疑问,今天系统的做了很多测试终于弄明白了.(自己通过看书和写demo测试的,如有不对欢迎大家批评指正) g ...
- eclipse调试jsp中的scriptlet代码
在eclipse开发环境下,jsp中的scriptlet代码,也就是<%%>中的java代码,跟普通的java代码一样可以打断点单步调试的! 做个笔记,免得自己忘了!
- POJ2282:The Counting Problem(数位DP)
Description Given two integers a and b, we write the numbers between a and b, inclusive, in a list. ...
- SQL高性能查询优化语句
1.应尽量避免在 where 子句中对字段进行 null 值判断,否则将导致引擎放弃使用索引而进行全表扫描,如: select id from t where num is null可以在num上设置 ...
- 《c程序设计语言》读书笔记--统计 行数、单词数、字符数
#include <stdio.h> int main() { int lin = 0,wor = 0,cha = 0; int flag = 0; int c; while((c = g ...
- Newtonsoft.Json序列化和反序列之javascriptConvert.SerializeObject,DeserializeObject,JsonWriter,JsonReader
这里下载:http://www.newtonsoft.com/products/json/安装: 1.解压下载文件,得到Newtonsoft.Json.dll 2.在项目中添加引用.. jav ...
- ERP调研之 对话
开卷语: 2009年8月6号,A公司ERP项目顺利启动,按照项目进度的安排,项目组成员立即投入到紧张而又忙碌的的业务调研之中.这次为期3周的业务调研面向企业所有业务部门,包括产品部门.采购部门.计划部 ...
- hadoop多次格式化后,导致datanode启动不了
hadoop namenode -format多次格式化后,datanode启动不了 org.apache.hadoop.ipc.RemoteException(java.io.IOException ...
- 【转+分析】JAVA: 为什么要使用"抽象类"? 使用"抽象类"有什么好处?
老是在想为什么要引用抽象类,一般类不就够用了吗.一般类里定义的方法,子类也可以覆盖,没必要定义成抽象的啊. 看了下面的文章,明白了一点. 其实不是说抽象类有什么用,一般类确实也能满足应用,但是现实中确 ...
- ajaxFileUpload插件上传文件 返回 syntaxError :unexpected token
Html 代码<table id="deploy_application" class="bordered-table"> <tr> & ...