KO
|
EN
gitlite — search
Search
#python
#java
#python3
#arduino
#golang
#machine-learning
#rust
#html
#flask
#javascript
#seismology
#nodejs
tesserpy
★ 20
Open GitHub ↗
ARCHIVED: A Python API for Tesseract
Download README (.md)
Explore Similar Repositories
mysql-udf-base64
:
It provides base64 encode/decode UDF (user defined function) for MySQL-5.1/5.5/5.6
sublime-text
:
Personal Sublime Text setup
es-google-drive-river
:
Google Drive river for Elasticsearch
meet-meteor
:
A shower of Meteor meetups
oem_gateway
:
Part of OpenEnergyMonitor project. Gateway from data source to target database.
// repository documentation
Was this content helpful?
★ 0
(0 ratings)
Select Rating:
★
★
★
★
★
Submit Feedback
Recent Feedback
×
Download README
Do you want to download the
README.md
file for
tesserpy
?
Download (.md)
**Archived** ============ **This repository is no longer being updated.** New development is happening in [rigorgt/tesserpy](https://github.com/rigorgt/tesserpy). tesserpy ======== A Python API for Tesseract Requirements ------------ * Python >= 2.7 or >= 3.2 * NumPy >= 1.6 * Tesseract >= 3.02 Building -------- It's the usual distutils dance -- run `python setup.py` for more details. If your Tesseract installation's files are not in the standard system paths, you may need to create a `setup.cfg` with the following contents: ```ini [build_ext] include-dirs=/path/to/tesseract/include library-dirs=/path/to/tesseract/lib ``` Example ------- Here's a simple example that requires OpenCV: ```python import cv2 import tesserpy tess = tesserpy.Tesseract("/path/to/tessdata/prefix", language="eng") # Anything exposed by SetVariable / GetVariableAsString is an attribute tess.tessedit_char_whitelist = """'"!@#$%^&*()_+-=[]{};,.<>/?`~abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789""" image = cv2.imread('/path/to/image.png') tess.set_image(image) page_info = tess.orientation() print(page_info.textline_order == tesserpy.TEXTLINE_ORDER_TOP_TO_BOTTOM) print("#####") print(tess.get_utf8_text()) print("#####") print("Word\tConfidence\tBounding box coordinates") for word in tess.words(): bb = word.bounding_box print("{}\t{}\tt:{}; l:{}; r:{}; b:{}".format(word.text, word.confidence, bb.top, bb.left, bb.right, bb.bottom)) ```