32abb8c053c97d5855c30b2d787b40d7fee8658a
[platform/upstream/opencv.git] / modules / softcascade / doc / softcascade_cuda.rst
1 CUDA version of Soft Cascade Classifier
2 ========================================
3
4 softcascade::SCascade
5 -----------------------------------------------
6 .. ocv:class:: softcascade::SCascade : public Algorithm
7
8 Implementation of soft (stageless) cascaded detector. ::
9
10     class CV_EXPORTS SCascade : public Algorithm
11     {
12         struct CV_EXPORTS Detection
13         {
14               ushort x;
15               ushort y;
16               ushort w;
17               ushort h;
18               float confidence;
19               int kind;
20
21               enum {PEDESTRIAN = 0};
22         };
23
24         SCascade(const double minScale = 0.4, const double maxScale = 5., const int scales = 55, const int rejfactor = 1);
25         virtual ~SCascade();
26         virtual bool load(const FileNode& fn);
27         virtual void detect(InputArray image, InputArray rois, OutputArray objects, Stream& stream = Stream::Null()) const;
28         virtual void genRoi(InputArray roi, OutputArray mask, Stream& stream = Stream::Null()) const;
29     };
30
31
32 softcascade::SCascade::~SCascade
33 ---------------------------------
34 Destructor for SCascade.
35
36 .. ocv:function:: softcascade::SCascade::~SCascade()
37
38
39
40 softcascade::SCascade::load
41 ----------------------------
42 Load cascade from FileNode.
43
44 .. ocv:function:: bool softcascade::SCascade::load(const FileNode& fn)
45
46     :param fn: File node from which the soft cascade are read.
47
48
49
50 softcascade::SCascade::detect
51 ------------------------------
52 Apply cascade to an input frame and return the vector of Decection objcts.
53
54 .. ocv:function:: void softcascade::SCascade::detect(InputArray image, InputArray rois, OutputArray objects, cv::cuda::Stream& stream = cv::cuda::Stream::Null()) const
55
56     :param image: a frame on which detector will be applied.
57
58     :param rois: a regions of interests mask generated by genRoi. Only the objects that fall into one of the regions will be returned.
59
60     :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.
61
62     :param stream: a high-level CUDA stream abstraction used for asynchronous execution.