gpt4 book ai didi

computer-vision - 我将如何实现用于视觉跟踪的粒子过滤器?

转载 作者:行者123 更新时间:2023-12-04 07:03:02 26 4
gpt4 key购买 nike

所以我刚上了 sebsastian thrun 的 AI 类(class)。在那篇文章中,他提到了如何构建一个粒子滤波器,用于根据航向 theta 和向前运动来跟踪移动的 xy 机器人。

代码在这里: https://gist.github.com/soulslicer/b4765ee8e01958374d3b

在他的实现中,他做了以下事情:

1. Get Range from Sensor of all bearings after moving R=1, Theta=0.5
2. Move all the particles by R=1, Theta=0.5
3. Compute the weights of all particles ranges against the measured range from sensor
4. Resample and draw new particles

这非常适合运动模型。这到底对计算机视觉跟踪有何作用?例如,我想跟踪一个黄色的圆形 Blob 。我将如何“移动”粒子?我的成本函数可能是什么?尤其是移动部分,我不确定我将如何进行计算机视觉跟踪这一步


这是我认为它可能起作用的方式,但我可能错了:

1. Get features from image, and compute the optical flow velocities of each feature
2. Place alot of particles in the scene with varying x,y,xvel,yvel
3. For the computation of weights, we can compare the each particle's velocity and position against all features
If we can threshold out the object based on color/shape, can match image features to shapes and put that in the cost function
4. Resample and draw new particles

最佳答案

要使用粒子过滤,您需要:

  • 过渡模型(例如,用于移动机器人的运动模型)和
  • 一个观察模型(即用于计算给定传感器读数的权重的模型)。

清楚地定义空格也很有帮助

  • 观察(例如,传感器读数的范围)
  • 跟踪状态(例如,机器人位置的范围)

现在,根据您问题中的描述,我假设目标是根据计算出的最佳流特征跟踪黄色 Blob 的位置。然后我会建模

  • 转换作为一个函数,它通过仅对噪声进行采样来对给定先前位置的新位置进行采样,例如,想象一下仅使用 + random.gauss(0.0, self.turn_noise)+ random。 gauss(0.0, self.forward_noise) 部分在 def move(self, turn, forward):
  • 观察作为一个函数,返回可能的观察和状态输入对的高分

我看到的问题是定义观察模型,即 blob 位置和最佳流输出之间的似然函数,这并不简单/直观,例如,黄色 blob 是否可能位于高光流输出区域的中心?如果是这样,我如何将这种关系表达为似然函数?出于这个原因,我会考虑使用不同的观察结果,例如,使用嘈杂的黄色 Blob 检测器的输出。

我的答案基于第 16 页的 particle-filters.ppt 文件,位于 http://www.probabilistic-robotics.org/

关于computer-vision - 我将如何实现用于视觉跟踪的粒子过滤器?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32696102/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com