1 #include "gaze/util/pipeline_utils.h"
5 #include "dlib/image_transforms.h"
13 const dlib::full_object_detection object_detection) {
15 if (object_detection.num_parts() < 5) {
19 auto get_rectangle = [](dlib::point
one, dlib::point two)
22 double scale = (one - two).length() * 1.5;
23 return dlib::centered_rect(result, scale, scale);
30 if (object_detection.num_parts() == 5) {
43 get_rectangle(object_detection.part(index_ex_right),
44 object_detection.part(index_en_right))));
46 get_rectangle(object_detection.part(index_ex_left),
47 object_detection.part(index_en_left))));
std::vector< dlib::chip_details > get_eyes_chip_details(const dlib::full_object_detection object_detection)
void rectangle(InputOutputArray img, Point pt1, Point pt2, const Scalar &color, int thickness=1, int lineType=LINE_8, int shift=0)
void push_back(const value_type &__x)