Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

xml

opencv

emgucv

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?

like image 900
Lessneek Avatar asked Jan 04 '10 17:01

Lessneek


People also ask

How do I use Haar Cascade XML?

Loading Haar Cascade in OpenCV We can load any haar-cascade XML file using cv2. CascadeClassifier function. Once cascade is loaded in OpenCV, we can call the detector function. results It lists coordinates (x, y, w,h) of bounding boxes around the detected object.

What is Haar Cascade XML file?

So what is Haar Cascade? It is an Object Detection Algorithm used to identify faces in an image or a real time video. The algorithm uses edge or line detection features proposed by Viola and Jones in their research paper “Rapid Object Detection using a Boosted Cascade of Simple Features” published in 2001.


2 Answers

I think this might be helpful:

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

like image 74
Tony The Lion Avatar answered Sep 23 '22 06:09

Tony The Lion


This might be helpful

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

like image 39
Scott Avatar answered Sep 26 '22 06:09

Scott