Aforge斑点检测 [英] Aforge Blob Detection

查看:114
本文介绍了Aforge斑点检测的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何从视频中检测不动的斑点?

How to detect Non Moving Blobs from a video?

让我们考虑一下我有一个视频和一个初始的背景帧位图.是否有可能检测到不运动的斑点/物体?并在该对象周围绘制一个矩形?

Let's consider I have a video and a initial background frame bitmap. Is that possible to detect an blob/object which is NOT MOVING ? and draw a rectangle around that Object?

推荐答案

这让我想起了一种算法,可以检测地铁上被遗忘的物体.如果我没看错,您想检测没有移动且不在初始背景上的对象,对吗?您可以采用这种方法:

This reminds me of an algorithm to detect forgotten objects on a subway. If I'm not wrong you want to detect objects that are not moving AND that were not on the initial background right? You can apply this approach:

具有这样的初始图像(找不到真正空的地铁图像):

With an initial image like this (couldn't find a truly empty subway image):

还有一个添加了静态物体(垃圾桶),地铁在移动,有人在等的图像,可能在移动了一点:

And an image with an added static object (the waste can), the subway moving, and a person waiting, probably moving a little:

在图像之后> ThresholdDifference( http ://www.aforgenet.com/framework/docs/html/322123cf-39df-0ae8-6434-29cceb6a54e1.htm ),我们将得到类似的信息:

After a Image>ThresholdDifference (http://www.aforgenet.com/framework/docs/html/322123cf-39df-0ae8-6434-29cceb6a54e1.htm) we will get something like:

请注意废物如何与不存在的其他物体一起出现.如果您多次应用类似的过程,则每10秒说一次,然后说一个Image> Intersect(

Note how the waste can appears along with other objects that were not there. If you apply this similar process several times, let say every 10 seconds and then a Image>Intersect (http://www.aforgenet.com/framework/docs/html/7244211d-e882-09b1-965d-f820375af8be.htm) you will end with something like this after a few minutes:

您可以使用图像>连接的组件标签(

You can easily get the coordinates of this object with a Image>Connected Component Labeling (http://www.aforgenet.com/framework/docs/html/240525ea-c114-8b0a-f294-508aae3e95eb.htm)

此方法的缺点:

  • 需要一些时间(如果每10秒拍摄一次快照则需要几分钟,而更频繁的快照则需要几秒钟)来检测对象.
  • 检测颜色与背景颜色相似的物体将花费更多的时间,您可以轻松地在罐子的上部(也像墙壁)上注意到这种缺陷.

这篇关于Aforge斑点检测的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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