mirror of
https://git.roussel.pro/telecom-paris/pact.git
synced 2026-02-09 02:20:17 +01:00
Ajout cercle progress
This commit is contained in:
@@ -103,8 +103,14 @@ class HandDetector():
|
||||
else:
|
||||
result = False
|
||||
|
||||
progress = 0
|
||||
if thumbState == "thumbs_up":
|
||||
progress = thumbsUpCount / (self.BUFFER_LENGTH * self.DETECTION_THRESHOLD)
|
||||
elif thumbState == "thumbs_down":
|
||||
progress = thumbsDownCount / (self.BUFFER_LENGTH * self.DETECTION_THRESHOLD)
|
||||
|
||||
if(thumbState != "neutre"):
|
||||
return thumbState, handLandmarks[9], np.linalg.norm(np.array(handLandmarks[9]) - np.array(handLandmarks[0])), result
|
||||
return thumbState, handLandmarks[9], np.linalg.norm(np.array(handLandmarks[9]) - np.array(handLandmarks[0])), result, progress
|
||||
return False
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user