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. POJ3020——Antenna Placement(二分图的最大匹配)

    Antenna Placement DescriptionThe Global Aerial Research Centre has been allotted the task of buildin ...

  2. SQL Server ->> 关于究竟ALTER INDEX ... REBUILD会不会导致改变索引选项和Filegroup的验证

    其实之前做过类型的验证,不过影响不是特别深,只是记得不会改变DATA COMPRESSION,那今天再次遇到这个问题就再拿出来验证一下.随便写个脚本验证下.ALTER INDEX ... REBUIL ...

  3. Java SpringMVC实现国际化整合案例分析(i18n)

    所谓国际化就是支持多种语言,web应用在不同的浏览环境中可以显示出不同的语言,比如说汉语.英语等.下面我将以具体的实例来举例说明: (1)新建动态Javaweb项目,并导入几个SpringMVC必需的 ...

  4. 基于Theano的DNN框架Blocks使用简要总结

    Blocks官方代码地址:https://github.com/mila-udem/blocks Blocks是加拿大Montreal大学Bengio实验室牵头开发的基于Python的神经网络模型框架 ...

  5. jsp+servlet+jquery 用jquery uploadify最新版本实现多文件上传

    //这是script代码 <link rel="stylesheet" type="text/css" href="uploadify/uplo ...

  6. python中的列表(list) 切片详解

    1.切片: 通过指定下标的方式来获得某一个数据元素,或者通过指定下标范围来获得一组序列的元素,这种访问序列的方式叫做切片.    访问某一个数据元素的的语法如下:    sequence[index] ...

  7. Makefile简介

    1.源程序的编译在Linux下面,如果要编译一个C语言源程序,我们要使用GNU的gcc编译器. 下面我们以一个实例来说明如何使用gcc编译器.假设我们有下面一个非常简单的源程序(hello.c):in ...

  8. linux查看某个端口被占用

    如8003 端口 使用命令:netstat -nlptu |awk '{print $4,$7}' | grep 8003 [root[@bogon](/user/bogon) ~]# netstat ...

  9. 安装cloudera

    1. 查看selinux状态 $ /usr/sbin/getenforce Enforcing $ /usr/sbin/sestatus SELinux status: enabled SELinux ...

  10. create-maximum-number(难)

    https://leetcode.com/problems/create-maximum-number/ 这道题目太难了,花了我很多时间.最后还是参考了别人的方法.还少加了个greater方法.很难. ...