Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I create a custom haar classifier?

Tags:

opencv

I am struggling to create a custom haar classifier. I have found a couple tutorials on the web, but they do not specify which version of opencv they are using. What I need is a very concise and simplified example of the steps that are required, along with a simple dataset of images. I also need to know the opencv version and the OS platform so I can get it running. I have tried a matrix of opencv versions on both windows and linux and I have run into memory error after memory error. I would like to start with a known good set of data and simple commands before expanding it to fit my problem.

Thanks for your help, Chris

like image 637
CLJ Avatar asked Jan 23 '12 04:01

CLJ


1 Answers

OpenCV provides two utility commands createsamples.exe and haartraining.exe, which can generate xml files used by Haar Classifiers. That is, with the xml file outputted from haartraining.exe, you can directly use the face detection sample with your xml file to detect any customized objects.

About the detailed procedures to use the commands, you may consult Page 513-516 in the book "Learning OpenCV", or this tutorial.

About the internal mechanism of how the classifier works, you may consult the paper "Rapid Object Detection using a Boosted Cascade of Simple Features", which has been cited 5500+ times.

like image 127
grapeot Avatar answered Nov 02 '22 13:11

grapeot