pytessarct

github.com/madmaze/pytesseract Developer Tools Open-source projectOpen source

pytesseract is a Python wrapper for Google Tesseract that provides optical character recognition.

github.com/madmaze/pytesseract
pytessarct homepage screenshot

About pytessarct

pytesseract is a Python wrapper for Google's Tesseract-OCR Engine that recognizes and reads text embedded in images. It works as a library and as a stand-alone invocation script that prints recognized text instead of writing it to a file. It handles image types supported by the Pillow and Leptonica libraries, including jpeg, png, gif, bmp and tiff, and exposes text, box, orientation, PDF, HOCR and ALTO XML outputs. It requires a separate Tesseract executable, set in PATH or via tesseract_cmd.

Key features

  • Convert images to text with image_to_string
  • Get bounding box estimates with image_to_boxes
  • Get verbose OCR data including confidences and page numbers
  • Detect orientation and script with image_to_osd
  • Generate searchable PDF, HOCR, and ALTO XML output
  • Process OpenCV images and NumPy arrays
Best for: Python developers who need to extract text from images using Tesseract in code or scripts.
Good for
  • Reads image types supported by Pillow and Leptonica, including jpeg, png, gif, bmp and tiff
  • Works as a library and as a stand-alone script that prints recognized text
  • Can return multiple output types in one call to save compute time
Watch out for
  • Requires a separate Tesseract executable in PATH or set via tesseract_cmd
  • File paths passed directly must be Tesseract-supported images or Tesseract returns an error
  • OpenCV images must be converted from BGR to RGB because pytesseract assumes RGB

pytessarct at a glance

Type
Open-source project
Pricing
Not confirmed. Check the site
Open source
Yes · Source code
Language
English
Last checked
Oct 5, 2026 · Online when checked
Listed
Oct 5, 2026

pytessarct alternatives

Tools and sites you could use instead, ranked by how closely they match.

All 24 alternatives

Popular in Developer Tools

Well-known listings from the same topic.

All 423

pytessarct FAQ

How do I point pytesseract to Tesseract if it is not in PATH?
Set pytesseract.pytesseract.tesseract_cmd to the full path to your Tesseract executable.
How do I stop a long-running OCR task?
Pass a timeout value to image_to_string; processing is terminated and raises RuntimeError.
What if I see an error opening tessdata files?
Add a --tessdata-dir config pointing to your tessdata directory, with double quotes around the path.
Is something wrong or out of date?

Tell us and an editor will check it.

Own this website?

Claim the listing and suggest updates yourself. An editor checks every claim first.

Claim this listing