Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Haar Cascade detecting only faces(no heads)?

Hi, I'm currently trying to solve face tracking problem using mix of Haar Cascade and camshift methods. First, I find face region using CascadeClassifier, then I pass it to method which calculates histogram for that region and then, having mentioned region and historgram new region is calculated.

It looks fine on paper, in reality it's whole other thing. By saying that I mean that when using CascadeClassifier I get Rect object which contains not only face but also whole head and a bit of background. That makes calculated histogram to be useless - with every camshift loop iteration region which formerly contained face now expands because of bits of background mixed into histogram.

So, back to topic, do any of you know Haar cascade XML files which would cause CascadeClassifier to return only face region, excluding rest of head? Or do you know of any method that would help me with getting desired result?

By far, I tried those resources: http://alereimondo.no-ip.org/OpenCV/34 - tried, all work like default cascades shipped with OpenCV http://tutorial-haartraining.googlecode.com/svn/trunk/result/ - those xml files actually cause application fail while loading into cascade, though method used for teaching them(faces only) seems to be what i'm looking for.

I would appreciate any feedback, thanks