blob.py 文件源码

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

项目:sudokuextract 作者: hbldh 项目源码 文件源码
def get_centered_blob(img, border_size=1):
    img = to_binary_otsu(img)
    blob = _get_most_centered_blob(img)
    if blob is None:
        blob = _get_most_centered_blob(to_binary_otsu(binary_dilation(img)))
        if blob is None:
            return None
    blob_img = add_border(blob, (28, 28), border_size=border_size)
    blob_img = to_binary_otsu(blob_img)

    return blob_img
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号