@@ -985,19 +985,20 @@ int visualizePoints(
985985
986986 if (gestureDetected)
987987 {
988- if (gestureFrame<20 )
988+ if (gestureFrame<25 )
989989 {
990990 snprintf (textInfo,512 ," %s (%u)" ,gestureName,gestureDetected);
991991
992992 if (endEffectorHistory)
993993 {// If we track end effectors we will use their position to emit circles
994994 if (leftEndEffector.size ()>0 )
995995 {
996- cv::putText (img,textInfo,leftEndEffector[leftEndEffector.size ()-1 ],fontUsed,2.5 ,cv::Scalar (0 ,255 ,255 ),thickness,8 );
997996 cv::circle (img,leftEndEffector[leftEndEffector.size ()-1 ],5 *gestureFrame,cv::Scalar (0 ,255 ,255 ),3 ,8 ,0 );
998997 }
999998 if (rightEndEffector.size ()>0 )
1000999 {
1000+ // Right is always left :P so there is space for the string
1001+ cv::putText (img,textInfo,rightEndEffector[rightEndEffector.size ()-1 ],fontUsed,2.2 ,cv::Scalar (0 ,255 ,255 ),thickness,8 );
10011002 cv::circle (img,rightEndEffector[rightEndEffector.size ()-1 ],5 *gestureFrame,cv::Scalar (0 ,255 ,255 ),3 ,8 ,0 );
10021003 }
10031004 } else
@@ -1006,14 +1007,17 @@ int visualizePoints(
10061007 cv::putText (img,textInfo,txtPosition,fontUsed,1.5 ,cv::Scalar (0 ,255 ,255 ),thickness,8 );
10071008 cv::circle (img,txtPosition,2 *gestureFrame,cv::Scalar (0 ,255 ,255 ),3 ,8 ,0 );
10081009 }
1009-
1010-
1011-
1012-
1013-
1014-
1015- }
1016- }
1010+ }
1011+ } else
1012+ {
1013+ // We did not detect a gesture.. Let's check the framerate
1014+ if (fpsTotal<13 )
1015+ {
1016+ txtPosition.y +=30 ;
1017+ cv::putText (img," Framerate is too slow for reliable gesture recognition.." ,txtPosition,fontUsed,0.8 ,color,thickness,8 );
1018+ }
1019+
1020+ }
10171021
10181022
10191023
0 commit comments