-
Notifications
You must be signed in to change notification settings - Fork 14
/
STCTracker.h
40 lines (34 loc) · 1.1 KB
/
STCTracker.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#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,Rect &boxRegion);
void tracking(const Mat frame, Rect &trackBox,Rect &boxRegion,int FrameNum);
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
double scale; // scale ratio
double lambda; // scale learning parameter
int num; // the number of frames for updating the scale
vector<double> maxValue;
Point center; // the object position
Rect cxtRegion; // context region
int padding;
Mat cxtPriorPro; // prior probability
Mat cxtPosteriorPro; // posterior probability
Mat STModel; // conditional probability
Mat STCModel; // spatio-temporal context model
Mat hammingWin; // Hamming window
};