我安装了Pytesser从图像中提取文本。
from PIL import Image
from pytesser import *
print image_to_string上面的命令正在工作,但是当我输入代码时
from pytesser import *
from PIL import Image
image = Image.open('C:/Users/Anmol/Desktop/PYTHON/text_image.jpg')
image_to_string(image)我知道错误:
**
回溯(最近一次调用):文件"C:\Users\Anmol\Desktop\PYTHON\text_image.py",第23行,在image_to_string (图像)文件“C:\Python27 27\lib\site-packages\pytesser.py”中,第31行,在image_to_string call_tesseract(scratch_image_name,scratch_text_name_root)文件“C:\Python27 27\lib\site-packages\pytesser.py”中,第21行,在call_tesseract proc = subprocess.Popen(args)文件"C:\Python27\lib\subprocess.py“中,第390行,在init errread,errwrite)文件"C:\Python27\lib\subprocess.py”中,第640行,在_execute_child startupinfo) WindowsError: Error 2中,系统找不到指定的文件*
请指导我如何做,因为我是新的Python。
发布于 2017-04-12 09:48:57
安装Tesseract-ocr for windows。
https://stackoverflow.com/questions/42574398
复制相似问题