gray image

This commit is contained in:
gocivici 2023-10-26 21:10:54 +03:00
parent c1850610bf
commit 962db75d6b

View File

@ -61,7 +61,8 @@ if cam.isOpened():
predictions = DeepFace.analyze(img,actions=['emotion'])
fearPoint = predictions[0]["emotion"]["fear"]
print("FEAR:" + str(round(fearPoint,2)))
cv2.imwrite('scared.jpg', img)
imgGray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
cv2.imwrite('scared.jpg', imgGray)
img = cv2.cvtColor(img,cv2.COLOR_BGR2RGB)
img = Image.fromarray(img)
draw = ImageDraw.Draw(img)