Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Yes. To integrate OpenCV inside your application, and avoid explicit installation of OpenCV manager, you need to first read following document provided by OpenCV.</p> <p><strong>First Read -> <a href="http://docs.opencv.org/doc/tutorials/introduction/android_binary_package/dev_with_OCV_on_Android.html#application-development-with-static-initialization" rel="noreferrer">Static Initialization of OpenCV</a></strong></p> <p>After successfully followed steps, you need to write following code to enable OpenCV in your application initialization code before calling OpenCV API. It can be done, for example, in the static section of the Activity class:</p> <pre><code>static { if (!OpenCVLoader.initDebug()) { // Handle initialization error } } </code></pre> <p><strong>References:</strong></p> <ol> <li><a href="http://answers.opencv.org/question/2033/use-opencv-on-android-without-manager/" rel="noreferrer">http://answers.opencv.org/question/2033/use-opencv-on-android-without-manager/</a></li> <li><a href="https://stackoverflow.com/questions/12615712/static-initialization-on-opencv-android">Static Initialization on OpenCV Android</a></li> </ol> <h1>Edit</h1> <p>As per new scenario in Document and thanks to @rozhok for providing new information, <strong>initDebug()</strong> method can't be used for production build</p> <blockquote> <p>Note This method is deprecated for production code. It is designed for experimental and local development purposes only. If you want to publish your app use approach with async initialization.</p> </blockquote> <p>You need to use following method for that</p> <p><strong><em>Syntax</em></strong></p> <pre><code>static boolean initAsync(String Version, Context AppContext, LoaderCallbackInterface Callback) </code></pre> <p><strong><em>Example</em></strong></p> <pre><code>public class Sample1Java extends Activity implements CvCameraViewListener { private BaseLoaderCallback mLoaderCallback = new BaseLoaderCallback(this) { @Override public void onManagerConnected(int status) { switch (status) { case LoaderCallbackInterface.SUCCESS: { Log.i(TAG, "OpenCV loaded successfully"); mOpenCvCameraView.enableView(); } break; default: { super.onManagerConnected(status); } break; } } }; @Override public void onResume() { super.onResume(); OpenCVLoader.initAsync(OpenCVLoader.OPENCV_VERSION_2_4_6, this, mLoaderCallback); } ... } </code></pre> <p><strong>References</strong></p> <ol> <li><a href="http://docs.opencv.org/doc/tutorials/introduction/android_binary_package/dev_with_OCV_on_Android.html" rel="noreferrer">http://docs.opencv.org/doc/tutorials/introduction/android_binary_package/dev_with_OCV_on_Android.html</a></li> </ol>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload