Finding the distance of object from a logitech camera

℡╲_俬逩灬. 提交于 2020-01-03 05:12:13

问题


I want to find the distance of an object from camera. Note here I am using single camera. Camera autofocuses to focus on planes at particular distance from camera.

Is there a way I can find this focus distance?


回答1:


I think you are looking for z-direction information even though the image from a camera only gives x-direction and y-direction information. What you have embarked upon is considerably tricky.

At your current stage of investigation I would recommend that you go through chapter 4 and 5 of Programming Computer Vision with Python. Then try an algorithm, if your code is giving you errors then someone at SO can help you.

Even if you have never worked with Python the codes in that book will still be understandable because they have lots of explanation. Essentially, you could get the algorithm and pseudocode you need for your problem.

Alternatively, cameras output metadata which is available when you save an image from the camera. This could be another way for you to investigate your problem; find out if the particular model of your camera outputs metadata and how to access it. The metadata may include information about diopter, exposure, aperture, etc. from the diopter you could find the focal length which would roughly tell you what the camera was focusing on.



来源:https://stackoverflow.com/questions/17037108/finding-the-distance-of-object-from-a-logitech-camera

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!