OpenCV loader initialization

asked 2016-02-09 06:12:50 -0500

titanreza gravatar image

In an android application which uses opencv4android I have seen these two methods to initiate opencv library, one in OnResume and the other in the beginning of the code. What is the difference? are they the same?

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_9, this,           mLoaderCallback);
}
edit retag flag offensive close merge delete