how can I use only the back camera with VideoCapture?
hello I'm realizing the face detection with opencv4android, but I want to use only the back camera how can I do? Thank you.
asked 2013-01-18 02:39:18 -0600
This post is a wiki. Anyone with karma >50 is welcome to improve it.
hello I'm realizing the face detection with opencv4android, but I want to use only the back camera how can I do? Thank you.
answered 2013-01-18 04:51:39 -0600
This post is a wiki. Anyone with karma >50 is welcome to improve it.
If you use OpenCV 2.4.3.2 and NativeCameraView or JavaCameraView classes you can set camera index with opencv:camera_id property of View object in layout.xml. See tutorial-1 as an example. Possible property values are back, front, any.
If you have direct access to camera object you can pass camera index. -1 - any camera, 0 - back camera, 1 - front camera.
Asked: 2013-01-18 02:39:18 -0600
Seen: 1,649 times
Last updated: Jan 18 '13
How to set camera resolution in OpenCV on Android?
How to decrease the number of processed frames from a live video camera?
How to limit the number of FPS from camera
Android Surface View Stops Updating [closed]
[Android - Native Camera] Setting ISO (and other camera parameters)
Android native camera crashes on HTC One X
Android Native Camera Focus Mode With 2.4.3 & Samsung Galaxy S2