page.py 文件源码

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

项目:doc2text 作者: jlsutherland 项目源码 文件源码
def rotate(image, theta):
    (h, w) = image.shape[:2]
    center = (w / 2, h / 2)
    M = cv2.getRotationMatrix2D(center, theta, 1)
    rotated = cv2.warpAffine(image, M, (int(w), int(h)), cv2.INTER_LINEAR,
                             borderMode=cv2.BORDER_CONSTANT, borderValue=(255, 255, 255))
    return rotated
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号