From e25832f0a3ab0c05c903f6da6962eb4a815d0008 Mon Sep 17 00:00:00 2001 From: gocivici Date: Thu, 26 Oct 2023 21:22:08 +0300 Subject: [PATCH] histogram equlizer added --- main.py | 1 + 1 file changed, 1 insertion(+) diff --git a/main.py b/main.py index ad4e448..1592902 100644 --- a/main.py +++ b/main.py @@ -62,6 +62,7 @@ if cam.isOpened(): fearPoint = predictions[0]["emotion"]["fear"] print("FEAR:" + str(round(fearPoint,2))) imgGray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY) + imgGray = cv2.equalizeHist(imgGray) cv2.imwrite('scared.jpg', imgGray) img = cv2.cvtColor(img,cv2.COLOR_BGR2RGB) img = Image.fromarray(img)