api.py 文件源码

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

项目:histonets-cv 作者: sul-cidr 项目源码 文件源码
def adjust_contrast(image, contrast):
    if (contrast < 0):
        contrast = 0
    elif (contrast > 200):
        contrast = 200
    contrast = contrast / 100
    img = image.astype(np.float) * contrast
    img[img > 255] = 255
    img[img < 0] = 0
    return img.astype(np.ubyte)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号