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 the processRect()

finnally ,it run like this

call Kernelized Correlation Filters Tracker(Matab) in Qt(c++)的更多相关文章

  1. KCF:High-Speed Tracking with Kernelized Correlation Filters 的翻译与分析(一)。分享与转发请注明出处-作者:行于此路

    High-Speed Tracking with Kernelized Correlation Filters 的翻译与分析 基于核相关滤波器的高速目标跟踪方法,简称KCF 写在前面,之所以对这篇文章 ...

  2. High-Speed Tracking with Kernelized Correlation Filters

          2015年的一篇论文,可参考:http://blog.csdn.net/carrierlxksuper/article/details/46461245.      另参考:http:// ...

  3. High-Speed Tracking with Kernelized Correlation Filters(二)

          首先看看get_features函数.             首先判断是hog特征还是gray,分两种情况.             如果是hog特征,调用fhog函数,返回x,并将矩阵 ...

  4. correlation filters in object tracking

    http://www.cnblogs.com/hanhuili/p/4266990.html Correlation Filter in Visual Tracking系列一:Visual Objec ...

  5. Correlation Filter in Visual Tracking系列一:Visual Object Tracking using Adaptive Correlation Filters 论文笔记

    Visual Object Tracking using Adaptive Correlation Filters 一文发表于2010的CVPR上,是笔者所知的第一篇将correlation filt ...

  6. Hign-Speed Tracking with Kernelzied Correlation Filters

    reference:Hign-Speed Tracking with Kernelzied Correlation Filters questions: The core componet of mo ...

  7. Learning Spatial-Temporal Regularized Correlation Filters for Visual Tracking---随笔

    Learning Spatial-Temporal Regularized Correlation Filters for Visual Tracking DCF跟踪算法因边界效应,鲁棒性较差.SRD ...

  8. correlation filters in object tracking2

    http://www.cnblogs.com/hanhuili/p/4281077.html Correlation Filter in Visual Tracking系列二:Fast Visual ...

  9. Multi-hierarchical Independent Correlation Filters for Visual Tracking(MFT)略读

    作者写道: 有幸在本届的VOT 2018 主赛中,我们的参赛方案Multi-solution Fusion for Visual Tracking(MFT)获得第一名的成绩,通过结果来看,MFT无论在 ...

随机推荐

  1. CentOS系统中常用查看日志命令

    cat tail -f 日 志 文 件 说    明 /var/log/message 系统启动后的信息和错误日志,是Red Hat Linux中最常用的日志之一 /var/log/secure 与安 ...

  2. C++:delete和delete[]释放内存的区别

      C++告诉我们在回收用 new 分配的单个对象的内存空间的时候用 delete,回收用 new[] 分配的一组对象的内存空间的时候用 delete[].  关于 new[] 和 delete[], ...

  3. 开发板上修改时间方法date命令【转】

    转自:http://blog.chinaunix.net/uid-25906157-id-3138157.html 之前使用开发板时发现每次开机后,系统的时间都恢复到初始状态1970年. 一. 先说一 ...

  4. (七)后台.apsx.cs获取前台客户端文本框的内容

    <input ID='AllLocalData' name='AllLocalDataName' /> 其中最重要的一点是Request.Form[]中括号是放的name属性而非Id属性. ...

  5. Newtonsoft.Json序列化和反序列之javascriptConvert.SerializeObject,DeserializeObject,JsonWriter,JsonReader

    这里下载:http://www.newtonsoft.com/products/json/安装:   1.解压下载文件,得到Newtonsoft.Json.dll   2.在项目中添加引用.. jav ...

  6. 【Python】如何安装easy_install?

    [Python]如何安装easy_install? http://jingyan.baidu.com/article/b907e627e78fe146e7891c25.html easy_instal ...

  7. WP7应用版本升级的实现方法

    首先必须要有一个服务提供升级推送查询 // Code to execute when the application is launching (eg, from Start)         //  ...

  8. UTC的相互转换(java)

      SimpleDateFormat foo = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss"); System.out.println(& ...

  9. 《自己动手写操作系统》pmtest2笔记

    ;DispReturn模拟一个回车的显示,(让下一个要显示的字符在下一行的开头处显示),其中edi始终指向要显示的下一个字符的位置.;   ------------------------------ ...

  10. HDU 3951 (博弈) Coin Game

    先考虑两种简单的情况: 如果先手能一次把硬币拿完,即 k >= n ,那么先手胜 如果每次只能拿一个硬币, 即 k = 1 ,那么如果有奇数个硬币先手胜,如果有偶数个硬币后手胜. 剩下的情况就是 ...