Ask Your Question

Jwalant's profile - activity

2018-02-14 03:18:09 -0600 received badge  Supporter (source)
2016-02-29 05:34:45 -0600 received badge  Teacher (source)
2015-12-03 04:37:12 -0600 received badge  Necromancer (source)
2015-06-30 11:47:22 -0600 answered a question How to work with OPENCV4ANDROID- in android studio

Simple Steps:-(Indirect Method)

  1. Download/Install(Extract) OpenCV for Android (you might already have it)
    Download :-here Documentation :- here
    Version 2.4.11 is recommended.
  2. Open you Android Project on Android Studio. Import Module (Files >> New >> Import Module) Browse the path to the samples Folder inside OpenCV for Android Folder and Select any one of the Samples
    eg :-OpenCV-2.4.11-android-sdk\OpenCV-android-sdk\samples\15-puzzle
    While importing keep everything checked.
    This will automatically add OpenCV Libraries Module to your project.
    Now you can delete the 15-puzzle module (this is optional).
  3. In the gradle file of your app add dependency :- compile project(':openCVLibrary2411')
    dependencies { compile project(':openCVLibrary2411') }
  4. Now you can Import openCV classes in your project
    eg:-

import org.opencv.android.BaseLoaderCallback;
import org.opencv.android.LoaderCallbackInterface;
import org.opencv.android.OpenCVLoader;