gaze  0.1.0
Perform gaze tracking with common webcams.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Groups Pages
gaze_tracker.h
1 #ifndef INCLUDE_GAZE_GAZE_TRACKER_H_
2 #define INCLUDE_GAZE_GAZE_TRACKER_H_
3 
4 #include <string>
5 #include <utility>
6 #include <vector>
7 
8 #include "opencv2/core.hpp"
9 
10 #include "gaze/pipeline.h"
11 #include "gaze/pipeline_step.h"
12 #include "gaze/pipeline_steps/source_capture.h"
13 
14 
15 namespace gaze {
16 
24 class GazeTracker {
25  std::string current_trial_id;
26  bool debug;
27  bool initialized;
28  Pipeline* pipeline;
29  std::vector<PipelineStep*> pipeline_steps;
30  std::string subject_id;
31  std::string video_source;
32 
38  void init_pipeline(const std::string subject_id);
39 
40  public:
49  GazeTracker(const std::string subject_id = "default_subject",
50  const bool debug = false);
51 
52  ~GazeTracker();
53 
59  void calibrate();
60 
69 
87  void init(const std::string subject_id,
88  const bool debug = false);
90 
113  void start_trial(const std::string identifier);
114 
118  void stop_trial();
120 };
121 
122 } // namespace gaze
123 
124 #endif // INCLUDE_GAZE_GAZE_TRACKER_H_
void init(const std::string subject_id, const bool debug=false)
The processing pipeline from input to output.
Definition: pipeline.h:19
const std::pair< int, int > get_current_gaze_point() const
void start_trial(const std::string identifier)
GazeTracker(const std::string subject_id="default_subject", const bool debug=false)
This class wraps the gaze tracking process.
Definition: gaze_tracker.h:24