Skip to main content

Tiny wrapper around pytesseract with image preprocessing and OCR configurations

Project description

ocr-tesseract-wrapper

Tiny wrapper around pytesseract with image preprocessing and OCR configurations

Requirements

Basic usage

from ocr_tesseract_wrapper import OCR
ocr_tool = OCR()
results = ocr_tool.ocr([image])  # where image is Pillow image or string image path

Advanced usage

from ocr_tesseract_wrapper import OCR
ocr_tool = OCR()
results = ocr_tool.ocr([image1, image2], config=[])
"""
where config parameter is list of additional configs and restrictions for each of the 
images given to the OCR. for instance: [None, 'tessedit_char_whitelist=0123456789'] will 
apply no restriction to the first but will only return numeric characters from the second image.
""" 

Project details


Download files

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

Files for ocr-tesseract-wrapper, version 0.0.6
Filename, size File type Python version Upload date Hashes
Filename, size ocr_tesseract_wrapper-0.0.6-py3-none-any.whl (5.0 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size ocr-tesseract-wrapper-0.0.6.tar.gz (3.1 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page