Yirga Yirga - 3 years ago 151
C++ Question

How to load svm trained files by android NDK?

I have trained pictures using c++ opencv code but know i want to save those files somewhere in app and load those SVM trained files using the load method of SVM in opencv c++ code.First i thought i am going to save trained files in assets folder and retrieve the files from assets but there is no absoulute path to assets folder in android apk file because the assets is zipped into apk file.
The second choice is to save it in the android internal storage but there is also another drawback to this method i can't save large amount of data in the android internal storage.

What is the best method to save files and load them using android ndk?

Answer Source

Internal storage. You're right, assets is only an option for read-only files shipped with the apk. You could use eternal storage, on old versions of android there was a significant difference, not so much these days, almost nobody has an external sd card.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download