涉及两篇论文:Visual Object Tracking using Adaptive Correlation Filters 和Fast Visual Tracking via Dense Spatio-Temporal Context Learning
可参考这位博主笔记:http://www.cnblogs.com/hanhuili/p/4266990.html
第一篇我说下自己的理解:训练时的输出都认为是高斯形状,因为这种形状符合PSR。
训练得到模板后开始跟踪,由输出继续按照新的规则更校模板,进行跟踪。
第二篇主要用到了上下文的信息,通过背景信息来确定目标的位置。可参考这篇博文:http://blog.csdn.net/zouxy09/article/details/16889905,博主还将其用C++实现了,很有启发性。
STCTracker.h
// Fast object tracking algorithm // Author : zouxy // Date : 2013-11-21 // HomePage : http://blog.csdn.net/zouxy09 // Email : zouxy09@qq.com // Reference: Kaihua Zhang, et al. Fast Tracking via Spatio-Temporal Context Learning // HomePage : http://www4.comp.polyu.edu.hk/~cskhzhang/ // Email: zhkhua@gmail.com #pragma once #include <opencv2/opencv.hpp> using namespace cv; using namespace std; class STCTracker { public: STCTracker(); ~STCTracker(); void init(const Mat frame, const Rect box); void tracking(const Mat frame, Rect &trackBox); private: void createHammingWin(); void complexOperation(const Mat src1, const Mat src2, Mat &dst, int flag = 0); void getCxtPriorPosteriorModel(const Mat image); void learnSTCModel(const Mat image); private: double sigma; // scale parameter (variance) double alpha; // scale parameter double beta; // shape parameter double rho; // learning parameter Point center; // the object position Rect cxtRegion; // context region Mat cxtPriorPro; // prior probability Mat cxtPosteriorPro; // posterior probability Mat STModel; // conditional probability Mat STCModel; // spatio-temporal context model Mat hammingWin; // Hamming window };