无法检测到图像上的等号

问题描述

enter image description here

我正在从事一个能够理解数学符号的计算机视觉项目。它可以正确检测除“等于”标记以外的所有内容。但是“等号”被视为两个单独的“减号”。

    image = cv2.imread('./deneme.png')
    grey = cv2.cvtColor(image.copy(),cv2.COLOR_BGR2GRAY)
    ret,thresh = cv2.threshold(grey.copy(),255,cv2.THRESH_BINARY_INV)
    contours,_ = cv2.findContours(thresh.copy(),cv2.RETR_EXTERNAL,cv2.CHAIN_APPROX_SIMPLE)
    preprocessed_digits = []
    for c in contours:
        x,y,w,h = cv2.boundingRect(c)
        cv2.rectangle(image,(x,y),(x+w,y+h),color=(0,0),thickness=2)
        digit = thresh[y:y+h,x:x+w]
        digit = make_square(digit)
        preprocessed_digits.append(digit)
    plt.imshow(image,cmap="gray")
    plt.show()

enter image description here

我不知道如何解决此问题。如何检测等号?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)