开发者

How to identify human like patterns in a webcam feed?

The camera is about 5 feet away开发者_如何学C 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.


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 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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜