0
votes

I have installed Pytesser to extract text from image

     from PIL import Image
     from pytesser import *
     print image_to_string

the above commands are working but when i type the code

           from pytesser import *
           from PIL import Image
           image = Image.open('C:/Users/Anmol/Desktop/PYTHON/text_image.jpg')
          image_to_string(image)

I get the error:

**

Traceback (most recent call last): File "C:\Users\Anmol\Desktop\PYTHON\text_image.py", line 23, in image_to_string(image) File "C:\Python27\lib\site-packages\pytesser.py", line 31, in image_to_string call_tesseract(scratch_image_name, 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 390, in init errread, errwrite) File "C:\Python27\lib\subprocess.py", line 640, in _execute_child startupinfo) WindowsError: [Error 2] The system cannot find the file specified**

Plzz guide me what to do as I'm new to Python.

1

1 Answers

0
votes

Install Tesseract-ocr for windows.