mirror of
https://github.com/serengil/deepface.git
synced 2025-06-07 12:05:22 +00:00
Fixed rotation angle
This commit is contained in:
parent
70bce5ae63
commit
cc8c3f0461
@ -329,7 +329,7 @@ def align_img_wrt_eyes(
|
|||||||
|
|
||||||
(h, w) = img.shape[:2]
|
(h, w) = img.shape[:2]
|
||||||
center = (w // 2, h // 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))
|
img = cv2.warpAffine(img, M, (w, h), flags=cv2.INTER_CUBIC, borderMode=cv2.BORDER_CONSTANT, borderValue=(0,0,0))
|
||||||
|
|
||||||
return img, angle
|
return img, angle
|
||||||
|
Loading…
x
Reference in New Issue
Block a user