由于dlib检测的眼部关键点缺少下沿点,无法将整个眉形区域表示出来,只能估算
略
1、眉部关键点
左侧:17,18,19,20,21
右侧:22,23,24,25,26
2、计算roi区域的w,h,center
FaceRegion left_eb, right_eb;
left_eb.w = landmarks.at(21).x - landmarks.at(17).x + 5;
left_eb.h = std::max(landmarks[21].y, landmarks[17].y) + 10 - std::min(landmarks[18].y, landmarks[19].y);
left_eb.center = cv::Point2i((landmarks[21].x - left_eb.w / 2.0), (std::min(landmarks[18].y, landmarks[19].y) + left_eb.h / 2.0));
right_eb.w = landmarks[26].x - landmarks[22].x + 5;
right_eb.h = std::max(landmarks[22].y, landmarks[26].y) + 5 - std::min(landmarks[24].y, landmarks[25].y);
right_eb.center = cv::Point2i((landmarks[22].x + right