使用光流计算机器人行驶的距离
我现在正在进行一个项目,我们正在开发一个自主机器人。我基本上必须找出机器人在任意两个间隔之间行驶的距离。我正在使用 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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
我希望您最终接受您过去收到的答案。不管怎样,我不久前已经在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?
您考虑过进行里程计吗?您可以使用编码器和加速度计来计算距离。便宜多了。
have you considered doing odometry? You can use encoders as well as accelerometers to calculate distance. Is way more cheaper.
借助车轮在特定距离内旋转的次数来计算距离怎么样?
What about finding distance with help of no of rotation a wheel rotated in particular distance.
雅各布提供的答案是正确的追求的路径,但您可能会发现所得的距离旅行信息相当嘈杂。您可能需要考虑使用卡尔曼滤波器来随着时间的推移改进您的本地化估计。
关于卡尔曼滤波器有大量文献,但我在下面列出了一篇相关论文。
拉里·H·马蒂斯、理查德·塞利斯基和金出武雄 (1989)。 "用于估计图像序列深度的卡尔曼滤波器算法
”,国际计算机视觉杂志,第 3 卷,第 3 期,9 月,第 209-236 页。
The answer offered by Jacob is the right path to pursue, but you are likely to find that the resulting distance-traveled information is fairly noisy. You may want to consider using Kalman filters to improve your localization estimates over time.
There is a very large body of literature on Kalman filters, but I've listed one relevant paper below.
Larry H. Matthies, Richard Szeliski, and Takeo Kanade (1989). "Kalman Filter-based Algorithms for Estimating Depth from Image Sequences
", International Journal of Computer Vision, Vol 3, No. 3, September, pp 209–236.