gpt4 book ai didi

python - 在 Ubuntu 14.04 上安装 pytesser

转载 作者:太空宇宙 更新时间:2023-11-04 10:12:14 24 4
gpt4 key购买 nike

我想使用 pytesser OCR,我想在系统中进行相同的更改,以便我可以将其作为模块从系统中的任何位置导入。我尝试使用在 ( Installing pytesser ) 上给出的建议,但它对我不起作用。

最佳答案

你可以使用

pip install pytesseract

您应该使用 PIL 打开图像并输入 pytesseract。PIL,Python Image Library 的缩写。只是一个图像库。

pytesseract 是 tesseract 的包装。

from PIL import Image
import pytesseract
im = Image.open('/home/xxxxxxx/Downloads/img.jpg')
text = pytesseract.image_to_string(im)
print (text)

关于python - 在 Ubuntu 14.04 上安装 pytesser,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37630887/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com