tesseract把图片背景先变白色,再进行识别(二值化)代码
import cv2 as cv
from PIL import Image
import pytesseract
def recognize_text():
gray = cv.cvtColor(src, cv.COLOR_BGR2GRAY)
ret, binary = cv.threshold(gray, 0, 255, cv.THRESH_BINARY_INV | cv...
原创
2019-07-15 09:52:07 ·
2553 阅读 ·
3 评论