-
Notifications
You must be signed in to change notification settings - Fork 2
/
mainwindow.h
120 lines (84 loc) · 2.36 KB
/
mainwindow.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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
#include <QTimer>
#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <iostream>
#include<thread>
#include <utility>
#include"kinematiccontrol.h"
#include"global_setting.h"
#include"camera.h"
#include"formation_control.h"
#include"line_formation_control.h"
using namespace cv;
using namespace std;
namespace Ui {
class MainWindow;
}
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
explicit MainWindow(QWidget *parent = 0);
~MainWindow();
public:
bool static write_file_stop;
private:
void static capture_thread(camera obj_camera,int i,Mat& frame);
void static write_file_thread(string filename);
// void static formation_thread_fun(float ratio_angle,float ratio_distance);
private slots:
// void on_pushButton_clicked();
void on_open_camera_clicked();
void videoUpdate();
void video1Update();
void video2Update();
void video3Update();
void video4Update();
// void videoUpdate2();
void robotStatusUpdate();
void on_reset_parameter_clicked();
void on_forward_move_clicked();
void on_stop_engine_clicked();
void move_tread(int move_type);
void on_left_move_clicked();
void on_right_move_clicked();
void stopping_all();
void on_backward_move_clicked();
void on_self_rotate_clicked();
void on_ratio_speed_textChanged(const QString &arg1);
void on_reset_pid_clicked();
void on_close_camera_clicked();
void on_screen_shot_clicked();
void on_pushButton_clicked();
void on_btn_start_formation_clicked();
void on_btn_stop_formation_clicked();
void on_advanced_angle_textChanged(const QString &arg1);
void on_btn_start_record_yaw_clicked();
void on_btn_stop_record_yaw_2_clicked();
private:
Ui::MainWindow *ui;
cv::VideoCapture capture;
QTimer *camera_timer;
cv::Mat camera_frame;
QImage camera_image;
vector<Mat> camera_frames;
vector<camera> vec_cameras;
Mat camera1_img;
Mat camera2_img;
Mat camera3_img;
Mat camera4_img;
QTimer *camera_timer1;
QTimer *camera_timer2;
QTimer *camera_timer3;
QTimer *camera_timer4;
float ratio_speed_setted;
float ratio_angle_setted;
bool is_stop;
bool is_able_shot;
int cur_shot_nums;
bool formation_is_stop;
};
#endif // MAINWINDOW_H