计算视频中的人数 [英] Count the number of people in the video

查看:141
本文介绍了计算视频中的人数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在从事图像处理和计算机视觉项目。该项目将计算进入会议的人数。这需要在OpenCV或Python中完成。

I am working on image processing and computer vision project. The project is to count the number of people entering the conference. This need to done in OpenCV or Python.

我已经尝试过在OpenCV中为上半身提供的Haar Cascade:使用OpenCV检测上半身部分

I have already tried the Haar Cascade that is available in OpenCV for Upper body: Detect upper body portion using OpenCV

但是,它没有满足要求。视频链接如下:

However, it does not address the requirement. The link of the videos is as follows:

https://drive.google.com/open?id=0B3LatSCwKo2benZyVXhKLXV6R0U

如果查看sample1文件,请在0:16秒查看某个人进入房间,这将永远是方式。相机位于门顶。

If you view the sample1 file, at 0:16 secs a person is entering the room, that would always be the way. The camera is on top of the door.

推荐答案

识别此航拍视频流中的人



我认为有一种简单的方法可以解决这个问题。用于检测移动物体的背景减法方法正是您所需要的,因为您提供的视频似乎在任何一点上只有一个移动物体:走过门的人。因此,如果您在Python中使用本教程,那么您应该能够为您的问题实现令人满意的解决方案。

Identifying People from this Aerial Video Stream

I think there is a simple way of approaching this problem. Background subtraction methods for detecting moving objects are just what you need because the video you provided seems to only have one moving object at any point: the person walking through the door. Thus, if you follow this tutorial in Python, you should be able to implement a satisfying solution for your problem.

现在,第一个如果有多个人在不同的时间间隔内走过门,我可以做些什么来计算(一个人在10秒内走进视频,第二个人在20秒内走进视频的)?这是我能想到的最简单的解决方案。一旦通过背景减法检测到斑点,您只需跟踪斑点,直到它离开帧。一旦它离开框架,你检测到的下一个斑点必须是进入房间的新人,因此你可以继续计数。如果您不熟悉如何在检测到对象后跟踪对象,请提供本教程一读。通过这种方式,您可以避免计算同一个blob(即同一个人)进入太多次。

Now, the first question that pops to my mind is what might I do to count if multiple people are walking through the door at separate time intervals (one person walks in 10 seconds into the video and a second person walks in 20 seconds into the video)? Here's the simplest solution to this consideration that I can think of. Once you've detected the blob(s) via background subtraction, you only have to track the blob until it goes off the frame. Once it leaves the frame, the next blob you detect must be a new person entering the room and thus you can continue counting. If you aren't familiar with how to track objects once they have been detected, give this tutorial a read. In this manner, you'd avoid counting the same blob (i.e., the same person) entering too many times.

如果您认为通过该门口的交通量很高,那么问题就变得更加困难了。这是因为在那种情况下,在任何给定时刻可能没有太多静止背景要减去,并且在检测到的斑点之间可能存在很多重叠。在自动行人跟踪和识别领域有很多活跃的研究 - 简而言之,这是一个难以解决的问题,并不是一个简单易行的解决方案。但是,如果您有兴趣阅读一些潜在的方法,您可以从鸟瞰图中解决行人检测中这些更具挑战性的问题,我建议您阅读这个问题

If you think that there is a high level of traffic through that doorway, then the problem becomes much more difficult. This is because in that case there may not be much stationary background to subtract at any given moment, and further there may be a lot of overlap between detected blobs. There is a lot of active research in the area of autonomous pedestrian tracking and identification - so, in short, it's a difficult question that doesn't have a straightforward easy-to-implement solution. However, if you're interested in reading about some of the potential approaches you could take to solving these more challenging problems in pedestrian detection from an aerial view, I'd recommend reading the answers to this question.

我希望这有帮助,祝你好运!

I hope this helps, good luck coding!

这篇关于计算视频中的人数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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