CUDA version of Soft Cascade Classifier

softcascade::SCascade

class softcascade::SCascade : public Algorithm

Implementation of soft (stageless) cascaded detector.

class CV_EXPORTS SCascade : public Algorithm
{
    struct CV_EXPORTS Detection
    {
          ushort x;
          ushort y;
          ushort w;
          ushort h;
          float confidence;
          int kind;

          enum {PEDESTRIAN = 0};
    };

    SCascade(const double minScale = 0.4, const double maxScale = 5., const int scales = 55, const int rejfactor = 1);
    virtual ~SCascade();
    virtual bool load(const FileNode& fn);
    virtual void detect(InputArray image, InputArray rois, OutputArray objects, Stream& stream = Stream::Null()) const;
    virtual void genRoi(InputArray roi, OutputArray mask, Stream& stream = Stream::Null()) const;
};

softcascade::SCascade::~SCascade

Destructor for SCascade.

C++: softcascade::SCascade::~SCascade()

softcascade::SCascade::load

Load cascade from FileNode.

C++: bool softcascade::SCascade::load(const FileNode& fn)
Parameters:
  • fn – File node from which the soft cascade are read.

softcascade::SCascade::detect

Apply cascade to an input frame and return the vector of Decection objcts.

C++: void softcascade::SCascade::detect(InputArray image, InputArray rois, OutputArray objects, cv::cuda::Stream& stream=cv::cuda::Stream::Null()) const
Parameters:
  • image – a frame on which detector will be applied.
  • rois – a regions of interests mask generated by genRoi. Only the objects that fall into one of the regions will be returned.
  • objects – an output array of Detections represented as GpuMat of detections (SCascade::Detection). The first element of the matrix is actually a count of detections.
  • stream – a high-level CUDA stream abstraction used for asynchronous execution.