def smooth_mask(mask):
""" Smooths a binary mask using 4x4 dilation
# Arguments
mask : the binary mask
# Returns
mask : a smoother binary mask
"""
n_hood = np.ones(4)
mask = morphology.binary_dilation(mask, n_hood)
mask = morphology.binary_dilation(mask, n_hood)
# type casting is a bitch
return mask
preprocessing.py 文件源码
python
阅读 24
收藏 0
点赞 0
评论 0
评论列表
文章目录