1 | initial version |
The default setting of OpenCV is to use stumps as weak classifiers, which means we use decisions trees based on only a single feature value. Then the weak features are combined into a stage that has to reach a certain performance, which is indicated by the parameters -maxFalseAlarmRate and -minHitRate
.
You can however change how the feature decision trees are built this by playing round with the following parameters
-maxDepth < max_depth_of_weak_tree >
is the parameter that defines how many splits deep a decision tree can go. OpenCV uses stumps because it is the fastest possible decision tree to evaluate and the fast way to benefit the most of the early rejection principle.-maxWeakCount < max_weak_tree_count >
is the parameter that defines how many weak trees there can be in a single stage before you need to move on. This is to avoid very long stages that take a lot of time and features to calculate and to result into a classifier that does not apply the early rejection principle.If you can wait until october, then pre-order the latest book I helped one, which has a complete chapter of the book explaining the cascade classifier training with every little detail. Look here!