detectMultiScale: Using rejectLevels and levelWeights
I have multiple classifiers and some objects look similar to others, so I would like to use rejectsLevel/levelWeight values to pick the most confident result.
How can I use the numbers provided by rejectLevels and levelWeights to "reject" results, similar to how the default detectMultiScale performs rejections?
Using detectMultiScale w/rejectLevels and levelWeights isn't documented and is not as greedy with regard to rejects. In other words, when I use detectMultiScale method with rejectLevels/levelWeights, I get back a ton of results which are normally not found.
Update: After digging into the code, these values aren't usable for the objective described above. The current implementation groups pass and fail rectangles and the most pertinent class methods and members are protected and/or private.
Did you finally find a method to pick the most confident result? Did you try to use the overlapp of detections to compute the score/confidence?
There seems to be a bug in groupRectangles which seems to prevent the detected objects from grouping if you call the undocumented version of detectMultiScale. Unfortunately there doesn't seem to be any way around this, right now. I've filed a bug report here: http://code.opencv.org/issues/3064
@vinayverma: This is exactly what I did. @achal: I think the comments on the bug are accurate in that this method isn't for detection.
I made some modifications which let me use the reject levels and weights but it's limited in production use until I determine how to properly combine the rejectLevels and weights with training parameters so the values are normalized. I'll eventually get these optimizations into opencv. Sponsors welcome ;)