Android opencv-2.4.4: how do I select the front camera? [closed]
Hi
I can't find any good reference on how to change the 2.4.4 tutorials to work with the front facing camera. Can someone point me in the right direction please?
With this in the manifest:
<uses-feature android:name="android.hardware.camera.front" android:required="true"/>
And this in onCreate:
mOpenCvCameraView.selectCamera(1);
Which calls in OpenCVDemo2View:
public void selectCamera (int i) {
mOpenCvCameraView.releaseCamera();
mCamera.open(i);
}
... I get images from the default camera - same if I don't try to select a camera. But if I use selectCamera(0) I get a message saying, "It seems that you [sic] device does not support camera (or it is locked). Application will be closed."
Any pointers to good info on this would be welcomed.
Many thanks
Barry