Ask Your Question
0

Android dnn in native C++

asked 2020-07-09 02:09:31 -0600

aguila gravatar image

Hello, i succesfully linked opencv to my android c++ native app.. now I encountered a problem where i cannot read my models (ex. YOLO) I pasted them here: /storage/emulated/0/DCIM/ <model> but when running I see that the models cannot be found/read. The tutorial on the opencv page is for java implementation, I would like to implement something similar but using native C++.

What I have tried:

  • set permissions on my app to READ/WRITE: <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
  • similar approach than: question opencv answers

Has someone encountered the same issue? Or has some tips? Thaaaanks!

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2020-07-09 02:53:16 -0600

aguila gravatar image

Oh okay I managed to solve it, I will post the solution in case that helps someone. If you do not have your device "rooted" you can use the Device File explorer inside Android Studio and you need to upload the files there to where your app is located. In my case it was: /data/user/0/com.NAME_OF_APP/files/ so you copy your models here and you read them normally with the path /data/user/0/com.NAME_OF_APP/files/FILE_TO_READ

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2020-07-09 02:09:31 -0600

Seen: 471 times

Last updated: Jul 09 '20