Ask Your Question
0

how i use opencv on android studio

asked 2016-12-12 00:02:19 -0600

joji gravatar image

im just lost,

cant even load the samples,

or build their code

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2016-12-12 03:21:55 -0600

Vintez gravatar image

If you want to use the OpenCV4Android SDK follow these steps:

  1. Download the latest Version of the OpenCV4Android sdk and decompress the folder.

  2. Import it to a Android Studio Project (e.g. one of its samples) with File -> New -> Import Module. Then choose the sdk/java folder from the decompressed folder.

  3. Update the the Gradle file so that compileSdkVersion, buildToolsVersion, minSdkVersion and targetSdkVersion of your app and the opencvLibrary match.

  4. Add the module dependencie of your app. Go to the Projectstructure choose the module folder from your app go to "Dependencies" and add the dependencie with the "+" and module dependencie.

  5. Copy the Libs Folder from sdk/native from your decompressed Folder into your app main folder app/src/main. After that rename Libs int jniLibs

When you finished these Tasks successfully everything should work.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2016-12-12 00:02:19 -0600

Seen: 410 times

Last updated: Dec 12 '16