Fixed rotation angle

This commit is contained in:
Josh 2024-08-24 09:07:53 +01:00
parent 70bce5ae63
commit cc8c3f0461

View File

@ -329,7 +329,7 @@ def align_img_wrt_eyes(
(h, w) = img.shape[:2]
center = (w // 2, h // 2)
M = cv2.getRotationMatrix2D(center, -angle, 1.0)
M = cv2.getRotationMatrix2D(center, angle, 1.0)
img = cv2.warpAffine(img, M, (w, h), flags=cv2.INTER_CUBIC, borderMode=cv2.BORDER_CONSTANT, borderValue=(0,0,0))
return img, angle