-
Notifications
You must be signed in to change notification settings - Fork 57
/
Copy pathvideostab.h
executable file
·77 lines (59 loc) · 1.31 KB
/
videostab.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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
#ifndef VIDEOSTAB_H
#define VIDEOSTAB_H
#include <opencv2/opencv.hpp>
#include <iostream>
using namespace cv;
using namespace std;
class VideoStab
{
public:
VideoStab();
VideoCapture capture;
Mat frame2;
Mat frame1;
int k;
const int HORIZONTAL_BORDER_CROP = 30;
Mat smoothedMat;
Mat affine;
Mat smoothedFrame;
double dx ;
double dy ;
double da ;
double ds_x ;
double ds_y ;
double sx ;
double sy ;
double scaleX ;
double scaleY ;
double thetha ;
double transX ;
double transY ;
double diff_scaleX ;
double diff_scaleY ;
double diff_transX ;
double diff_transY ;
double diff_thetha ;
double errscaleX ;
double errscaleY ;
double errthetha ;
double errtransX ;
double errtransY ;
double Q_scaleX ;
double Q_scaleY ;
double Q_thetha ;
double Q_transX ;
double Q_transY ;
double R_scaleX ;
double R_scaleY ;
double R_thetha ;
double R_transX ;
double R_transY ;
double sum_scaleX ;
double sum_scaleY ;
double sum_thetha ;
double sum_transX ;
double sum_transY ;
Mat stabilize(Mat frame_1 , Mat frame_2);
void Kalman_Filter(double *scaleX , double *scaleY , double *thetha , double *transX , double *transY);
};
#endif // VIDEOSTAB_H