Merge pull request #22 from rez-spb/fix-gaze

Fix exception in gaze tracking.
This commit is contained in:
Emiliana 2021-06-08 21:48:55 +02:00 • committed by GitHub
commit 9a6eb20d83
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -50,7 +50,7 @@ def compensate(p1, p2):
def rotate_image(image, a, center): def rotate_image(image, a, center):
(h, w) = image.shape[:2] (h, w) = image.shape[:2]
a = np.rad2deg(a) a = np.rad2deg(a)
M = cv2.getRotationMatrix2D((center[0], center[1]), a, 1.0) M = cv2.getRotationMatrix2D((float(center[0]), float(center[1])), a, 1.0)
rotated = cv2.warpAffine(image, M, (w, h)) rotated = cv2.warpAffine(image, M, (w, h))
return rotated return rotated