util.py 文件源码

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

项目:camelyon17 作者: hyosari 项目源码 文件源码
def otsu_thresholding(im_float):

    """
        apply otsu thresholding on the whole slide

        im_float = input image as float type 

        return otsued image with gray, otsu threshold value 
    """

    print("threshold_otsu\n")
    threshold_global_Otsu = threshold_otsu(im_float)

    #thresholding 
    im_bool= (im_float > threshold_global_Otsu)
    im_int = im_bool.astype(float)
    print im_int*255
    return im_int*255, threshold_global_Otsu
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号