-
Notifications
You must be signed in to change notification settings - Fork 119
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
Which method returns text orientation? #44
Comments
I don't think result of this mode (as many other things) is exposed in the Java API. You may need to see how it's accessed in the C++ code and expose it for yourself by modifying the library. So, cpp files in |
Hi, I want to pass in an image captured from the camera of the device, but when I do that, I don't get the text at all, the only time I get the right text is if I save the image in the asset folder or I pick it from the gallery. |
@chilex111 Hi, you are writing comment to completely unrelated issue. Also, for such questions you should use StackOverflow and not Github issues. I will just say here that generally you should convert the image you get from Camera into standard Bitmap and then give that to Tesseract by calling setImage(bitmap). There is no direct support for giving the Image object which you receive from Camera2 API directly to Tesseract. |
@Robyer I believe this feature has now been added to tesseract-ocr: tesseract-ocr/tesseract#4070 |
@john-khgoh That is separate feature. There is no issue in Tesseract itself, current version of this (Tesseract4Android) library just doesn't expose the full Tesseract's C/C++ API to Java. It's because I directly used the same Java API from tess-two project and kept it (mostly) as is. It's possible to expose more methods/features from Tesseract, or even create a completely new API at Java side, but I just didn't have the need for that on my own. |
There is mode "Orientation and script detection only. PSM_OSD_ONLY" in TessBaseAPI, which method returns text orientation
?
The text was updated successfully, but these errors were encountered: