Aforge Blob Detection

[亡魂溺海] 提交于 2019-12-06 10:59:45

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:

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

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)

Drawbacks of this approach:

  • Needs some time (minutes if you take a snapshot every 10 seconds, seconds for more frequent snapshots) to detect the objects.
  • Will take even more time to detect an object that has a similar color than the background, you can easily notice this drawback in the upper part of the can, which is also white, like the wall.

This is a solution that is in my mind and I'm not sure to works properly:

  1. run any pre-required filters and algorithms to be ready to blob detection.
  2. run the blob detection algorithm and save all the blobs in an array.
  3. find the center, and the area size of each blob.
  4. compare current frame blob's data with previous blobs (their center and sizes)
  5. if the changes was in acceptable range they are the unmoved blobs.
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!