file_io.py 文件源码

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

项目:evaluation-toolkit 作者: lightfield-analysis 项目源码 文件源码
def write_img(img, fpath, cmax=None):
    from scipy import misc

    if cmax is None:
        cmax = 255
        if np.max(img) <= 1.0 and img.dtype == float:
            cmax = 1.0

    img_conv = misc.toimage(img, cmin=0, cmax=cmax)
    img_conv.save(fpath)


# json
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号