试了下传说中的近距离感应器,但好像只有0.0和5.0两个值,而且感应的是屏幕那一侧。我需要的是检测摄像头和被拍摄物体之间的距离。各位大神能否指点一下思路???? |
|
…先通过了解距离和对焦过程之间的关系 写个Rom改下对焦函数?
= = |
|
我只知道通过人的双眼和方位传感器 可以估算距离…
|
|
恩 您提醒的思路很对!google搜遍了 这方便的资料很少啊!几乎没有。唉 难道要一点一点看google的api |
|
貌似 现在手机上都没有红外了! 有红外的话还能自己控制发送接收自己算出个距离!
|
|
http://pastebin.com/w3vDGZ2F
查了一圈,很多国外的程序猿也在研究这个,也没个所以然来。 目前唯一的线索就是焦距到底是多少! google的api也找到了,public void getFocusDistances (float[] output) Since: API Level 9 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 |
|
20分 |
哥们是准备做物体3D姿态估计吧 如果是的话OpenCV里面有http://www.opencv.org.cn/index.php/Cv%E7%85%A7%E7%9B%B8%E6%9C%BA%E5%AE%9A%E6%A0%87%E5%92%8C%E4%B8%89%E7%BB%B4%E9%87%8D%E5%BB%BA#POSIT
|
好的 谢谢哥们啦! 我项目需要确定被拍摄物体在空间中的位置,要求多次拍摄被拍摄物体在空间中位置尽量保持不练,平面(x,y)里采用这种屏幕上画关键点,关键点与物体的关键点重合实现。还需要一个z分量,就是距离。 |
|
楼主有用贴 顶一下···
|
|
顶lz一下 想问问楼主一年了 解决了没有?小弟想请教请教楼主
|
|
唉,我也在做这个,一点头绪都没有。。。顶一个!
|