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. CodeBlocks ubuntu常见问题及小技巧

    1.安装完后没有快捷键的设置: http://blog.csdn.net/sjwbcb/article/details/4797785 感谢这哥,原来是包没有装全. codeblocks用ubuntu ...

  2. 【总结】java命令解析以及编译器,虚拟机如何定位类

    学Java有些日子了,一直都使用IDE来写程序.这样的好处就是能让我连如何用命令行编译,解释执行Java源代码都不知道,就更不清楚JDK中的编译器和虚拟机(包含字节码解释器)是如何定位到类文件的.悲哀 ...

  3. ace-min.css

    textarea,input[type="text"],input[type="password"],input[type="datetime&quo ...

  4. C# 将字符串转化成流,将流转换成字符串

    using System; using System.IO; using System.Text; namespace CSharpConvertString2Stream { class Progr ...

  5. MYSQL语句中SELECT语句及其子句的执行顺序

    SELECT语句的执行的逻辑查询处理步骤:(8)SELECT (9)DISTINCT(11)<TOP_specification> <select_list>(1)FROM & ...

  6. dataguru试听课程

    http://www.dataguru.cn/article-5447-1.html#userconsent#

  7. 总结Selenium自动化测试方法(六)常见的异常错误处理

    六.常见的异常错误处理 NoSuchElementException: Message: Unable to locate element: {"method":"xpa ...

  8. Javascript零散知识点总结

    一.Javascript获取系统当前时间 <script type="text/javascript"> var time = new Date(); var date ...

  9. HDU 4324 (拓扑排序) Triangle LOVE

    因为题目说了,两个人之间总有一个人喜欢另一个人,而且不会有两个人互相喜欢.所以只要所给的图中有一个环,那么一定存在一个三元环. 所以用拓扑排序判断一下图中是否有环就行了. #include <c ...

  10. QCon 2015 阅读笔记 - 移动开发最佳实践

    所有ppt下载地址:http://pan.baidu.com/s/1mg9o4TM 下面是移动开发实践部分的阅读笔记. 移动开发网络性能优化实践 - 陈浩然 (携程) 携程是非常标准的移动App架构, ...