Skip to main content

Tesseract C-API in python, a faster alternative to pytesseract

Project description

pytesseract-api

Tesseract C-API in python, a faster alternative to pytesseract

Installation

You can install the package via pip:

pip install pytesseract-api

Usage

import cv2

from pytesseract_api import image_to_string
from pytesseract_api.api import set_variable

img = cv2.imread("sample.png")
text = image_to_string(img)
print(text)

img = cv2.imread("digits.png")
set_variable("tessedit_char_whitelist", "0123456789")
text = image_to_string(img)
set_variable("tessedit_char_whitelist", "") # reset

Limitations

  • Only supports opencv images as input as of now

License

This project is licensed under the terms of the MIT license.

Contact

If you want to contact me you can reach me at pradishbijukchhe@gmail.com.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pytesseract_api-1.0.4.tar.gz (4.1 kB view hashes)

Uploaded Source

Built Distribution

pytesseract_api-1.0.4-py3-none-any.whl (4.9 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page