使用OpenCV跟踪blob [英] Tracking blobs with OpenCV

查看:278
本文介绍了使用OpenCV跟踪blob的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我有一个EMGU(openCV封装)程序,从

a相机源中减去背景,并提取漂亮的干净blob。

现在我需要一些东西将跟踪这些Blob并为其分配ID。

任何建议/库?




谢谢,

SW


I have an EMGU (openCV wrapper) program that subtracts the background from
a camera feed and extracts nice clean blobs.
Now I need something that will track these blobs and assign them with IDs.
Any suggestions/libraries ?


Thanks,
SW

推荐答案

很好,如果你有多个对象,你想跟踪你可以尝试粒子过滤器

well if you have multiple objects that you would like to track you could try a Particle Filter.

粒子过滤器基本上将粒子有一定的重量。在每个时间步中,然后通过将这些权重与当时的对象的实际测量值进行比较来更新这些权重。具有高重量的颗粒然后将在其方向上配置更多的颗粒(在该方向上添加轻微的随机部分)用于下一时间步骤。
经过几个步骤之后,粒子将围绕对象测量位置分组。这就是为什么这种方法有时也称为适者生存方法的生存...

Particle filters basically "disposes" particles on the image which each have a certain weight. In each time step these weights are then updated by comparing them with the actual measured value of the object at that time. Particles with high weight will then dispose more particles in its direction (with adding a slight random part on the direction) for the next time step. After a few time steps the particles will then group around the objects measured position. That's why this method is sometimes also called Survival of the fittest method...

所以这整个事情构建了一个圆:

So this whole thing builds a circle:

Initialization  ---->      Sampling
                        >             \
                       /               >
                 Updating           Prediction
                      <                /
                       \               <
                          Association

所以这提供了一个跟踪给定场景中的对象的好方法。执行多对象跟踪的一种方法是在所有对象上使用这一个粒子过滤器,这将工作,但是当您尝试向对象提供ID时以及当对象彼此交叉时也有缺点,因为粒子云可能失去一个对象,然后跟着另一个。

So this provides a good method of tracking objects in a given scene. One way to do multi-object tracking would be to use this one particle filter on all the objects, which would work, but has disadvantages when you try to give IDs to the objects and also when the objects cross each other since the particle clouds might lose one object and follow another one.

为了解决这个问题,你可以尝试一个混合粒子滤波器(由Vermaak等人[2003])。这一个跟踪每个对象由一个单独的粒子过滤器(当然更少的必要粒子)。

To solve this you could try a Mixture-Particle-Filter (by Vermaak et al. [2003]). This one tracks each of the objects by an individual Particle filter (with of course less necessary particles).

一个很好的文章可以在这里找到: http://www.springerlink.com/content/qn4704415gx65315/
(我也可以为您提供如果你喜欢,如果你说德语,我甚至可以给你一个介绍我在大学里一段时间以前在我的大学)

A good paper on that can be found here: http://www.springerlink.com/content/qn4704415gx65315/ (I can also supply you with several other stuff on that if you like and if you speak German I can even give you a presentation I held about that in my university a while ago)

编辑:

忘记提及:因为你试图在OpenCV中做到这一点:据我所知,有一个冷凝算法的实现一个在整个图像上使用一个粒子滤波器)是OpenCV分布的一部分,虽然它可能已经过时了一点。在OpenCV中可能有更新的粒子过滤器的方法,但如果不是,你会发现在谷歌很多结果,如果你寻找OpenCV和粒子过滤器

Forgot to mention: Since you try to do this in OpenCV: as far as I know there is an implementation of the Condensation algorithm (the first one where you use one particle filter on the whole image) is part of the OpenCV distribution, though it might be outdated a bit. There might be newer ways of the particle filter in OpenCV directly but if not you will find a lot of results on Google if you look for OpenCV and particle filters

希望,帮助...如果没有,请继续问...

Hope that helps... if not, please keep asking...

这篇关于使用OpenCV跟踪blob的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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