rot_mat = cv2.getRotationMatrix2D(image_center, angle, 1.0)
result = cv2.warpAffine(image, rot_mat, image.shape, flags=cv2.INTER_LINEAR)
return result
OpenCV Python rotate image by X degrees around specific point