我正在尝试使用该pytesser
image_to_string
功能,但它不起作用:代码是:
from PIL import ImageGrab
from pytesser import *
import Image
ImageGrab.grab((0, 0, 900, 500)).save("C:\Users\Emanuele\Desktop\sss" + '.jpg')
imm= Image.open("C:\Users\Emanuele\Desktop\sss.jpg")
print image_to_string(imm)
它说:
Traceback (most recent call last):
File "C:\Users\Emanuele\Desktop\Project Z\Python\Imagesave\Imagesave\__init__.py", line 7, in <module>
text = image_file_to_string('C:\Users\Emanuele\Desktop\sss.jpg', graceful_errors=False)
File "C:\Python27\lib\site-packages\pytesser.py", line 44, in image_file_to_string
call_tesseract(filename, scratch_text_name_root)
File "C:\Python27\lib\site-packages\pytesser.py", line 21, in call_tesseract
proc = subprocess.Popen(args)
File "C:\Python27\lib\subprocess.py", line 711, in __init__
errread, errwrite)
File "C:\Python27\lib\subprocess.py", line 948, in _execute_child
startupinfo)
WindowsError: [Error 2] Impossibile trovare il file specificato {traduction: Impossible to find specified file}