我正在尝试弄清楚如何使用Open-Q™ 835 HDK Development Kit Open-Q™ 835 Camera相机模块在运行的Android 7中的后置摄像头(立体摄像头)访问图像。
目前,我只使用以下代码看到一个后置摄像头和一个前置摄像头:
int numberOfCameras = Camera.getNumberOfCameras();
int selected = -1;
for (int i = 0; i < numberOfCameras; i++) {
Camera.getCameraInfo(i, info);
if( info.facing == Camera.CameraInfo.CAMERA_FACING_BACK ) {
selected = i;
//break;
} else {
// default to a front facing camera if a back facing one can't be found
selected = i;
}
}