From 1434f55cb917eaf15fe2966f02be83791302889f Mon Sep 17 00:00:00 2001 From: qubick Date: Tue, 15 Dec 2015 11:38:56 -0700 Subject: [PATCH 1/2] camera view was enabled to visible when the app launched --- .../samples/colorblobdetect/ColorBlobDetectionActivity.java | 1 + 1 file changed, 1 insertion(+) diff --git a/samples/android/color-blob-detection/src/org/opencv/samples/colorblobdetect/ColorBlobDetectionActivity.java b/samples/android/color-blob-detection/src/org/opencv/samples/colorblobdetect/ColorBlobDetectionActivity.java index 97d348c9d8..d2ddad6aeb 100644 --- a/samples/android/color-blob-detection/src/org/opencv/samples/colorblobdetect/ColorBlobDetectionActivity.java +++ b/samples/android/color-blob-detection/src/org/opencv/samples/colorblobdetect/ColorBlobDetectionActivity.java @@ -73,6 +73,7 @@ public class ColorBlobDetectionActivity extends Activity implements OnTouchListe setContentView(R.layout.color_blob_detection_surface_view); mOpenCvCameraView = (CameraBridgeViewBase) findViewById(R.id.color_blob_detection_activity_surface_view); + mOpenCvCameraView.setVisibility(SurfaceView.VISIBLE); mOpenCvCameraView.setCvCameraViewListener(this); } From 5502f0b45d12dc117208560fb3de8a94aa64eaea Mon Sep 17 00:00:00 2001 From: qubick Date: Tue, 15 Dec 2015 12:35:21 -0700 Subject: [PATCH 2/2] surfaceview import --- .../samples/colorblobdetect/ColorBlobDetectionActivity.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/samples/android/color-blob-detection/src/org/opencv/samples/colorblobdetect/ColorBlobDetectionActivity.java b/samples/android/color-blob-detection/src/org/opencv/samples/colorblobdetect/ColorBlobDetectionActivity.java index d2ddad6aeb..3b40394492 100644 --- a/samples/android/color-blob-detection/src/org/opencv/samples/colorblobdetect/ColorBlobDetectionActivity.java +++ b/samples/android/color-blob-detection/src/org/opencv/samples/colorblobdetect/ColorBlobDetectionActivity.java @@ -25,6 +25,7 @@ import android.view.View; import android.view.Window; import android.view.WindowManager; import android.view.View.OnTouchListener; +import android.view.SurfaceView; public class ColorBlobDetectionActivity extends Activity implements OnTouchListener, CvCameraViewListener2 { private static final String TAG = "OCVSample::Activity"; @@ -73,7 +74,7 @@ public class ColorBlobDetectionActivity extends Activity implements OnTouchListe setContentView(R.layout.color_blob_detection_surface_view); mOpenCvCameraView = (CameraBridgeViewBase) findViewById(R.id.color_blob_detection_activity_surface_view); - mOpenCvCameraView.setVisibility(SurfaceView.VISIBLE); + mOpenCvCameraView.setVisibility(SurfaceView.VISIBLE); mOpenCvCameraView.setCvCameraViewListener(this); }