pytesseract,WindowsError:[错误2]系统找不到指定的文件 [英] pytesseract,WindowsError: [Error 2] The system cannot find the file specified

查看:1065
本文介绍了pytesseract,WindowsError:[错误2]系统找不到指定的文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I am new to text extraction.when i try to extract text from a png image using pytesseract as

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

我收到错误

这是问题吗? image(test.png).the test.png是一个号牌的图像。我应该安装其他任何东西。

I am getting error as Is this the problem of image(test.png).the test.png is the image of a number plate.Should i need to install anything else.

推荐答案

根据 PyPi信息,您有一个遗漏的缺点:

according to the PyPi information there is a perquisite that you are missing:


http://code.google.com/p/tesseract-ocr/
您必须能够以tesseract调用tesseract命令。如果这个
不是这种情况,例如因为tesseract不在你的PATH中,你将
必须更改'tesseract.py'顶部的tesseract_cmd变量。

Install google tesseract-ocr from http://code.google.com/p/tesseract-ocr/ . You must be able to invoke the tesseract command as "tesseract". If this isn't the case, for example because tesseract isn't in your PATH, you will have to change the "tesseract_cmd" variable at the top of 'tesseract.py'.

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

我很遗憾该软件包没有为您提供更多信息一旦你安装了基础 tesseract 命令,你就会错过这个,pytesseract应该可以正常工作:)

I'm frankly disappointed that the package doesn't give you a more informative message that you are missing this, anyway once you have installed the underlying tesseract command pytesseract should work correctly :)

这篇关于pytesseract,WindowsError:[错误2]系统找不到指定的文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆