我正在尝试从图像中提取文本,但是无法提取所有文本
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)
结果:
'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-'
它不能准确识别IFSC代码。 我该怎么做才能提高准确性