Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Background subtraction is a good start. Such as frame difference or MOG.

This gives you a nice mask of objects that are not in the background. i.e. foreground objects

Get contours of the mask in order to get ROIs, region of interests. The ROI is the contours bounding box.

You can now run Haar or HOG on each ROI. Take the mask image and change it's ROI for each bounding box, and run the detector. HOG seems to be the preferred method, but performs better on a GPU as it's quite intensive. The cascade files are available in the OpenCV source there are many tutorials. Just find a good one on face detection and change the xml file to "people" or "bodies" or whatever it's called.

You now have detections, which are...

a) Not the background. b) Computational inexpensive to compute. c) Probably people.

All of the terms used can be found in OpenCV documentation.

Regards.