문제

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?

도움이 되었습니까?

해결책

"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?

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top