gray image
This commit is contained in:
parent
c1850610bf
commit
962db75d6b
3
main.py
3
main.py
@ -61,7 +61,8 @@ if cam.isOpened():
|
|||||||
predictions = DeepFace.analyze(img,actions=['emotion'])
|
predictions = DeepFace.analyze(img,actions=['emotion'])
|
||||||
fearPoint = predictions[0]["emotion"]["fear"]
|
fearPoint = predictions[0]["emotion"]["fear"]
|
||||||
print("FEAR:" + str(round(fearPoint,2)))
|
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 = cv2.cvtColor(img,cv2.COLOR_BGR2RGB)
|
||||||
img = Image.fromarray(img)
|
img = Image.fromarray(img)
|
||||||
draw = ImageDraw.Draw(img)
|
draw = ImageDraw.Draw(img)
|
||||||
|
Loading…
Reference in New Issue
Block a user