当前位置: 首页>>代码示例>>Java>>正文


Java LoaderCallbackInterface类代码示例

本文整理汇总了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);
    }
}
 
开发者ID:ykarim,项目名称:FTC2016,代码行数:20,代码来源:VisionEnabledActivity.java

示例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;
    }
}
 
开发者ID:spacejake,项目名称:android-age-estimator,代码行数:17,代码来源:MainActivity.java

示例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");
}
 
开发者ID:spacejake,项目名称:android-age-estimator,代码行数:18,代码来源:MainActivity.java

示例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;
      }
    }
  };
}
 
开发者ID:beast,项目名称:react-native-scan-doc,代码行数:24,代码来源:RNScanDocModule.java

示例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;
    }
}
 
开发者ID:johnhany,项目名称:MOAAP,代码行数:17,代码来源:MainActivity.java

示例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();
        }
    }
 
开发者ID:trc492,项目名称:FtcSamples,代码行数:23,代码来源:FtcTestOpenCv.java

示例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;
    }
}
 
开发者ID:akshika47,项目名称:OpencvAndroid,代码行数:20,代码来源:MainActivity.java

示例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;
    }
}
 
开发者ID:michaeltroger,项目名称:shape-detection,代码行数:27,代码来源:MainActivity.java

示例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);
        }
    }
}
 
开发者ID:gcoulby,项目名称:OpenCVDistanceCamera,代码行数:17,代码来源:MainActivity.java

示例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;
    }
}
 
开发者ID:rafaelaaraujo,项目名称:Face-detect-framework,代码行数:17,代码来源:MultipleZoom.java

示例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) {

        }
    };
}
 
开发者ID:rafaelaaraujo,项目名称:Face-detect-framework,代码行数:19,代码来源:DetectFaceFromVideo.java

示例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;
    }
}
 
开发者ID:rafaelaaraujo,项目名称:Face-detect-framework,代码行数:17,代码来源:FaceDetect.java

示例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;
    }
}
 
开发者ID:rafaelaaraujo,项目名称:Face-detect-framework,代码行数:18,代码来源:Split.java

示例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);
    }
}
 
开发者ID:rafaelaaraujo,项目名称:Face-detect-framework,代码行数:17,代码来源:MultipleZoomCanny.java

示例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;
    }
}
 
开发者ID:rafaelaaraujo,项目名称:Face-detect-framework,代码行数:20,代码来源:Zoom.java


注:本文中的org.opencv.android.LoaderCallbackInterface类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。