segmentation.py 文件源码

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

项目:EquationRecognition 作者: xyjiang94 项目源码 文件源码
def __init__(self,path):
        blur_radius = 1.0
        threshold = 50

        img = misc.imread(path)
        self.origin = img
        # smooth the image (to remove small objects)
        imgf = ndimage.gaussian_filter(img, blur_radius)
        threshold = 50
        # find connected components
        self.img, self.count = ndimage.label(imgf > threshold)
        self.labels = self.calculate_labels()


    # Return
    # ----------
    # labels : dictionary, key = label, value = list of bounding in order y1, y2, x1, x2
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号