Python 使用pytesseract改进OCR结果
我试图从图像中提取文本,但无法提取所有文本Python 使用pytesseract改进OCR结果,python,ocr,tesseract,Python,Ocr,Tesseract,我试图从图像中提取文本,但无法提取所有文本 from pytesseract import image_to_string import re from PIL import Image import cv2 import numpy as np img = Image.open("test.png") width, height = img.size new_size = width*6, height*6 img = img.resize(new_size, Image.ANTIALIAS
from pytesseract import image_to_string
import re
from PIL import Image
import cv2
import numpy as np
img = Image.open("test.png")
width, height = img.size
new_size = width*6, height*6
img = img.resize(new_size, Image.ANTIALIAS)
img = img.convert('L')
abc = img.point(lambda x: 0 if x < 170 else 300, '1')
image_to_string(abc)
无法准确识别IFSC代码。
如何提高准确性此问题可能更适合此问题可能更适合
'wide sar da\n\nDemo Bank of India\n\n373, COMMERCIAL POINT BRANCH\nNETAJI SUBHAS ROAD\n\nKOLKATA 700001\nFS Code DOBIK003S9122\n\n@vwvw-'