I found this good steps to train Haar classifier from OpenCV mailing list. So I am listing it in case it would help somebody or I need it in my research.
1- For positive set, it’s recommended to have ~2000 samples. The same is applied for the negative ones.
2- If you have different form of the object or gesture; try to make these images have the same conditions. Examples: – All hands are in the same range of degree of rotation. – If you are interested in hands; make your decision either to put wrist or not for ALL images.
3- When you define the ROI ‘Region of interest’ for the positive ones, try to mark an area that have some sort of rough marks. ‘Viola-Jones’ method is using HAAR features to detect candidates, and these features are simple and rough in some how.
4- Don’t include a lot of positions for the same detector; Instead, find the common area ‘if exist’ between all positions ‘forms’ of the object which has rough ‘clear’ marks in it.
Advice: Although machine-learning methods may give good results, but you have to understand their requirements and conditions well to utilize them. Also, they require a lot of GOOD !!! SAMPLES !!! to run the classification well.
At the end I’d like to thank everyone who get involved in this post.