"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?
How to get a full path for an Android resource file? Init Tesseract OCR in Android NDK
-
06-07-2023 - |
문제
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?
해결책
제휴하지 않습니다 StackOverflow