Ask Your Question

titanreza's profile - activity

2016-02-09 10:26:31 -0500 received badge  Student (source)
2016-02-09 06:22:05 -0500 asked a question OpenCV loader initialization

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);
}