There are some good tutorials about that, just I´ve look for one and in the opencv forum and I found a reference to this one that looks simple-and-clear. all that is necessary to create samples and do the training is inside the opencv, and it´s true, there are the source inside this folder_\OpenCV\apps\HaarTraining\src_
Also there are this tool to get directly the samples, any way will be so great implement this tool inside Of.
So i have been able to compile opencv on osx and creating haarcascade using the opencv executables. The step:
create positive samples (you can do this many ways - multiple images or a single image)
create negative sample (these images can not have the object you are tracking in them)
… some vec/dat things
build a training file.
I wrote a class using an old face tracking app to be just ofxHaarTracking so that you can just load and track haar files. After awhile of piecing many tutorial together I was able to build a haarcascade.xml file
I think that OF will be a killer part in creating the samples for the training. I want to move onto that next. Ohh man this stuff is fun.
I just took a look in O’Reilly’s book about OpenCV, and it got a chapter about face detection and Haar Classifier. Haven’t read it, but looks like it got some theory about how it works, and some samples.