Android camera2 API在AF模式下获得焦距

我正在使用 Android camera2 API.

我可以在手动对焦模式下使用LENS_FOCUS_disTANCE获得焦距值.但是,AF模式下的属性始终为零.在AF模式下有没有办法获得焦距?

解决方法

Shortest distance from frontmost surface of the lens that can be
brought into sharp focus.

If the lens is fixed-focus,this will be 0.

http://developer.android.com/intl/es/reference/android/hardware/camera2/CameraCharacteristics.html

换句话说,如果您想要管理焦点,请记住LENS_INFO_MINIMUM_FOCUS_disTANCE为您提供最小焦点,但要获得“最大”焦点,您必须使用LENS_INFO_HYPERFOCAL_disTANCE.

float yourMinFocus = mCameracharacteristics.get(Cameracharacteristics.LENS_INFO_MINIMUM_FOCUS_disTANCE);
float yourMaxFocus = mCameracharacteristics.get(Cameracharacteristics.LENS_INFO_HYPERFOCAL_disTANCE);

相关文章

Android性能优化——之控件的优化 前面讲了图像的优化,接下...
前言 上一篇已经讲了如何实现textView中粗字体效果,里面主要...
最近项目重构,涉及到了数据库和文件下载,发现GreenDao这个...
WebView加载页面的两种方式 一、加载网络页面 加载网络页面,...
给APP全局设置字体主要分为两个方面来介绍 一、给原生界面设...
前言 最近UI大牛出了一版新的效果图,按照IOS的效果做的,页...