crass.py 文件源码

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

项目:crass 作者: UB-Mannheim 项目源码 文件源码
def whiteout_ramp(image, linecoords):
    # Dilation enlarge the bright segments and cut them out off the original image
    imagesection = image[linecoords.object]
    count = 0
    for i in morph.dilation(linecoords.object_matrix, morph.square(10)):
        whitevalue = measurements.find_objects(i == linecoords.object_value + 1)
        if whitevalue:
            whitevalue = whitevalue[0][0]
            imagesection[count,whitevalue.start:whitevalue.stop] = 255
            count +=1
    return 0
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号