Skip to content

Instantly share code, notes, and snippets.

@techedlaksh
Created February 9, 2017 18:57
Show Gist options
  • Save techedlaksh/3cdb7ef224c697cdff572d7e1d9b3b77 to your computer and use it in GitHub Desktop.
Save techedlaksh/3cdb7ef224c697cdff572d7e1d9b3b77 to your computer and use it in GitHub Desktop.
def rotateImage(image, angle):
image_center = tuple(np.array(image.shape)[:2]/2)
rot_mat = cv2.getRotationMatrix2D(image_center,angle,1.0)
result = cv2.warpAffine(image, rot_mat, image.shape[:2],flags=cv2.INTER_LINEAR)
return result
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment