Ask Your Question
0

How to utilize cascade classifier in custom detection algorithm ?

asked 2013-04-23 03:53:28 -0600

sub_o gravatar image

So, I've created my own HoG features extractor and a simple sliding window algorithm, which pseudo code looks like this:

for( int i = 0; i < img.rows; i++ ) {
   for( int j = 0; j < img.cols; j++ ) {
     extract image ROI from the current position
     calculate features for the ROI
     feed the features into svm.predict() function, to determine whether it's human or not
   }
}

However since it's very slow (especially when you include different scales), I've decided to train some cascade classifiers using openv_traincascade command on my positive and negative samples.

opencv_traincascade provides me with cascade.xml, params.xml, and a number of stages.xml files

My question is how do I utilize this trained cascade classifiers in my detection loop ?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2013-04-23 04:08:12 -0600

You should check out the cascade classifier documentation. It has an examplr of how to load and use a cascade to detect an actual object. However, if you are looking for a fast pedestrian detector, this one won't satisfy your needs either. You should look into class specific hoigh forests or grammar based latent SVM detection. Also the integral channel processing is a promising technique.

However many of these techniques require you to probram your own code based on provided sub functionality of openCV.

edit flag offensive delete link more

Question Tools

Stats

Asked: 2013-04-23 03:53:28 -0600

Seen: 461 times

Last updated: Apr 23 '13