Install pytesseract and images,
sudo pip install pytesseract
sudo pip install pillow
Install Google Tesseract OCR in the machine. In Linux,
apt-get install tesseract-ocr
type in the terminal 'tesseract' and see whether its working.
Then the following is the code for captcha recognize.
Code :
from PIL import Image
import pytesseract
print pytesseract.image_to_string(Image.open('/home/ubuntu/Desktop/index.jpeg'))
Instead of the indicated path put the captcha image path.
Source:
https://pypi.python.org/pypi/pytesseract
No comments:
Post a Comment