mirror of
https://github.com/opencv/opencv.git
synced 2026-07-29 15:23:05 +04:00
3rd attempt to prepare patch with improved OpenCL kernels of CascadeClassifier.
This commit is contained in:
@@ -32,112 +32,6 @@ The following reference is for the detection part only. There is a separate appl
|
||||
.. [Lienhart02] Rainer Lienhart and Jochen Maydt. An Extended Set of Haar-like Features for Rapid Object Detection. IEEE ICIP 2002, Vol. 1, pp. 900-903, Sep. 2002. This paper, as well as the extended technical report, can be retrieved at http://www.multimedia-computing.de/mediawiki//images/5/52/MRL-TR-May02-revised-Dec02.pdf
|
||||
|
||||
|
||||
FeatureEvaluator
|
||||
----------------
|
||||
.. ocv:class:: FeatureEvaluator
|
||||
|
||||
Base class for computing feature values in cascade classifiers. ::
|
||||
|
||||
class CV_EXPORTS FeatureEvaluator
|
||||
{
|
||||
public:
|
||||
enum { HAAR = 0, LBP = 1 }; // supported feature types
|
||||
virtual ~FeatureEvaluator(); // destructor
|
||||
virtual bool read(const FileNode& node);
|
||||
virtual Ptr<FeatureEvaluator> clone() const;
|
||||
virtual int getFeatureType() const;
|
||||
|
||||
virtual bool setImage(const Mat& img, Size origWinSize);
|
||||
virtual bool setWindow(Point p);
|
||||
|
||||
virtual double calcOrd(int featureIdx) const;
|
||||
virtual int calcCat(int featureIdx) const;
|
||||
|
||||
static Ptr<FeatureEvaluator> create(int type);
|
||||
};
|
||||
|
||||
|
||||
FeatureEvaluator::read
|
||||
--------------------------
|
||||
Reads parameters of features from the ``FileStorage`` node.
|
||||
|
||||
.. ocv:function:: bool FeatureEvaluator::read(const FileNode& node)
|
||||
|
||||
:param node: File node from which the feature parameters are read.
|
||||
|
||||
|
||||
|
||||
FeatureEvaluator::clone
|
||||
---------------------------
|
||||
Returns a full copy of the feature evaluator.
|
||||
|
||||
.. ocv:function:: Ptr<FeatureEvaluator> FeatureEvaluator::clone() const
|
||||
|
||||
|
||||
|
||||
FeatureEvaluator::getFeatureType
|
||||
------------------------------------
|
||||
Returns the feature type (``HAAR`` or ``LBP`` for now).
|
||||
|
||||
.. ocv:function:: int FeatureEvaluator::getFeatureType() const
|
||||
|
||||
|
||||
FeatureEvaluator::setImage
|
||||
------------------------------
|
||||
Assigns an image to feature evaluator.
|
||||
|
||||
.. ocv:function:: bool FeatureEvaluator::setImage(InputArray img, Size origWinSize, Size sumSize)
|
||||
|
||||
:param img: Matrix of the type ``CV_8UC1`` containing an image where the features are computed.
|
||||
|
||||
:param origWinSize: Size of training images.
|
||||
|
||||
:param sumSize: The requested size of integral images (so if the integral image is smaller, it resides in the top-left corner of the larger image of requested size). Because the features are represented using offsets from the image origin, using the same sumSize for all scales helps to avoid constant readjustments of the features to different scales.
|
||||
|
||||
The method assigns an image, where the features will be computed, to the feature evaluator.
|
||||
|
||||
|
||||
|
||||
FeatureEvaluator::setWindow
|
||||
-------------------------------
|
||||
Assigns a window in the current image where the features will be computed.
|
||||
|
||||
.. ocv:function:: bool FeatureEvaluator::setWindow(Point p)
|
||||
|
||||
:param p: Upper left point of the window where the features are computed. Size of the window is equal to the size of training images.
|
||||
|
||||
FeatureEvaluator::calcOrd
|
||||
-----------------------------
|
||||
Computes the value of an ordered (numerical) feature.
|
||||
|
||||
.. ocv:function:: double FeatureEvaluator::calcOrd(int featureIdx) const
|
||||
|
||||
:param featureIdx: Index of the feature whose value is computed.
|
||||
|
||||
The function returns the computed value of an ordered feature.
|
||||
|
||||
|
||||
|
||||
FeatureEvaluator::calcCat
|
||||
-----------------------------
|
||||
Computes the value of a categorical feature.
|
||||
|
||||
.. ocv:function:: int FeatureEvaluator::calcCat(int featureIdx) const
|
||||
|
||||
:param featureIdx: Index of the feature whose value is computed.
|
||||
|
||||
The function returns the computed label of a categorical feature, which is the value from [0,... (number of categories - 1)].
|
||||
|
||||
|
||||
FeatureEvaluator::create
|
||||
----------------------------
|
||||
Constructs the feature evaluator.
|
||||
|
||||
.. ocv:function:: Ptr<FeatureEvaluator> FeatureEvaluator::create(int type)
|
||||
|
||||
:param type: Type of features evaluated by cascade (``HAAR`` or ``LBP`` for now).
|
||||
|
||||
|
||||
CascadeClassifier
|
||||
-----------------
|
||||
.. ocv:class:: CascadeClassifier
|
||||
|
||||
Reference in New Issue
Block a user