如何自动自动对焦Android摄像头? [英] How to autofocus Android camera automatically?
本文介绍了如何自动自动对焦Android摄像头?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我要自动对焦摄像头的Android尽快相机仍然保持。林寻找教程或样本如何做到这一点,或至少小样本,显示我可以用一下班就勾上这样的事件。
I want to autofocus Android camera as soon as camera holds still. Im looking for tutorials or samples how to do it or at least small sample that shows what classes I can use to hook on such events.
推荐答案
对于我这种工作一种享受:
For me this worked a treat:
//set camera to continually auto-focus
Camera.Parameters params = c.getParameters();
//*EDIT*//params.setFocusMode("continuous-picture");
//It is better to use defined constraints as opposed to String, thanks to AbdelHady
params.setFocusMode(Camera.Parameters.FOCUS_MODE_CONTINUOUS_PICTURE);
c.setParameters(params);
这篇关于如何自动自动对焦Android摄像头?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文