How to count the number of people in an image using MATLAB?

Has anyone ever tried making this work?

+2


a source to share


2 answers


Before trying to count the number of people in an image, it's easier to first solve the problem of solving: Does this region contain a person? And it's even easier if you scale it down to a certain size: does this have a 20x20 pixel image of a person? It's even easier if you're only trying to detect faces .. in which case you can use Viola-Jones's face detection algorithm to determine if there is a face in the image.

Once you can say yes / no, no or no person (or person) in a region, you can use a sliding window approach to cover every possible region and say yes / no is / is not a person (or faces) in this region. To count the number of people (or persons), you simply count the number of yes answers.



As I said, face detection is slightly easier than human detection, and face detection is easier than detecting faces in any orientation. However, you can create object detectors for almost any object, as long as you have a large enough dataset. These methods can be quite accurate, but they are not 100% reliable, which is why you will get false positives and false negatives.

You can find Matlab face detector from this link.

+3


a source


There is an active research community out there on this issue. Here's a good start:

http://lear.inrialpes.fr/people/triggs/pubs/Dalal-cvpr05.pdf



More information on links to HOG implementations:

http://en.wikipedia.org/wiki/Histogram_of_oriented_gradients

+2


a source







All Articles