Getting started with OpenCV4Android using Android Studio 2.0 preview

These are the steps to get started:
  1. Download open CV from this link
  2. Extract the file and get OpenCV-android-sdk folder
  3. New --> Import Module --> choose OpenCV-android-sdk/sdk/java, and modify the folder of the module folder to what you like, such as: opencv
  4. Open opencv/build.gradle change the version of compileSdkVersion and buildToolsVersion to suit with your project. Press sync gradle.
  5. Right click app module. Choose Open module settings --> Choose Dependencies tab --> + --> module dependency --> opencv
  6. Copy OpenCV-android-sdk/sdk/native/libs, paste to app/src/main, and rename folder to jniLibs
Now, you can import and use OpenCV.

Comments

Popular posts from this blog

My books review: "The retrospective handbook"

My books review: Money for the rest of us

Use SwiftUI preview with UIKit