-
Notifications
You must be signed in to change notification settings - Fork 9.6k
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
Error in boxClipToRectangle: box outside rectangle #427
Comments
Add a white/black frame to the image and no error messages will appear.
Strange behaviour... |
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
These error messages are produced by Leptonica. They are triggered by a call to https://github.com/tesseract-ocr/tesseract/search?q=pixClipBoxToForeground |
@stweil, this seems like a bug in Tesseract, maybe you can explore it and find its cause. |
https://github.com/tesseract-ocr/tesseract/search?q=pixClipBoxToForeground I noticed that Tesseract does not check the return value from Leptonica's functions ( |
It's caused by a box with width / height 0, but as always in Tesseract it is difficult to find the right fix. |
This error is still present, tried to read an image of 250x50,and got the error.. |
I have the same issue. I have a software that fetches images via wget and then runs ocr with tesseract on them. I noticed that with some images (or resolutions like I found out) the following error occurs:
I found out that this only occurs at some resolutions. So I wrote a script to check this on an example image. This script decreases successively the resolution of the image and then tries to apply ocr to it with tesseract. The image has a resolution of 2090x1504 pixel. There are no errors till the height reaches 1578 pixels. Than irregulary some errors and from 1502p nearly for every image. Some images generate several of these errors, eg:
Unlike @Nemesis77swe ,
I don't think that there is a limit, I think it's maybe a mathematical issue somewhere in the code which causes a box with width / height of 0 like @stweil stated. I attached the script and the output and this is the image. Platform:
Tesseract Version:
|
I tried this on an other windows machine in wsl with same results:
Ubuntu 20.04 (on both win machines) and Debian buster showing exact the same outputs. |
Does adding a white or black border to the image help? If not, post an image that demonstrate the issue. |
Indeed, there are no errors after adding a white border |
Hi there, I've got some specific images that output the following on linux:
The pictures get successfully OCRed in tesseract (without great results tho). The biggest problem for me, however, is that in OCRopus they don't even get OCRed.
Any ideas?
The text was updated successfully, but these errors were encountered: