First time here? Check out the FAQ!

Ask Your Question
0

How to utilize cascade classifier in custom detection algorithm ?

asked Apr 23 '13

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 ?

Preview: (hide)

1 answer

Sort by » oldest newest most voted
1

answered Apr 23 '13

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.

Preview: (hide)

Question Tools

Stats

Asked: Apr 23 '13

Seen: 479 times

Last updated: Apr 23 '13