How to create Haar Cascade (.xml file) to use in OpenCV?

If you are familiar with OpenCV library, you know what Haar Cascade image object detection is. By image object detection I mean, like human face detection or something else. I have some Haar Cascade XMLs for face detection, but I don't know how to create my own. I want to create Haar Cascade XMLs to detect simple bright circle light sources (i.e. flashing infrared light from TV remote control).

So, how do I create a Haar Cascade (.xml file) to use in OpenCV?


I think this might be helpful:

http://note.sonots.com/SciSoftware/haartraining.html


This might be helpful

http://opencvuser.blogspot.in/2011/08/creating-haar-cascade-classifier-aka.html