OpenCVLoader.initAsync() fails everytime

asked 2015-12-25 11:17:38 -0500

avikapl20 gravatar image

Hi, after comparing my project to the samples, I just cannot figure out why my OpenCVLoader.initAsync() method fails everytime: (This code is in my MainActivity.java)

 private BaseLoaderCallback mLoaderCallback = new BaseLoaderCallback(this) {
    @Override
    public void onManagerConnected(int status) {
        switch (status) {
            case LoaderCallbackInterface.SUCCESS:
            {
                Log.i(TAG, "OpenCV loaded successfully");
            } break;
            default:
            {
                super.onManagerConnected(status);
            } break;
        }
    }
};

@Override
public void onResume()
{
    super.onResume();
    if (!OpenCVLoader.initDebug()) {
        Log.d(TAG, "Internal OpenCV library not found. Using OpenCV Manager for initialization");
        OpenCVLoader.initAsync(OpenCVLoader.OPENCV_VERSION_3_1_0, this, mLoaderCallback);
    } else {
        Log.d(TAG, "OpenCV library found inside package. Using it!");
        mLoaderCallback.onManagerConnected(LoaderCallbackInterface.SUCCESS);
    }
}

It just cannot load the OpenCV library. I followed all of the tutorials word by word and I just don't get it.

Any help will be appreciated.

edit retag flag offensive close merge delete