Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/294.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 使用pytesseract改进OCR结果_Python_Ocr_Tesseract - Fatal编程技术网

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-'