lengyanyue39

============问题描述============


查了一些资料,都没有找到,手机摄像头对选定的区域对焦的方法,就像小米照相机一样,点击哪。哪里显示就特别清晰的那个功能,求大神 支招 怎么做到这个功能。。。。

============解决方案1============


对焦这个问题,早期版本未能解决。安卓4.0新增的Camera类,有一个setFocusAreas方法可以设置焦距。

早起SDK因为手机品种不齐,有些缺乏硬件支持,所以没有一个统一的对焦接口,新的SDK里已经出现了。

============解决方案2============


这个是要硬件支持的,不是所有camera都可以。
先调用getMaxNumFocusAreas()看下是否支持,google的说明:
Before using this API or {@link #setFocusAreas(List)}, apps should
call {@link #getMaxNumFocusAreas()} to know the maximum number of
focus areas first. If the value is 0, focus area is not supported.

分类:

技术点:

相关文章:

  • 2022-12-23
  • 2021-09-20
  • 2022-02-02
  • 2022-01-11
  • 2021-06-11
  • 2021-12-05
  • 2022-01-21
猜你喜欢
  • 2021-07-18
  • 2021-09-07
  • 2021-06-26
  • 2022-12-23
  • 2022-12-23
  • 2021-12-27
相关资源
相似解决方案