资源简介
KCF跟踪算法

代码片段和文件信息
#include
#include “kcf.h“
#include “vot.hpp“
int main()
{
//load region images and prepare for output
VOT vot_io(“region.txt“ “images.txt“ “output.txt“);
KCF_Tracker tracker;
cv::Mat image;
//img = firts frame initPos = initial position in the first frame
cv::Rect init_rect = vot_io.getInitRectangle();
vot_io.outputBoundingBox(init_rect);
vot_io.getNextImage(image);
BBox_c bb;
bb.cx = init_rect.x + init_rect.width/2.;
bb.cy = init_rect.y + init_rect.height/2.;
bb.w = init_rect.width;
bb.h = init_rect.height;
tracker.init(image bb);
double avg_time = 0.;
int frames = 0;
while (vot_io.getNextImage(image) == 1){
double time_profile_counter = cv::getCPUTickCount();
tracker.track(image);
time_profile_counter = cv::getCPUTickCount() - time_profile_counter;
//std::cout << “ -> speed : “ << time_profile_counter/((double)cvGetTickFrequency()*1000) << “ms. per frame“ << std::endl;
avg_time += time_profile_counter/((double)cvGetTickFrequency()*1000);
frames++;
bb = tracker.getBBox();
vot_io.outputBoundingBox(cv::Rect(bb.cx - bb.w/2. bb.cy - bb.h/2. bb.w bb.h));
// cv::rectangle(image cv::Rect(bb.cx - bb.w/2. bb.cy - bb.h/2. bb.w bb.h) CV_RGB(02550) 2);
// cv::imshow(“output“ image);
// cv::waitKey();
// std::stringstream s;
// std::string ss;
// int countTmp = frames;
// s << “imgs“ << “/img“ << (countTmp/10000);
// countTmp = countTmp%10000;
// s << (countTmp/1000);
// countTmp = countTmp%1000;
// s << (countTmp/100);
// countTmp = countTmp%100;
// s << (countTmp/10);
// countTmp = countTmp%10;
// s << (countTmp);
// s << “.jpg“;
// s >> ss;
// //set image output parameters
// std::vector compression_params;
// compression_params.push_back(CV_IMWRITE_JPEG_QUALITY);
// compression_params.push_back(90);
// cv::imwrite(ss.c_str() image compression_params);
}
std::cout << “Average processing speed “ << avg_time/frames << “ms. (“ << 1./(avg_time/frames)*1000 << “ fps)“ << std::endl;
return EXIT_SUCCESS;
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2015-12-16 12:47 kcf-master\
文件 48 2015-12-16 12:47 kcf-master\.gitignore
文件 748 2015-12-16 12:47 kcf-master\CMakeLists.txt
文件 4153 2015-12-16 12:47 kcf-master\README.md
文件 2270 2015-12-16 12:47 kcf-master\main_vot.cpp
目录 0 2015-12-16 12:47 kcf-master\src\
文件 263 2015-12-16 12:47 kcf-master\src\CMakeLists.txt
文件 5846 2015-12-16 12:47 kcf-master\src\complexmat.hpp
文件 13187 2015-12-16 12:47 kcf-master\src\kcf.cpp
文件 2933 2015-12-16 12:47 kcf-master\src\kcf.h
目录 0 2015-12-16 12:47 kcf-master\src\piotr_fhog\
文件 264 2015-12-16 12:47 kcf-master\src\piotr_fhog\CMakeLists.txt
文件 3080 2015-12-16 12:47 kcf-master\src\piotr_fhog\fhog.hpp
文件 18893 2015-12-16 12:47 kcf-master\src\piotr_fhog\gradientMex.cpp
文件 569 2015-12-16 12:47 kcf-master\src\piotr_fhog\gradientMex.h
文件 3125 2015-12-16 12:47 kcf-master\src\piotr_fhog\sse.hpp
文件 1593 2015-12-16 12:47 kcf-master\src\piotr_fhog\wrappers.hpp
文件 5024 2015-12-16 12:47 kcf-master\vot.hpp
- 上一篇:Kinect v2 跌到检测函数
- 下一篇:vc++做的考试系统c/s模式
相关资源
- 物联网GPS跟踪器demo程序
- traceroute路由跟踪
- 移动机器人lissajous曲线轨迹跟踪
- 粒子滤波器+目标跟踪的C++实现,VS2
- staple多目标跟踪算法代码
- 利用openGL和C++实现光线跟踪绘图的完
- KCFC++demo代码
- SiamFC++.pptx
- 人脸跟踪基于opencv
- [源码&文档] 基于OpenCV的室内目标跟踪
- meanShift视频目标跟踪 C++实现源代码
- 光线跟踪算法C++源代码+文档
- KCF源码代码
- 疲劳检测程序源码
- OPENGL光线跟踪算法
- 人体跟踪源代码,用visual c++
- SiamFC文档
- 多运动目标检测和跟踪
- 基于单片机的太阳能电池板自动对光
- 多目标跟踪c++代码290025
- 运动车辆检测跟踪源码,可运行
- 粒子滤波跟踪程序源代码
- MIL视频目标跟踪官方源码MATLAB与C++两
- 光线跟踪 入门级 项目代码
- 基于OpenCV的运动目标检测与跟踪
- 多目标跟踪c++代码
- 多个光线投射算法ray casting和光线跟踪
- C++版_STC跟踪代码(多尺度)
- C++光线跟踪
- OpenCV实现移动跟踪非常简单
评论
共有 条评论