http://pastebin.com/w3vDGZ2F 查了一圈,很多国外的程序猿也在研究这个,也没个所以然来。 目前唯一的线索就是焦距到底是多少! google的api也找到了,public void getFocusDistances (float[] output)Since: API Level 9 Gets the distances from the camera to where an object appears to be in focus. The object is sharpest at the optimal focus distance. The depth of field is the far focus distance minus near focus distance.Focus distances may change after calling autoFocus(AutoFocusCallback), cancelAutoFocus(), or startPreview(). Applications can call getParameters() and this method anytime to get the latest focus distances. If the focus mode is FOCUS_MODE_CONTINUOUS_VIDEO, focus distances may change from time to time.This method is intended to estimate the distance between the camera and the subject. After autofocus, the subject distance may be within near and far focus distance. However, the precision depends on the camera hardware, autofocus algorithm, the focus area, and the scene. The error can be large and it should be only used as a reference.Far focus distance >= optimal focus distance >= near focus distance. If the focus distance is infinity, the value will be Float.POSITIVE_INFINITY.Parameters output focus distances in meters. output must be a float array with three elements. Near focus distance, optimal focus distance, and far focus distance will be filled in the array. See Also FOCUS_DISTANCE_NEAR_INDEX FOCUS_DISTANCE_OPTIMAL_INDEX FOCUS_DISTANCE_FAR_INDEX 得到的数据一直是infinite,奶奶的真坑爹! 看来是测不出了
= =
查了一圈,很多国外的程序猿也在研究这个,也没个所以然来。
目前唯一的线索就是焦距到底是多少!
google的api也找到了,public void getFocusDistances (float[] output)Since: API Level 9
Gets the distances from the camera to where an object appears to be in focus. The object is sharpest at the optimal focus distance. The depth of field is the far focus distance minus near focus distance.Focus distances may change after calling autoFocus(AutoFocusCallback), cancelAutoFocus(), or startPreview(). Applications can call getParameters() and this method anytime to get the latest focus distances. If the focus mode is FOCUS_MODE_CONTINUOUS_VIDEO, focus distances may change from time to time.This method is intended to estimate the distance between the camera and the subject. After autofocus, the subject distance may be within near and far focus distance. However, the precision depends on the camera hardware, autofocus algorithm, the focus area, and the scene. The error can be large and it should be only used as a reference.Far focus distance >= optimal focus distance >= near focus distance. If the focus distance is infinity, the value will be Float.POSITIVE_INFINITY.Parameters
output focus distances in meters. output must be a float array with three elements. Near focus distance, optimal focus distance, and far focus distance will be filled in the array.
See Also
FOCUS_DISTANCE_NEAR_INDEX
FOCUS_DISTANCE_OPTIMAL_INDEX
FOCUS_DISTANCE_FAR_INDEX
得到的数据一直是infinite,奶奶的真坑爹! 看来是测不出了