开发者

Video camera auto focus

I developed a small video camera application. It all works fine except focus开发者_开发百科. I understand I need to call camera.autofocus, but I don't really know where is the right place to put the call it. Anyone ever succeeded in autofocusing a video camera on android?

Thank Eli


It's probably a matter of preference based on how you think users will use your app.

I think a common convention is to do an auto-focus when the user touches the scene in the preview. Most OEM camera apps seem to do this.

Doing auto-focus after zooming is also a common thing.

Finally, you might want to have a look at the zxing project (bar code scanner app) which has a nifty continuous auto focus approach that might be of use, though since youre capturing video, it might not be ideal as the focus transitions might be too noticeable.

http://code.google.com/p/zxing/source/browse/trunk/android/src/com/google/zxing/client/android/camera/AutoFocusCallback.java?r=1698

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜