-
Notifications
You must be signed in to change notification settings - Fork 1
/
STCTracker.h
45 lines (37 loc) · 1.05 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
41
42
43
44
45
#pragma once
#ifndef _STCTRACKER_H
#define _STCTRACKER_H
#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, int _frameNum);
private:
void createHammingWin();
void complexOperation(const Mat src1, const Mat src2, Mat &dst, int flag = 0);
void getCxtPriorPosteriorModel(Mat image, Rect rect);
void learnSTCModel();
private:
double padding; //Ä¿±êÖÜΧÉÏÏÂÎıÈÀý
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
double lambda;
int num;
double scale;
vector<double> maxValue;
Mat cxtPriorPro; // prior probability
Mat cxtPosteriorPro; // posterior probability
Mat STModel; // conditional probability
Mat STCModel; // spatio-temporal context model
Mat hammingWin; // Hamming window
};
#endif