forked from amintronic/opticalFlowLK
-
Notifications
You must be signed in to change notification settings - Fork 0
/
optflow.h
64 lines (44 loc) · 1.03 KB
/
optflow.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
#ifndef OPTFLOW_H
#define OPTFLOW_H
#include <QMainWindow>
#include "QSerialPort"
#include "QSerialPortInfo"
#include "plot_opencv.h"
#include "capture_webcam.h"
//#define _GRAPH
#define _DATA_SCALE 100
#define MAX_COUNT 100
#define THRESH_REFRESH 50
#define winSize Size(31,31)
#define subPixWinSize Size(10,10)
using namespace cv;
using namespace std;
namespace Ui {
class OptFlow;
}
class OptFlow : public QMainWindow
{
Q_OBJECT
public:
explicit OptFlow(QWidget *parent = 0);
~OptFlow();
Mat colorframe, grayframe;
QTimer *main_timer;
capture_webcam *cap;
Mat prevGray, image;
vector<Point2f> points[2];
TermCriteria termcrit;
Plot_opencv plot1;
std::vector<double> plot_datas;
Point2f point;
bool needToInit;
bool done;
size_t Features_counter;//count Features state true
double delta_x, delta_y;
void OptFlow_LK();
private:
Ui::OptFlow *ui;
public slots:
void timerEvent();
};
#endif // OPTFLOW_H