资源简介
Gracker: A Graph-based Planar Object Tracker(基于图结构的平面目标追踪算法)的源码比较详尽的注解。本文件下含有一份代码和对应论文。
代码片段和文件信息
#include “stdafx.h“
#include “Brisker.h“
const float Brisker::basicSize_ = 12.0;
const unsigned int Brisker::scales_ = 64;
const float Brisker::scalerange_ = 30; // 40->4 Octaves - else this needs to be adjusted...
const unsigned int Brisker::n_rot_ = 1024; // discretization of the rotation look-up
//const float BriskScaleSpace::safetyFactor_ = 1.0;
//const float BriskScaleSpace::basicSize_ = 12.0;
Brisker::Brisker(bool rotationInvariant bool scaleInvariant float patternScale)
{
std::vector rList;
std::vector nList;
// this is the standard pattern found to be suitable also
rList.resize(5);
nList.resize(5);
const double f = 0.85*patternScale;
rList[0] = f * 0;
rList[1] = f*2.9;
rList[2] = f*4.9;
rList[3] = f*7.4;
rList[4] = f*10.8;
nList[0] = 1;
nList[1] = 10;
nList[2] = 14;
nList[3] = 15;
nList[4] = 20;
rotationInvariance = rotationInvariant;
scaleInvariance = scaleInvariant;
generateKernel(rList nList 5.85*patternScale 8.2*patternScale);
}
Brisker::~Brisker()
{
delete[] patternPoints_;
delete[] shortPairs_;
delete[] longPairs_;
delete[] scaleList_;
delete[] sizeList_;
}
bool Brisker::RoiPredicate(const float minX const float minY
const float maxX const float maxY const KeyPoint& keyPt)
{
const Point2f& pt = keyPt.pt;
return (pt.x < minX) || (pt.x >= maxX) || (pt.y < minY) || (pt.y >= maxY);
}
void Brisker::generateKernel(std::vector &radiusList std::vector &numberList
float dMax float dMin std::vector indexChange)
{
dMax_ = dMax;
dMin_ = dMin;
// get the total number of points
const int rings = radiusList.size();
assert(radiusList.size() != 0 && radiusList.size() == numberList.size());
points_ = 0; // remember the total number of points
for (int ring = 0; ring points_ += numberList[ring];
}
// set up the patterns
patternPoints_ = new BriskPatternPoint[points_*scales_*n_rot_];
BriskPatternPoint* patternIterator = patternPoints_;
// define the scale discretization:
static const float lb_scale = log(scalerange_) / log(2.0);
static const float lb_scale_step = lb_scale / (scales_);
scaleList_ = new float[scales_];
sizeList_ = new unsigned int[scales_];
const float sigma_scale = 1.3;
for (unsigned int scale = 0; scale scaleList_[scale] = pow((double)2.0 (double)(scale*lb_scale_step));
sizeList_[scale] = 0;
// generate the pattern points look-up
double alpha theta;
for (size_t rot = 0; rot theta = double(rot) * 2 * CV_PI / double(n_rot_); // this is the rotation of the feature
for (int ring = 0; ring for (int num = 0; num // the actual coordinates on the circle
alpha = (double(num)) * 2 * CV_PI / double(numberList[ring]);
patternIterator->x = scaleList_[scale] * radiusList[ring] * cos(alpha + theta); // fe
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 2949120 2017-07-29 10:01 OpenCV49R_GraphTracker\ipch\opencv49r_graphtracker-3badaabe\opencv49r_graphtracker-473cadad.ipch
文件 3080192 2017-07-29 09:51 OpenCV49R_GraphTracker\ipch\opencv49r_graphtracker-3badaabe\opencv49r_graphtracker-96d0f4f3.ipch
文件 19275 2017-07-28 18:06 OpenCV49R_GraphTracker\OpenCV49R_GraphTracker\Brisker.cpp
文件 4270 2017-03-28 21:47 OpenCV49R_GraphTracker\OpenCV49R_GraphTracker\Brisker.h
文件 1808 2017-07-29 09:55 OpenCV49R_GraphTracker\OpenCV49R_GraphTracker\common.h
文件 64009 2013-09-15 11:58 OpenCV49R_GraphTracker\OpenCV49R_GraphTracker\data\nl_newspaper.txt
文件 11462 2017-07-29 09:52 OpenCV49R_GraphTracker\OpenCV49R_GraphTracker\Debug\OpenCV49.5153248E.tlog\cl.command.1.tlog
文件 122762 2017-07-29 09:52 OpenCV49R_GraphTracker\OpenCV49R_GraphTracker\Debug\OpenCV49.5153248E.tlog\CL.read.1.tlog
文件 8594 2017-07-29 09:52 OpenCV49R_GraphTracker\OpenCV49R_GraphTracker\Debug\OpenCV49.5153248E.tlog\CL.write.1.tlog
文件 202 2017-07-29 09:52 OpenCV49R_GraphTracker\OpenCV49R_GraphTracker\Debug\OpenCV49.5153248E.tlog\OpenCV49R_GraphTracker.lastbuildstate
文件 0 2017-07-29 09:52 OpenCV49R_GraphTracker\OpenCV49R_GraphTracker\Debug\OpenCV49.5153248E.tlog\unsuccessfulbuild
文件 3994 2017-07-29 09:52 OpenCV49R_GraphTracker\OpenCV49R_GraphTracker\Debug\OpenCV49R_GraphTracker.log
文件 1638400 2017-07-29 09:52 OpenCV49R_GraphTracker\OpenCV49R_GraphTracker\Debug\OpenCV49R_GraphTracker.pch
文件 12137 2017-07-29 09:52 OpenCV49R_GraphTracker\OpenCV49R_GraphTracker\Debug\stdafx.obj
文件 150528 2017-07-29 09:52 OpenCV49R_GraphTracker\OpenCV49R_GraphTracker\Debug\vc120.idb
文件 274432 2017-07-29 09:52 OpenCV49R_GraphTracker\OpenCV49R_GraphTracker\Debug\vc120.pdb
文件 21209 2017-08-08 18:47 OpenCV49R_GraphTracker\OpenCV49R_GraphTracker\GMA.cpp
文件 1785 2017-08-08 18:48 OpenCV49R_GraphTracker\OpenCV49R_GraphTracker\GMA.h
文件 24289 2017-08-09 11:04 OpenCV49R_GraphTracker\OpenCV49R_GraphTracker\Gracker.cpp
文件 4642 2017-08-09 11:02 OpenCV49R_GraphTracker\OpenCV49R_GraphTracker\Gracker.h
文件 5522 2017-08-09 12:10 OpenCV49R_GraphTracker\OpenCV49R_GraphTracker\GraphModel.cpp
文件 1866 2017-08-09 11:18 OpenCV49R_GraphTracker\OpenCV49R_GraphTracker\GraphModel.h
文件 13394 2017-08-09 12:15 OpenCV49R_GraphTracker\OpenCV49R_GraphTracker\GraphTracker.cpp
文件 17478 2017-08-04 14:48 OpenCV49R_GraphTracker\OpenCV49R_GraphTracker\ObjDetector.cpp
文件 2645 2017-06-21 10:52 OpenCV49R_GraphTracker\OpenCV49R_GraphTracker\ObjDetector.h
文件 800 2017-07-29 09:47 OpenCV49R_GraphTracker\OpenCV49R_GraphTracker\OpenCV49R.cpp
文件 6436 2017-07-29 10:01 OpenCV49R_GraphTracker\OpenCV49R_GraphTracker\OpenCV49R_GraphTracker.vcxproj
文件 3293 2017-07-29 09:52 OpenCV49R_GraphTracker\OpenCV49R_GraphTracker\OpenCV49R_GraphTracker.vcxproj.filters
文件 165 2017-07-29 10:00 OpenCV49R_GraphTracker\OpenCV49R_GraphTracker\OpenCV49R_GraphTracker.vcxproj.user
文件 2822 2017-07-28 18:08 OpenCV49R_GraphTracker\OpenCV49R_GraphTracker\Polygon.cpp
............此处省略68个文件信息
- 上一篇:whitesmoke
- 下一篇:PSCAD Users Guide
评论
共有 条评论