如何从模糊图像中读取日期内容?

时间:2019-10-29 08:49:07

标签: ocr tesseract google-vision

我只需要从图像中提取日期字段。日期信息在某些图像中无法正确显示。 python中有什么准确的方法吗?

pytesseract:但无法识别模糊的图像

img = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
        kernel = np.ones((1, 1), np.uint8)
        img = cv2.dilate(img, kernel, iterations=1)
        img = cv2.erode(img, kernel, iterations=1)
        cv2.imwrite(src_path + "thres.png", img)
        # Recognize text with tesseract for python
        result = pytesseract.image_to_string(Image.open(src_path + "thres.png"))

0 个答案:

没有答案