-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Tesseract.js (v5.1.1) Fails on Angled Text Recognition #963
Comments
There’s another issue which explains that rotateAuto only works up to +-10 degrees, so indeed it won’t work with text angled at 45 degrees. I’m not sure if this is something that could be changed or is somehow inherent to the method. It’s probably a good idea to use another method to detect the text (including position and angle) before feeding it into Tesseract once straightened. |
+1 to the issue. Hey Jacques, How would you recommend to "detect the text (including position and angle) before feeding it ". Is there a built in function in teserractJs for this or you suggesting to use some other library like OpenCv to accomplish this? |
@rajkumardongre I think there are two separate issues here. First is the case of images that are scanned in a particular orientation--one of 0, 90, 180, or 270 degrees. This should be something Tesseract is capable of handling, however appears to be bugged in certain cases. This is already being discussed in #940. The second issue brought up above is images rotated by some amount that is not a standard orientation, nor an amount close enough to be handled by |
So after testing with tesseract, the detect feature doesn't seem to work on text slanted at angles anything other than 0 90 180 or 270 degrees. It doesn't work with 45 degrees or something. |
I am using Tesseract.js version 5.1.1 to build a simple OCR solution. While it works well on images with horizontally or vertically aligned text (top to bottom), I encounter issues when the text is at an angle or written bottom to up.
Observations:
Text orientation issues:
Settings applied:
rotateAuto: true
, which works in some cases but fails to detect text properly at certain angles.Expected Behavior:
OCR should be able to correctly detect and process text, regardless of its orientation or the angle at which it appears in the image.
Actual Behavior:
Text at an angle or written from bottom to top is either not recognized or inaccurately detected.
Steps to Reproduce:
rotateAuto: true
and enable orientation detection.Additional Information:
Images for Reference:
images of the text where recognition fails
The text was updated successfully, but these errors were encountered: