If you are interested in finding simple infrared light in a cascade of hara, it will be very strange. Since a simple IR unit does not have sufficient educational opportunities through opencv, like other objects (face, eyes, nose, etc.). Because IR is just a simple light that has only one feature of brightness in my point of view. But if you want to learn how to train the classifier, a link to it will help you.
http://note.sonots.com/SciSoftware/haartraining.html
And if you just want to detect an IR block, then you have two more options: one you go for DIP algorithms to detect a bright area, and the other, which I recommend to you, you can use an IR camera that simply transmits IR blob and you can easily detect infrared using opencv blob functiuons. If you think that the IR camera is expansive, you can make a simple webcam on the IR camera by removing the IR block (if any) and add a block of visible light, for example, a negative film, flexible material or any other. You can check the following link to convert a simple webcam to an IR camera.
http://www.metacafe.com/watch/385098/transform_your_webcam_into_an_infrared_cam/
Sublime Dec 13 '11 at 5:23 2011-12-13 05:23
source share