piltesseract

Image-to-text Tesseract command line wrapper.


License
MIT
Install
pip install piltesseract==0.0.2

Documentation

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

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
    • First install either from source or from binaries.
    • Ensure that the tesseract binary folder is on your PATH.
  • Pillow
    • $ pip install Pillow
  • Six
    • $ pip install six

Install

$ pip install piltesseract