tetrak_ocr.backends.tesseract¶
OCR a single image file using Tesseract and return the extracted text.
Supports JPEG, PNG, TIFF, and PDF (including multi-page PDFs). Requires Tesseract to be installed on the system (brew install tesseract). PDF support also requires Poppler (brew install poppler).
- Usage:
tetrak-ocr ocr <path-to-image> tetrak-ocr ocr <path-to-image> –contrast 3.0 –psm 6 tetrak-ocr ocr <path-to-image> –backend tesseract-auto # auto-configure
Functions
|
Inspect image characteristics and suggest Tesseract configuration. |
|
Extract text from an image or PDF file. |
|
Prepare an image for OCR by converting to greyscale and boosting contrast. |