2013-02-28 20:19:16 +08:00
CUDA version of Soft Cascade Classifier
========================================
softcascade::SCascade
-----------------------------------------------
.. ocv: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
2013-03-14 17:49:48 +08:00
---------------------------------
2013-02-28 20:19:16 +08:00
Destructor for SCascade.
2013-03-14 17:49:48 +08:00
.. ocv:function :: softcascade::SCascade::~SCascade()
2013-02-28 20:19:16 +08:00
softcascade::SCascade::load
2013-03-14 17:49:48 +08:00
----------------------------
2013-02-28 20:19:16 +08:00
Load cascade from FileNode.
2013-03-14 17:49:48 +08:00
.. ocv:function :: bool softcascade::SCascade::load(const FileNode& fn)
2013-02-28 20:19:16 +08:00
:param fn: File node from which the soft cascade are read.
softcascade::SCascade::detect
2013-03-14 17:49:48 +08:00
------------------------------
2013-02-28 20:19:16 +08:00
Apply cascade to an input frame and return the vector of Decection objcts.
2013-03-14 17:49:48 +08:00
.. ocv:function :: void softcascade::SCascade::detect(InputArray image, InputArray rois, OutputArray objects, cv::gpu::Stream& stream = cv::gpu::Stream::Null()) const
2013-02-28 20:19:16 +08:00
:param image: a frame on which detector will be applied.
:param rois: a regions of interests mask generated by genRoi. Only the objects that fall into one of the regions will be returned.
:param 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.
:param stream: a high-level CUDA stream abstraction used for asynchronous execution.