lineest.py 文件源码

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

项目:deep_ocr 作者: JinpengLI 项目源码 文件源码
def scale_to_h(img,target_height,order=1,dtype=dtype('f'),cval=0):
    h,w = img.shape
    scale = target_height*1.0/h
    target_width = int(scale*w)
    output = interpolation.affine_transform(1.0*img,eye(2)/scale,order=order,
                                            output_shape=(target_height,target_width),
                                            mode='constant',cval=cval)
    output = array(output,dtype=dtype)
    return output
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号