def rotate(image, angles=DEFAULT_ANGLES):
rotated = []
for angle in angles:
center = tuple(np.array(image.shape[:2]) / 2)
R = cv2.getRotationMatrix2D(center, angle, 1.0)
rotated_image = cv2.warpAffine(image, R, image.shape[:2], flags=cv2.INTER_CUBIC)
rotated.append(rotated_image)
return rotated
augment.py 文件源码
python
阅读 32
收藏 0
点赞 0
评论 0
评论列表
文章目录