From e3d2c201dcec8e5e075600462bc4d701e7a09b43 Mon Sep 17 00:00:00 2001 From: gocivici Date: Fri, 27 Oct 2023 11:52:22 +0300 Subject: [PATCH] change flip direction --- main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.py b/main.py index 86d32a4..a6a80d3 100644 --- a/main.py +++ b/main.py @@ -32,7 +32,7 @@ if cam.isOpened(): ret, img = cam.read() # img = cv2.rotate(img, cv2.ROTATE_90_CLOCKWISE) # cv2.putText(img, str(TIMER), (200, 250), cv2.FONT_HERSHEY_SIMPLEX, 7, (0, 255, 255), 4, cv2.LINE_AA) - img = cv2.flip(img, 1) + img = cv2.flip(img, 0) img = cv2.rotate(img, cv2.ROTATE_90_COUNTERCLOCKWISE) img = cv2.cvtColor(img,cv2.COLOR_BGR2RGB) img = Image.fromarray(img) @@ -58,7 +58,7 @@ if cam.isOpened(): break else: ret, img = cam.read() - img = cv2.flip(img, 1) + img = cv2.flip(img, 0) img = cv2.rotate(img, cv2.ROTATE_90_COUNTERCLOCKWISE) # img = cv2.rotate(img, cv2.ROTATE_90_CLOCKWISE) predictions = DeepFace.analyze(img,actions=['emotion'])