crop_util.py 文件源码

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

项目:tensorflow_face 作者: ZhihengCV 项目源码 文件源码
def rotateImage(image, angle, center=None, scale=1.0):
    h, w = image.shape[:2]
    if center is None:
        center = (w / 2, h / 2)
    rot_mat = cv2.getRotationMatrix2D(center, angle, scale)
    result = cv2.warpAffine(image, rot_mat, (w, h), flags=cv2.INTER_CUBIC)
    return result
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号