pytesseract,WindowsError:[错误2]系统找不到指定的文件

时间:2016-04-23 16:24:33

标签: python image-processing image-recognition

我是文本提取新手。当我尝试使用pytesseract从png图像中提取文本时

from PIL import Image
import pytesseract
s=Image.open('d:\\test.png')
print(pytesseract.image_to_string(s))

我收到错误了 enter image description here 这是image(test.png)的问题.the test.png是一个号牌的图像。我应该安装其他任何东西。

1 个答案:

答案 0 :(得分:5)

根据PyPi information,您缺少一个必要条件:

  

http://code.google.com/p/tesseract-ocr/安装google tesseract-ocr。   您必须能够将tesseract命令作为“tesseract”调用。如果这   事实并非如此,例如因为tesseract不在你的PATH中,你会的   必须更改'tesseract.py'顶部的“tesseract_cmd”变量。

该链接将我重定向到https://github.com/tesseract-ocr/tesseract

我坦率地感到失望的是,无论如何,一旦安装了基础tesseract命令,pytesseract应该正常工作,该软件包不会给你提供更多信息,因为你错过了这个消息:)