1 #include "gaze/util/data.h"
18 Data::Data(
const Data& data)
19 : source_image(data.source_image),
20 landmarks(data.landmarks),
23 head_rotation(data.head_rotation),
24 head_translation(data.head_translation),
27 estimated_gaze_point(data.estimated_gaze_point),
28 execution_times(data.execution_times) {
29 dlib::assign_image(this->
image, data.image);
31 for (
auto i = decltype(data.eyes.size()){0};
32 i < data.eyes.size(); ++i) {
33 dlib::assign_image(this->
eyes[i], data.eyes[i]);
36 for (
auto i = decltype(data.centers.size()){0};
37 i < data.centers.size(); ++i) {
38 this->
centers[i] = data.centers[i];
41 for (
auto i = decltype(data.pupils.size()){0};
42 i < data.pupils.size(); ++i) {
43 this->
pupils[i] = data.pupils[i];
46 for (
auto i = decltype(data.gaze_points.size()){0};
47 i < data.gaze_points.size(); ++i) {
57 void Data::swap(
Data& data) {
dlib::array< dlib::array2d< double > > eyes
dlib::array< dlib::point > centers
dlib::array2d< dlib::bgr_pixel > image
enable_if< __and_< __not_< __is_tuple_like< _Tp > >, is_move_constructible< _Tp >, is_move_assignable< _Tp > >::value >::type swap(_Tp &__a, _Tp &__b) noexcept(__and_< is_nothrow_move_constructible< _Tp >, is_nothrow_move_assignable< _Tp >>::value)
std::vector< cv::Vec3d > gaze_points
cv::Vec2d estimated_gaze_point
dlib::full_object_detection landmarks
std::map< std::string, double > execution_times
Data & operator=(Data data)
Wraps the data acquired per frame into a single instance.
std::vector< cv::Vec3d > pupils