-
Notifications
You must be signed in to change notification settings - Fork 8
/
UserInterface.hpp
65 lines (41 loc) · 1.23 KB
/
UserInterface.hpp
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
/*
* File: UserInterface.hpp
* Author: Jan Dufek
*/
#ifndef USERINTERFACE_HPP
#define USERINTERFACE_HPP
#include "opencv2/opencv.hpp"
#include "Settings.hpp"
using namespace std;
using namespace cv;
extern bool select_object;
extern int object_selected;
extern Rect selection;
extern Point target_location;
extern bool target_reached;
extern Point emily_pose_point_1;
extern Point emily_pose_point_2;
class UserInterface {
public:
UserInterface(Settings&, Size);
UserInterface(const UserInterface& orig);
virtual ~UserInterface();
void draw_position(int, int, double, Mat&);
void draw_principal_axis(RotatedRect, Mat&);
void draw_target(Mat&, Point);
void print_status(Mat&, int, double);
void drawAxis(Mat&, Point, Point, Scalar, const float);
void show_main(Mat&);
void show_histogram(Mat&);
private:
void create_main_window();
static void onMouse(int, int, int, int, void*);
static void on_trackbar(int, void*);
string int_to_string(int);
// Program settings
static Settings * settings;
// Original point of click
static Point origin;
static Size video_size;
};
#endif /* USERINTERFACE_HPP */