opencv/modules/softcascade/doc/softcascade_cuda.rst
2013-03-14 20:12:52 +04:00

63 lines
2.1 KiB
ReStructuredText

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
---------------------------------
Destructor for SCascade.
.. ocv:function:: softcascade::SCascade::~SCascade()
softcascade::SCascade::load
----------------------------
Load cascade from FileNode.
.. ocv:function:: bool softcascade::SCascade::load(const FileNode& fn)
:param 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.
.. ocv:function:: void softcascade::SCascade::detect(InputArray image, InputArray rois, OutputArray objects, cv::gpu::Stream& stream = cv::gpu::Stream::Null()) const
: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.