Move from int cast to float.
This commit is contained in:
parent
98781a780a
commit
323d707849
1 changed files with 1 additions and 1 deletions
|
|
@ -50,7 +50,7 @@ def compensate(p1, p2):
|
|||
def rotate_image(image, a, center):
|
||||
(h, w) = image.shape[:2]
|
||||
a = np.rad2deg(a)
|
||||
M = cv2.getRotationMatrix2D((int(center[0]), int(center[1])), a, 1.0)
|
||||
M = cv2.getRotationMatrix2D((float(center[0]), float(center[1])), a, 1.0)
|
||||
rotated = cv2.warpAffine(image, M, (w, h))
|
||||
return rotated
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue