我正在尝试使用 pytesseract library 获取图像文件的字符位置。
import pytesseract
from PIL import Image
print pytesseract.image_to_string(Image.open('5.png'))
是否有任何库可以获取角色的每个位置
最佳答案
使用 pytesseract 似乎不是拥有该职位的最佳主意,但您可以这样做:
from pytesseract import pytesseract
pytesseract.run_tesseract('image.png', 'output', lang=None, boxes=False, config="hocr")
关于python-2.7 - 如何在pytesseract中获取字符位置,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32175014/