[FEATURE] finished hand open/closed recognition

This commit is contained in:
Sem van der Hoeven
2021-05-25 14:49:04 +02:00
parent 3696e2eb30
commit 05ae8ee019
5 changed files with 28 additions and 9 deletions

View File

@@ -151,9 +151,16 @@ namespace computervision
drawVectorPoints(frame, filtered_finger_points, color_yellow, false);
putText(frame, to_string(filtered_finger_points.size()), center_bounding_rect, FONT_HERSHEY_PLAIN, 3, color_purple);
amount_of_fingers = filtered_finger_points.size();
return contours_image;
}
int FingerCount::getAmountOfFingers()
{
return amount_of_fingers;
}
double FingerCount::findPointsDistance(Point a, Point b) {
Point difference = a - b;
return sqrt(difference.ddot(difference));