Commit d12dfa2f authored by klorydryk's avatar klorydryk

Add text for all scores - reduce gradient width

parent 5a94445a
......@@ -34,7 +34,7 @@ GREEN = (0, 255, 0)
suspiciousColors = {0:(0,0,0), 1:GREEN, 2:ORANGE, 3:RED}
avSusRectWidth = 60
avSusRectWidth = 20
cursorSize = (30, 30)
cursor = cv2.imread('logo.png') # Read the file
......@@ -395,17 +395,24 @@ def put_warning_message(fid, faceTrackers, faceSuspicion, resultImage):
suspicion_level = faceSuspicion[fid]
text = "Citoyen modele"
color = GREEN
if suspicion_level > SUSPICIOUS_THRESHOLD:
text = "ATTENTION! PERSONNE DANGEREUSE!"
cv2.putText(resultImage,
text ,
# Name's alignment
(t_x+ int((t_w - len(text)*10)/2 + 10), int(t_y) + 20 + t_h),
cv2.FONT_HERSHEY_SIMPLEX,
0.5,
RED,
1,
cv2.LINE_AA)
color = RED
elif suspicion_level > 1:
text = "Comportement a surveiller"
color = ORANGE
cv2.putText(resultImage,
text ,
# Name's alignment
(t_x+ int((t_w - len(text)*10)/2 + 10), int(t_y) + 20 + t_h),
cv2.FONT_HERSHEY_SIMPLEX,
0.5,
color,
1,
cv2.LINE_AA)
def rectangle_around_face(fid, faceTrackers, faceSuspicion, draw_person_dangerosity, resultImage):
......
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