madmaze/pytesseract

A Python wrapper for Google Tesseract

What it solves

It provides a way to recognize and "read" text embedded in images using Python, allowing developers to integrate optical character recognition (OCR) capabilities into their applications.

How it works

It acts as a wrapper for Google's Tesseract-OCR Engine. It can process various image types supported by Pillow and Leptonica (such as JPEG, PNG, GIF, BMP, and TIFF) and can be used either as a Python library or as a standalone invocation script.

Who it’s for

Python developers who need to extract text from images, including those using OpenCV and NumPy arrays, and who have the Tesseract OCR engine installed on their system.

Highlights

  • Multiple Output Formats: Supports extracting text as strings, bounding boxes, searchable PDFs, HOCR, and ALTO XML.
  • Flexible Image Input: Works with PIL images, NumPy arrays, or direct file paths.
  • Cofiguration Control: Allows custom configuration flags (like oem and psm) and language selection for multi-language support.
  • Efficiency: Includes a function to retrieve multiple output types in a single call to reduce compute time.

Related

  • Project
  • Project
  • Project
  • Project