本文整理匯總了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;
}
}