main.py 文件源码

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

项目:SudokuVisionSolver 作者: tusharsircar95 项目源码 文件源码
def removeInnerGridLines(img):
    template = cv2.imread('cross_template.jpg',0)
    (tx,ty) = np.shape(template)
    res = cv2.matchTemplate(img,template,cv2.TM_SQDIFF_NORMED)
    threshold = 0.1
    loc = np.where( res <= threshold)
    for pt in zip(*loc[::-1]):
        x = pt[0]
        y = pt[1]
        img,area,dummy = customFloodFill(img,(x + int(tx/2),y + int(ty/2)),0,0)
    return img

# Reads in image of sudoku and does processing
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号