在 Opencv 上,我读到 BackgroundSubtractorGMG 来自文章“Visual Tracking of Human Visitors under Variable-Lighting Conditions for a Responsive Audio Art Installation”,A. Godbehere、A. Matsukawa、K. Goldberg,American Control Conference,蒙特利尔, 2012 年 6 月。
我阅读了它,然后查看了 OpenCv 的源代码。
我没有找到标题为“III. MULTIPLE VISITOR TRACKING”文章(卡尔曼滤波器)。
此外,在我看来,每个像素都已更新,甚至是标记为前景的像素(与文章中所述不同)。
如果是这样,该实现就像 OpenCv 的其他方法一样,但存储过去像素内存的方式略有不同。
我哪里错了吗?
编辑
在我仔细阅读的原始文章中,有一张图表解释了该算法的工作原理。 (这篇文章很清楚,我的疑虑是关于 OpenCv 的实现)
图1.
Image & (previous image+foreground pixels) => segmentation part => multitracking part => foreground pixels
原始算法与其他算法的不同之处在于嵌入的多轨部分。 如果你愿意,你可以删除它,但它不再有意义了。 无论如何,如果不修改第一部分,那部分是不可能实现的(这应该真的很难),因为它们是集成的。
最佳答案
BackgroundSubtractorGMG 不实现跟踪,它只实现前景检测。因此,对象跟踪是前景检测之上的一项单独操作。您可以使用 the Kalman filter class 自己实现论文的跟踪部分。在 OpenCV 中。
编辑 前景分割和目标跟踪是本文提出的算法的两个不同步骤,前景分割只是图1中算法图的一部分。来自文章(重点是我的):
Abstract—For a responsive audio art installation in a skylit atrium, we introduce a single-camera statistical segmentation and tracking algorithm. The algorithm combines statistical background image estimation, per-pixel Bayesian segmentation, and an approximate solution to the multi-target tracking problem using a bank of Kalman filters and Gale-Shapley matching.
...
III. MULTIPLE VISITOR TRACKING
Lacking camera calibration, we track foreground visitors in the image plane rather than the ground plane. Once the foreground/background segmentation algorithm returns a set of detected visitors, the challenge is to track the visitors to gather useful state information: their position, velocity, and size in the image plane.
...
Given this linear model, and given that observations are correctly matched to the tracks, a Kalman filter bank solves the multiple target tracking problem.
因此 BackgroundSubtractorGMG
是返回一组检测到的访问者的前景/背景分割算法。它由统计背景图像估计、逐像素贝叶斯分割组成。
本文的第三部分着重于前景对象被分割后的跟踪。它利用一组卡尔曼滤波器和 Gale-Shapley 匹配近似解决多目标跟踪问题。
关于c++ - 没有卡尔曼滤波器的 BackgroundSubtractorGMG?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18854089/