Question

I need to initialize Tesseract OCR in Android NDK. Tesseract requires to specify a path for tessdata directory. How should I do this in a canonical Android way? I think I need to add a resource(tessdata folder) and pass it to NDK, but how can I get a path of this folder resource? May be is there a best way to solve my problem?

Était-ce utile?

La solution

"in a canonical Android way" you should unpack the tessdata directory from your APK (most likely, from your assets) to private or external files folder of your app. Here is an example: How to copy files from 'assets' folder to sdcard?

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top