1. Download all these-
i. PIL-1.1.7.win32-py2.7.exe
ii. pytesser_v0.0.1.zip
iii. python-2.7.5.msi
iv. tesseract-ocr-setup-3.02.02.exe
2. Install Python-2.7.5
3. tesseract-ocr-setup-3.02.02 & PIL-1.1.7.win32-py2.7
4. Extract pytesser_v0.0.1.zip at the same directory as Python (C:\Python27).
5. Go to C:\Python.Open pytesser.py file on notepad.In 6th line replace "import Image" with "from PIL import Image".Save this file by pressing CTRL+S.

6. See the below image for better understanding.
7. All Set. Open IDLE (Python GUI).
See the below image for better understanding.
8. After opening ODLE (Python GUI) open new window by pressing CTRL+N.
Type the below code.
from PIL import Image
from pytesser import *
image_file = 'fnord.tif' # Image Name
im = Image.open(image_file)
text = image_to_string(im)
text = image_file_to_string(image_file)
text = image_file_to_string(image_file, graceful_errors=True)
print "=====output=======\n"
print text
Save this file at the same location as Python (C:\Python27) by pressing CTRL+S.
from PIL import Image
from pytesser import *
image_file = 'fnord.tif' # Image Name
im = Image.open(image_file)
text = image_to_string(im)
text = image_file_to_string(image_file)
text = image_file_to_string(image_file, graceful_errors=True)
print "=====output=======\n"
print text
print text
Well done bhai
ReplyDeleteThank You Bhai...!!
ReplyDelete