It is possible. Just check how CascadeClassifier::detectMultiScale
works.
In this function you can check this->data.stages.size()
, it will show you how many stages there are in cascade.
In particular detectMultiScale
calls detectSingleScale
, then it calls CascadeClassifierInvoker
's operator()
, and we see there
int result = classifier->runAt(evaluator, Point(x, y), gypWeight);
line.
Thus if result
is greater than zero, this means classification succeded and went through all stages.
Otherwise (if i'm not mistaken) result will be equal to -[number of stage]
classifier failed at. So you can see the exact stage classifier failed to pass.
Also if you use old-style cascades pay attention that detectMultiScale
calls cvHaarDetectObjectsForROC
, not detectSingleScale
, but essentialy it does the same thing.
Good luck.
And yes, this means you're going to modify sources.