人数统计系统

发布于 2024-11-29 00:15:40 字数 259 浏览 1 评论 0原文

我想使用 OpenCV(或 Emgu CV)开发一个“人数统计系统”。

请指导我如何实施或引导我找到一些示例或开源项目。

(我做了一些工作:提取差异然后阈值删除背景,使用运动历史记录等;仍然没有好的结果。)

编辑 1:我正在计算高人流(其中十几个人可能会同时通过)。

编辑 2:准确率必须至少为 80%。人们正走过一扇近5米宽的门。问题是我无法控制相机的位置或角度。摄像机从 10m 距离、2.5m 高度拍摄该地点。

谢谢

I want to develop a "People Counting System" using OpenCV (or Emgu CV).

Please guide me on how to implement or lead me to some examples or open source projects.

(I have done some work: extracting diff then threshold to delete background, using motion history and like that; still no good results.)

Edit 1: I am counting a high people flow (a dozen of them may come through simultaneously).

Edit 2: It must be at least 80% accurate. People are walking through a door that is almost 5 meters wide. The problem is I have no control on the position or angle of the camera. Camera is shouting the place from a 10m distance at a 2.5m height.

Thank you

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(6

陪你搞怪i 2024-12-06 00:15:40

如果您将人数统计系统称为对房间内人数进行计数的系统,那么我建议您使用带有 2 个激光(普通激光玩具工作)和 2 个光敏电阻的微控制器来实现硬件。对于微控制器,我建议您使用 Arduino。并且然后创建一个具有 SerialPort 对象的 C# 应用程序,并读取 arduino 通过 USB 发送的数据。arduino 将发送 1 表示“有人进入房间”,发送 0 表示“有人离开房间” room”为例。然后用C#就可以轻松完成日志记录和统计。

Arduiono 网站:此处

光敏电阻 1 美元:这里

这个解决方案比使用质量相当好的相机便宜得多,也更容易实现。

希望我对你有帮助。

If you call a people counting system a system that counts people that are in a room then I recommend you implement the hardware with a microcontroller with 2 lazers(normal lazer toys work) and 2 photoresistors.For the microcontroller I recomen you use Arduino.And then make an C# application that has a SerialPort object and reads the data that the arduino sends through the USB.The arduino will send 1 for "someone entered the room" and 0 for "someone left the room" for example.Then the logging and statistics can be done easily in C#.

Arduiono Site:here

Photoresistor for $1: here

This solution is alot cheaper and easyer to implement than using a camera that is with a fairly good quality.

Hope I helped you.

墨小墨 2024-12-06 00:15:40

查看 OpenCV 最新版本 (>= 2.2) 附带的 HOG 行人检测器。

请参阅 OpenCV 源代码中的 modules/objdetect/src/hog.cppsamples/cpp/peopledetect.cpp。不幸的是,目前还没有关于它的官方文档。

Check out the HOG pedestrian detector that comes with recent versions of OpenCV (>= 2.2).

See modules/objdetect/src/hog.cpp and samples/cpp/peopledetect.cpp in the OpenCV sources. Unfortunately there is no official documentation about it yet.

草莓味的萝莉 2024-12-06 00:15:40

这将帮助您计算包括人在内的移动物体:CodeProject 上的运动检测项目

This would help you to count moving things including people: Motion Detection project on CodeProject

那小子欠揍 2024-12-06 00:15:40

人是场景中唯一的“实体”吗?如果情况并非如此,您是否愿意将一个人视为在场景中移动的其他某种事物?因为如果是这种情况,您只需计算进入或离开场景的斑点即可。这可能听起来有点天真,但我会采取某种运动图像,按簇中的距离对运动像素进行分组。您的距离度量可以考虑一些限制,例如人们“经常”站立,因此簇中的像素应围绕某种回归线分组(如果相机与地板对齐,则为直线)。不必在场景中跟踪他们,只需注意他们何时进入或离开,尽管您会遇到一些问题,例如,人们独自进入场景并成对或成群地离开。 .. 祝你好运 :)

Are people the only kind of "entities" in the scene? If this is not the case, do you care about considering a person some other kind of thing that moves through the scene? Because if that is the case, you could just count blobs that come in or come out from the scene. It may sound a bit naive but I will take some kind of motion image, group motion pixels by distance in clusters. Your distance metric could take into account some restrictions, such as that people will "often" stand so pixels in a cluster should group around some kind of regression line (an straight-up line if the camera is aligned with de floor). It shouldn't be necessary to track them in the scene, just noticing when they enter or they leave, though you'd get some issues with, for example, people entering on their own in the scene and leaving in pairs or in groups... Good luck :)

剪不断理还乱 2024-12-06 00:15:40

我认为如果你有密集的人群并且有很多遮挡,你必须使用一些机器学习算法,例如你可以使用隐式形状模型来获取特征。

I think if you have dense people crowd with a lot of occlusions you have to use some machine learning algorithm, for example you can use Implicit Shape Model for features.

败给现实 2024-12-06 00:15:40

这实际上取决于相机的位置。假设您可以获得图像中人的正面轮廓:

这个问题基本上是人脸检测和识别。

寻找面孔的方法有很多,但这是我更熟悉的方法。

对于人脸检测,您需要对肤色进行图像分割。这将提取皮肤区域。 [手臂、胸部(对于穿着 V 形剪裁上衣的人)、脸部、腿部等] 然后,您需要将皮肤区域的轮廓与训练过的脸部轮廓对齐。

[您需要使用特征脸来创建面部外观的通用轮廓]

如果皮肤区域对齐并且与轮廓没有偏离太远,则将其视为面部。一旦人脸被确认,然后将其添加到特征脸数据存储中[用于识别]。为了节省处理时间,如果您正在寻找以前的面孔,您可能需要考虑限制搜索区域。 [考虑到帧速率和上次看到该人的时间]

如果您指的是“人群流量”,我认为您只是指人群中面孔的密度。

现在您已确认视频中的移动物体是一个人。现在你只需要注意这一点,然后确保你不再将他们视为新人。

这种方法:实际上取决于您检测面部区域的能力。如果视频中的人低头、不符合训练数据的轮廓等,这可能不起作用。如果视频中的人戴上太阳镜,这也可能会受到影响。 【可能会被认为是“新面孔”】

It really depends on the position of the camera. Assuming that you can get front facing profiles of the people in the images:

This problem is basically face detection and recognition.

There are many ways to go about finding faces, but this is the approach that I'm a little more familiar with.

For the face detection you need to do image segmentation on the skin tone color. This will extract skin regions. [Arms, the chest (for those wearing V cut tops), face, legs, etc] Then you would need to line up the profiles of the skin regions to the profile of your trained faces.

[You'll need to use Eigenfaces to create a generic profile of what a face looks like]

If the skin region lines up and doesn't devate too far from the profile, then it is considered a face. Once the face is confirmed, then add it into the eigenfaces data store [for recognition]. To save processing you might want to consider limiting the search area if you are looking for a previous face. [Given the frame rate, and last time the person was seen]

If you are referring to "Crowd flow" I think you just mean the density of faces in a crowd.

Now you've confirmed that a moving object in the video is a person. Now you just need to note that and then make sure that you don't consider them as a new person again.

This approach: Really depends on your ability to detect face regions. This may not work if the people in the video are looking down, not fitting the profile of the trained data etc. Also it may be effected if a person puts on sunglasses within the video. [Probably would be considered a "new face"]

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文