-
Notifications
You must be signed in to change notification settings - Fork 5
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
Android tesseract no text out at recognise() #11
Comments
Are you running the LSTM engine or the legacy one? I remember something about the new LSTM engine possibly not working on Android due to being too memory demanding. I've only used the legacy engine myself. This issue has a bit more info: rmtheis/tess-two#196 |
Hi @rhardih , It didn't made any difference. |
Hi @scubess, it would be much easier to help you if you post the bitmap that is passed to OCREngineImp.recognition() |
Hi @alexcohn , |
Maybe I am missing something, but your bitmap should be 640x480, and here you post a PNG of size 1280x960 pixels. If by any chance this image is passed to tesseract with wrong size and/or format, it won't have a chance to find text there. |
Hi @alexcohn, Sorry, It's my fault. I didn't made it clear to you. The bitmap image I am passing is created via code in the sample app. But as you asked the image, I have another image which I created and load from assets folder. Tesseract didn't recognise both images. The one I sent to you is loading from |
Exactly, so I thought, maybe the bitmap that is created via code is not good. With a png from assets, it's easier to debug the engine. |
Hi @alexcohn , Thanks again for looking into it. EDITED: @alexcohn I made a change to load image from asset folder for you now |
Thank you @rhardih |
Hi @rhardih ,
I compiled tesseract 4.0.0 for android and produce shared libraries using Building from one of your Android Docker file.
I wrote a simple JNI wrapper and using ndk-build with android.mk file, I build a shared library that goes into my application. I can see, tesseract has been initialised and can get the version 4.0.0 with no issue. I am seeing no crashes but at the same time, I can't see any text has been recognised or no error is thrown.
I followed the instructions and I am sure, I downloaded the right version of trained data file into tessdata folder. Even I tried with different versions of .traineddata, didn't make any difference.
To note, when I use tesseract 3.05, I can see the code runs with no issues. I can't understand what's going wrong here. I have been trying for days and I couldn't find the issue.
I tried to post this question in tesseract. Sadly, its been closed as they said they cant provide any help for throd party projects.
I attached the sample app with JNI wrapper please click the link for the sample android application
Environment: Tesseract
Tesseract Version: tesseract 4.0.0
Current Behavior:
No text recognised at in api->GetUTF8Text()
Expected Behavior:
returns recognised text from the image
Look forward yours help!
The text was updated successfully, but these errors were encountered: