从罗技摄像头找到物体的距离 [英] Finding the distance of object from a logitech camera

查看:122
本文介绍了从罗技摄像头找到物体的距离的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想找到一个物体与相机的距离.请注意,这里我使用的是单相机.相机自动对焦以聚焦在距相机特定距离的平面上.

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?

推荐答案

我认为您正在寻找z方向信息,即使来自摄像机的图像仅提供x方向和y方向信息.您所从事的工作相当棘手.

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.

在当前调查阶段,建议您阅读对计算机视觉进行编程的第4章和第5章使用Python .然后尝试一种算法,如果您的代码给您错误,那么SO的某人可以为您提供帮助.

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.

即使您从未使用过Python,该书中的代码仍然可以理解,因为它们有很多解释.本质上,您可以获取解决问题所需的算法和伪代码.

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.

这篇关于从罗技摄像头找到物体的距离的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆