Commit b1ff9e5b authored by Benoît Piédallu's avatar Benoît Piédallu

Go to fullscreen with space bar AND F5

Add explanation text under the gradient
parent 7f0292ff
......@@ -83,7 +83,26 @@ def displayGradientOn(resultImage, value):
x_offset = width-avSusRectWidth-30
y_offset = int((start_position - cursor_height/2) + gradient_height * (2-(value-1))/2)
resultImage[y_offset:y_offset+cursor_height, x_offset:x_offset+cursor_width] = cursor
cv2.putText(resultImage,
"Danger",
(int(width-55),int(10+start_position+gradient_height)),
cv2.FONT_HERSHEY_SIMPLEX,
0.5,
NAME_COLOR,
1,
cv2.LINE_AA)
cv2.putText(resultImage,
"moyen",
(int(width-55),int(10+12+start_position+gradient_height)),
cv2.FONT_HERSHEY_SIMPLEX,
0.5,
NAME_COLOR,
1,
cv2.LINE_AA)
def calculateAverageSuspicious(faceSuspicion):
global averageSuspicious
currentFaces = len(faceSuspicion) - faceSuspicion.count(0)
......@@ -133,7 +152,7 @@ def detectAndTrackMultipleFaces(start_thread,
pass
elif pressedKey == 113: # Q
break
elif pressedKey == 194: # F5
elif pressedKey == 194 or pressedKey == 32: # F5
FULLSCREEN = not FULLSCREEN
#Resize the image to 320x240
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment