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

  1. function runKCFexe( base_path ,video)
  2. %./data/Benchmark/ Boy
  3. interp_factor = 0.02;
  4. kernel.sigma = 0.5;
  5. kernel.type = 'gaussian';
  6. kernel.poly_a = 1;
  7. kernel.poly_b = 9;
  8. feature_type = 'hog';
  9. features.hog = true;
  10. features.gray = false;
  11. features.hog_orientations = 9;
  12. cell_size = 4;
  13. padding = 1.5; %extra area surrounding the target
  14. lambda = 1e-4; %regularization
  15. output_sigma_factor = 0.1; %spatial bandwidth (proportional to target)
  16. [img_files, pos, target_sz, ground_truth, video_path] = load_video_info(base_path, video);
  17. [positions, time] = tracker(video_path, img_files, pos, target_sz, ...
  18. padding, kernel, lambda, output_sigma_factor, interp_factor, ...
  19. cell_size, features, 0);
  20. fileID = fopen('centerPointResult.txt','w');
  21. fprintf(fileID,'%d %d\n',positions');
  22. fclose(fileID);
  23. %fprintf('kcf finished %s\n','done');
  24. 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. js浮点数的计算

        js在计算浮点数时可能不够准确,会产生舍入误差的问题,这是使用基于IEEE745数值的浮点计算的通病,并非ECMAScript一家,其他使用相同数值格式的语言也存在这个问题.     这里讲一 ...

  2. PowerDesiger 15逆向生成工程E-R图及导出word表格

    应用环境:win8(64位)+oracle10g(32位)服务端+PowerDesigner15 需求:oracle数据库中的表结构是web工程框架hibernate 自动生成,现需要将数据库中已有的 ...

  3. openfire插件开发入门1

    .案例插件的功能 这个插件很简单,就是在openfire Server启动时,和关闭时,在控制台打印出消息. 3.插件开发的目录结构设计 先来看一下当前openfire在eclipse中的目录结构: ...

  4. Android 如何处理崩溃的异常

    Android中处理崩溃异常    大家都知道,现在安装Android系统的手机版本和设备千差万别,在模拟器上运行良好的程序安装到某款手机上说不定就出现崩溃的现象,开发者个人不可能购买所有设备逐个调试 ...

  5. Docker仓库搭建(Registry + Portus)

    1.更新系统: yum update -y 2. 安装docker-compos yum -y install epel-release    #pip安装包在epel源中   yum -y inst ...

  6. hdu - 2102 A计划 (简单bfs)

    http://acm.hdu.edu.cn/showproblem.php?pid=2102 题目还是不难,注意起点一定是(0,0,0),然后到达P点时间<=t都可以. 用一个3维字符数组存储图 ...

  7. CollectionBase类

    在命名空间System.Collections下的CollectionBase类 The CollectionBase class exposes the interfaces IEnumerable ...

  8. git subtree有效管理公共第三方lib

    如果你的项目中有很多第三方的lib,你希望使用它,并且也希望可能对该lib做修改并且贡献到原始的项目中去,或者你的项目希望模块化,分为几个repo单独维护,那么git subtree就是一个选择.gi ...

  9. [ionic开源项目教程] - 第6讲 过滤器filter的使用

    过滤器filter的使用 1.回顾 再熟悉一下tab1.html的代码: <div class="list"> <a ng-repeat="item i ...

  10. ASP.NET 4.0 Webform Bundles 压缩css, js,为什么放到服务器不行

    参考文章: http://blog.csdn.net/dyllove98/article/details/8758149 文章说的很详细. 但是本地是可以完美展示(我的本地环境有4.0 也有4.5) ...