gaze  0.1.0
Perform gaze tracking with common webcams.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Groups Pages
head_pose_estimation.h
1 #ifndef INCLUDE_GAZE_PIPELINE_STEPS_HEAD_POSE_ESTIMATION_H_
2 #define INCLUDE_GAZE_PIPELINE_STEPS_HEAD_POSE_ESTIMATION_H_
3 
4 #include <vector>
5 
6 #include "dlib/gui_widgets.h"
7 #include "opencv2/opencv.hpp"
8 
9 #include "gaze/gui/visualizeable.h"
10 #include "gaze/pipeline_step.h"
11 #include "gaze/util/data.h"
12 
13 
14 namespace gaze {
15 
16 namespace pipeline {
17 
24 class HeadPoseEstimation final
25  : public PipelineStep,
27  std::vector<int> index_list;
28  std::vector<cv::Point3d> model_points;
29  double model_scale = 1;
31  cv::Matx33d camera_matrix;
32  bool has_camera_matrix = false;
33  cv::Mat distortions;
34  bool has_distortions = false;
35 
36  void update_overlay(const util::Data& data);
37 
38  protected:
65 
77 
78  public:
80 
87  void process(util::Data& data) override;
88 
94  void visualize(util::Data& data) override;
95 };
96 
97 } // namespace pipeline
98 
99 } // namespace gaze
100 
101 #endif // INCLUDE_GAZE_PIPELINE_STEPS_HEAD_POSE_ESTIMATION_H_
void process(util::Data &data) override
Abstract base class for PipelineSteps. Must be inherited from.
Definition: pipeline_step.h:18
Estimates the head pose from landmarks and source image.
cv::Mat get_and_maybe_read_distortions(const util::Data &data)
Implements VisualizeableBase for several widget types.
cv::Matx33d read_or_set_camera_matrix(const util::Data &data)
Wraps the data acquired per frame into a single instance.
Definition: data.h:27
void visualize(util::Data &data) override