计算机视觉中的卡尔曼滤波器:Q 和 R 噪声协方差的选择 [英] Kalman filter in computer vision: the choice of Q and R noise covariances

查看:94
本文介绍了计算机视觉中的卡尔曼滤波器:Q 和 R 噪声协方差的选择的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我阅读了一些关于用于 CV 对象跟踪的卡尔曼滤波器的作品,但我找不到关于以下选择的参考:1)过程噪声协方差 Q;2)测量噪声协方差R.到目前为止,我已经意识到该模型是运动方程(有人使用加速度作为状态变量,其他人仅使用位置和速度)但没有人清楚Q和R的选择,包括mathworks的这个例子:http://www.mathworks.it/it/help/vision/examples/using-kalman-filter-for-object-tracking.html最近我发现了这个页面:http://blog.cordiner.net/2011/05/03/object-tracking-using-a-kalman-filter-matlab/但 Q 和 R 的分配并不清楚.有谁知道请帮帮我吗?

I read some works about Kalman filter for CV object tracking but I can't find some reference about the choice of: 1)the process noise covariance Q; 2)Measurement noise covariance R. So far I have realized that the model is equation of motion (someone uses acceleration as state variable, others use position and speed only) but nobody is clear about Q and R choice including this example by mathworks: http://www.mathworks.it/it/help/vision/examples/using-kalman-filter-for-object-tracking.html Recently I found this page: http://blog.cordiner.net/2011/05/03/object-tracking-using-a-kalman-filter-matlab/ but the Q and R assignment is not clear. Does anyone know help me, please ?

推荐答案

R是测量噪声的协方差矩阵,假设为高斯.在视频中跟踪对象的上下文中,这意味着您的检测错误.假设您正在使用面部检测器来检测面部,然后您想使用卡尔曼滤波器来跟踪它们.运行检测器,得到每个人脸的边界框,然后使用卡尔曼滤波器跟踪每个框的质心.R 矩阵必须描述您对质心位置的不确定性.所以在这种情况下,对于 x,y 坐标,R 的对应对角线值应该是几个像素.如果您的状态包括速度,那么您需要猜测速度测量的不确定性,并考虑单位.如果您的位置以像素为单位,而您的速度以每帧的像素为单位,则 R 的对角线条目必须反映这一点.

R is the covariance matrix of the measurement noise, assumed to be Gaussian. In the context of tracking objects in video it means your detection error. Let's say you are using a face detector to detect faces, and then you want to track them using the Kalman filter. You run the detector, you get a bounding box for each face, and then you use the Kalman filter to track the centroid of each box. The R matrix must describe how uncertain you are about the location of the centroid. So in this case for the x,y coordinates the corresponding diagonal values of R should be a few pixels. If your state includes velocity, then you need to guess the uncertainty of the velocity measurement, and take the units into account. If your position is measured in pixels and your velocity in pixels per frame, then the diagonal entries of R must reflect that.

Q 是过程噪声的协方差.简而言之,Q 指定了物体的实际运动与假设的运动模型的偏差程度.如果您在道路上跟踪汽车,那么等速模型应该相当不错,并且 Q 的条目应该很小.如果您正在跟踪人脸,他们不太可能以恒定速度移动,因此您需要调高 Q.同样,您需要了解状态变量的表达单位.

Q is the covariance of the process noise. Simply put, Q specifies how much the actual motion of the object deviates from your assumed motion model. If you are tracking cars on a road, then the constant velocity model should be reasonably good, and the entries of Q should be small. If you are tracking people's faces, they are not likely to move with a constant velocity, so you need to crank up Q. Again, you need to be aware of the units in which your state variables are expressed.

这就是直觉.在实践中,您首先对 R 和 Q 进行一些合理的初始猜测,然后通过实验调整它们.所以设置 R 和 Q 有点艺术.此外,在大多数情况下,对 R 和 Q 使用对角矩阵就足够了.

So this is the intuition. In practice you start with some reasonable initial guess for R and Q, and then you tune them experimentally. So setting R and Q is a bit of an art. Also, in most cases using diagonal matrices for R and Q is sufficient.

这是一个示例 使用 Matalb 中的 vision.KalmanFilter 来跟踪多人.

Here is an example that uses the vision.KalmanFilter in Matalb for tracking multiple people.

这篇关于计算机视觉中的卡尔曼滤波器:Q 和 R 噪声协方差的选择的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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