border_removal.py 文件源码

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

项目:idmatch 作者: maddevsio 项目源码 文件源码
def rotate(image, angle, center = None, scale = 1.0):
    # Grab the dimensions of the image
    (h, w) = image.shape[:2]
    # If the center is None, initialize it as the center of
    # the image
    if center is None:
        center = (w / 2, h / 2)
    # Perform the rotation
    M = cv2.getRotationMatrix2D(center, angle, scale)
    rotated = cv2.warpAffine(image, M, (w, h))
    # Return the rotated image
    return rotated
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号