augmentation.py 文件源码

python
阅读 28 收藏 0 点赞 0 评论 0

项目:phocnet 作者: ssudholt 项目源码 文件源码
def rotate_image(image, angle):
        '''
        Rotates the given image by the given angle.
        '''

        rows, cols, _ = np.atleast_3d(image).shape
        rot_mat = cv2.getRotationMatrix2D((cols/2, rows/2), angle, 1)

        return cv2.warpAffine(image, rot_mat, (cols, rows))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号