當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。