It is odd that when loading OpenCV NDK module in static statement makes app slow. Don't load the module like this.
static {
System.loadLibrary("ndk_module");
}
Load NDK module at onManagerConnected() in BaseLoaderCallback.
static {
System.loadLibrary("ndk_module");
}
Load NDK module at onManagerConnected() in BaseLoaderCallback.
private BaseLoaderCallback mLoaderCallback = new BaseLoaderCallback(this) { @Override public void onManagerConnected(int status) { switch (status) { case LoaderCallbackInterface.SUCCESS: { System.loadLibrary("ndk_module"); mOpenCvCameraView.enableView(); } break; default: { super.onManagerConnected(status); } break; } } };
댓글
댓글 쓰기