的HTC One M8 - 利用第二个后置摄像头 [英] HTC One M8 - making use of 2nd rear camera

查看:612
本文介绍了的HTC One M8 - 利用第二个后置摄像头的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个的HTC One M8装置,其中有2后置摄像头和一个额外的前置摄像头。我的问题是试图访问第二个后置摄像头;我设法让它运行2个同步摄像机(1前1面朝后)的应用程序,但问题是,我无法访问面对面的第二后部。

I have an HTC One M8 device, which has 2 rear cameras and an additional front facing camera. My problem is trying to access the 2nd rear camera; I have managed to make an app which runs 2 simultaneous cameras (1 front and 1 rear facing), but the problem is that I cannot access the 2nd rear facing one.

我曾尝试通过双方的OpenCV,并通过与以下code中的机器人摄像机2访问摄像头:

I have tried to access the camera through both openCV and through the android camera2 with following code:

OpenCV进行Android的:

openCV for Android:

CameraBridgeViewBase mOpenCvCameraView2;
mOpenCvCameraView2.setCameraIndex(int value);

其中值可能为0 - 第一个后置摄像头,1 - 面对镜头前; 2 - 不适合面朝后工作(而且也没有100,因为我发现它在HTC页)

where value may be 0 - first rear camera, 1 - front facing camera; 2 - does not work for rear facing (and neither does 100, cause I found it on the HTC page)

正常的android code:

normal android code:

CameraManager manager = (CameraManager) getSystemService( Context.CAMERA_SERVICE);
   try {
       String[] cameraList = manager.getCameraIdList();
       Log.i("Number of cameras", Integer.toString(cameraList.length));
    } catch (CameraAccessException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
    }

这code将打印的设备访问摄像机的数量;然而,它告诉我,它只有2。

This code will print the number of cameras accessible for the device; however, it tells me that it has only 2.

因此​​,没有人有一个想法,我能做些什么来访问第2个后置摄像头吗?

So, does anyone have an idea what I can do to access the 2nd rear camera please?

推荐答案

解释第二传感器是不是一个真正的摄像头:

Wikipedia explains that the second sensor is not a real camera:

主摄像头保持相对不变,使用面积为2.0微米像素组成的的UltraPixel图像传感器(OmniVision公司OV4688)。该传感器的UltraPixel进行了更新,在光线的照片提供更好的色彩精度,该装置现在包括一个双音闪光灯。主摄像头是伴随着位于主摄像头为设备的双核相机系统的一部分,上述领域的传感器(OmniVision公司OV2722)的第二,200万像素的深度。传感器分析相片内的元件的距离和位置,并且产生的深度图,其中已经被嵌入各相片中。

The main camera remained relatively unchanged, using an "UltraPixel" image sensor (OmniVision OV4688) composed of pixels that are 2.0 µm in size. The UltraPixel sensor was updated to provide better color accuracy in lit photographs, and the device now includes a dual-tone flash. The main camera is accompanied by a second, 2-megapixel depth of field sensor (OmniVision OV2722) located directly above the main camera as a part of the device's "Duo Camera" system. The sensor analyzes the distance and position of elements within a photo, and generates a depth map, which is embedded within each photo.

也许有一些后门程序直接访问OV2722传感器,但它不会给你反正传统形象。

Maybe there is some backdoor to access the OV2722 sensor directly, but it won't give you a conventional image anyway.

这篇关于的HTC One M8 - 利用第二个后置摄像头的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆