changes related with code review

This commit is contained in:
marina.kolpakova
2013-02-01 14:25:10 +04:00
parent f7ac73998a
commit cc538ddfa6
20 changed files with 175 additions and 137 deletions

View File

@@ -25,20 +25,20 @@ The sample has been rejected if it fall rejection threshold. So stageless cascad
.. [BMTG12] Rodrigo Benenson, Markus Mathias, Radu Timofte and Luc Van Gool. Pedestrian detection at 100 frames per second. IEEE CVPR, 2012.
SoftCascadeDetector
Detector
-------------------
.. ocv:class:: SoftCascadeDetector
.. ocv:class:: Detector
Implementation of soft (stageless) cascaded detector. ::
class CV_EXPORTS_W SoftCascadeDetector : public Algorithm
class CV_EXPORTS_W Detector : public Algorithm
{
public:
enum { NO_REJECT = 1, DOLLAR = 2, /*PASCAL = 4,*/ DEFAULT = NO_REJECT};
CV_WRAP SoftCascadeDetector(double minScale = 0.4, double maxScale = 5., int scales = 55, int rejCriteria = 1);
CV_WRAP virtual ~SoftCascadeDetector();
CV_WRAP Detector(double minScale = 0.4, double maxScale = 5., int scales = 55, int rejCriteria = 1);
CV_WRAP virtual ~Detector();
cv::AlgorithmInfo* info() const;
CV_WRAP virtual bool load(const FileNode& fileNode);
CV_WRAP virtual void read(const FileNode& fileNode);
@@ -49,13 +49,13 @@ Implementation of soft (stageless) cascaded detector. ::
SoftCascadeDetector::SoftCascadeDetector
Detector::Detector
----------------------------------------
An empty cascade will be created.
.. ocv:function:: SoftCascadeDetector::SoftCascadeDetector(float minScale = 0.4f, float maxScale = 5.f, int scales = 55, int rejCriteria = 1)
.. ocv:function:: Detector::Detector(float minScale = 0.4f, float maxScale = 5.f, int scales = 55, int rejCriteria = 1)
.. ocv:pyfunction:: cv2.SoftCascadeDetector.SoftCascadeDetector(minScale[, maxScale[, scales[, rejCriteria]]]) -> cascade
.. ocv:pyfunction:: cv2.Detector.Detector(minScale[, maxScale[, scales[, rejCriteria]]]) -> cascade
:param minScale: a minimum scale relative to the original size of the image on which cascade will be applied.
@@ -67,35 +67,35 @@ An empty cascade will be created.
SoftCascadeDetector::~SoftCascadeDetector
Detector::~Detector
-----------------------------------------
Destructor for SoftCascadeDetector.
Destructor for Detector.
.. ocv:function:: SoftCascadeDetector::~SoftCascadeDetector()
.. ocv:function:: Detector::~Detector()
SoftCascadeDetector::load
Detector::load
--------------------------
Load cascade from FileNode.
.. ocv:function:: bool SoftCascadeDetector::load(const FileNode& fileNode)
.. ocv:function:: bool Detector::load(const FileNode& fileNode)
.. ocv:pyfunction:: cv2.SoftCascadeDetector.load(fileNode)
.. ocv:pyfunction:: cv2.Detector.load(fileNode)
:param fileNode: File node from which the soft cascade are read.
SoftCascadeDetector::detect
Detector::detect
---------------------------
Apply cascade to an input frame and return the vector of Detection objects.
.. ocv:function:: void SoftCascadeDetector::detect(InputArray image, InputArray rois, std::vector<Detection>& objects) const
.. ocv:function:: void Detector::detect(InputArray image, InputArray rois, std::vector<Detection>& objects) const
.. ocv:function:: void SoftCascadeDetector::detect(InputArray image, InputArray rois, OutputArray rects, OutputArray confs) const
.. ocv:function:: void Detector::detect(InputArray image, InputArray rois, OutputArray rects, OutputArray confs) const
.. ocv:pyfunction:: cv2.SoftCascadeDetector.detect(image, rois) -> (rects, confs)
.. ocv:pyfunction:: cv2.Detector.detect(image, rois) -> (rects, confs)
:param image: a frame on which detector will be applied.

View File

@@ -7,13 +7,13 @@ Soft Cascade Detector Training
--------------------------------------------
SoftCascadeOctave
Octave
-----------------
.. ocv:class:: SoftCascadeOctave
.. ocv:class:: Octave
Public interface for soft cascade training algorithm. ::
class CV_EXPORTS SoftCascadeOctave : public Algorithm
class CV_EXPORTS Octave : public Algorithm
{
public:
@@ -25,8 +25,8 @@ Public interface for soft cascade training algorithm. ::
// Originally proposed by L. Bourdev and J. Brandt
HEURISTIC = 4 };
virtual ~SoftCascadeOctave();
static cv::Ptr<SoftCascadeOctave> create(cv::Rect boundingBox, int npositives, int nnegatives, int logScale, int shrinkage);
virtual ~Octave();
static cv::Ptr<Octave> create(cv::Rect boundingBox, int npositives, int nnegatives, int logScale, int shrinkage);
virtual bool train(const Dataset* dataset, const FeaturePool* pool, int weaks, int treeDepth) = 0;
virtual void setRejectThresholds(OutputArray thresholds) = 0;
@@ -37,17 +37,17 @@ Public interface for soft cascade training algorithm. ::
SoftCascadeOctave::~SoftCascadeOctave
Octave::~Octave
---------------------------------------
Destructor for SoftCascadeOctave.
Destructor for Octave.
.. ocv:function:: SoftCascadeOctave::~SoftCascadeOctave()
.. ocv:function:: Octave::~Octave()
SoftCascadeOctave::train
Octave::train
------------------------
.. ocv:function:: bool SoftCascadeOctave::train(const Dataset* dataset, const FeaturePool* pool, int weaks, int treeDepth)
.. ocv:function:: bool Octave::train(const Dataset* dataset, const FeaturePool* pool, int weaks, int treeDepth)
:param dataset an object that allows communicate for training set.
@@ -59,19 +59,19 @@ SoftCascadeOctave::train
SoftCascadeOctave::setRejectThresholds
Octave::setRejectThresholds
--------------------------------------
.. ocv:function:: void SoftCascadeOctave::setRejectThresholds(OutputArray thresholds)
.. ocv:function:: void Octave::setRejectThresholds(OutputArray thresholds)
:param thresholds an output array of resulted rejection vector. Have same size as number of trained stages.
SoftCascadeOctave::write
Octave::write
------------------------
.. ocv:function:: void SoftCascadeOctave::train(cv::FileStorage &fs, const FeaturePool* pool, InputArray thresholds) const
.. ocv:function:: void SoftCascadeOctave::train( CvFileStorage* fs, string name) const
.. ocv:function:: void Octave::train(cv::FileStorage &fs, const FeaturePool* pool, InputArray thresholds) const
.. ocv:function:: void Octave::train( CvFileStorage* fs, string name) const
:param fs an output file storage to store trained detector.