本文整理汇总了Java中org.opencv.android.LoaderCallbackInterface类的典型用法代码示例。如果您正苦于以下问题:Java LoaderCallbackInterface类的具体用法?Java LoaderCallbackInterface怎么用?Java LoaderCallbackInterface使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
LoaderCallbackInterface类属于org.opencv.android包,在下文中一共展示了LoaderCallbackInterface类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onResume
import org.opencv.android.LoaderCallbackInterface; //导入依赖的package包/类
@Override
protected void onResume() {
super.onResume();
if (opMode == null)
return;
if (!OpenCVLoader.initDebug()) {
Log.d("OpenCV", "Internal OpenCV library not found. Using OpenCV Manager for initialization");
boolean success = OpenCVLoader.initAsync(OpenCVLoader.OPENCV_VERSION_3_0_0, this, openCVLoaderCallback);
if (!success)
Log.e("OpenCV", "Asynchronous initialization failed!");
else
Log.d("OpenCV", "Asynchronous initialization succeeded!");
} else {
Log.d("OpenCV", "OpenCV library found inside package. Using it!");
openCVLoaderCallback.onManagerConnected(LoaderCallbackInterface.SUCCESS);
}
}
示例2: onManagerConnected
import org.opencv.android.LoaderCallbackInterface; //导入依赖的package包/类
@Override
public void onManagerConnected(int status) {
switch (status) {
case LoaderCallbackInterface.SUCCESS:
{
Log.i("OpenCV", "OpenCV loaded successfully");
mOpenCvCameraView.setCvCameraViewListener(MainActivity.this);
load_cascade();
mOpenCvCameraView.enableView();
} break;
default:
{
super.onManagerConnected(status);
} break;
}
}
示例3: onResume
import org.opencv.android.LoaderCallbackInterface; //导入依赖的package包/类
@Override
public void onResume()
{
super.onResume();
if (!OpenCVLoader.initDebug()) {
Log.d("OpenCV", "Internal OpenCV library not found. Using OpenCV Manager for initialization");
OpenCVLoader.initAsync(OpenCVLoader.OPENCV_VERSION_3_0_0, this, mLoaderCallback);
} else {
Log.d("OpenCV", "OpenCV library found inside package. Using it!");
mLoaderCallback.onManagerConnected(LoaderCallbackInterface.SUCCESS);
}
FaceConsumer consumer = new FaceConsumer(faceProcessQueue);
mProcessThread = new Thread(consumer);
mProcessThread.start();
System.out.println("faceConsumer has been started");
}
示例4: RNScanDocModule
import org.opencv.android.LoaderCallbackInterface; //导入依赖的package包/类
public RNScanDocModule(ReactApplicationContext reactContext) {
super(reactContext);
this.mReactContext = reactContext;
mOpenCVCallBack = new BaseLoaderCallback(getCurrentActivity()) {
@Override
public void onManagerConnected(int status) {
switch (status) {
case LoaderCallbackInterface.SUCCESS:
{
rgbMat = new Mat();
grayMat = new Mat();
cannyMat = new Mat();
linesMat = new Mat();
Log.d(TAG, "OpenCV loaded success");
} break;
default:
{
super.onManagerConnected(status);
} break;
}
}
};
}
示例5: onManagerConnected
import org.opencv.android.LoaderCallbackInterface; //导入依赖的package包/类
@Override
public void onManagerConnected(int status) {
switch (status) {
case LoaderCallbackInterface.SUCCESS:
{
Log.d("OCR", "Start loading MNIST and creating classifier");
mOpenCvCameraView.enableView();
mnist = new DigitRecognizer("train-images.idx3-ubyte", "train-labels.idx1-ubyte");
Log.d("OCR", "Loading MNIST done");
} break;
default:
{
super.onManagerConnected(status);
} break;
}
}
示例6: startCamera
import org.opencv.android.LoaderCallbackInterface; //导入依赖的package包/类
private void startCamera()
{
final String funcName = "startCamera";
if (cameraEnabled)
{
if (!OpenCVLoader.initDebug())
{
tracer.traceInfo(
funcName,
"Internal OpenCV library not found, using OpenCV Manager for initialization");
OpenCVLoader.initAsync(OpenCVLoader.OPENCV_VERSION_3_0_0, activity, loaderCallback);
}
else
{
tracer.traceInfo(funcName, "OpenCV library found inside package, use it!");
loaderCallback.onManagerConnected(LoaderCallbackInterface.SUCCESS);
}
// setCameraDisplayOrientation(activity, Camera.CameraInfo.CAMERA_FACING_FRONT);
// cameraPreview.onResume();
}
}
示例7: onManagerConnected
import org.opencv.android.LoaderCallbackInterface; //导入依赖的package包/类
@Override
public void onManagerConnected(int status) {
switch (status) {
case LoaderCallbackInterface.SUCCESS: {
Log.i(TAG, "OpenCV loaded successfully");
mOpenCvCameraView.enableView();
try {
initializeOpenCVDependencies();
} catch (IOException e) {
e.printStackTrace();
}
}
break;
default: {
super.onManagerConnected(status);
}
break;
}
}
示例8: onManagerConnected
import org.opencv.android.LoaderCallbackInterface; //导入依赖的package包/类
@Override
public void onManagerConnected(int status) {
switch (status) {
case LoaderCallbackInterface.SUCCESS:
{
Log.i(TAG, "OpenCV loaded successfully");
bw = new Mat();
hsv = new Mat();
lowerRedRange = new Mat();
upperRedRange = new Mat();
downscaled = new Mat();
upscaled = new Mat();
contourImage = new Mat();
hierarchyOutputVector = new Mat();
approxCurve = new MatOfPoint2f();
mOpenCvCameraView.enableView();
} break;
default:
{
super.onManagerConnected(status);
} break;
}
}
示例9: onManagerConnected
import org.opencv.android.LoaderCallbackInterface; //导入依赖的package包/类
public void onManagerConnected(int status)
{
switch (status)
{
case LoaderCallbackInterface.SUCCESS:
{
Log.i(TAG, "OpenCV loaded successfully");
mOpenCvCameraView.enableView();
break;
}
default:
{
super.onManagerConnected(status);
}
}
}
示例10: onManagerConnected
import org.opencv.android.LoaderCallbackInterface; //导入依赖的package包/类
@Override
public void onManagerConnected(int status) {
switch (status) {
case LoaderCallbackInterface.SUCCESS:
cameraView.enableView();
viewModeEnum = ViewModeEnum.MULTIPLE;
cameraView.setEffect("sepia");
break;
default:
super.onManagerConnected(status);
break;
}
}
示例11: DetectFaceFromVideo
import org.opencv.android.LoaderCallbackInterface; //导入依赖的package包/类
public DetectFaceFromVideo(Activity activity) {
this.activity = activity;
framePackage = new FramePackage();
faceDetectController = new FaceDetect(activity);
LoaderCallbackInterface mOpenCVCallBack = new LoaderCallbackInterface() {
@Override
public void onManagerConnected(int status) {
System.loadLibrary("detection_based_tracker");
faceDetectController.iniciaFaceDetection(false);
}
@Override
public void onPackageInstall(int operation, InstallCallbackInterface callback) {
}
};
}
示例12: onManagerConnected
import org.opencv.android.LoaderCallbackInterface; //导入依赖的package包/类
@Override
public void onManagerConnected(int status) {
switch (status) {
case LoaderCallbackInterface.SUCCESS:
System.loadLibrary("detection_based_tracker");
iniciaFaceDetection(true);
fisherFaceRecognizer = new FisherFaceRecognizer(context);
fisherFaceRecognizer.trainClassifier();
break;
default:
super.onManagerConnected(status);
break;
}
}
示例13: onManagerConnected
import org.opencv.android.LoaderCallbackInterface; //导入依赖的package包/类
@Override
public void onManagerConnected(int status) {
switch (status) {
case LoaderCallbackInterface.SUCCESS:
cameraView.setOnTouchListener(Split.this);
cameraView.enableView();
viewMode = ViewModeEnum.SPLIT_FULL_VIEW;
cameraView.setEffect("sepia");
midWidth = (int) (cameraView.getWidth() / 2.0);
break;
default:
super.onManagerConnected(status);
break;
}
}
示例14: onManagerConnected
import org.opencv.android.LoaderCallbackInterface; //导入依赖的package包/类
@Override
public void onManagerConnected(int status) {
switch (status) {
case LoaderCallbackInterface.SUCCESS:
Log.i(TAG, "OpenCV loaded successfully");
cameraView.enableView();
viewModeEnum = ViewModeEnum.MULTIPLE;
cameraView.setEffect("sepia");
break;
default:
super.onManagerConnected(status);
}
}
示例15: onManagerConnected
import org.opencv.android.LoaderCallbackInterface; //导入依赖的package包/类
@SuppressWarnings("null")
@Override
public void onManagerConnected(int status) {
switch (status) {
case LoaderCallbackInterface.SUCCESS:
Log.i("zoom", "OpenCV loaded successfully");
cameraView.setOnTouchListener(Zoom.this);
cameraView.enableView();
viewModeEnum = ViewModeEnum.ZOOM_2;
cameraView.setEffect("sepia");
break;
default:
super.onManagerConnected(status);
break;
}
}