Optical character recognition (OCR) tool for printed book pages
Project description
BookOcr
Optical character recognition (OCR) tool for printed book pages.
Usage examples:
from bookocr.ocr import Ocr
ocr = Ocr()
image_path = "my_image.png"
nested_list_structure = ocr.image_ocr(image_path) # pages > text areas > lines > words
text = ocr.get_data_as_text() # the same result, but joined
print(text)
from bookocr.config import OcrConfig
from bookocr.stats_config import OcrStatsConfig
from bookocr.ocr import Ocr
# optional
config = OcrConfig()
# ... set config values here
# optional as well
# provides intermediate results of image processing
stats_config = OcrStatsConfig()
stats_config.set_enabled_true("stats_folder")
# ... set stats_config values here
ocr = Ocr(config, stats_config)
image_path = "my_image.png"
nested_list_structure = ocr.image_ocr(image_path) # pages > text areas > lines > words
text = ocr.get_data_as_text() # the same result, but joined
print(text)
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
bookocr-1.0.3.tar.gz
(1.9 MB
view details)
Built Distribution
File details
Details for the file bookocr-1.0.3.tar.gz
.
File metadata
- Download URL: bookocr-1.0.3.tar.gz
- Upload date:
- Size: 1.9 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0c995654064c1a4be721538d4d6c26998618ed2652f573ed6bc8c2d27305de9b |
|
MD5 | af1fdb0fce51c4e687bdf4f9aac5e6a4 |
|
BLAKE2b-256 | 7dd89770c013de9ebb814d6d097e4eb1155c6ad395d8457d95e3b254970fda2c |
File details
Details for the file bookocr-1.0.3-py3-none-any.whl
.
File metadata
- Download URL: bookocr-1.0.3-py3-none-any.whl
- Upload date:
- Size: 1.9 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 94a8a712fbb88339c79bc4f939e69b45f8034b8217dcebfe5d33e0948643f6d2 |
|
MD5 | 6ac17e7b71803aea68b179d879b9239c |
|
BLAKE2b-256 | d7a772dbf8649e0368f5317ac8a2f42c19a218a53916f40c9c4bc7901b39c65e |