gaze  0.1.0
Perform gaze tracking with common webcams.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Groups Pages
debug_window.h
1 #ifndef INCLUDE_GAZE_GUI_DEBUG_WINDOW_H_
2 #define INCLUDE_GAZE_GUI_DEBUG_WINDOW_H_
3 
4 #include <memory>
5 #include <vector>
6 
7 #include "dlib/gui_core.h"
8 #include "dlib/gui_widgets.h"
9 
10 #include "gaze/pipeline.h"
11 #include "gaze/util/data.h"
12 
13 
14 namespace gaze {
15 
16 namespace gui {
17 
22 class DebugWindow final : public dlib::drawable_window {
23  util::Data data;
24  dlib::button pause_button;
25  bool paused;
26  Pipeline* pipeline;
27  std::vector<PipelineStep*> pipeline_steps;
28  dlib::tabbed_display pipeline_tabs;
29  dlib::text_grid statistics_widget;
31 
32  const int w_height = 720;
33  const int w_margin = 5;
34  const int w_width = 1280;
35  const int stat_width = 250;
36 
37  public:
44  explicit DebugWindow(Pipeline* pipeline);
45  ~DebugWindow();
47 
56  void process_data(int idx = -1);
57 
64  void on_user_event(void *event_data, int event_type) override;
66 };
67 
73 void open_debug_window(Pipeline* pipeline);
74 
75 } // namespace gui
76 
77 } // namespace gaze
78 
79 #endif // INCLUDE_GAZE_GUI_DEBUG_WINDOW_H_
DebugWindow(Pipeline *pipeline)
The processing pipeline from input to output.
Definition: pipeline.h:19
void process_data(int idx=-1)
A window to inspect computation results.
Definition: debug_window.h:22
void on_user_event(void *event_data, int event_type) override
Wraps the data acquired per frame into a single instance.
Definition: data.h:27