Android camera2 判断相机功能是否可控的实例

Android camera2 判断相机功能是否可控的实例,第1张

概述AndroidCamera2可调功能适配首先获取到设备等级:FloathardwareLevel=mCameraCharacteristics.get(CameraCharacteristics.INFO_SUPPORTED_HARDWARE_LEVEL);

AndroID Camera2 可调功能适配

首先获取到设备等级:

float harDWareLevel = mCameracharacteristics.get(Cameracharacteristics.INFO_SUPPORTED_HARDWARE_LEVEL);

LEGACY < liMITED < FulL < LEVEL_3. 越靠右边权限越大

•INFO_SUPPORTED_HARDWARE_LEVEL_LEGACY = 2
•INFO_SUPPORTED_HARDWARE_LEVEL_liMITED = 0
•INFO_SUPPORTED_HARDWARE_LEVEL_FulL = 1
•INFO_SUPPORTED_HARDWARE_LEVEL_3 = 3

在相应的等级下面会有各自支持的功能,LEGACY为最低权限

在liMITED中

Additional capabilitIEs may optionally be supported by a liMITED-level device,and can be checked for in *androID.request.availableCapabilitIEs*.

androID.request.availableCapabilitIEs

介绍:List of capabilitIEs that this camera device advertises as fully supporting.

int[] ints = mCameracharacteristics.get(Cameracharacteristics.REQUEST_AVAILABLE_CAPABIliTIES);

Possible values:

•BACKWARD_COMPATIBLE
•MANUAL_SENSOR
•MANUAL_POST_PROCESSING
•RAW
•PRIVATE_REPROCESSING
•READ_SENSOR_SETTINGS
•BURST_CAPTURE
•YUV_REPROCESSING
•DEPTH_OUTPUT
•CONSTRAINED_HIGH_SPEED_VIDEO

For example manual_semsor:REQUEST_AVAILABLE_CAPABIliTIES_MANUAL_SENSOR The camera device can be manually controlled (3A algorithms such as auto-exposure,and auto-focus can be bypassed). The camera device supports basic manual control of the sensor image acquisition related stages. This means the following controls are guaranteed to be supported: Manual frame duration control - androID.sensor.frameDuration - androID.sensor.info.maxFrameDuration Manual exposure control - androID.sensor.exposureTime - androID.sensor.info.exposureTimeRange Manual sensitivity control - androID.sensor.sensitivity - androID.sensor.info.sensitivityRange Manual lens control (if the lens is adjustable) - androID.lens.* Manual flash control (if a flash unit is present) - androID.flash.* Manual black level locking - androID.blackLevel.lock auto exposure lock - androID.control.aeLock 

这些值对应的特征值举例:

final String name3 = CaptureRequest.SENSOR_FRAME_DURATION.getname();
name3 -》androID.sensor.frameDuration

列出这个的意思是,如果想知道该设备是否支持此功能,可以通过getname()获取其包名,然后在

mCameracharacteristics.getAvailableCaptureRequestKeys();生成的队列中寻找。

如果有匹配则是可控;

CaptureRequest.LENS_FOCUS_disTANCE;调节焦距
CaptureRequest.CONTRol_AF_MODE;自动对焦模式
CaptureRequest.SENSOR_SENSITIVITY 调节iso
CaptureRequest.CONTRol_AE_MODE 自动曝光模式

以上这篇AndroID camera2 判断相机功能是否可控的实例就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持编程小技巧。

总结

以上是内存溢出为你收集整理的Android camera2 判断相机功能是否可控的实例全部内容,希望文章能够帮你解决Android camera2 判断相机功能是否可控的实例所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/web/1146659.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-31
下一篇 2022-05-31

发表评论

登录后才能评论

评论列表(0条)

保存