Java Code Examples for org.opencv.android.LoaderCallbackInterface#SUCCESS
The following examples show how to use
org.opencv.android.LoaderCallbackInterface#SUCCESS .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: CameraActivity.java From android-object-distance with Apache License 2.0 | 6 votes |
@Override public void onManagerConnected(int status) { switch (status) { case LoaderCallbackInterface.SUCCESS: { Log.i(RIZ_TAG, "OpenCV loaded successfully"); // Create and set View setContentView(R.layout.activity_camera); getFragmentManager().beginTransaction() .replace(R.id.container, Camera2BasicFragment.newInstance()) .commit(); } break; default: { super.onManagerConnected(status); } break; } }
Example 2
Source File: SingleMakeupActivity.java From FaceT with Mozilla Public License 2.0 | 6 votes |
@Override public void onManagerConnected(int status) { switch (status) { case LoaderCallbackInterface.SUCCESS: { Log.i("OpenCV", "OpenCV loaded successfully"); mRgbMat = new Mat(); mHsvMat = new Mat(); mMaskMat = new Mat(); mDilatedMat = new Mat(); hierarchy = new Mat(); } break; default: { super.onManagerConnected(status); } break; } }
Example 3
Source File: Puzzle15Activity.java From OpenCV-AndroidSamples with MIT License | 6 votes |
@Override public void onManagerConnected(int status) { switch (status) { case LoaderCallbackInterface.SUCCESS: { Log.i(TAG, "OpenCV loaded successfully"); /* Now enable camera view to start receiving frames */ mOpenCvCameraView.setOnTouchListener(Puzzle15Activity.this); mOpenCvCameraView.enableView(); } break; default: { super.onManagerConnected(status); } break; } }
Example 4
Source File: ColorizeFaceActivity.java From FaceT with Mozilla Public License 2.0 | 6 votes |
@Override public void onManagerConnected(int status) { switch (status) { case LoaderCallbackInterface.SUCCESS: { Log.i("OpenCV", "OpenCV loaded successfully"); mRgbMat = new Mat(); mHsvMat = new Mat(); mMaskMat = new Mat(); mDilatedMat = new Mat(); hierarchy = new Mat(); } break; default: { super.onManagerConnected(status); } break; } }
Example 5
Source File: BaseCameraView.java From OpenCV-android with Apache License 2.0 | 5 votes |
@Override public void onManagerConnected(int status) { switch (status) { case LoaderCallbackInterface.SUCCESS: System.out.println("onManagerConnected SUCCESS"); break; default: System.out.println("onManagerConnected Failed"); break; } }
Example 6
Source File: MainActivity.java From MOAAP with MIT License | 5 votes |
@Override public void onManagerConnected(int status) { switch (status) { case LoaderCallbackInterface.SUCCESS: //DO YOUR WORK/STUFF HERE Log.i("OpenCV", "OpenCV loaded successfully."); break; default: super.onManagerConnected(status); break; } }
Example 7
Source File: MainActivity.java From MOAAP with MIT License | 5 votes |
@Override public void onManagerConnected(int status) { switch (status) { case LoaderCallbackInterface.SUCCESS: { Log.i(TAG, "OpenCV loaded successfully"); mOpenCvCameraView.enableView(); } break; default: { super.onManagerConnected(status); } break; } }
Example 8
Source File: PyramidActivity.java From MOAAP with MIT License | 5 votes |
@Override public void onManagerConnected(int status) { switch (status) { case LoaderCallbackInterface.SUCCESS: //DO YOUR WORK/STUFF HERE break; default: super.onManagerConnected(status); break; } }
Example 9
Source File: CameraCalibrationActivity.java From OpenCV-AndroidSamples with MIT License | 5 votes |
@Override public void onManagerConnected(int status) { switch (status) { case LoaderCallbackInterface.SUCCESS: { Log.i(TAG, "OpenCV loaded successfully"); mOpenCvCameraView.enableView(); mOpenCvCameraView.setOnTouchListener(CameraCalibrationActivity.this); } break; default: { super.onManagerConnected(status); } break; } }
Example 10
Source File: MainActivity.java From ResistorScanner with MIT License | 5 votes |
@Override public void onManagerConnected(int status) { switch (status) { case LoaderCallbackInterface.SUCCESS: _resistorCameraView.enableView(); break; default: super.onManagerConnected(status); break; } }
Example 11
Source File: ScanActivity.java From opencv-documentscanner-android with Apache License 2.0 | 5 votes |
@Override public void onManagerConnected(int status) { switch (status) { case LoaderCallbackInterface.SUCCESS: //DO YOUR WORK/STUFF HERE break; default: super.onManagerConnected(status); break; } }
Example 12
Source File: LPRActivity.java From LPR with Apache License 2.0 | 5 votes |
@SuppressLint("StaticFieldLeak") @Override public void onManagerConnected(int status) { if (status == LoaderCallbackInterface.SUCCESS) { System.loadLibrary("lpr"); } else { super.onManagerConnected(status); } }
Example 13
Source File: MainActivity.java From OCR-Test with Apache License 2.0 | 5 votes |
@Override public void onManagerConnected(int status) { switch (status) { case LoaderCallbackInterface.SUCCESS: { Log.i("OpenCV", "OpenCV loaded successfully"); } break; default: { super.onManagerConnected(status); } break; } }
Example 14
Source File: CameraActivity.java From AndroidObjectDetection-OpenCV with MIT License | 5 votes |
@Override public void onManagerConnected(int status) { switch (status) { case LoaderCallbackInterface.SUCCESS: { Log.i(TAG, "OpenCV loaded successfully"); mOpenCvCameraView.enableView(); } break; default: { super.onManagerConnected(status); } break; } }
Example 15
Source File: Yolov2FromDarkFlowTest.java From pasm-yolov3-Android with GNU General Public License v3.0 | 5 votes |
@Override // Una volta che OpenCV manager è connesso viene chiamato questo metodo di public void onManagerConnected(int status) { switch (status) { // Una volta che OpenCV manager si è connesso con successo // possiamo abilitare l'interazione con la tlc case LoaderCallbackInterface.SUCCESS: Log.i(TAG, "OpenCV loaded successfully"); break; default: super.onManagerConnected(status); break; } }
Example 16
Source File: GabrielClientActivity.java From faceswap with Apache License 2.0 | 5 votes |
@Override public void onManagerConnected(int status) { switch (status) { case LoaderCallbackInterface.SUCCESS: { Log.i(LOG_TAG, "OpenCV loaded successfully"); mOpenCvCameraView.setMaxFrameSize(Const.IMAGE_WIDTH, Const.IMAGE_HEIGHT); mOpenCvCameraView.enableView(); } break; default: { super.onManagerConnected(status); } break; } }
Example 17
Source File: Tutorial1Activity.java From OpenCV-AndroidSamples with MIT License | 5 votes |
@Override public void onManagerConnected(int status) { switch (status) { case LoaderCallbackInterface.SUCCESS: { Log.i(TAG, "OpenCV loaded successfully"); mOpenCvCameraView.enableView(); } break; default: { super.onManagerConnected(status); } break; } }
Example 18
Source File: Yolov3DrawRectTest.java From pasm-yolov3-Android with GNU General Public License v3.0 | 5 votes |
@Override // Una volta che OpenCV manager è connesso viene chiamato questo metodo di public void onManagerConnected(int status) { switch (status) { // Una volta che OpenCV manager si è connesso con successo // possiamo abilitare l'interazione con la tlc case LoaderCallbackInterface.SUCCESS: Log.i(TAG, "OpenCV loaded successfully"); break; default: super.onManagerConnected(status); break; } }
Example 19
Source File: MainActivity.java From opencv-android-sample with MIT License | 5 votes |
@Override public void onManagerConnected(int status) { switch (status) { case LoaderCallbackInterface.SUCCESS: { Log.i(TAG, "OpenCV loaded successfully"); mOpenCvCameraView.enableView(); } break; default: { super.onManagerConnected(status); } break; } }
Example 20
Source File: MainActivity.java From MOAAP with MIT License | 4 votes |
@Override public void onManagerConnected(int status) { switch (status) { case LoaderCallbackInterface.SUCCESS: { Log.i(TAG, "OpenCV成功加载"); try{ InputStream is = getResources().openRawResource(R.raw.haarcascade_frontalface_alt2); File cascadeDir = getDir("cascade", Context.MODE_PRIVATE); File mCascadeFile = new File(cascadeDir,"cascade.xml"); FileOutputStream os = new FileOutputStream(mCascadeFile); byte[] buffer = new byte[4096]; int bytesRead; while((bytesRead = is.read(buffer)) != -1) { os.write(buffer, 0, bytesRead); } is.close(); os.close(); haarCascade = new CascadeClassifier( mCascadeFile.getAbsolutePath()); if (haarCascade.empty()) { Log.i("Cascade Error", "级联分类器加载失败"); haarCascade = null; } } catch(Exception e) { Log.i("Cascade Error: ","找不到级联分类器文件"); } mOpenCvCameraView.enableView(); } break; default: { super.onManagerConnected(status); } break; } }