Cascade detectors have been shown to operate extremely rapidly, with high accuracy, and have important applications in different spheres. The initial goal for this cascade implementation was the fast and accurate pedestrian detector but it also useful in general. Soft cascade is trained with AdaBoost. But instead of training sequence of stages, the soft cascade is trained as a one long stage of T weak classifiers. Soft cascade is formulated as follows:

where
are the set of thresholded weak classifiers selected during AdaBoost training scaled by the associated weights. Let

be the partial sum of sample responses before
-the weak classifier will be applied. The funtcion
of
for sample
named sample trace.
After each weak classifier evaluation, the sample trace at the point
is compared with the rejection threshold
. The sequence of
named rejection trace.
The sample has been rejected if it fall rejection threshold. So stageless cascade allows to reject not-object sample as soon as possible. Another meaning of the sample trace is a confidence with that sample recognized as desired object. At each
that confidence depend on all previous weak classifier. This feature of soft cascade is resulted in more accurate detection. The original formulation of soft cascade can be found in [BJ05].
| [BJ05] | Lubomir Bourdev and Jonathan Brandt. tRobust Object Detection Via Soft Cascade. IEEE CVPR, 2005. |
| [BMTG12] | Rodrigo Benenson, Markus Mathias, Radu Timofte and Luc Van Gool. Pedestrian detection at 100 frames per second. IEEE CVPR, 2012. |
Implementation of soft (stageless) cascaded detector.
class CV_EXPORTS SCascade : public Algorithm
{
public:
SCascade(const float minScale = 0.4f, const float maxScale = 5.f, const int scales = 55, const int rejfactor = 1);
virtual ~SCascade();
cv::AlgorithmInfo* info() const;
virtual bool load(const FileNode& fn);
virtual void detect(InputArray image, InputArray rois, std::vector<Detection>& objects) const;
virtual void detect(InputArray image, InputArray rois, OutputArray rects, OutputArray confs) const;
};
An empty cascade will be created.
| Parameters: |
|
|---|
Load cascade from FileNode.
| Parameters: |
|
|---|
Apply cascade to an input frame and return the vector of Decection objcts.
| Parameters: |
|
|---|