使用卡尔曼滤波器跟踪对象的位置,但需要知道该对象的位置作为卡尔曼滤波器的输入。到底是怎么回事? [英] Use Kalman filter to track the position of an object, but need to know the position of that object as an input of Kalman filter. What is going on?

查看:144
本文介绍了使用卡尔曼滤波器跟踪对象的位置,但需要知道该对象的位置作为卡尔曼滤波器的输入。到底是怎么回事?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试研究如何使用卡尔曼滤波器跟踪我自己在视频序列中移动的物体(球),所以请在我小时候向我解释。

I am trying to study how to use Kalman filter in tracking an object (ball) moving in a video sequence by myself so please explain it to me as I am a child.


  • 通过一些算法(颜色分析,光流...),我能够得到每个视频帧的二进制图像,其中有跟踪对象(白色像素) )和背景(黑色像素) - >我知道对象大小,对象质心,对象位置 - >只需简单地在对象周围绘制一个边界框 - >完成。为什么我需要在这里使用卡尔曼滤波器?

  • By some algorithms (color analysis, optical flow...), I am able to get a binary image of each video frame in which there is the tracking object ( white pixels) and background (black pixels) -> I know the object size, object centroid, object position -> Just simple draw a bounding box around the object --> Finish. Why do I need to use Kalman filter here?

好的,有人告诉我因为噪音无法检测每个视频帧中的物体,需要使用卡尔曼滤波器来估计物体的位置。好的。但据我所知,我需要为卡尔曼滤波器提供输入。它们是先前的状态和测量值。

Ok, somebody told me that because I can not detect the object in each video frame because of noise, I need to use Kalman filter to estimate the position of the object. Ok, fine. But as I know, I need to provide the input to Kalman filter. They are previous state and measurement.


  • 之前的状态(所以我认为它是物体的位置,速度,加速度......在前一帧中) - >好的,这对我来说没问题。

  • 测量当前状态:这是我无法理解的。可以测量什么?
    - 当前帧中对象的位置?这很有趣,因为如果我知道对象的位置,我只需要在对象周围绘制一个简单的边界框(矩形)。为什么我在这里需要卡尔曼滤波器?因此,不可能将当前帧中的对象的位置作为测量值。
    - 视频监控系统中基于卡尔曼滤波器的跟踪文章说

  • previous state ( so I think it is the position, the velocity, acceleration...of the object in the previous frame) -> Ok, this is fine to me.
  • measurement of current state: Here is what I can not understand. What can measurement be? - The position of the object in the current frame? It is funny because if I know the position of the object, all I need is just to draw a simple boundingbox (rectangular) around the object. Why I need Kalman filter here anymore? Therefore, it is impossible to take the position of the object in the current frame as measurement value. - "Kalman Filter Based Tracking in an Video Surveillance System" article says


卡尔曼滤波块的主要作用是从
光流分析块为每个进入系统的测量值分配一个跟踪
过滤器。

The main role of the Kalman filtering block is to assign a tracking filter to each of the measurements entering the system from the optical flow analysis block.

如果您阅读完整的论文,您将看到作者将blob的最大数量和blob的最小大小作为卡尔曼滤波器的输入。如何将这些参数用作测量

If you read the full paper, you will see that the author takes the maximum number of blob and the minimum size of the blob as an input to the Kalman filter. How can those parameters be used as measurement?

我想我现在处于循环中。我想使用卡尔曼滤波器来跟踪物体的位置,但我需要知道该物体的位置作为卡尔曼滤波器的输入。发生了什么?

I think I am in a loop now. I want to use Kalman filter to track the position of an object, but I need to know the position of that object as an input of Kalman filter. What is going on?

还有一个问题,我不明白卡尔曼滤波器的数量一词。在视频序列中,如果有2个对象需要跟踪 - >需要使用2个卡尔曼滤波器吗?这是什么意思?

And 1 more question, I dont understand the term "number of Kalman filter". In a video sequence, if there are 2 objects need to track -> need to use 2 Kalman filter? Is that what it means?

推荐答案

你没有使用卡尔曼滤波器给你初步估计的东西;您可以根据一系列嘈杂的估算值使用它来为您提供改进的估算值

You don't use the Kalman filter to give you an initial estimate of something; you use it to give you an improved estimate based on a series of noisy estimates.

为了让您更容易理解,想象一下测量一些不动的东西,比如成年人的身高。您测量一次,但您不确定结果的准确性,因此您连续10天再次测量,每次测量略有不同,比如说几毫米。那么您应该选择哪种测量值作为最佳值?我认为很容易看出,使用平均值会比使用任何一次测量更能估计出人的真实身高。

To make this easier to understand, imagine you're measuring something that is not dynamic, like the height of an adult. You measure once, but you're not sure of the accuracy of the result, so you measure again for 10 consecutive days, and each measurement is slightly different, say a few millimeters apart. So which measurement should you choose as the best value? I think it's easy to see that taking the average will give you a better estimate of the person's true height than using any single measurement.

确定,但与卡尔曼滤波器有什么关系?

OK, but what has that to do with the Kalman filter?

卡尔曼滤波器基本上是对一系列测量的平均值,如上所述,但对于动态系统即可。例如,假设您使用连接到跑步者的GPS +发射器单元提供的信息来测量马拉松跑步者在赛道上的位置。 GPS每分钟给你一次阅读。但是那些读数是不准确的,你想要提高你对跑步者当前位置的了解。您可以通过以下方式完成此操作:

The Kalman filter is essentially taking an average of a series of measurements, as above, but for dynamic systems. For instance, let's say you're measuring the position of a marathon runner along a race track, using information provided by a GPS + transmitter unit attached to the runner. The GPS gives you one reading per minute. But those readings are inaccurate, and you want to improve your knowledge of the runner's current position. You can do that in the following way:

步骤1)使用最后几个读数,您可以估计跑步者的速度并估计他在任何时间的位置。未来(这是卡尔曼滤波器的预测部分)。

Step 1) Using the last few readings, you can estimate the runner's velocity and estimate where he will be at any time in the future (this is the prediction part of the Kalman filter).

步骤2)每当您收到新的GPS读数时,请进行加权平均在步骤1中获得的读数和估计值(这是卡尔曼滤波器的更新部分)。加权平均值的结果是位于预测位置和测量位置之间的新估计值,并且比其自身更准确。

Step 2) Whenever you receive a new GPS reading, do a weighted average of the reading and of your estimate obtained in step 1 (this is the update part of the Kalman filter). The result of the weighted average is a new estimate that lies in between the predicted and measured position, and is more accurate than either by itself.

请注意,您必须指定模型,您希望卡尔曼滤波器用于预测部分。在marathon runner示例中,您可以使用恒定速度模型。

Note that you must specify the model you want the Kalman filter to use in the prediction part. In the marathon runner example you could use a constant velocity model.

这篇关于使用卡尔曼滤波器跟踪对象的位置,但需要知道该对象的位置作为卡尔曼滤波器的输入。到底是怎么回事?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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