本文介绍了使用光流查找机器人行进的距离的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个项目,我们正在开发一个自主的机器人。我必须基本上找出机器人在任何2个间隔之间移动的距离。我使用OpenCV,并使用OpenCV的光流函数,我能够找出每个像素在2个不同图像的速度/距离。使用这个信息,我想要能够找出机器人在这两个图像之间的间隔中行进的距离。

I'm working on a project right now in which we are developing an autonomous robot. I have to basically find out the distance travelled by the robot between any 2 intervals. I'm using OpenCV, and using the Optical Flow functions of OpenCV, I'm able to find out the velocity/distance of each pixel in 2 different images. Using this information, I want to be able to find out the distance travelled by the robot in the interval between those 2 images.

我想到了一种方法,我们可以开发在像素行进的距离和机器人行进的距离(使用一些测试)之间的输入输出映射。这样,使用神经网络,我们将能够找到关系。但是,光流将取决于相机与像素的距离,这将导致问题。

I thought of a way in which we could develop an input output mapping between the distance travelled by pixels and the distance travelled by the bot (using some tests). In this way, using neural networks, we would be able to find the relationship. However, the optical flow would depend on the distance of the camera from the pixel, which would cause problems.

有没有办法解决这个问题?

Is there any way to solve this problem?

推荐答案

我希望你最后接受过去收到的答案。无论如何,我已经张贴的解决方案这个问题在SO(在OpenCV)一会儿,这里是:

I hope you do end up accepting answers you received in the past. Anyway, I had posted the solution to this problem on SO (in OpenCV) a while back, so here it is:

如何确定与视频中某个对象的距离?

How can I determine distance from an object in a video?

这篇关于使用光流查找机器人行进的距离的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!