-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Please provide some working code examples. #54
Comments
This repo is not about Tesseract, and not just an API. There are plenty of usage examples in the README, including links to the general documentation of the OCR-D framework. Can we close this? |
As mentioned at #53 (comment) similar to import ocrd
import cv2
config = {
"ocrd-olena-binarize": {"impl": "sauvola"},
"ocrd-anybaseocr-crop": None,
"ocrd-olena-binarize": {"impl": "kim"},
"ocrd-cis-ocropy-denoise": {"level-of-operation":"page"},
"ocrd-tesserocr-deskew": {"operation_level":"page"},
"ocrd-tesserocr-segment-region": None,
"ocrd-segment-repair": {"plausibilize": True},
"ocrd-cis-ocropy-deskew": {"level-of-operation":"region"},
"ocrd-cis-ocropy-clip": {"level-of-operation":"region"},
"ocrd-tesserocr-segment-line": None,
"ocrd-segment-repair": {"sanitize": True},
"ocrd-cis-ocropy-dewarp": None,
"ocrd-calamari-recognize": {"checkpoint":"/path/to/models/*.ckpt.json"}
}
img = cv2.read("someimage.jpg")
# Doing the post-correction magic
processed_img = ocrd.process(img, config)
# Now i can use pytesseract to get text from processed_img
text = pytesseract.image_to_string(processed_img)
print(text) |
I am sorry, but there is no such explicit API documentation. This project is meant to provide a command-line application for the OCR-D tool suite. |
Likewise we can find so many working examples about tesseract-OCR
for example at this link
The text was updated successfully, but these errors were encountered: