如何测量立体图像中的距离? [英] How can I measure distances in stereo images?

查看:266
本文介绍了如何测量立体图像中的距离?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有两个图像(左和右)
我想测量图像上的实际距离?
当我点击图片时,将获得点击指向相机的真实距离。



左图:





右图:





我已经校准了两张图片。

解决方案

div>

虽然我不知道EmguCV的细节,我可以告诉你立体深度感知如何工作的概念,希望你可以实现某种修复。



本质上,第一步是分割和匹配图像的部分。你想在这里完成的是识别图像的每个部分是相同的。例如,您希望能够识别每个图像中灯的中心。你使用的功能集取决于你,但是一个可以帮助的基本功能是使用边缘检测器(如canny方法),并尝试匹配具有类似形状的轮廓。另外,另一种常见的技术是将图像分解为更小的块和这些块中的匹配特征。



接下来,您可以计算两个图像中匹配的物体距离相机中心的距离。您将需要为x和y方向执行此操作。我们称之为你的x和y差异。



现在,你需要知道拍摄照片的摄像机中心之间的距离。一旦你有这个,有一些简单的触发,你可以做解决距离。有一个相当简单的解释这 此处



同样,这是概念性的,但重要的是要知道您应用的算法如何工作。理解问题的解决方案的第一步是理解问题本身。一旦你完全理解了问题和解决它的过程,使用任何库实现该过程应该变得更容易。祝你好运!


I Have two images( left and right ) I want to measure the real distance on image? When I click on the image, ı ll get real distance to clicked point to camera.

Left Image:

Right Image:

I have calibrated the two images. I want to use EmguCV to get distance from image.

Is this possible ?

解决方案

While I do not know the specifics of EmguCV, I can tell you the concept behind how stereo depth perception works, and hopefully you can then implement some sort of fix.

Essentially, the first step is to segment and match parts of the image. What you are trying to accomplish here is to identify the parts of the image that are the "same" in each. For instance, you want to be able to identify the center of the lamp in each image. The feature set you use to do this is up to you, but one basic one that may help is by using an edge detector (like the canny method) and trying to match contours with similar shapes. Additionally, another technique that is common is breaking up the image into smaller blocks and matching features in those blocks. The method you use is up to you.

Next, you are able to calculate the distance of the matched objects from the center of your camera in both images. You will need to do this both for the x and y directions. We will call this your x and y disparity.

Now, you need to know the distance between the centers of the cameras that took the picture. Once you have this, there is some simple trig that you can do to solve for distance. There is a rather simple explanation of this here

Again, this is all conceptual, but it is important to know how the algorithms you are applying work. The first step to understanding the solution to a problem is to understand the problem itself. Once you have a full understanding of the problem, and the procedure for solving it, implementing that procedure with any library should become much easier. Good luck!

这篇关于如何测量立体图像中的距离?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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