How to choose the best bounding box out of a set of bounding boxes returned by cascade classifiers for face detection? [closed]
I trained a classifier for face detection using opencv_traincascade based on LBP features. When I run cascade.xml on a face, I get many bounding boxes (it is not the best classifier in the world). For generalisability, I make no assumptions on the data and assume the bounding box of maximum size will give me the face region. Sadly, this is not always the case.
Is there any way to solve this problem or do I need a better classifier?
EDIT
- I am training using OpenCV on windows and testing the cascade.xml on Matlab. Are the results affected by doing this? Any compatibility issues?
- How do people usually test their cascades-on C#, Matlab, C, C++, Python or using OpenCV itself?
maybe have a look at grouprectangles()
@berak Any way of doing this in Matlab? :) Or will there be compatibility issues in using vision.CascadeObjectDetector of Matlab for LBP features?
sorry, no idea (total idiot here, when it comes to matlab..)
@aishpant, you can use mex opencv. Iv'e successfully used group rectangles in my project with mex opencv, I can help you with that.
mex opencv: http://www.cs.stonybrook.edu/~kyamagu/mexopencv/