Webcam Tracker  V1.0
Using openCV and an Arduino Uno
GUI.h
Go to the documentation of this file.
1 
8 #pragma once
9 
10 #include <string>
11 
12 #include <opencv2/highgui.hpp>
13 #include <opencv2/core/core.hpp>
14 #include <opencv2/features2d/features2d.hpp>
15 #include <opencv2/imgproc.hpp>
16 
17 #include "Menu.h"
18 #include "Console.h"
19 #include "Button.h"
20 #include "../PipeLineActions/PipeLineAction.h"
21 
22 using namespace std;
23 
27 class GUI
28 {
29 private:
30  const cv::String sourceWindow = "Tracking application";
31 
34  vector<bool>buttonStates;
35  bool tracking;
36 
39  void createButtonStates();
40 
43  void checkButtonStates();
44 
52  static void onMouse(int event, int x, int y, int, void* userdata);
53 
54 public:
56  GUI();
57 
62  GUI(vector<PipeLineAction*> actions);
63 
68  void showOutput(cv::Mat& src, cv::Point* trackingPoint);
69 
74  void showWindows(vector<PipeLineAction*> actions);
75 
78  void addMessage(string message);
79 
82  bool trackingActive();
83 };
header file of the Button class
header file of the Console class
header file of the Menu class
Displays the output of the serial communication. Member of GUI classes Graphic group.
Definition: Console.h:23
Contains the graphic user interface main class. Member of GUI classes Graphic group.
Definition: GUI.h:28
vector< bool > buttonStates
All button states, from the menu in one vector.
Definition: GUI.h:34
Console console
Object holding the console class.
Definition: GUI.h:33
bool tracking
Tracking active flag.
Definition: GUI.h:35
Menu menu
Object holding the menu class.
Definition: GUI.h:32
Menu like structure with clickable buttons. Member of GUI classes Graphic group.
Definition: Menu.h:23
cv::Mat src
Object holding an OpenCV matrix for the capture source.
Definition: Main.cpp:26
vector< PipeLineAction * > actions
All OpenCV pipeline actions.
Definition: Main.cpp:27