如何识别网络摄像头中的类人模式?
相机距离拍摄对象大约 5 英尺,当我捕捉画面时,我需要能够判断画面中是否有人。
我有一些复杂的实施计划,只是想知道你们中是否有人知道我可以使用的现有解决方案。
The camera is about 5 feet away form the subject and when I capture a frame, I need to be able to tell if the frame has a human in it or not.
I have some complicated plans on implementing it, just wondering if any of you know an existing solution that I can use.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您遇到的问题实际上非常复杂,并且它有自己的专用领域:计算机视觉。
这是人们可能会做的一件相当常见的事情,正如您所建议的,您绝对不应该重新发明轮子。我不确定是否存在任何算法或开源项目。
我认为你最好的选择是开始寻找学术论文和计算机科学讲义。
这是一篇论文:用于识别人体的线扫描算法
The problem you've stumbled into is actually quite complicated, and it has it's own dedicated field : Computer Vision.
This is a fairly common thing one might do, and as you suggested, you definetly shouldn't reinvent the wheel. I'm not sure if there are any algorithms or open source projects floating around.
I think your best bet is to start to look for academic papers and Computer Science lecture notes.
Here's a paper: A Line-Scan Algorithm for Identifying the Human Body
OpenCV 是一个成熟的工具集,可用于开始使用计算机视觉。但请注意,这是一个非常困难的问题,相应的工具也很难理解和使用。
如果您不使用 C++,OpenCV 可能已被封装,供您使用您最喜欢的语言进行访问。我将 Emgu CV 与 C# 结合使用: http://www.emgu.com/wiki/index .php/Main_Page。
OpenCV is a mature toolset to use to start working with computer vision. Note, though, that it is a very difficult problem, and the tools are correspondingly difficult to understand and use.
If you are not using C++, OpenCV may have been wrapped for you to access with your favorite language. I use Emgu CV with C#: http://www.emgu.com/wiki/index.php/Main_Page.
定向梯度直方图是一种用于检测人类的技术: Wikipedia HoG
简单来说,该算法通过图像中梯度方向的分布来识别人类:圆将具有均匀的梯度方向分布,因为所有方向沿边界的频率相同。正方形的分布在 0°、90°、180° 和 270° 处有四个峰值,因为这是其边界的唯一方向。人类也有独特的方向直方图,并且该直方图可以通过支持向量机或人工神经网络等经典机器学习算法来识别。我认为 OpenCV 包含 HoG 算法的实现。
The histogram of oriented gradients is a technique used to detect humans: Wikipedia HoG
Simply put, the algorithm recognizes humans by the distribution of gradient directions in the image: A circle would have a uniform gradient direction distribution, because all directions are equally frequent along the boundary. A square has a distribution with four peaks at 0°, 90°, 180° and 270°, because that's the only directions of it's boundary. A human has a distinctive direction histogram, too, and that histogram can be recognized by classical machine learning algorithms like a support vector machine or an artificial neural network. I think OpenCV contains an implementation of the HoG algorithm.