PILtesseract
Simple Tesseract wrapper for converting PIL Images to text.
Warning: PILtesseract is intended to only work with tesseract 3.03+, one awesome feature added in 3.03 is the ability to pipe images via stdin, PILtesseract utilizes this feature.
Features
- Completely wraps Tesseract-OCR command line optional arguments.
- Sends PIL images to tesseract through stdin (avoids creating a temp file).
- Works for Python 2 and 3.
- All working code in one file.
- MIT License
- Documentation
Here is a simple example:
>>> from PIL import Image
>>> from piltesseract import get_text_from_image
>>> image = Image.open('quickfox.png')
>>> get_text_from_image(image)
'The quick brown fox jumps over the lazy dog'
See Advanced Example
See Recipes
Requirements
More detailed installation instructions can be found here.
- Tesseract-OCR: 3.03 or higher
-
Pillow
$ pip install Pillow
-
Six
$ pip install six
Install
$ pip install piltesseract