Camera focus distances

前端 未结 4 534
一整个雨季
一整个雨季 2020-12-29 07:44

I\'m trying to read the focus distance (distance of subject in a photo) from an Android camera. I keep getting 0 for all focus distances on my HTC Desire even when it correc

4条回答
  •  甜味超标
    2020-12-29 08:12

    In Froyo, frameworks/base/core/jni/android_hardware_Camera.cpp implements native_autoFocus() by calling android_hardware_Camera_autoFocus(), which appears to bind at runtime to the device/vendor specific code.

    Unfortunately, "If the camera does not support auto-focus and autoFocus is called, onAutoFocus will be called immediately with a fake value of success set to true." is a documented behavior.

    I'm curious which of the functions you use requires 2.3.3, API level 10.

提交回复
热议问题