[FIX] detecting hand when its just a finger or hair

This commit is contained in:
Sem van der Hoeven
2021-06-04 14:48:19 +02:00
parent 81dec3b9f4
commit ca2959bf2d
4 changed files with 19 additions and 7 deletions

View File

@@ -41,7 +41,7 @@ namespace computervision
return cap;
}
bool ObjectDetection::detectHand(Mat cameraFrame)
bool ObjectDetection::detectHand(Mat cameraFrame, bool& hand_present)
{
Mat inputFrame = generateHandMaskSquare(cameraFrame);
frameOut = inputFrame.clone();
@@ -72,7 +72,7 @@ namespace computervision
//imshow("handMask", handMask);
//imshow("handDetection", fingerCountDebug);
check_if_hand_present(handMask);
hand_present = check_if_hand_present(handMask);