some more doc cleanup

This commit is contained in:
Vadim Pisarevsky 2011-03-03 07:29:55 +00:00
parent 4e6572acd9
commit f025e4739a
39 changed files with 1531 additions and 889 deletions

View File

@ -15,7 +15,19 @@ or
.. math::
s \vecthree{u}{v}{1} = \vecthreethree{f_x}{0}{c_x}{0}{f_y}{c_y}{0}{0}{1} \begin{bmatrix} r_{11} & r_{12} & r_{13} & t_1 \\ r_{21} & r_{22} & r_{23} & t_2 \\ r_{31} & r_{32} & r_{33} & t_3 \end{bmatrix} \begin{bmatrix} X \\ Y \\ Z \\ 1 \end{bmatrix}
s \vecthree{u}{v}{1} = \vecthreethree{f_x}{0}{c_x}{0}{f_y}{c_y}{0}{0}{1}
\begin{bmatrix}
r_{11} & r_{12} & r_{13} & t_1 \\
r_{21} & r_{22} & r_{23} & t_2 \\
r_{31} & r_{32} & r_{33} & t_3
\end{bmatrix}
\begin{bmatrix}
X \\
Y \\
Z \\
1
\end{bmatrix}
Where
:math:`(X, Y, Z)` are the coordinates of a 3D point in the world
@ -45,7 +57,13 @@ to the following (when
.. math::
\begin{array}{l} \vecthree{x}{y}{z} = R \vecthree{X}{Y}{Z} + t \\ x' = x/z \\ y' = y/z \\ u = f_x*x' + c_x \\ v = f_y*y' + c_y \end{array}
\begin{array}{l}
\vecthree{x}{y}{z} = R \vecthree{X}{Y}{Z} + t \\
x' = x/z \\
y' = y/z \\
u = f_x*x' + c_x \\
v = f_y*y' + c_y
\end{array}
Real lenses usually have some distortion, mostly
radial distortion and slight tangential distortion. So, the above model
@ -207,7 +225,7 @@ cv::composeRT
:param tvec3: The output translation vector of the superposition
:param d??d??: The optional output derivatives of ``rvec3`` or ``tvec3`` w.r.t. ``rvec?`` or ``tvec?``
:param d*d*: The optional output derivatives of ``rvec3`` or ``tvec3`` w.r.t. ``rvec?`` or ``tvec?``
The functions compute:
@ -1192,7 +1210,7 @@ The matrices, together with ``R1`` and ``R2`` , can then be passed to
Below is the screenshot from ``stereo_calib.cpp`` sample. Some red horizontal lines, as you can see, pass through the corresponding image regions, i.e. the images are well rectified (which is what most stereo correspondence algorithms rely on). The green rectangles are ``roi1`` and ``roi2`` - indeed, their interior are all valid pixels.
.. image:: ../../pics/stereo_undistort.jpg
.. image:: pics/stereo_undistort.jpg
.. index:: stereoRectifyUncalibrated

Binary file not shown.

After

Width:  |  Height:  |  Size: 120 KiB

View File

@ -455,16 +455,14 @@ Template class for short numerical vectors ::
typedef Vec<double, 3> Vec3d;
typedef Vec<double, 4> Vec4d;
typedef Vec<double, 6> Vec6d;
.. ``Vec`` is a partial case of ``Matx`` . It is possible to convert ``Vec<T,2>`` to/from ``Point_``,``Vec<T,3>`` to/from ``Point3_`` , and ``Vec<T,4>`` to
:ref:`CvScalar` or
:ref:`Scalar` . The elements of ``Vec`` are accessed using ``operator[]`` . All the expected vector operations are implemented too:
``Vec`` is a partial case of ``Matx`` . It is possible to convert ``Vec<T,2>`` to/from ``Point_``,``Vec<T,3>`` to/from ``Point3_`` , and ``Vec<T,4>`` to :ref:`CvScalar` or :ref:`Scalar`. The elements of ``Vec`` are accessed using ``operator[]``. All the expected vector operations are implemented too:
*
:math:`\texttt{v1} = \texttt{v2} \pm \texttt{v3}`, :math:`\texttt{v1} = \texttt{v2} * \alpha`, :math:`\texttt{v1} = \alpha * \texttt{v2}` (plus the corresponding augmenting operations; note that these operations apply
to the each computed vector component)
* ``v1 == v2, v1 != v2`` * ``norm(v1)`` (
:math:`L_2` -norm)
* ``v1 == v2, v1 != v2`` * ``norm(v1)`` (:math:`L_2`-norm)
The class ``Vec`` is commonly used to describe pixel types of multi-channel arrays, see ``Mat_`` description.
@ -742,10 +740,7 @@ There are many different ways to create ``Mat`` object. Here are the some popula
..
Thanks to the additional ``datastart`` and ``dataend`` members, it is possible to
compute the relative sub-array position in the main
*"container"*
array using ``locateROI()`` :
Thanks to the additional ``datastart`` and ``dataend`` members, it is possible to compute the relative sub-array position in the main *"container"* array using ``locateROI()``:
::
@ -792,17 +787,9 @@ There are many different ways to create ``Mat`` object. Here are the some popula
..
partial yet very common cases of this "user-allocated data" case are conversions
from
:ref:`CvMat` and
:ref:`IplImage` to ``Mat`` . For this purpose there are special constructors
taking pointers to ``CvMat`` or ``IplImage`` and the optional
flag indicating whether to copy the data or not.
partial yet very common cases of this "user-allocated data" case are conversions from :ref:`CvMat` and :ref:`IplImage` to ``Mat``. For this purpose there are special constructors taking pointers to ``CvMat`` or ``IplImage`` and the optional flag indicating whether to copy the data or not.
Backward conversion from ``Mat`` to ``CvMat`` or ``IplImage`` is provided via cast operators ``Mat::operator CvMat() const`` an ``Mat::operator IplImage()`` .
The operators do
*not*
copy the data.
Backward conversion from ``Mat`` to ``CvMat`` or ``IplImage`` is provided via cast operators ``Mat::operator CvMat() const`` an ``Mat::operator IplImage()``. The operators do *not* copy the data.
::
@ -915,11 +902,11 @@ for a scalar ( ``Scalar`` ),
:math:`A.t() \sim A^t` *
matrix inversion and pseudo-inversion, solving linear systems and least-squares problems:
:math:`A.inv([method]) \sim A^{-1}, A.inv([method])*B \sim X:\,AX=B` *
:math:`A.inv([method]) \sim A^{-1}, A.inv([method])*B \sim X:\,AX=B`
*
comparison:
:math:`A\gtreqqless B,\;A \ne B,\;A \gtreqqless \alpha,\;A \ne \alpha` .
The result of comparison is 8-bit single channel mask, which elements are set to 255
(if the particular element or pair of elements satisfy the condition) and 0 otherwise.
:math:`A\gtreqqless B,\;A \ne B,\;A \gtreqqless \alpha,\;A \ne \alpha`. The result of comparison is 8-bit single channel mask, which elements are set to 255 (if the particular element or pair of elements satisfy the condition) and 0 otherwise.
*
bitwise logical operations: ``A & B, A & s, A | B, A | s, A textasciicircum B, A textasciicircum s, ~ A`` *
@ -935,17 +922,12 @@ for a scalar ( ``Scalar`` ),
:func:`determinant`, :func:`repeat` etc.
*
matrix initializers ( ``eye(), zeros(), ones()`` ), matrix comma-separated initializers,
matrix constructors and operators that extract sub-matrices (see
:ref:`Mat` description).
matrix initializers ( ``eye(), zeros(), ones()`` ), matrix comma-separated initializers, matrix constructors and operators that extract sub-matrices (see :ref:`Mat` description).
*
verb
"Mat_<destination_type>()" constructors to cast the result to the proper type.
``Mat_<destination_type>()`` constructors to cast the result to the proper type.
Note, however, that comma-separated initializers and probably some other operations may require additional explicit ``Mat()`` or
verb
"Mat_<T>()" constuctor calls to resolve possible ambiguity.
Note, however, that comma-separated initializers and probably some other operations may require additional explicit ``Mat()`` or ``Mat_<T>()`` constuctor calls to resolve possible ambiguity.
Below is the formal description of the ``Mat`` methods.
@ -2410,8 +2392,8 @@ Template sparse n-dimensional array class derived from
SparseMatIterator_<_Tp> end();
SparseMatConstIterator_<_Tp> end() const;
};
.. ``SparseMat_`` is a thin wrapper on top of
:ref:`SparseMat` , made in the same way as ``Mat_`` .
``SparseMat_`` is a thin wrapper on top of :ref:`SparseMat` , made in the same way as ``Mat_`` .
It simplifies notation of some operations, and that's it. ::
int sz[] = {10, 20, 30};

View File

@ -116,7 +116,7 @@ explains the meaning of the parameters.
Parameters of Elliptic Arc
.. image:: ../../pics/ellipse.png
.. image:: pics/ellipse.png
.. index:: ellipse2Poly

View File

@ -133,7 +133,6 @@ Here is the example: ::
}
return 0;
}
..
The array ``frame`` is automatically allocated by ``>>`` operator, since the video frame resolution and bit-depth is known to the video capturing module. The array ``edges`` is automatically allocated by ``cvtColor`` function. It will have the same size and the bit-depth as the input array, and the number of channels will be 1, because we passed the color conversion code ``CV_BGR2GRAY`` (that means color to grayscale conversion). Note that ``frame`` and ``edges`` will be allocated only once during the first execution of the loop body, since all the next video frames will have the same resolution (unless user somehow changes the video resolution, in this case the arrays will be automatically reallocated).

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

View File

@ -112,7 +112,6 @@ The macro ``CV_Error_`` can be used to construct the error message on-fly to inc
CV_Error_(CV_StsOutOfRange,
("the matrix element (
i, j, mtx.at<float>(i,j)))
..
.. index:: Exception
@ -145,7 +144,6 @@ The exception class passed to error ::
// the source file line where the error happened
int line;
};
..
The class ``Exception`` encapsulates all or almost all the necessary information about the error happened in the program. The exception is usually constructed and thrown implicitly, via ``CV_Error`` and ``CV_Error_`` macros, see
:func:`error` .
@ -241,7 +239,6 @@ That is, the following code computes the execution time in seconds. ::
double t = (double)getTickCount();
// do something ...
t = ((double)getTickCount() - t)/getTickFrequency();
..
.. index:: setNumThreads

View File

@ -65,7 +65,6 @@ The XML/YAML file storage class ::
vector<char> structs;
int state;
};
..
.. index:: FileNode
@ -116,7 +115,6 @@ The XML/YAML file node class ::
const CvFileStorage* fs;
const CvFileNode* node;
};
..
.. index:: FileNodeIterator
@ -153,5 +151,6 @@ The XML/YAML file node iterator class ::
CvSeqReader reader;
size_t remaining;
};
..

View File

@ -11,8 +11,6 @@ descriptor extractors inherit
.. index:: DescriptorExtractor
.. _DescriptorExtractor:
DescriptorExtractor
-------------------
.. c:type:: DescriptorExtractor
@ -40,7 +38,7 @@ Abstract base class for computing descriptors for image keypoints. ::
protected:
...
};
..
In this interface we assume a keypoint descriptor can be represented as a
dense, fixed-dimensional vector of some basic type. Most descriptors used
@ -55,8 +53,7 @@ DescriptorExtractor::compute
--------------------------------
.. c:function:: void DescriptorExtractor::compute( const Mat\& image, vector<KeyPoint>\& keypoints, Mat\& descriptors ) const
Compute the descriptors for a set of keypoints detected in an image (first variant)
or image set (second variant).
Compute the descriptors for a set of keypoints detected in an image (first variant) or image set (second variant).
:param image: The image.
@ -102,25 +99,22 @@ DescriptorExtractor::create
:func:`DescriptorExtractor`
.. c:function:: Ptr<DescriptorExtractor> DescriptorExtractor::create( const string\& descriptorExtractorType )
Descriptor extractor factory that creates of given type with
default parameters (rather using default constructor).
Descriptor extractor factory that creates of given type with default parameters (rather using default constructor).
:param descriptorExtractorType: Descriptor extractor type.
Now the following descriptor extractor types are supported:
\ ``"SIFT"`` --
:func:`SiftFeatureDetector`,\ ``"SURF"`` --
:func:`SurfFeatureDetector`,\ ``"BRIEF"`` --
:func:`BriefFeatureDetector` .
\
* ``"SIFT"`` -- :func:`SiftFeatureDetector`,
* ``"SURF"`` -- :func:`SurfFeatureDetector`,
* ``"BRIEF"`` -- :func:`BriefFeatureDetector` .
Also combined format is supported: descriptor extractor adapter name ( ``"Opponent"`` --
:func:`OpponentColorDescriptorExtractor` ) + descriptor extractor name (see above),
e.g. ``"OpponentSIFT"`` , etc.
.. index:: SiftDescriptorExtractor
.. _SiftDescriptorExtractor:
SiftDescriptorExtractor
-----------------------
.. c:type:: SiftDescriptorExtractor
@ -147,12 +141,10 @@ Wrapping class for descriptors computing using
protected:
...
}
..
.. index:: SurfDescriptorExtractor
.. _SurfDescriptorExtractor:
SurfDescriptorExtractor
-----------------------
.. c:type:: SurfDescriptorExtractor
@ -173,12 +165,10 @@ Wrapping class for descriptors computing using
protected:
...
}
..
.. index:: CalonderDescriptorExtractor
.. _CalonderDescriptorExtractor:
CalonderDescriptorExtractor
---------------------------
.. c:type:: CalonderDescriptorExtractor
@ -199,7 +189,7 @@ Wrapping class for descriptors computing using
protected:
...
}
..
.. index:: OpponentColorDescriptorExtractor
@ -227,7 +217,7 @@ them into a single color descriptor. ::
protected:
...
};
..
.. index:: BriefDescriptorExtractor
@ -257,5 +247,5 @@ Strecha C., Fua P.: ''BRIEF: Binary Robust Independent Elementary Features.''
protected:
...
};
..

View File

@ -40,7 +40,7 @@ train descriptor index, train image index and distance between descriptors. ::
// less is better
bool operator<( const DMatch &m ) const;
};
..
.. index:: DescriptorMatcher
@ -102,16 +102,15 @@ with image set. ::
vector<Mat> trainDescCollection;
...
};
..
.. index:: DescriptorMatcher::add
DescriptorMatcher::add
-------------------------- ````
--------------------------
.. c:function:: void add( const vector<Mat>\& descriptors )
Add descriptors to train descriptor collection. If collection trainDescCollectionis not empty
the new descriptors are added to existing train descriptors.
Add descriptors to train descriptor collection. If collection trainDescCollectionis not empty the new descriptors are added to existing train descriptors.
:param descriptors: Descriptors to add. Each ``descriptors[i]`` is a set of descriptors
from the same (one) train image.
@ -119,7 +118,7 @@ the new descriptors are added to existing train descriptors.
.. index:: DescriptorMatcher::getTrainDescriptors
DescriptorMatcher::getTrainDescriptors
------------------------------------------ ````
------------------------------------------
.. c:function:: const vector<Mat>\& getTrainDescriptors() const
Returns constant link to the train descriptor collection (i.e. trainDescCollection).
@ -154,23 +153,15 @@ DescriptorMatcher::train
----------------------------
.. c:function:: void DescriptorMatcher::train()
Train descriptor matcher (e.g. train flann index). In all methods to match the method train()
is run every time before matching. Some descriptor matchers (e.g. BruteForceMatcher) have empty
implementation of this method, other matchers realy train their inner structures (e.g. FlannBasedMatcher
trains flann::Index)
Train descriptor matcher (e.g. train flann index). In all methods to match the method train() is run every time before matching. Some descriptor matchers (e.g. BruteForceMatcher) have empty implementation of this method, other matchers realy train their inner structures (e.g. FlannBasedMatcher trains flann::Index)
.. index:: DescriptorMatcher::match
DescriptorMatcher::match
---------------------------- ```` ```` ```` ````
----------------------------
.. c:function:: void DescriptorMatcher::match( const Mat\& queryDescriptors, const Mat\& trainDescriptors, vector<DMatch>\& matches, const Mat\& mask=Mat() ) const
Find the best match for each descriptor from a query set with train descriptors.
Supposed that the query descriptors are of keypoints detected on the same query image.
In first variant of this method train descriptors are set as input argument and
supposed that they are of keypoints detected on the same train image. In second variant
of the method train descriptors collection that was set using addmethod is used.
Optional mask (or masks) can be set to describe which descriptors can be matched. queryDescriptors[i]can be matched with trainDescriptors[j]only if mask.at<uchar>(i,j)is non-zero.
Find the best match for each descriptor from a query set with train descriptors. Supposed that the query descriptors are of keypoints detected on the same query image. In first variant of this method train descriptors are set as input argument and supposed that they are of keypoints detected on the same train image. In second variant of the method train descriptors collection that was set using addmethod is used. Optional mask (or masks) can be set to describe which descriptors can be matched. queryDescriptors[i] can be matched with trainDescriptors[j] only if mask.at<uchar>(i,j)is non-zero.
.. c:function:: void DescriptorMatcher::match( const Mat\& queryDescriptors, vector<DMatch>\& matches, const vector<Mat>\& masks=vector<Mat>() )
@ -194,9 +185,7 @@ DescriptorMatcher::knnMatch
:func:`DescriptorMatcher::match`
.. c:function:: void DescriptorMatcher::knnMatch( const Mat\& queryDescriptors, const Mat\& trainDescriptors, vector<vector<DMatch> >\& matches, int k, const Mat\& mask=Mat(), bool compactResult=false ) const
Find the k best matches for each descriptor from a query set with train descriptors.
Found k (or less if not possible) matches are returned in distance increasing order.
Details about query and train descriptors see in .
Find the k best matches for each descriptor from a query set with train descriptors. Found k (or less if not possible) matches are returned in distance increasing order. Details about query and train descriptors see in .
.. c:function:: void DescriptorMatcher::knnMatch( const Mat\& queryDescriptors, vector<vector<DMatch> >\& matches, int k, const vector<Mat>\& masks=vector<Mat>(), bool compactResult=false )
@ -215,9 +204,7 @@ DescriptorMatcher::radiusMatch
:func:`DescriptorMatcher::match`
.. c:function:: void DescriptorMatcher::radiusMatch( const Mat\& queryDescriptors, const Mat\& trainDescriptors, vector<vector<DMatch> >\& matches, float maxDistance, const Mat\& mask=Mat(), bool compactResult=false ) const
Find the best matches for each query descriptor which have distance less than given threshold.
Found matches are returned in distance increasing order. Details about query and train
descriptors see in .
Find the best matches for each query descriptor which have distance less than given threshold. Found matches are returned in distance increasing order. Details about query and train descriptors see in.
.. c:function:: void DescriptorMatcher::radiusMatch( const Mat\& queryDescriptors, vector<vector<DMatch> >\& matches, float maxDistance, const vector<Mat>\& masks=vector<Mat>(), bool compactResult=false )
@ -246,8 +233,7 @@ DescriptorMatcher::create
:func:`DescriptorMatcher`
.. c:function:: Ptr<DescriptorMatcher> DescriptorMatcher::create( const string\& descriptorMatcherType )
Descriptor matcher factory that creates of
given type with default parameters (rather using default constructor).
Descriptor matcher factory that creates of given type with default parameters (rather using default constructor).
:param descriptorMatcherType: Descriptor matcher type.
@ -261,9 +247,7 @@ BruteForceMatcher
-----------------
.. c:type:: BruteForceMatcher
Brute-force descriptor matcher. For each descriptor in the first set, this matcher finds the closest
descriptor in the second set by trying each one. This descriptor matcher supports masking
permissible matches between descriptor sets. ::
Brute-force descriptor matcher. For each descriptor in the first set, this matcher finds the closest descriptor in the second set by trying each one. This descriptor matcher supports masking permissible matches between descriptor sets. ::
template<class Distance>
class BruteForceMatcher : public DescriptorMatcher
@ -277,10 +261,9 @@ permissible matches between descriptor sets. ::
protected:
...
}
..
For efficiency, BruteForceMatcher is templated on the distance metric.
For float descriptors, a common choice would be ``L2<float>`` . Class of supported distances are: ::
For efficiency, BruteForceMatcher is templated on the distance metric. For float descriptors, a common choice would be ``L2<float>``. Class of supported distances are: ::
template<typename T>
struct Accumulator
@ -340,7 +323,7 @@ For float descriptors, a common choice would be ``L2<float>`` . Class of support
int size ) const;
...
};
..
.. index:: FlannBasedMatcher
@ -350,14 +333,7 @@ FlannBasedMatcher
-----------------
.. c:type:: FlannBasedMatcher
Flann based descriptor matcher. This matcher trains
:func:`flann::Index` on
train descriptor collection and calls it's nearest search methods to find best matches.
So this matcher may be faster in cases of matching to large train collection than
brute force matcher. ``FlannBasedMatcher`` does not support masking permissible
matches between descriptor sets, because
:func:`flann::Index` does not
support this. ::
Flann based descriptor matcher. This matcher trains :func:`flann::Index` on train descriptor collection and calls it's nearest search methods to find best matches. So this matcher may be faster in cases of matching to large train collection than brute force matcher. ``FlannBasedMatcher`` does not support masking permissible matches between descriptor sets, because :func:`flann::Index` does not support this. ::
class FlannBasedMatcher : public DescriptorMatcher
{
@ -376,5 +352,6 @@ support this. ::
protected:
...
};
..

View File

@ -10,13 +10,13 @@ inherit
.. index:: KeyPoint
.. _KeyPoint:
.. KeyPoint:
KeyPoint
--------
.. c:type:: KeyPoint
Data structure for salient point detectors. ::
Data structure for salient point detectors. ::
class KeyPoint
{
@ -65,7 +65,7 @@ Data structure for salient point detectors. ::
void write(FileStorage& fs, const string& name, const vector<KeyPoint>& keypoints);
// reads vector of keypoints from the specified file storage node
void read(const FileNode& node, CV_OUT vector<KeyPoint>& keypoints);
..
.. index:: FeatureDetector
@ -97,7 +97,7 @@ Abstract base class for 2D image feature detectors. ::
protected:
...
};
..
.. index:: FeatureDetector::detect
@ -150,8 +150,7 @@ FeatureDetector::create
:func:`FeatureDetector`
.. c:function:: Ptr<FeatureDetector> FeatureDetector::create( const string\& detectorType )
Feature detector factory that creates of given type with
default parameters (rather using default constructor).
Feature detector factory that creates of given type with default parameters (rather using default constructor).
:param detectorType: Feature detector type.
@ -190,7 +189,7 @@ Wrapping class for feature detection using
protected:
...
};
..
.. index:: GoodFeaturesToTrackDetector
@ -233,7 +232,7 @@ Wrapping class for feature detection using
protected:
...
};
..
.. index:: MserFeatureDetector
@ -259,7 +258,7 @@ Wrapping class for feature detection using
protected:
...
};
..
.. index:: StarFeatureDetector
@ -283,7 +282,7 @@ Wrapping class for feature detection using
protected:
...
};
..
.. index:: SiftFeatureDetector
@ -312,7 +311,7 @@ Wrapping class for feature detection using
protected:
...
};
..
.. index:: SurfFeatureDetector
@ -335,7 +334,7 @@ Wrapping class for feature detection using
protected:
...
};
..
.. index:: GridAdaptedFeatureDetector
@ -345,8 +344,7 @@ GridAdaptedFeatureDetector
--------------------------
.. c:type:: GridAdaptedFeatureDetector
Adapts a detector to partition the source image into a grid and detect
points in each cell. ::
Adapts a detector to partition the source image into a grid and detect points in each cell. ::
class GridAdaptedFeatureDetector : public FeatureDetector
{
@ -366,7 +364,7 @@ points in each cell. ::
protected:
...
};
..
.. index:: PyramidAdaptedFeatureDetector
@ -376,8 +374,7 @@ PyramidAdaptedFeatureDetector
-----------------------------
.. c:type:: PyramidAdaptedFeatureDetector
Adapts a detector to detect points over multiple levels of a Gaussian
pyramid. Useful for detectors that are not inherently scaled. ::
Adapts a detector to detect points over multiple levels of a Gaussian pyramid. Useful for detectors that are not inherently scaled. ::
class PyramidAdaptedFeatureDetector : public FeatureDetector
{
@ -389,18 +386,24 @@ pyramid. Useful for detectors that are not inherently scaled. ::
protected:
...
};
..
.. index:: DynamicAdaptedFeatureDetector
.. _DynamicAdaptedFeatureDetector:
DynamicAdaptedFeatureDetector
-----------------------------
.. c:type:: DynamicAdaptedFeatureDetector
An adaptively adjusting detector that iteratively detects until the desired number
of features are found.
An adaptively adjusting detector that iteratively detects until the desired number of features are found. ::
class DynamicAdaptedFeatureDetector: public FeatureDetector
{
public:
DynamicAdaptedFeatureDetector( const Ptr<AdjusterAdapter>& adjaster,
int min_features=400, int max_features=500, int max_iters=5 );
...
};
If the detector is persisted, it will "remember" the parameters
used on the last detection. In this way, the detector may be used for consistent numbers
@ -429,16 +432,7 @@ Here is a sample of how to create a DynamicAdaptedFeatureDetector. ::
//number of keypoints are found
Ptr<FeatureDetector> detector(new DynamicAdaptedFeatureDetector (100, 110, 10,
new FastAdjuster(20,true)));
.. ::
class DynamicAdaptedFeatureDetector: public FeatureDetector
{
public:
DynamicAdaptedFeatureDetector( const Ptr<AdjusterAdapter>& adjaster,
int min_features=400, int max_features=500, int max_iters=5 );
...
};
..
.. index:: DynamicAdaptedFeatureDetector::DynamicAdaptedFeatureDetector
@ -460,28 +454,26 @@ DynamicAdaptedFeatureDetector::DynamicAdaptedFeatureDetector
.. index:: AdjusterAdapter
.. _AdjusterAdapter:
AdjusterAdapter
---------------
.. c:type:: AdjusterAdapter
A feature detector parameter adjuster interface, this is used by the
:func:`DynamicAdaptedFeatureDetector` and is a wrapper for
:func:`FeatureDetecto` r that allow them to be adjusted after a detection.
A feature detector parameter adjuster interface, this is used by the :func:`DynamicAdaptedFeatureDetector` and is a wrapper for :func:`FeatureDetecto` r that allow them to be adjusted after a detection. ::
class AdjusterAdapter: public FeatureDetector
{
public:
virtual ~AdjusterAdapter() {}
virtual void tooFew(int min, int n_detected) = 0;
virtual void tooMany(int max, int n_detected) = 0;
virtual bool good() const = 0;
};
See
:func:`FastAdjuster`,:func:`StarAdjuster`,:func:`SurfAdjuster` for concrete implementations. ::
:func:`FastAdjuster`,:func:`StarAdjuster`,:func:`SurfAdjuster` for concrete implementations.
class AdjusterAdapter: public FeatureDetector
{
public:
virtual ~AdjusterAdapter() {}
virtual void tooFew(int min, int n_detected) = 0;
virtual void tooMany(int max, int n_detected) = 0;
virtual bool good() const = 0;
};
..
.. index:: AdjusterAdapter::tooFew
@ -489,8 +481,7 @@ AdjusterAdapter::tooFew
---------------------------
.. c:function:: virtual void tooFew(int min, int n_detected) = 0
Too few features were detected so, adjust the detector parameters accordingly - so that the next
detection detects more features.
Too few features were detected so, adjust the detector parameters accordingly - so that the next detection detects more features.
:param min: This minimum desired number features.
@ -502,7 +493,7 @@ An example implementation of this is ::
{
thresh_--;
}
..
.. index:: AdjusterAdapter::tooMany
@ -510,8 +501,7 @@ AdjusterAdapter::tooMany
----------------------------
.. c:function:: virtual void tooMany(int max, int n_detected) = 0
Too many features were detected so, adjust the detector parameters accordingly - so that the next
detection detects less features.
Too many features were detected so, adjust the detector parameters accordingly - so that the next detection detects less features.
:param max: This maximum desired number features.
@ -523,7 +513,7 @@ An example implementation of this is ::
{
thresh_++;
}
..
.. index:: AdjusterAdapter::good
@ -531,28 +521,504 @@ AdjusterAdapter::good
-------------------------
.. c:function:: virtual bool good() const = 0
Are params maxed out or still valid? Returns false if the parameters can't be adjusted any more.
Are params maxed out or still valid? Returns false if the parameters can't be adjusted any more. An example implementation of this is ::
bool FastAdjuster::good() const
{
return (thresh_ > 1) && (thresh_ < 200);
}
.. index:: FastAdjuster
FastAdjuster
------------
.. c:type:: FastAdjuster
:func:`AdjusterAdapter` for the :func:`FastFeatureDetector`. This will basically decrement or increment the threshhold by 1 ::
class FastAdjuster FastAdjuster: public AdjusterAdapter
{
public:
FastAdjuster(int init_thresh = 20, bool nonmax = true);
...
};
.. index:: StarAdjuster
StarAdjuster
------------
.. c:type:: StarAdjuster
:func:`AdjusterAdapter` for the :func:`StarFeatureDetector` . This adjusts the responseThreshhold of StarFeatureDetector. ::
class StarAdjuster: public AdjusterAdapter
{
StarAdjuster(double initial_thresh = 30.0);
...
};
.. index:: SurfAdjuster
SurfAdjuster
------------
.. c:type:: SurfAdjuster
:func:`AdjusterAdapter` for the :func:`SurfFeatureDetector` . This adjusts the hessianThreshold of SurfFeatureDetector. ::
class SurfAdjuster: public SurfAdjuster
{
SurfAdjuster();
...
};
.. index:: FeatureDetector
FeatureDetector
---------------
.. c:type:: FeatureDetector
Abstract base class for 2D image feature detectors. ::
class CV_EXPORTS FeatureDetector
{
public:
virtual ~FeatureDetector();
void detect( const Mat& image, vector<KeyPoint>& keypoints,
const Mat& mask=Mat() ) const;
void detect( const vector<Mat>& images,
vector<vector<KeyPoint> >& keypoints,
const vector<Mat>& masks=vector<Mat>() ) const;
virtual void read(const FileNode&);
virtual void write(FileStorage&) const;
static Ptr<FeatureDetector> create( const string& detectorType );
protected:
...
};
.. index:: FeatureDetector::detect
FeatureDetector::detect
---------------------------
.. c:function:: void FeatureDetector::detect( const Mat\& image, vector<KeyPoint>\& keypoints, const Mat\& mask=Mat() ) const
Detect keypoints in an image (first variant) or image set (second variant).
:param image: The image.
:param keypoints: The detected keypoints.
:param mask: Mask specifying where to look for keypoints (optional). Must be a char matrix
with non-zero values in the region of interest.
.. c:function:: void FeatureDetector::detect( const vector<Mat>\& images, vector<vector<KeyPoint> >\& keypoints, const vector<Mat>\& masks=vector<Mat>() ) const
* **images** Images set.
* **keypoints** Collection of keypoints detected in an input images. keypoints[i] is a set of keypoints detected in an images[i].
* **masks** Masks for each input image specifying where to look for keypoints (optional). masks[i] is a mask for images[i].
Each element of ``masks`` vector must be a char matrix with non-zero values in the region of interest.
.. index:: FeatureDetector::read
FeatureDetector::read
-------------------------
.. c:function:: void FeatureDetector::read( const FileNode\& fn )
Read feature detector object from file node.
:param fn: File node from which detector will be read.
.. index:: FeatureDetector::write
FeatureDetector::write
--------------------------
.. c:function:: void FeatureDetector::write( FileStorage\& fs ) const
Write feature detector object to file storage.
:param fs: File storage in which detector will be written.
.. index:: FeatureDetector::create
FeatureDetector::create
---------------------------
:func:`FeatureDetector`
.. c:function:: Ptr<FeatureDetector> FeatureDetector::create( const string\& detectorType )
Feature detector factory that creates of given type with default parameters (rather using default constructor).
:param detectorType: Feature detector type.
Now the following detector types are supported:
* ``"FAST"`` -- :func:`FastFeatureDetector`,
* ``"STAR"`` -- :func:`StarFeatureDetector`,
* ``"SIFT"`` -- :func:`SiftFeatureDetector`,
* ``"SURF"`` -- :func:`SurfFeatureDetector`,
* ``"MSER"`` -- :func:`MserFeatureDetector`,
* ``"GFTT"`` -- :func:`GfttFeatureDetector`,
* ``"HARRIS"`` -- :func:`HarrisFeatureDetector` .
Also combined format is supported: feature detector adapter name ( ``"Grid"`` --
:func:`GridAdaptedFeatureDetector`,``"Pyramid"`` --
:func:`PyramidAdaptedFeatureDetector` ) + feature detector name (see above),
e.g. ``"GridFAST"``,``"PyramidSTAR"`` , etc.
.. index:: FastFeatureDetector
FastFeatureDetector
-------------------
.. c:type:: FastFeatureDetector
Wrapping class for feature detection using
:func:`FAST` method. ::
class FastFeatureDetector : public FeatureDetector
{
public:
FastFeatureDetector( int threshold=1, bool nonmaxSuppression=true );
virtual void read( const FileNode& fn );
virtual void write( FileStorage& fs ) const;
protected:
...
};
.. index:: GoodFeaturesToTrackDetector
GoodFeaturesToTrackDetector
---------------------------
.. c:type:: GoodFeaturesToTrackDetector
Wrapping class for feature detection using :func:`goodFeaturesToTrack` function. ::
class GoodFeaturesToTrackDetector : public FeatureDetector
{
public:
class Params
{
public:
Params( int maxCorners=1000, double qualityLevel=0.01,
double minDistance=1., int blockSize=3,
bool useHarrisDetector=false, double k=0.04 );
void read( const FileNode& fn );
void write( FileStorage& fs ) const;
int maxCorners;
double qualityLevel;
double minDistance;
int blockSize;
bool useHarrisDetector;
double k;
};
GoodFeaturesToTrackDetector( const GoodFeaturesToTrackDetector::Params& params=
GoodFeaturesToTrackDetector::Params() );
GoodFeaturesToTrackDetector( int maxCorners, double qualityLevel,
double minDistance, int blockSize=3,
bool useHarrisDetector=false, double k=0.04 );
virtual void read( const FileNode& fn );
virtual void write( FileStorage& fs ) const;
protected:
...
};
.. index:: MserFeatureDetector
MserFeatureDetector
-------------------
.. c:type:: MserFeatureDetector
Wrapping class for feature detection using :func:`MSER` class. ::
class MserFeatureDetector : public FeatureDetector
{
public:
MserFeatureDetector( CvMSERParams params=cvMSERParams() );
MserFeatureDetector( int delta, int minArea, int maxArea,
double maxVariation, double minDiversity,
int maxEvolution, double areaThreshold,
double minMargin, int edgeBlurSize );
virtual void read( const FileNode& fn );
virtual void write( FileStorage& fs ) const;
protected:
...
};
.. index:: StarFeatureDetector
StarFeatureDetector
-------------------
.. c:type:: StarFeatureDetector
Wrapping class for feature detection using :func:`StarDetector` class. ::
class StarFeatureDetector : public FeatureDetector
{
public:
StarFeatureDetector( int maxSize=16, int responseThreshold=30,
int lineThresholdProjected = 10,
int lineThresholdBinarized=8, int suppressNonmaxSize=5 );
virtual void read( const FileNode& fn );
virtual void write( FileStorage& fs ) const;
protected:
...
};
.. index:: SiftFeatureDetector
SiftFeatureDetector
-------------------
.. c:type:: SiftFeatureDetector
Wrapping class for feature detection using :func:`SIFT` class. ::
class SiftFeatureDetector : public FeatureDetector
{
public:
SiftFeatureDetector(
const SIFT::DetectorParams& detectorParams=SIFT::DetectorParams(),
const SIFT::CommonParams& commonParams=SIFT::CommonParams() );
SiftFeatureDetector( double threshold, double edgeThreshold,
int nOctaves=SIFT::CommonParams::DEFAULT_NOCTAVES,
int nOctaveLayers=SIFT::CommonParams::DEFAULT_NOCTAVE_LAYERS,
int firstOctave=SIFT::CommonParams::DEFAULT_FIRST_OCTAVE,
int angleMode=SIFT::CommonParams::FIRST_ANGLE );
virtual void read( const FileNode& fn );
virtual void write( FileStorage& fs ) const;
protected:
...
};
.. index:: SurfFeatureDetector
SurfFeatureDetector
-------------------
.. c:type:: SurfFeatureDetector
Wrapping class for feature detection using :func:`SURF` class. ::
class SurfFeatureDetector : public FeatureDetector
{
public:
SurfFeatureDetector( double hessianThreshold = 400., int octaves = 3,
int octaveLayers = 4 );
virtual void read( const FileNode& fn );
virtual void write( FileStorage& fs ) const;
protected:
...
};
.. index:: GridAdaptedFeatureDetector
GridAdaptedFeatureDetector
--------------------------
.. c:type:: GridAdaptedFeatureDetector
Adapts a detector to partition the source image into a grid and detect points in each cell. ::
class GridAdaptedFeatureDetector : public FeatureDetector
{
public:
/*
* detector Detector that will be adapted.
* maxTotalKeypoints Maximum count of keypoints detected on the image.
* Only the strongest keypoints will be keeped.
* gridRows Grid rows count.
* gridCols Grid column count.
*/
GridAdaptedFeatureDetector( const Ptr<FeatureDetector>& detector,
int maxTotalKeypoints, int gridRows=4,
int gridCols=4 );
virtual void read( const FileNode& fn );
virtual void write( FileStorage& fs ) const;
protected:
...
};
.. index:: PyramidAdaptedFeatureDetector
PyramidAdaptedFeatureDetector
-----------------------------
.. c:type:: PyramidAdaptedFeatureDetector
Adapts a detector to detect points over multiple levels of a Gaussian pyramid. Useful for detectors that are not inherently scaled. ::
class PyramidAdaptedFeatureDetector : public FeatureDetector
{
public:
PyramidAdaptedFeatureDetector( const Ptr<FeatureDetector>& detector,
int levels=2 );
virtual void read( const FileNode& fn );
virtual void write( FileStorage& fs ) const;
protected:
...
};
.. index:: DynamicAdaptedFeatureDetector
DynamicAdaptedFeatureDetector
-----------------------------
.. c:type:: DynamicAdaptedFeatureDetector
An adaptively adjusting detector that iteratively detects until the desired number of features are found. ::
class DynamicAdaptedFeatureDetector: public FeatureDetector
{
public:
DynamicAdaptedFeatureDetector( const Ptr<AdjusterAdapter>& adjaster,
int min_features=400, int max_features=500, int max_iters=5 );
...
};
If the detector is persisted, it will "remember" the parameters
used on the last detection. In this way, the detector may be used for consistent numbers
of keypoints in a sets of images that are temporally related such as video streams or
panorama series.
The DynamicAdaptedFeatureDetector uses another detector such as FAST or SURF to do the dirty work,
with the help of an AdjusterAdapter.
After a detection, and an unsatisfactory number of features are detected,
the AdjusterAdapter will adjust the detection parameters so that the next detection will
result in more or less features. This is repeated until either the number of desired features are found
or the parameters are maxed out.
Adapters can easily be implemented for any detector via the
AdjusterAdapter interface.
Beware that this is not thread safe - as the adjustment of parameters breaks the const
of the detection routine...
Here is a sample of how to create a DynamicAdaptedFeatureDetector. ::
//sample usage:
//will create a detector that attempts to find
//100 - 110 FAST Keypoints, and will at most run
//FAST feature detection 10 times until that
//number of keypoints are found
Ptr<FeatureDetector> detector(new DynamicAdaptedFeatureDetector (100, 110, 10,
new FastAdjuster(20,true)));
.. index:: DynamicAdaptedFeatureDetector::DynamicAdaptedFeatureDetector
DynamicAdaptedFeatureDetector::DynamicAdaptedFeatureDetector
----------------------------------------------------------------
.. c:function:: DynamicAdaptedFeatureDetector::DynamicAdaptedFeatureDetector( const Ptr<AdjusterAdapter>\& adjaster, int min_features, int max_features, int max_iters )
DynamicAdaptedFeatureDetector constructor.
:param adjaster: An :func:`AdjusterAdapter` that will do the detection and parameter
adjustment
:param min_features: This minimum desired number features.
:param max_features: The maximum desired number of features.
:param max_iters: The maximum number of times to try to adjust the feature detector parameters. For the :func:`FastAdjuster` this number can be high,
but with Star or Surf, many iterations can get time consuming. At each iteration the detector is rerun, so keep this in mind when choosing this value.
.. index:: AdjusterAdapter
AdjusterAdapter
---------------
.. c:type:: AdjusterAdapter
A feature detector parameter adjuster interface, this is used by the :func:`DynamicAdaptedFeatureDetector` and is a wrapper for :func:`FeatureDetecto` r that allow them to be adjusted after a detection. ::
class AdjusterAdapter: public FeatureDetector
{
public:
virtual ~AdjusterAdapter() {}
virtual void tooFew(int min, int n_detected) = 0;
virtual void tooMany(int max, int n_detected) = 0;
virtual bool good() const = 0;
};
See
:func:`FastAdjuster`,:func:`StarAdjuster`,:func:`SurfAdjuster` for concrete implementations.
.. index:: AdjusterAdapter::tooFew
AdjusterAdapter::tooFew
---------------------------
.. c:function:: virtual void tooFew(int min, int n_detected) = 0
Too few features were detected so, adjust the detector parameters accordingly - so that the next detection detects more features.
:param min: This minimum desired number features.
:param n_detected: The actual number detected last run.
An example implementation of this is ::
void FastAdjuster::tooFew(int min, int n_detected)
{
thresh_--;
}
.. index:: AdjusterAdapter::tooMany
AdjusterAdapter::tooMany
----------------------------
.. c:function:: virtual void tooMany(int max, int n_detected) = 0
Too many features were detected so, adjust the detector parameters accordingly - so that the next detection detects less features.
:param max: This maximum desired number features.
:param n_detected: The actual number detected last run.
An example implementation of this is ::
void FastAdjuster::tooMany(int min, int n_detected)
{
thresh_++;
}
.. index:: AdjusterAdapter::good
AdjusterAdapter::good
-------------------------
.. c:function:: virtual bool good() const = 0
Are params maxed out or still valid? Returns false if the parameters can't be adjusted any more. An example implementation of this is ::
bool FastAdjuster::good() const
{
return (thresh_ > 1) && (thresh_ < 200);
}
..
.. index:: FastAdjuster
.. _FastAdjuster:
FastAdjuster
------------
.. c:type:: FastAdjuster
An
:func:`AdjusterAdapter` for the
:func:`FastFeatureDetector` . This will basically decrement or increment the
threshhold by 1 ::
:func:`AdjusterAdapter` for the :func:`FastFeatureDetector`. This will basically decrement or increment the threshhold by 1 ::
class FastAdjuster FastAdjuster: public AdjusterAdapter
{
@ -560,45 +1026,38 @@ threshhold by 1 ::
FastAdjuster(int init_thresh = 20, bool nonmax = true);
...
};
..
.. index:: StarAdjuster
.. _StarAdjuster:
StarAdjuster
------------
.. c:type:: StarAdjuster
An
:func:`AdjusterAdapter` for the
:func:`StarFeatureDetector` . This adjusts the responseThreshhold of
StarFeatureDetector. ::
:func:`AdjusterAdapter` for the :func:`StarFeatureDetector` . This adjusts the responseThreshhold of StarFeatureDetector. ::
class StarAdjuster: public AdjusterAdapter
{
StarAdjuster(double initial_thresh = 30.0);
...
};
..
.. index:: SurfAdjuster
.. _SurfAdjuster:
SurfAdjuster
------------
.. c:type:: SurfAdjuster
An
:func:`AdjusterAdapter` for the
:func:`SurfFeatureDetector` . This adjusts the hessianThreshold of
SurfFeatureDetector. ::
:func:`AdjusterAdapter` for the :func:`SurfFeatureDetector` . This adjusts the hessianThreshold of SurfFeatureDetector. ::
class SurfAdjuster: public SurfAdjuster
{
SurfAdjuster();
...
};
..

View File

@ -25,7 +25,7 @@ There is
:func:`DescriptorExtractor` and
:func:`DescriptorMatcher` for these purposes too, but their interfaces are intended for descriptors
represented as vectors in a multidimensional space. ``GenericDescriptorMatcher`` is a more generic interface for descriptors.
As
:func:`DescriptorMatcher`,``GenericDescriptorMatcher`` has two groups
of match methods: for matching keypoints of one image with other image or
with image set. ::
@ -88,7 +88,7 @@ with image set. ::
protected:
...
};
..
.. index:: GenericDescriptorMatcher::add
@ -96,9 +96,7 @@ GenericDescriptorMatcher::add
---------------------------------
.. c:function:: void GenericDescriptorMatcher::add( const vector<Mat>\& images, vector<vector<KeyPoint> >\& keypoints )
Adds images and keypoints from them to the train collection (descriptors are supposed to be calculated here).
If train collection is not empty new image and keypoints from them will be added to
existing data.
Adds images and keypoints from them to the train collection (descriptors are supposed to be calculated here). If train collection is not empty new image and keypoints from them will be added to existing data.
:param images: Image collection.
@ -135,8 +133,7 @@ GenericDescriptorMatcher::train
-----------------------------------
.. c:function:: void GenericDescriptorMatcher::train()
Train the object, e.g. tree-based structure to extract descriptors or
to optimize descriptors matching.
Train the object, e.g. tree-based structure to extract descriptors or to optimize descriptors matching.
.. index:: GenericDescriptorMatcher::isMaskSupported
@ -153,8 +150,7 @@ GenericDescriptorMatcher::classify
:func:`GenericDescriptorMatcher::add`
.. c:function:: void GenericDescriptorMatcher::classify( const Mat\& queryImage, vector<KeyPoint>\& queryKeypoints, const Mat\& trainImage, vector<KeyPoint>\& trainKeypoints ) const
Classifies query keypoints under keypoints of one train image qiven as input argument
(first version of the method) or train image collection that set using (second version).
Classifies query keypoints under keypoints of one train image qiven as input argument (first version of the method) or train image collection that set using (second version).
.. c:function:: void GenericDescriptorMatcher::classify( const Mat\& queryImage, vector<KeyPoint>\& queryKeypoints )
@ -173,9 +169,7 @@ GenericDescriptorMatcher::match
:func:`GenericDescriptorMatcher::add` :func:`DescriptorMatcher::match`
.. c:function:: void GenericDescriptorMatcher::match( const Mat\& queryImage, vector<KeyPoint>\& queryKeypoints, const Mat\& trainImage, vector<KeyPoint>\& trainKeypoints, vector<DMatch>\& matches, const Mat\& mask=Mat() ) const
Find best match for query keypoints to the training set. In first version of method
one train image and keypoints detected on it - are input arguments. In second version
query keypoints are matched to training collectin that set using . As in the mask can be set.
Find best match for query keypoints to the training set. In first version of method one train image and keypoints detected on it - are input arguments. In second version query keypoints are matched to training collectin that set using . As in the mask can be set.
.. c:function:: void GenericDescriptorMatcher::match( const Mat\& queryImage, vector<KeyPoint>\& queryKeypoints, vector<DMatch>\& matches, const vector<Mat>\& masks=vector<Mat>() )
@ -204,9 +198,7 @@ GenericDescriptorMatcher::knnMatch
:func:`GenericDescriptorMatcher::match` :func:`DescriptorMatcher::knnMatch`
.. c:function:: void GenericDescriptorMatcher::knnMatch( const Mat\& queryImage, vector<KeyPoint>\& queryKeypoints, const Mat\& trainImage, vector<KeyPoint>\& trainKeypoints, vector<vector<DMatch> >\& matches, int k, const Mat\& mask=Mat(), bool compactResult=false ) const
Find the knn best matches for each keypoint from a query set with train keypoints.
Found knn (or less if not possible) matches are returned in distance increasing order.
Details see in and .
Find the knn best matches for each keypoint from a query set with train keypoints. Found knn (or less if not possible) matches are returned in distance increasing order. Details see in and.
.. c:function:: void GenericDescriptorMatcher::knnMatch( const Mat\& queryImage, vector<KeyPoint>\& queryKeypoints, vector<vector<DMatch> >\& matches, int k, const vector<Mat>\& masks=vector<Mat>(), bool compactResult=false )
@ -217,8 +209,7 @@ GenericDescriptorMatcher::radiusMatch
:func:`GenericDescriptorMatcher::match` :func:`DescriptorMatcher::radiusMatch`
.. c:function:: void GenericDescriptorMatcher::radiusMatch( const Mat\& queryImage, vector<KeyPoint>\& queryKeypoints, const Mat\& trainImage, vector<KeyPoint>\& trainKeypoints, vector<vector<DMatch> >\& matches, float maxDistance, const Mat\& mask=Mat(), bool compactResult=false ) const
Find the best matches for each query keypoint which have distance less than given threshold.
Found matches are returned in distance increasing order. Details see in and .
Find the best matches for each query keypoint which have distance less than given threshold. Found matches are returned in distance increasing order. Details see in and .
.. c:function:: void GenericDescriptorMatcher::radiusMatch( const Mat\& queryImage, vector<KeyPoint>\& queryKeypoints, vector<vector<DMatch> >\& matches, float maxDistance, const vector<Mat>\& masks=vector<Mat>(), bool compactResult=false )
@ -309,12 +300,10 @@ Wrapping class for computing, matching and classification of descriptors using
protected:
...
};
..
.. index:: FernDescriptorMatcher
.. _FernDescriptorMatcher:
FernDescriptorMatcher
---------------------
.. c:type:: FernDescriptorMatcher
@ -368,7 +357,7 @@ Wrapping class for computing, matching and classification of descriptors using
protected:
...
};
..
.. index:: VectorDescriptorMatcher
@ -400,11 +389,11 @@ Class used for matching descriptors that can be described as vectors in a finite
protected:
...
};
..
Example of creating: ::
VectorDescriptorMatcher matcher( new SurfDescriptorExtractor,
new BruteForceMatcher<L2<float> > );
..

View File

@ -7,12 +7,11 @@ Drawing Function of Keypoints and Matches
drawMatches
---------------
.. c:function:: void drawMatches( const Mat\& img1, const vector<KeyPoint>\& keypoints1, const Mat\& img2, const vector<KeyPoint>\& keypoints2, const vector<DMatch>\& matches1to2, Mat\& outImg, const Scalar\& matchColor=Scalar::all(-1), const Scalar\& singlePointColor=Scalar::all(-1), const vector<char>\& matchesMask=vector<char>(), int flags=DrawMatchesFlags::DEFAULT )
.. c:function:: void drawMatches( const Mat& img1, const vector<KeyPoint>& keypoints1, const Mat& img2, const vector<KeyPoint>& keypoints2, const vector<DMatch>& matches1to2, Mat& outImg, const Scalar& matchColor=Scalar::all(-1), const Scalar& singlePointColor=Scalar::all(-1), const vector<char>& matchesMask=vector<char>(), int flags=DrawMatchesFlags::DEFAULT )
This function draws matches of keypints from two images on output image.
Match is a line connecting two keypoints (circles).
This function draws matches of keypints from two images on output image. Match is a line connecting two keypoints (circles).
.. c:function:: void drawMatches( const Mat\& img1, const vector<KeyPoint>\& keypoints1, const Mat\& img2, const vector<KeyPoint>\& keypoints2, const vector<vector<DMatch> >\& matches1to2, Mat\& outImg, const Scalar\& matchColor=Scalar::all(-1), const Scalar\& singlePointColor=Scalar::all(-1), const vector<vector<char>>\& matchesMask= vector<vector<char> >(), int flags=DrawMatchesFlags::DEFAULT )
.. c:function:: void drawMatches( const Mat& img1, const vector<KeyPoint>& keypoints1, const Mat& img2, const vector<KeyPoint>& keypoints2, const vector<vector<DMatch> >& matches1to2, Mat& outImg, const Scalar& matchColor=Scalar::all(-1), const Scalar& singlePointColor=Scalar::all(-1), const vector<vector<char>>& matchesMask= vector<vector<char> >(), int flags=DrawMatchesFlags::DEFAULT )
:param img1: First source image.
@ -24,45 +23,43 @@ Match is a line connecting two keypoints (circles).
:param matches: Matches from first image to second one, i.e. ``keypoints1[i]`` has corresponding point ``keypoints2[matches[i]]`` .
:param outImg: Output image. Its content depends on ``flags`` value
what is drawn in output image. See below possible ``flags`` bit values.
:param outImg: Output image. Its content depends on ``flags`` value what is drawn in output image. See below possible ``flags`` bit values.
:param matchColor: Color of matches (lines and connected keypoints).
If ``matchColor==Scalar::all(-1)`` color will be generated randomly.
:param matchColor: Color of matches (lines and connected keypoints). If ``matchColor==Scalar::all(-1)`` color will be generated randomly.
:param singlePointColor: Color of single keypoints (circles), i.e. keypoints not having the matches.
If ``singlePointColor==Scalar::all(-1)`` color will be generated randomly.
:param singlePointColor: Color of single keypoints (circles), i.e. keypoints not having the matches. If ``singlePointColor==Scalar::all(-1)`` color will be generated randomly.
:param matchesMask: Mask determining which matches will be drawn. If mask is empty all matches will be drawn.
:param flags: Each bit of ``flags`` sets some feature of drawing.
Possible ``flags`` bit values is defined by ``DrawMatchesFlags`` , see below. ::
:param flags: Each bit of ``flags`` sets some feature of drawing. Possible ``flags`` bit values is defined by ``DrawMatchesFlags`` ::
struct DrawMatchesFlags
{
enum{ DEFAULT = 0, // Output image matrix will be created (Mat::create),
// i.e. existing memory of output image may be reused.
// Two source image, matches and single keypoints
// will be drawn.
// For each keypoint only the center point will be
// drawn (without the circle around keypoint with
// keypoint size and orientation).
DRAW_OVER_OUTIMG = 1, // Output image matrix will not be
// created (Mat::create). Matches will be drawn
// on existing content of output image.
NOT_DRAW_SINGLE_POINTS = 2, // Single keypoints will not be drawn.
DRAW_RICH_KEYPOINTS = 4 // For each keypoint the circle around
// keypoint with keypoint size and orientation will
// be drawn.
struct DrawMatchesFlags
{
enum{ DEFAULT = 0, // Output image matrix will be created (Mat::create),
// i.e. existing memory of output image may be reused.
// Two source image, matches and single keypoints
// will be drawn.
// For each keypoint only the center point will be
// drawn (without the circle around keypoint with
// keypoint size and orientation).
DRAW_OVER_OUTIMG = 1, // Output image matrix will not be
// created (Mat::create). Matches will be drawn
// on existing content of output image.
NOT_DRAW_SINGLE_POINTS = 2, // Single keypoints will not be drawn.
DRAW_RICH_KEYPOINTS = 4 // For each keypoint the circle around
// keypoint with keypoint size and orientation will
// be drawn.
};
};
};
..
..
.. index:: drawKeypoints
drawKeypoints
-----------------
.. c:function:: void drawKeypoints( const Mat\& image, const vector<KeyPoint>\& keypoints, Mat\& outImg, const Scalar\& color=Scalar::all(-1), int flags=DrawMatchesFlags::DEFAULT )
.. c:function:: void drawKeypoints( const Mat& image, const vector<KeyPoint>& keypoints, Mat& outImg, const Scalar& color=Scalar::all(-1), int flags=DrawMatchesFlags::DEFAULT )
Draw keypoints.
@ -70,14 +67,9 @@ drawKeypoints
:param keypoints: Keypoints from source image.
:param outImg: Output image. Its content depends on ``flags`` value
what is drawn in output image. See possible ``flags`` bit values.
:param outImg: Output image. Its content depends on ``flags`` value what is drawn in output image. See possible ``flags`` bit values.
:param color: Color of keypoints
:param color: Color of keypoints.
.
:param flags: Each bit of ``flags`` sets some feature of drawing.
Possible ``flags`` bit values is defined by ``DrawMatchesFlags`` ,
see above in :func:`drawMatches` .
:param flags: Each bit of ``flags`` sets some feature of drawing. Possible ``flags`` bit values is defined by ``DrawMatchesFlags``, see above in :func:`drawMatches` .

View File

@ -36,12 +36,12 @@ Lixin Fan, Jutta Willamowski, Cedric Bray, 2004. ::
protected:
...
};
..
.. index:: BOWTrainer::add
BOWTrainer::add
------------------- ````
-------------------
.. c:function:: void BOWTrainer::add( const Mat\& descriptors )
Add descriptors to training set. The training set will be clustered using clustermethod to construct vocabulary.
@ -70,14 +70,11 @@ BOWTrainer::cluster
-----------------------
.. c:function:: Mat BOWTrainer::cluster() const
Cluster train descriptors. Vocabulary consists from cluster centers. So this method
returns vocabulary. In first method variant the stored in object train descriptors will be
clustered, in second variant -- input descriptors will be clustered.
Cluster train descriptors. Vocabulary consists from cluster centers. So this method returns vocabulary. In first method variant the stored in object train descriptors will be clustered, in second variant -- input descriptors will be clustered.
.. c:function:: Mat BOWTrainer::cluster( const Mat\& descriptors ) const
:param descriptors: Descriptors to cluster. Each row of ``descriptors`` matrix is a one descriptor. Descriptors will not be added
to the inner train descriptor set.
:param descriptors: Descriptors to cluster. Each row of ``descriptors`` matrix is a one descriptor. Descriptors will not be added to the inner train descriptor set.
.. index:: BOWKMeansTrainer
@ -103,7 +100,7 @@ BOWKMeansTrainer
protected:
...
};
..
To gain an understanding of constructor parameters see
:func:`kmeans` function
@ -117,35 +114,32 @@ BOWImgDescriptorExtractor
-------------------------
.. c:type:: BOWImgDescriptorExtractor
Class to compute image descriptor using ''bad of visual words''. In few,
such computing consists from the following steps:
1. Compute descriptors for given image and it's keypoints set,
\
2. Find nearest visual words from vocabulary for each keypoint descriptor,
\
3. Image descriptor is a normalized histogram of vocabulary words encountered in the image. I.e.
``i`` -bin of the histogram is a frequency of ``i`` -word of vocabulary in the given image. ::
Class to compute image descriptor using ''bad of visual words''. In few, such computing consists from the following steps:
class BOWImgDescriptorExtractor
{
public:
BOWImgDescriptorExtractor( const Ptr<DescriptorExtractor>& dextractor,
const Ptr<DescriptorMatcher>& dmatcher );
virtual ~BOWImgDescriptorExtractor(){}
#. Compute descriptors for given image and it's keypoints set
#. Find nearest visual words from vocabulary for each keypoint descriptor,
#. Image descriptor is a normalized histogram of vocabulary words encountered in the image. I.e. ``i`` -bin of the histogram is a frequency of ``i`` -word of vocabulary in the given image. ::
void setVocabulary( const Mat& vocabulary );
const Mat& getVocabulary() const;
void compute( const Mat& image, vector<KeyPoint>& keypoints,
Mat& imgDescriptor,
vector<vector<int> >* pointIdxsOfClusters=0,
Mat* descriptors=0 );
int descriptorSize() const;
int descriptorType() const;
class BOWImgDescriptorExtractor
{
public:
BOWImgDescriptorExtractor( const Ptr<DescriptorExtractor>& dextractor,
const Ptr<DescriptorMatcher>& dmatcher );
virtual ~BOWImgDescriptorExtractor(){}
void setVocabulary( const Mat& vocabulary );
const Mat& getVocabulary() const;
void compute( const Mat& image, vector<KeyPoint>& keypoints,
Mat& imgDescriptor,
vector<vector<int> >* pointIdxsOfClusters=0,
Mat* descriptors=0 );
int descriptorSize() const;
int descriptorType() const;
protected:
...
};
protected:
...
};
..
.. index:: BOWImgDescriptorExtractor::BOWImgDescriptorExtractor
@ -155,11 +149,9 @@ BOWImgDescriptorExtractor::BOWImgDescriptorExtractor
Constructor.
:param dextractor: Descriptor extractor that will be used to compute descriptors
for input image and it's keypoints.
:param dextractor: Descriptor extractor that will be used to compute descriptors for input image and it's keypoints.
:param dmatcher: Descriptor matcher that will be used to find nearest word of trained vocabulary to
each keupoints descriptor of the image.
:param dmatcher: Descriptor matcher that will be used to find nearest word of trained vocabulary to each keupoints descriptor of the image.
.. index:: BOWImgDescriptorExtractor::setVocabulary
@ -169,8 +161,7 @@ BOWImgDescriptorExtractor::setVocabulary
Method to set visual vocabulary.
:param vocabulary: Vocabulary (can be trained using inheritor of :func:`BOWTrainer` ).
Each row of vocabulary is a one visual word (cluster center).
:param vocabulary: Vocabulary (can be trained using inheritor of :func:`BOWTrainer` ). Each row of vocabulary is a one visual word (cluster center).
.. index:: BOWImgDescriptorExtractor::getVocabulary
@ -194,8 +185,7 @@ BOWImgDescriptorExtractor::compute
:param imgDescriptor: This is output, i.e. computed image descriptor.
:param pointIdxsOfClusters: Indices of keypoints which belong to the cluster, i.e. ``pointIdxsOfClusters[i]`` is keypoint indices which belong
to the ``i-`` cluster (word of vocabulary) (returned if it is not 0.)
:param pointIdxsOfClusters: Indices of keypoints which belong to the cluster, i.e. ``pointIdxsOfClusters[i]`` is keypoint indices which belong to the ``i-`` cluster (word of vocabulary) (returned if it is not 0.)
:param descriptors: Descriptors of the image keypoints (returned if it is not 0.)

View File

@ -45,11 +45,11 @@ This class computes the disparity map using block matching algorithm. The class
:math:`>` 0). If ``avergeTexThreshold = 0`` low textureness filtering is disabled, otherwise disparity is set to 0 in each point ``(x, y)`` where for left image
:math:`\sum HorizontalGradiensInWindow(x, y, winSize) < (winSize \cdot winSize) \cdot avergeTexThreshold` i.e. input left image is low textured.
.. index:: cv::gpu::StereoBM_GPU::StereoBM_GPU
.. index:: gpu::StereoBM_GPU::StereoBM_GPU
.. _cv::gpu::StereoBM_GPU::StereoBM_GPU:
.. _gpu::StereoBM_GPU::StereoBM_GPU:
cv::gpu::StereoBM_GPU::StereoBM_GPU
gpu::StereoBM_GPU::StereoBM_GPU
-----------------------------------_
.. c:function:: StereoBM_GPU::StereoBM_GPU()
@ -67,11 +67,11 @@ cv::gpu::StereoBM_GPU::StereoBM_GPU
:param winSize: Block size.
.. index:: cv::gpu::StereoBM_GPU::operator ()
.. index:: gpu::StereoBM_GPU::operator ()
.. _cv::gpu::StereoBM_GPU::operator ():
.. _gpu::StereoBM_GPU::operator ():
cv::gpu::StereoBM_GPU::operator ()
gpu::StereoBM_GPU::operator ()
----------------------------------
.. c:function:: void StereoBM_GPU::operator() (const GpuMat\& left, const GpuMat\& right, GpuMat\& disparity)
@ -87,11 +87,11 @@ cv::gpu::StereoBM_GPU::operator ()
:param stream: Stream for the asynchronous version.
.. index:: cv::gpu::StereoBM_GPU::checkIfGpuCallReasonable
.. index:: gpu::StereoBM_GPU::checkIfGpuCallReasonable
.. _cv::gpu::StereoBM_GPU::checkIfGpuCallReasonable:
.. _gpu::StereoBM_GPU::checkIfGpuCallReasonable:
cv::gpu::StereoBM_GPU::checkIfGpuCallReasonable
gpu::StereoBM_GPU::checkIfGpuCallReasonable
-----------------------------------------------
.. c:function:: bool StereoBM_GPU::checkIfGpuCallReasonable()
@ -169,7 +169,7 @@ for data cost storage. ``width_step`` is the number of bytes in a line including
.. index:: gpu::StereoBeliefPropagation::StereoBeliefPropagation
cv::gpu::StereoBeliefPropagation::StereoBeliefPropagation
gpu::StereoBeliefPropagation::StereoBeliefPropagation
---------------------------------------------------------
.. c:function:: StereoBeliefPropagation::StereoBeliefPropagation( int ndisp = DEFAULT_NDISP, int iters = DEFAULT_ITERS, int levels = DEFAULT_LEVELS, int msg_type = CV_32F)
@ -191,8 +191,9 @@ cv::gpu::StereoBeliefPropagation::StereoBeliefPropagation
:param disc_single_jump: Discontinuity single jump.
:param msg_type: Type for messages. Supports ``CV_16SC1`` and ``CV_32FC1`` .
``StereoBeliefPropagation`` uses truncated linear model for the data cost and discontinuity term:
:param msg_type: Type for messages. Supports ``CV_16SC1`` and ``CV_32FC1``.
``StereoBeliefPropagation`` uses truncated linear model for the data cost and discontinuity term:
.. math::
@ -214,15 +215,16 @@ By default ``StereoBeliefPropagation`` uses floating-point arithmetics and ``CV_
.. index:: gpu::StereoBeliefPropagation::estimateRecommendedParams
cv::gpu::StereoBeliefPropagation::estimateRecommendedParams
----------------------------------------------------------- ```` ```` ```` ```` ````
gpu::StereoBeliefPropagation::estimateRecommendedParams
-----------------------------------------------------------
.. c:function:: void StereoBeliefPropagation::estimateRecommendedParams( int width, int height, int\& ndisp, int\& iters, int\& levels)
Some heuristics that tries to compute recommended parameters (ndisp, itersand levels) for specified image size (widthand height).
.. index:: gpu::StereoBeliefPropagation::operator ()
cv::gpu::StereoBeliefPropagation::operator ()
gpu::StereoBeliefPropagation::operator ()
---------------------------------------------
.. c:function:: void StereoBeliefPropagation::operator()( const GpuMat\& left, const GpuMat\& right, GpuMat\& disparity)
@ -313,7 +315,7 @@ qx_csbp
.. index:: gpu::StereoConstantSpaceBP::StereoConstantSpaceBP
cv::gpu::StereoConstantSpaceBP::StereoConstantSpaceBP
gpu::StereoConstantSpaceBP::StereoConstantSpaceBP
-----------------------------------------------------
.. c:function:: StereoConstantSpaceBP::StereoConstantSpaceBP(int ndisp = DEFAULT_NDISP, int iters = DEFAULT_ITERS, int levels = DEFAULT_LEVELS, int nr_plane = DEFAULT_NR_PLANE, int msg_type = CV_32F)
@ -340,7 +342,8 @@ cv::gpu::StereoConstantSpaceBP::StereoConstantSpaceBP
:param min_disp_th: Minimal disparity threshold.
:param msg_type: Type for messages. Supports ``CV_16SC1`` and ``CV_32FC1`` .
``StereoConstantSpaceBP`` uses truncated linear model for the data cost and discontinuity term:
``StereoConstantSpaceBP`` uses truncated linear model for the data cost and discontinuity term:
.. math::
@ -362,15 +365,16 @@ By default ``StereoConstantSpaceBP`` uses floating-point arithmetics and ``CV_32
.. index:: gpu::StereoConstantSpaceBP::estimateRecommendedParams
cv::gpu::StereoConstantSpaceBP::estimateRecommendedParams
--------------------------------------------------------- ```` ```` ```` ``_`` ```` ````
gpu::StereoConstantSpaceBP::estimateRecommendedParams
---------------------------------------------------------
.. c:function:: void StereoConstantSpaceBP::estimateRecommendedParams( int width, int height, int\& ndisp, int\& iters, int\& levels, int\& nr_plane)
Some heuristics that tries to compute parameters (ndisp, iters, levelsand nrplane) for specified image size (widthand height).
.. index:: gpu::StereoConstantSpaceBP::operator ()
cv::gpu::StereoConstantSpaceBP::operator ()
gpu::StereoConstantSpaceBP::operator ()
-------------------------------------------
.. c:function:: void StereoConstantSpaceBP::operator()( const GpuMat\& left, const GpuMat\& right, GpuMat\& disparity)
@ -425,7 +429,7 @@ qx_csbp
.. index:: gpu::DisparityBilateralFilter::DisparityBilateralFilter
cv::gpu::DisparityBilateralFilter::DisparityBilateralFilter
gpu::DisparityBilateralFilter::DisparityBilateralFilter
-----------------------------------------------------------
.. c:function:: DisparityBilateralFilter::DisparityBilateralFilter( int ndisp = DEFAULT_NDISP, int radius = DEFAULT_RADIUS, int iters = DEFAULT_ITERS)
@ -447,7 +451,7 @@ cv::gpu::DisparityBilateralFilter::DisparityBilateralFilter
.. index:: gpu::DisparityBilateralFilter::operator ()
cv::gpu::DisparityBilateralFilter::operator ()
gpu::DisparityBilateralFilter::operator ()
----------------------------------------------
.. c:function:: void DisparityBilateralFilter::operator()( const GpuMat\& disparity, const GpuMat\& image, GpuMat\& dst)
@ -465,11 +469,11 @@ cv::gpu::DisparityBilateralFilter::operator ()
.. index:: gpu::drawColorDisp
cv::gpu::drawColorDisp
gpu::drawColorDisp
----------------------
.. c:function:: void drawColorDisp(const GpuMat\& src_disp, GpuMat\& dst_disp, int ndisp)
.. c:function:: void gpu::drawColorDisp(const GpuMat\& src_disp, GpuMat\& dst_disp, int ndisp)
.. c:function:: void drawColorDisp(const GpuMat\& src_disp, GpuMat\& dst_disp, int ndisp, const Stream\& stream)
.. c:function:: void gpu::drawColorDisp(const GpuMat\& src_disp, GpuMat\& dst_disp, int ndisp, const Stream\& stream)
Does coloring of disparity image.
@ -487,11 +491,11 @@ This function converts
.. index:: gpu::reprojectImageTo3D
cv::gpu::reprojectImageTo3D
gpu::reprojectImageTo3D
---------------------------
.. c:function:: void reprojectImageTo3D(const GpuMat\& disp, GpuMat\& xyzw, const Mat\& Q)
.. c:function:: void gpu::reprojectImageTo3D(const GpuMat\& disp, GpuMat\& xyzw, const Mat\& Q)
.. c:function:: void reprojectImageTo3D(const GpuMat\& disp, GpuMat\& xyzw, const Mat\& Q, const Stream\& stream)
.. c:function:: void gpu::reprojectImageTo3D(const GpuMat\& disp, GpuMat\& xyzw, const Mat\& Q, const Stream\& stream)
Reprojects disparity image to 3D space.

View File

@ -3,13 +3,13 @@ Data Structures
.. highlight:: cpp
.. index:: gpu::DevMem2D_
.. index:: gpu::DevMem2D\_
.. _gpu::DevMem2D_:
gpu::DevMem2D_
--------------
.. c:type:: gpu::DevMem2D_
gpu::DevMem2D\_
---------------
.. c:type:: gpu::DevMem2D\_
This is a simple lightweight class that encapsulate pitched memory on GPU. It is intended to pass to nvcc-compiled code, i.e. CUDA kernels. So it is used internally by OpenCV and by users writes own device code. Its members can be called both from host and from device code. ::
@ -21,7 +21,7 @@ This is a simple lightweight class that encapsulate pitched memory on GPU. It is
size_t step;
DevMem2D_() : cols(0), rows(0), data(0), step(0){};
DevMem2D_(int rows_, int cols_, T *data_, size_t step_);
DevMem2D_(int rows, int cols, T *data, size_t step);
template <typename U>
explicit DevMem2D_(const DevMem2D_<U>& d);
@ -37,15 +37,15 @@ This is a simple lightweight class that encapsulate pitched memory on GPU. It is
};
.. index:: gpu::PtrStep_
.. index:: gpu::PtrStep\_
.. _gpu::PtrStep_:
.. gpu::PtrStep\_:
gpu::PtrStep_
-------------
.. c:type:: gpu::PtrStep_
gpu::PtrStep\_
--------------
.. c:type:: gpu::PtrStep\_
This is structure is similar to DevMem2D_but contains only pointer and row step. Width and height fields are excluded due to performance reasons. The structure is for internal use or for users who write own device code. ::
This is structure is similar to DevMem2D\_ but contains only pointer and row step. Width and height fields are excluded due to performance reasons. The structure is for internal use or for users who write own device code. ::
template<typename T> struct PtrStep_
{
@ -64,13 +64,13 @@ This is structure is similar to DevMem2D_but contains only pointer and row step.
};
.. index:: gpu::PtrElemStrp_
.. index:: gpu::PtrElemStrp\_
.. _gpu::PtrElemStrp_:
.. gpu::PtrElemStrp\_:
gpu::PtrElemStrp_
-----------------
.. c:type:: gpu::PtrElemStrp_
gpu::PtrElemStrp\_
------------------
.. c:type:: gpu::PtrElemStrp\_
This is structure is similar to DevMem2D_but contains only pointer and row step in elements. Width and height fields are excluded due to performance reasons. This class is can only be constructed if sizeof(T) is a multiple of 256. The structure is for internal use or for users who write own device code. ::
@ -84,7 +84,7 @@ This is structure is similar to DevMem2D_but contains only pointer and row step
.. index:: gpu::GpuMat
.. _gpu::GpuMat:
.. gpu::GpuMat:
gpu::GpuMat
-----------
@ -136,9 +136,8 @@ Is it a bad practice to leave static or global GpuMat variables allocated, i.e.
See also:
:func:`Mat`
.. index:: gpu::CudaMem
.. _gpu::CudaMem:
.. index:: gpu::CudaMem
gpu::CudaMem
------------
@ -187,18 +186,18 @@ Please note that allocation size of such memory types is usually limited. For mo
.. index:: gpu::CudaMem::createMatHeader
cv::gpu::CudaMem::createMatHeader
gpu::CudaMem::createMatHeader
---------------------------------
:func:`Mat`
.. c:function:: Mat CudaMem::createMatHeader() const
.. c:function:: CudaMem::operator Mat() const
.. cpp:function:: Mat CudaMem::createMatHeader() const
.. cpp:function:: CudaMem::operator Mat() const
Creates header without reference counting to CudaMem data.
.. index:: gpu::CudaMem::createGpuMatHeader
cv::gpu::CudaMem::createGpuMatHeader
gpu::CudaMem::createGpuMatHeader
------------------------------------
:func:`gpu::GpuMat` ``_``
.. c:function:: GpuMat CudaMem::createGpuMatHeader() const
@ -209,8 +208,8 @@ cv::gpu::CudaMem::createGpuMatHeader
.. index:: gpu::CudaMem::canMapHostMemory
cv::gpu::CudaMem::canMapHostMemory
---------------------------------- ``_``
gpu::CudaMem::canMapHostMemory
----------------------------------
.. c:function:: static bool CudaMem::canMapHostMemory()
Returns true if the current hardware supports address space mapping and ALLOCZEROCOPYmemory allocation
@ -270,7 +269,7 @@ This class encapsulated queue of the asynchronous calls. Some functions have ove
.. index:: gpu::Stream::queryIfComplete
cv::gpu::Stream::queryIfComplete
gpu::Stream::queryIfComplete
--------------------------------
.. c:function:: bool Stream::queryIfComplete()
@ -278,7 +277,7 @@ cv::gpu::Stream::queryIfComplete
.. index:: gpu::Stream::waitForCompletion
cv::gpu::Stream::waitForCompletion
gpu::Stream::waitForCompletion
----------------------------------
.. c:function:: void Stream::waitForCompletion()
@ -303,7 +302,7 @@ This class provides possibility to get ``cudaStream_t`` from
.. index:: gpu::createContinuous
cv::gpu::createContinuous
gpu::createContinuous
-------------------------
.. c:function:: void createContinuous(int rows, int cols, int type, GpuMat\& m)
@ -329,7 +328,7 @@ Matrix is called continuous if its elements are stored continuously, i.e. wuthou
.. index:: gpu::ensureSizeIsEnough
cv::gpu::ensureSizeIsEnough
gpu::ensureSizeIsEnough
---------------------------
.. c:function:: void ensureSizeIsEnough(int rows, int cols, int type, GpuMat\& m)

View File

@ -5,7 +5,7 @@ Feature Detection and Description
.. index:: gpu::SURF_GPU
.. _gpu::SURF_GPU:
.. gpu::SURF_GPU:
gpu::SURF_GPU
-------------
@ -77,7 +77,7 @@ See also:
.. index:: gpu::BruteForceMatcher_GPU
.. _gpu::BruteForceMatcher_GPU:
.. gpu::BruteForceMatcher_GPU:
gpu::BruteForceMatcher_GPU
--------------------------
@ -168,34 +168,30 @@ Brute-force descriptor matcher. For each descriptor in the first set, this match
};
The class ``BruteForceMatcher_GPU`` has the similar interface to class
. It has two groups of match methods: for matching descriptors of one image with other image or with image set. Also all functions have alternative: save results to GPU memory or to CPU memory.
``Distance`` template parameter is kept for CPU/GPU interfaces similarity. ``BruteForceMatcher_GPU`` supports only ``L1<float>`` and ``L2<float>`` distance types.
The class ``BruteForceMatcher_GPU`` has the similar interface to class. It has two groups of match methods: for matching descriptors of one image with other image or with image set. Also all functions have alternative: save results to GPU memory or to CPU memory. ``Distance`` template parameter is kept for CPU/GPU interfaces similarity. ``BruteForceMatcher_GPU`` supports only ``L1<float>`` and ``L2<float>`` distance types.
See also:,.
.. index:: gpu::BruteForceMatcher_GPU::match
.. index:: cv::gpu::BruteForceMatcher_GPU::match
.. gpu::BruteForceMatcher_GPU::match:
.. _cv::gpu::BruteForceMatcher_GPU::match:
cv::gpu::BruteForceMatcher_GPU::match
gpu::BruteForceMatcher_GPU::match
-------------------------------------
.. c:function:: void match(const GpuMat\& queryDescs, const GpuMat\& trainDescs, std::vector<DMatch>\& matches, const GpuMat\& mask = GpuMat())
.. c:function:: void match(const GpuMat&queryDescs, const GpuMat&trainDescs, std::vector<DMatch>&matches, const GpuMat&mask = GpuMat())
.. c:function:: void match(const GpuMat\& queryDescs, std::vector<DMatch>\& matches, const std::vector<GpuMat>\& masks = std::vector<GpuMat>())
.. c:function:: void match(const GpuMat&queryDescs, std::vector<DMatch>&matches, const std::vector<GpuMat>&masks = std::vector<GpuMat>())
Finds the best match for each descriptor from a query set with train descriptors.
See also:
:func:`DescriptorMatcher::match` .
.. index:: cv::gpu::BruteForceMatcher_GPU::matchSingle
.. index:: gpu::BruteForceMatcher_GPU::matchSingle
.. _cv::gpu::BruteForceMatcher_GPU::matchSingle:
.. gpu::BruteForceMatcher_GPU::matchSingle:
cv::gpu::BruteForceMatcher_GPU::matchSingle
gpu::BruteForceMatcher_GPU::matchSingle
-------------------------------------------
.. c:function:: void matchSingle(const GpuMat\& queryDescs, const GpuMat\& trainDescs, GpuMat\& trainIdx, GpuMat\& distance, const GpuMat\& mask = GpuMat())
.. c:function:: void matchSingle(const GpuMat&queryDescs, const GpuMat&trainDescs, GpuMat&trainIdx, GpuMat&distance, const GpuMat&mask = GpuMat())
Finds the best match for each query descriptor. Results will be stored to GPU memory.
@ -206,13 +202,13 @@ cv::gpu::BruteForceMatcher_GPU::matchSingle
:param mask: Mask specifying permissible matches between input query and train matrices of descriptors.
.. index:: cv::gpu::BruteForceMatcher_GPU::matchCollection
.. index:: gpu::BruteForceMatcher_GPU::matchCollection
.. _cv::gpu::BruteForceMatcher_GPU::matchCollection:
.. gpu::BruteForceMatcher_GPU::matchCollection:
cv::gpu::BruteForceMatcher_GPU::matchCollection
gpu::BruteForceMatcher_GPU::matchCollection
-----------------------------------------------
.. c:function:: void matchCollection(const GpuMat\& queryDescs, const GpuMat\& trainCollection, GpuMat\& trainIdx, GpuMat\& imgIdx, GpuMat\& distance, const GpuMat\& maskCollection)
.. c:function:: void matchCollection(const GpuMat&queryDescs, const GpuMat&trainCollection, GpuMat&trainIdx, GpuMat&imgIdx, GpuMat&distance, const GpuMat&maskCollection)
Find the best match for each query descriptor from train collection. Results will be stored to GPU memory.
@ -225,50 +221,50 @@ cv::gpu::BruteForceMatcher_GPU::matchCollection
:param maskCollection: ``GpuMat`` containing set of masks. It can be obtained from ``std::vector<GpuMat>`` by . Or it can contain user defined mask set. It must be empty matrix or one row matrix, each element is a ``PtrStep`` that points to one mask.
.. index:: cv::gpu::BruteForceMatcher_GPU::makeGpuCollection
.. index:: gpu::BruteForceMatcher_GPU::makeGpuCollection
.. _cv::gpu::BruteForceMatcher_GPU::makeGpuCollection:
.. gpu::BruteForceMatcher_GPU::makeGpuCollection:
cv::gpu::BruteForceMatcher_GPU::makeGpuCollection
gpu::BruteForceMatcher_GPU::makeGpuCollection
-------------------------------------------------
.. c:function:: void makeGpuCollection(GpuMat\& trainCollection, GpuMat\& maskCollection, const vector<GpuMat>\& masks = std::vector<GpuMat>())
.. c:function:: void makeGpuCollection(GpuMat&trainCollection, GpuMat&maskCollection, const vector<GpuMat>&masks = std::vector<GpuMat>())
Makes gpu collection of train descriptors and masks in suitable format for function.
.. index:: cv::gpu::BruteForceMatcher_GPU::matchDownload
.. index:: gpu::BruteForceMatcher_GPU::matchDownload
.. _cv::gpu::BruteForceMatcher_GPU::matchDownload:
.. gpu::BruteForceMatcher_GPU::matchDownload:
cv::gpu::BruteForceMatcher_GPU::matchDownload
--------------------------------------------- ```` ```` ````
.. c:function:: void matchDownload(const GpuMat\& trainIdx, const GpuMat\& distance, std::vector<DMatch>\& matches)
gpu::BruteForceMatcher_GPU::matchDownload
---------------------------------------------
.. c:function:: void matchDownload(const GpuMat&trainIdx, const GpuMat&distance, std::vector<DMatch>&matches)
.. c:function:: void matchDownload(const GpuMat\& trainIdx, GpuMat\& imgIdx, const GpuMat\& distance, std::vector<DMatch>\& matches)
.. c:function:: void matchDownload(const GpuMat&trainIdx, GpuMat&imgIdx, const GpuMat&distance, std::vector<DMatch>&matches)
Downloads trainIdx, imgIdxand distancematrices obtained via or to CPU vector with .
.. index:: cv::gpu::BruteForceMatcher_GPU::knnMatch
.. index:: gpu::BruteForceMatcher_GPU::knnMatch
.. _cv::gpu::BruteForceMatcher_GPU::knnMatch:
.. gpu::BruteForceMatcher_GPU::knnMatch:
cv::gpu::BruteForceMatcher_GPU::knnMatch
gpu::BruteForceMatcher_GPU::knnMatch
----------------------------------------
.. c:function:: void knnMatch(const GpuMat\& queryDescs, const GpuMat\& trainDescs, std::vector< std::vector<DMatch> >\& matches, int k, const GpuMat\& mask = GpuMat(), bool compactResult = false)
.. c:function:: void knnMatch(const GpuMat&queryDescs, const GpuMat&trainDescs, std::vector< std::vector<DMatch> >&matches, int k, const GpuMat&mask = GpuMat(), bool compactResult = false)
Finds the k best matches for each descriptor from a query set with train descriptors. Found k (or less if not possible) matches are returned in distance increasing order.
.. c:function:: void knnMatch(const GpuMat\& queryDescs, std::vector< std::vector<DMatch> >\& matches, int k, const std::vector<GpuMat>\& masks = std::vector<GpuMat>(), bool compactResult = false )
.. c:function:: void knnMatch(const GpuMat&queryDescs, std::vector< std::vector<DMatch> >&matches, int k, const std::vector<GpuMat>&masks = std::vector<GpuMat>(), bool compactResult = false )
See also:
:func:`DescriptorMatcher::knnMatch` .
.. index:: cv::gpu::BruteForceMatcher_GPU::knnMatch
.. index:: gpu::BruteForceMatcher_GPU::knnMatch
.. _cv::gpu::BruteForceMatcher_GPU::knnMatch:
.. gpu::BruteForceMatcher_GPU::knnMatch:
cv::gpu::BruteForceMatcher_GPU::knnMatch
gpu::BruteForceMatcher_GPU::knnMatch
----------------------------------------
.. c:function:: void knnMatch(const GpuMat\& queryDescs, const GpuMat\& trainDescs, GpuMat\& trainIdx, GpuMat\& distance, GpuMat\& allDist, int k, const GpuMat\& mask = GpuMat())
.. c:function:: void knnMatch(const GpuMat&queryDescs, const GpuMat&trainDescs, GpuMat&trainIdx, GpuMat&distance, GpuMat&allDist, int k, const GpuMat&mask = GpuMat())
Finds the k best matches for each descriptor from a query set with train descriptors. Found k (or less if not possible) matches are returned in distance increasing order. Results will be stored to GPU memory.
@ -285,27 +281,27 @@ cv::gpu::BruteForceMatcher_GPU::knnMatch
:param mask: Mask specifying permissible matches between input query and train matrices of descriptors.
.. index:: cv::gpu::BruteForceMatcher_GPU::knnMatchDownload
.. index:: gpu::BruteForceMatcher_GPU::knnMatchDownload
.. _cv::gpu::BruteForceMatcher_GPU::knnMatchDownload:
.. gpu::BruteForceMatcher_GPU::knnMatchDownload:
cv::gpu::BruteForceMatcher_GPU::knnMatchDownload
------------------------------------------------ ```` ```` ```` ````
.. c:function:: void knnMatchDownload(const GpuMat\& trainIdx, const GpuMat\& distance, std::vector< std::vector<DMatch> >\& matches, bool compactResult = false)
gpu::BruteForceMatcher_GPU::knnMatchDownload
------------------------------------------------
.. c:function:: void knnMatchDownload(const GpuMat&trainIdx, const GpuMat&distance, std::vector< std::vector<DMatch> >&matches, bool compactResult = false)
Downloads trainIdxand distancematrices obtained via to CPU vector with . If compactResultis true matchesvector will not contain matches for fully masked out query descriptors.
.. index:: cv::gpu::BruteForceMatcher_GPU::radiusMatch
.. index:: gpu::BruteForceMatcher_GPU::radiusMatch
.. _cv::gpu::BruteForceMatcher_GPU::radiusMatch:
.. gpu::BruteForceMatcher_GPU::radiusMatch:
cv::gpu::BruteForceMatcher_GPU::radiusMatch
gpu::BruteForceMatcher_GPU::radiusMatch
-------------------------------------------
.. c:function:: void radiusMatch(const GpuMat\& queryDescs, const GpuMat\& trainDescs, std::vector< std::vector<DMatch> >\& matches, float maxDistance, const GpuMat\& mask = GpuMat(), bool compactResult = false)
.. c:function:: void radiusMatch(const GpuMat&queryDescs, const GpuMat&trainDescs, std::vector< std::vector<DMatch> >&matches, float maxDistance, const GpuMat&mask = GpuMat(), bool compactResult = false)
Finds the best matches for each query descriptor which have distance less than given threshold. Found matches are returned in distance increasing order.
.. c:function:: void radiusMatch(const GpuMat\& queryDescs, std::vector< std::vector<DMatch> >\& matches, float maxDistance, const std::vector<GpuMat>\& masks = std::vector<GpuMat>(), bool compactResult = false)
.. c:function:: void radiusMatch(const GpuMat&queryDescs, std::vector< std::vector<DMatch> >&matches, float maxDistance, const std::vector<GpuMat>&masks = std::vector<GpuMat>(), bool compactResult = false)
This function works only on devices with Compute Capability
:math:`>=` 1.1.
@ -313,13 +309,13 @@ This function works only on devices with Compute Capability
See also:
:func:`DescriptorMatcher::radiusMatch` .
.. index:: cv::gpu::BruteForceMatcher_GPU::radiusMatch
.. index:: gpu::BruteForceMatcher_GPU::radiusMatch
.. _cv::gpu::BruteForceMatcher_GPU::radiusMatch:
.. gpu::BruteForceMatcher_GPU::radiusMatch:
cv::gpu::BruteForceMatcher_GPU::radiusMatch
gpu::BruteForceMatcher_GPU::radiusMatch
-------------------------------------------
.. c:function:: void radiusMatch(const GpuMat\& queryDescs, const GpuMat\& trainDescs, GpuMat\& trainIdx, GpuMat\& nMatches, GpuMat\& distance, float maxDistance, const GpuMat\& mask = GpuMat())
.. c:function:: void radiusMatch(const GpuMat&queryDescs, const GpuMat&trainDescs, GpuMat&trainIdx, GpuMat&nMatches, GpuMat&distance, float maxDistance, const GpuMat&mask = GpuMat())
Finds the best matches for each query descriptor which have distance less than given threshold. Results will be stored to GPU memory.
@ -335,19 +331,18 @@ cv::gpu::BruteForceMatcher_GPU::radiusMatch
:param mask: Mask specifying permissible matches between input query and train matrices of descriptors.
In contrast to
results are not sorted by distance increasing order.
In contrast to results are not sorted by distance increasing order.
This function works only on devices with Compute Capability
:math:`>=` 1.1.
.. index:: cv::gpu::BruteForceMatcher_GPU::radiusMatchDownload
.. index:: gpu::BruteForceMatcher_GPU::radiusMatchDownload
.. _cv::gpu::BruteForceMatcher_GPU::radiusMatchDownload:
.. gpu::BruteForceMatcher_GPU::radiusMatchDownload:
cv::gpu::BruteForceMatcher_GPU::radiusMatchDownload
--------------------------------------------------- ```` ```` ```` ```` ````
.. c:function:: void radiusMatchDownload(const GpuMat\& trainIdx, const GpuMat\& nMatches, const GpuMat\& distance, std::vector< std::vector<DMatch> >\& matches, bool compactResult = false)
gpu::BruteForceMatcher_GPU::radiusMatchDownload
---------------------------------------------------
.. c:function:: void radiusMatchDownload(const GpuMat&trainIdx, const GpuMat&nMatches, const GpuMat&distance, std::vector< std::vector<DMatch> >&matches, bool compactResult = false)
Downloads trainIdx, nMatchesand distancematrices obtained via to CPU vector with . If compactResultis true matchesvector will not contain matches for fully masked out query descriptors.

View File

@ -9,8 +9,6 @@ See also:
.. index:: gpu::BaseRowFilter_GPU
.. _gpu::BaseRowFilter_GPU:
gpu::BaseRowFilter_GPU
----------------------
.. c:type:: gpu::BaseRowFilter_GPU
@ -33,8 +31,6 @@ This class doesn't allocate memory for destination image. Usually this class is
.. index:: gpu::BaseColumnFilter_GPU
.. _gpu::BaseColumnFilter_GPU:
gpu::BaseColumnFilter_GPU
-------------------------
.. c:type:: gpu::BaseColumnFilter_GPU
@ -57,8 +53,6 @@ This class doesn't allocate memory for destination image. Usually this class is
.. index:: gpu::BaseFilter_GPU
.. _gpu::BaseFilter_GPU:
gpu::BaseFilter_GPU
-------------------
.. c:type:: gpu::BaseFilter_GPU
@ -82,8 +76,6 @@ This class doesn't allocate memory for destination image. Usually this class is
.. index:: gpu::FilterEngine_GPU
.. _gpu::FilterEngine_GPU:
gpu::FilterEngine_GPU
---------------------
.. c:type:: gpu::FilterEngine_GPU
@ -107,19 +99,19 @@ By using ``FilterEngine_GPU`` instead of functions you can avoid unnecessary mem
while (...)
{
cv::gpu::GpuMat src = getImg();
cv::gpu::GpuMat dst;
gpu::GpuMat src = getImg();
gpu::GpuMat dst;
// Allocate and release buffers at each iterations
cv::gpu::GaussianBlur(src, dst, ksize, sigma1);
gpu::GaussianBlur(src, dst, ksize, sigma1);
}
// Allocate buffers only once
cv::Ptr<cv::gpu::FilterEngine_GPU> filter =
cv::gpu::createGaussianFilter_GPU(CV_8UC4, ksize, sigma1);
cv::Ptr<gpu::FilterEngine_GPU> filter =
gpu::createGaussianFilter_GPU(CV_8UC4, ksize, sigma1);
while (...)
{
cv::gpu::GpuMat src = getImg();
cv::gpu::GpuMat dst;
gpu::GpuMat src = getImg();
gpu::GpuMat dst;
filter->apply(src, dst, cv::Rect(0, 0, src.cols, src.rows));
}
// Release buffers only once
@ -130,15 +122,11 @@ By using ``FilterEngine_GPU`` instead of functions you can avoid unnecessary mem
**Please note:**
The GPU filters doesn't support the in-place mode.
See also:,,,,,,,,,,
.. index:: gpu::createFilter2D_GPU
.. index:: cv::gpu::createFilter2D_GPU
.. _cv::gpu::createFilter2D_GPU:
cv::gpu::createFilter2D_GPU
gpu::createFilter2D_GPU
---------------------------
.. c:function:: Ptr<FilterEngine_GPU> createFilter2D_GPU( const Ptr<BaseFilter_GPU>\& filter2D, int srcType, int dstType)
.. c:function:: Ptr<FilterEngine_GPU> createFilter2D_GPU( const Ptr<BaseFilter_GPU>& filter2D, int srcType, int dstType)
Creates non-separable filter engine with the specified filter.
@ -150,13 +138,11 @@ cv::gpu::createFilter2D_GPU
Usually this function is used inside high-level functions, like,.
.. index:: cv::gpu::createSeparableFilter_GPU
.. index:: gpu::createSeparableFilter_GPU
.. _cv::gpu::createSeparableFilter_GPU:
cv::gpu::createSeparableFilter_GPU
gpu::createSeparableFilter_GPU
----------------------------------
.. c:function:: Ptr<FilterEngine_GPU> createSeparableFilter_GPU( const Ptr<BaseRowFilter_GPU>\& rowFilter, const Ptr<BaseColumnFilter_GPU>\& columnFilter, int srcType, int bufType, int dstType)
.. c:function:: Ptr<FilterEngine_GPU> createSeparableFilter_GPU( const Ptr<BaseRowFilter_GPU>& rowFilter, const Ptr<BaseColumnFilter_GPU>& columnFilter, int srcType, int bufType, int dstType)
Creates separable filter engine with the specified filters.
@ -172,11 +158,9 @@ cv::gpu::createSeparableFilter_GPU
Usually this function is used inside high-level functions, like
.
.. index:: cv::gpu::getRowSumFilter_GPU
.. index:: gpu::getRowSumFilter_GPU
.. _cv::gpu::getRowSumFilter_GPU:
cv::gpu::getRowSumFilter_GPU
gpu::getRowSumFilter_GPU
----------------------------
.. c:function:: Ptr<BaseRowFilter_GPU> getRowSumFilter_GPU(int srcType, int sumType, int ksize, int anchor = -1)
@ -193,11 +177,9 @@ cv::gpu::getRowSumFilter_GPU
**Please note:**
This filter doesn't check out of border accesses, so only proper submatrix of bigger matrix have to be passed to it.
.. index:: cv::gpu::getColumnSumFilter_GPU
.. index:: gpu::getColumnSumFilter_GPU
.. _cv::gpu::getColumnSumFilter_GPU:
cv::gpu::getColumnSumFilter_GPU
gpu::getColumnSumFilter_GPU
-------------------------------
.. c:function:: Ptr<BaseColumnFilter_GPU> getColumnSumFilter_GPU(int sumType, int dstType, int ksize, int anchor = -1)
@ -214,17 +196,15 @@ cv::gpu::getColumnSumFilter_GPU
**Please note:**
This filter doesn't check out of border accesses, so only proper submatrix of bigger matrix have to be passed to it.
.. index:: cv::gpu::createBoxFilter_GPU
.. index:: gpu::createBoxFilter_GPU
.. _cv::gpu::createBoxFilter_GPU:
cv::gpu::createBoxFilter_GPU
gpu::createBoxFilter_GPU
----------------------------
.. c:function:: Ptr<FilterEngine_GPU> createBoxFilter_GPU(int srcType, int dstType, const Size\& ksize, const Point\& anchor = Point(-1,-1))
.. c:function:: Ptr<FilterEngine_GPU> createBoxFilter_GPU(int srcType, int dstType, const Size& ksize, const Point& anchor = Point(-1,-1))
Creates normalized 2D box filter.
.. c:function:: Ptr<BaseFilter_GPU> getBoxFilter_GPU(int srcType, int dstType, const Size\& ksize, Point anchor = Point(-1, -1))
.. c:function:: Ptr<BaseFilter_GPU> getBoxFilter_GPU(int srcType, int dstType, const Size& ksize, Point anchor = Point(-1, -1))
:param srcType: Input image type. Supports ``CV_8UC1`` and ``CV_8UC4`` .
@ -237,14 +217,13 @@ cv::gpu::createBoxFilter_GPU
**Please note:**
This filter doesn't check out of border accesses, so only proper submatrix of bigger matrix have to be passed to it.
See also:
:func:`boxFilter` .
See also: :func:`boxFilter` .
.. index:: gpu::boxFilter
cv::gpu::boxFilter
gpu::boxFilter
------------------
.. c:function:: void boxFilter(const GpuMat\& src, GpuMat\& dst, int ddepth, Size ksize, Point anchor = Point(-1,-1))
.. c:function:: void gpu::boxFilter(const GpuMat& src, GpuMat& dst, int ddepth, Size ksize, Point anchor = Point(-1,-1))
Smooths the image using the normalized box filter.
@ -266,9 +245,9 @@ See also:
.. index:: gpu::blur
cv::gpu::blur
gpu::blur
-------------
.. c:function:: void blur(const GpuMat\& src, GpuMat\& dst, Size ksize, Point anchor = Point(-1,-1))
.. c:function:: void gpu::blur(const GpuMat& src, GpuMat& dst, Size ksize, Point anchor = Point(-1,-1))
A synonym for normalized box filter.
@ -286,17 +265,15 @@ This filter doesn't check out of border accesses, so only proper submatrix of bi
See also:
:func:`blur`,:func:`gpu::boxFilter` .
.. index:: cv::gpu::createMorphologyFilter_GPU
.. index:: gpu::createMorphologyFilter_GPU
.. _cv::gpu::createMorphologyFilter_GPU:
cv::gpu::createMorphologyFilter_GPU
gpu::createMorphologyFilter_GPU
-----------------------------------
.. c:function:: Ptr<FilterEngine_GPU> createMorphologyFilter_GPU(int op, int type, const Mat\& kernel, const Point\& anchor = Point(-1,-1), int iterations = 1)
.. c:function:: Ptr<FilterEngine_GPU> createMorphologyFilter_GPU(int op, int type, const Mat& kernel, const Point& anchor = Point(-1,-1), int iterations = 1)
Creates 2D morphological filter.
.. c:function:: Ptr<BaseFilter_GPU> getMorphologyFilter_GPU(int op, int type, const Mat\& kernel, const Size\& ksize, Point anchor=Point(-1,-1))
.. c:function:: Ptr<BaseFilter_GPU> getMorphologyFilter_GPU(int op, int type, const Mat& kernel, const Size& ksize, Point anchor=Point(-1,-1))
{Morphology operation id. Only ``MORPH_ERODE`` and ``MORPH_DILATE`` are supported.}
@ -316,9 +293,9 @@ See also:
.. index:: gpu::erode
cv::gpu::erode
gpu::erode
--------------
.. c:function:: void erode(const GpuMat\& src, GpuMat\& dst, const Mat\& kernel, Point anchor = Point(-1, -1), int iterations = 1)
.. c:function:: void gpu::erode(const GpuMat& src, GpuMat& dst, const Mat& kernel, Point anchor = Point(-1, -1), int iterations = 1)
Erodes an image by using a specific structuring element.
@ -340,9 +317,9 @@ See also:
.. index:: gpu::dilate
cv::gpu::dilate
gpu::dilate
---------------
.. c:function:: void dilate(const GpuMat\& src, GpuMat\& dst, const Mat\& kernel, Point anchor = Point(-1, -1), int iterations = 1)
.. c:function:: void gpu::dilate(const GpuMat& src, GpuMat& dst, const Mat& kernel, Point anchor = Point(-1, -1), int iterations = 1)
Dilates an image by using a specific structuring element.
@ -364,9 +341,9 @@ See also:
.. index:: gpu::morphologyEx
cv::gpu::morphologyEx
gpu::morphologyEx
---------------------
.. c:function:: void morphologyEx(const GpuMat\& src, GpuMat\& dst, int op, const Mat\& kernel, Point anchor = Point(-1, -1), int iterations = 1)
.. c:function:: void gpu::morphologyEx(const GpuMat& src, GpuMat& dst, int op, const Mat& kernel, Point anchor = Point(-1, -1), int iterations = 1)
Applies an advanced morphological operation to image.
@ -398,17 +375,15 @@ This filter doesn't check out of border accesses, so only proper submatrix of bi
See also:
:func:`morphologyEx` .
.. index:: cv::gpu::createLinearFilter_GPU
.. index:: gpu::createLinearFilter_GPU
.. _cv::gpu::createLinearFilter_GPU:
cv::gpu::createLinearFilter_GPU
gpu::createLinearFilter_GPU
-------------------------------
.. c:function:: Ptr<FilterEngine_GPU> createLinearFilter_GPU(int srcType, int dstType, const Mat\& kernel, const Point\& anchor = Point(-1,-1))
.. c:function:: Ptr<FilterEngine_GPU> gpu::createLinearFilter_GPU(int srcType, int dstType, const Mat& kernel, const Point& anchor = Point(-1,-1))
Creates the non-separable linear filter.
.. c:function:: Ptr<BaseFilter_GPU> getLinearFilter_GPU(int srcType, int dstType, const Mat\& kernel, const Size\& ksize, Point anchor = Point(-1, -1))
.. c:function:: Ptr<BaseFilter_GPU> getLinearFilter_GPU(int srcType, int dstType, const Mat& kernel, const Size& ksize, Point anchor = Point(-1, -1))
:param srcType: Input image type. Supports ``CV_8UC1`` and ``CV_8UC4`` .
@ -428,9 +403,9 @@ See also:
.. index:: gpu::filter2D
cv::gpu::filter2D
gpu::filter2D
-----------------
.. c:function:: void filter2D(const GpuMat\& src, GpuMat\& dst, int ddepth, const Mat\& kernel, Point anchor=Point(-1,-1))
.. c:function:: void gpu::filter2D(const GpuMat& src, GpuMat& dst, int ddepth, const Mat& kernel, Point anchor=Point(-1,-1))
Applies non-separable 2D linear filter to image.
@ -452,9 +427,9 @@ See also:
.. index:: gpu::Laplacian
cv::gpu::Laplacian
gpu::Laplacian
------------------
.. c:function:: void Laplacian(const GpuMat\& src, GpuMat\& dst, int ddepth, int ksize = 1, double scale = 1)
.. c:function:: void gpu::Laplacian(const GpuMat& src, GpuMat& dst, int ddepth, int ksize = 1, double scale = 1)
Applies Laplacian operator to image.
@ -474,13 +449,11 @@ This filter doesn't check out of border accesses, so only proper submatrix of bi
See also:
:func:`Laplacian`,:func:`gpu::filter2D` .
.. index:: cv::gpu::getLinearRowFilter_GPU
.. index:: gpu::getLinearRowFilter_GPU
.. _cv::gpu::getLinearRowFilter_GPU:
cv::gpu::getLinearRowFilter_GPU
gpu::getLinearRowFilter_GPU
-------------------------------
.. c:function:: Ptr<BaseRowFilter_GPU> getLinearRowFilter_GPU(int srcType, int bufType, const Mat\& rowKernel, int anchor = -1, int borderType = BORDER_CONSTANT)
.. c:function:: Ptr<BaseRowFilter_GPU> getLinearRowFilter_GPU(int srcType, int bufType, const Mat& rowKernel, int anchor = -1, int borderType = BORDER_CONSTANT)
Creates primitive row filter with the specified kernel.
@ -498,13 +471,11 @@ There are two version of algorithm: NPP and OpenCV. NPP calls when ``srcType ==
See also:,:func:`createSeparableLinearFilter` .
.. index:: cv::gpu::getLinearColumnFilter_GPU
.. index:: gpu::getLinearColumnFilter_GPU
.. _cv::gpu::getLinearColumnFilter_GPU:
cv::gpu::getLinearColumnFilter_GPU
gpu::getLinearColumnFilter_GPU
----------------------------------
.. c:function:: Ptr<BaseColumnFilter_GPU> getLinearColumnFilter_GPU(int bufType, int dstType, const Mat\& columnKernel, int anchor = -1, int borderType = BORDER_CONSTANT)
.. c:function:: Ptr<BaseColumnFilter_GPU> getLinearColumnFilter_GPU(int bufType, int dstType, const Mat& columnKernel, int anchor = -1, int borderType = BORDER_CONSTANT)
Creates the primitive column filter with the specified kernel.
@ -521,13 +492,11 @@ cv::gpu::getLinearColumnFilter_GPU
There are two version of algorithm: NPP and OpenCV. NPP calls when ``dstType == CV_8UC1`` or ``dstType == CV_8UC4`` and ``bufType == dstType`` , otherwise calls OpenCV version. NPP supports only ``BORDER_CONSTANT`` border type and doesn't check indices outside image. OpenCV version supports only ``CV_32F`` buffer depth and ``BORDER_REFLECT101``,``BORDER_REPLICATE`` and ``BORDER_CONSTANT`` border types and checks indices outside image.
See also:,:func:`createSeparableLinearFilter` .
.. index:: cv::gpu::createSeparableLinearFilter_GPU
.. index:: gpu::createSeparableLinearFilter_GPU
.. _cv::gpu::createSeparableLinearFilter_GPU:
cv::gpu::createSeparableLinearFilter_GPU
gpu::createSeparableLinearFilter_GPU
----------------------------------------
.. c:function:: Ptr<FilterEngine_GPU> createSeparableLinearFilter_GPU(int srcType, int dstType, const Mat\& rowKernel, const Mat\& columnKernel, const Point\& anchor = Point(-1,-1), int rowBorderType = BORDER_DEFAULT, int columnBorderType = -1)
.. c:function:: Ptr<FilterEngine_GPU> createSeparableLinearFilter_GPU(int srcType, int dstType, const Mat& rowKernel, const Mat& columnKernel, const Point& anchor = Point(-1,-1), int rowBorderType = BORDER_DEFAULT, int columnBorderType = -1)
Creates the separable linear filter engine.
@ -546,9 +515,9 @@ See also:,,
.. index:: gpu::sepFilter2D
cv::gpu::sepFilter2D
gpu::sepFilter2D
--------------------
.. c:function:: void sepFilter2D(const GpuMat\& src, GpuMat\& dst, int ddepth, const Mat\& kernelX, const Mat\& kernelY, Point anchor = Point(-1,-1), int rowBorderType = BORDER_DEFAULT, int columnBorderType = -1)
.. c:function:: void gpu::sepFilter2D(const GpuMat& src, GpuMat& dst, int ddepth, const Mat& kernelX, const Mat& kernelY, Point anchor = Point(-1,-1), int rowBorderType = BORDER_DEFAULT, int columnBorderType = -1)
Applies separable 2D linear filter to the image.
@ -566,11 +535,9 @@ cv::gpu::sepFilter2D
See also:,:func:`sepFilter2D` .
.. index:: cv::gpu::createDerivFilter_GPU
.. index:: gpu::createDerivFilter_GPU
.. _cv::gpu::createDerivFilter_GPU:
cv::gpu::createDerivFilter_GPU
gpu::createDerivFilter_GPU
------------------------------
.. c:function:: Ptr<FilterEngine_GPU> createDerivFilter_GPU(int srcType, int dstType, int dx, int dy, int ksize, int rowBorderType = BORDER_DEFAULT, int columnBorderType = -1)
@ -592,9 +559,9 @@ See also:,:func:`createDerivFilter` .
.. index:: gpu::Sobel
cv::gpu::Sobel
gpu::Sobel
--------------
.. c:function:: void Sobel(const GpuMat\& src, GpuMat\& dst, int ddepth, int dx, int dy, int ksize = 3, double scale = 1, int rowBorderType = BORDER_DEFAULT, int columnBorderType = -1)
.. c:function:: void gpu::Sobel(const GpuMat& src, GpuMat& dst, int ddepth, int dx, int dy, int ksize = 3, double scale = 1, int rowBorderType = BORDER_DEFAULT, int columnBorderType = -1)
Applies generalized Sobel operator to the image.
@ -618,9 +585,9 @@ See also:,:func:`Sobel` .
.. index:: gpu::Scharr
cv::gpu::Scharr
gpu::Scharr
---------------
.. c:function:: void Scharr(const GpuMat\& src, GpuMat\& dst, int ddepth, int dx, int dy, double scale = 1, int rowBorderType = BORDER_DEFAULT, int columnBorderType = -1)
.. c:function:: void gpu::Scharr(const GpuMat& src, GpuMat& dst, int ddepth, int dx, int dy, double scale = 1, int rowBorderType = BORDER_DEFAULT, int columnBorderType = -1)
Calculates the first x- or y- image derivative using Scharr operator.
@ -636,14 +603,11 @@ cv::gpu::Scharr
:param scale: Optional scale factor for the computed derivative values (by default, no scaling is applied, see :func:`getDerivKernels` ).
:param rowBorderType, columnBorderType: Pixel extrapolation method, see :func:`borderInterpolate`
See also:,:func:`Scharr` .
:param rowBorderType, columnBorderType: Pixel extrapolation method, see :func:`borderInterpolate` See also:,:func:`Scharr` .
.. index:: cv::gpu::createGaussianFilter_GPU
.. index:: gpu::createGaussianFilter_GPU
.. _cv::gpu::createGaussianFilter_GPU:
cv::gpu::createGaussianFilter_GPU
gpu::createGaussianFilter_GPU
---------------------------------
.. c:function:: Ptr<FilterEngine_GPU> createGaussianFilter_GPU(int type, Size ksize, double sigmaX, double sigmaY = 0, int rowBorderType = BORDER_DEFAULT, int columnBorderType = -1)
@ -663,9 +627,9 @@ See also:,:func:`createGaussianFilter` .
.. index:: gpu::GaussianBlur
cv::gpu::GaussianBlur
gpu::GaussianBlur
---------------------
.. c:function:: void GaussianBlur(const GpuMat\& src, GpuMat\& dst, Size ksize, double sigmaX, double sigmaY = 0, int rowBorderType = BORDER_DEFAULT, int columnBorderType = -1)
.. c:function:: void gpu::GaussianBlur(const GpuMat& src, GpuMat& dst, Size ksize, double sigmaX, double sigmaY = 0, int rowBorderType = BORDER_DEFAULT, int columnBorderType = -1)
Smooths the image using Gaussian filter.
@ -681,13 +645,11 @@ cv::gpu::GaussianBlur
See also:,:func:`GaussianBlur` .
.. index:: cv::gpu::getMaxFilter_GPU
.. index:: gpu::getMaxFilter_GPU
.. _cv::gpu::getMaxFilter_GPU:
cv::gpu::getMaxFilter_GPU
gpu::getMaxFilter_GPU
-------------------------
.. c:function:: Ptr<BaseFilter_GPU> getMaxFilter_GPU(int srcType, int dstType, const Size\& ksize, Point anchor = Point(-1,-1))
.. c:function:: Ptr<BaseFilter_GPU> getMaxFilter_GPU(int srcType, int dstType, const Size& ksize, Point anchor = Point(-1,-1))
Creates maximum filter.
@ -702,13 +664,11 @@ cv::gpu::getMaxFilter_GPU
**Please note:**
This filter doesn't check out of border accesses, so only proper submatrix of bigger matrix have to be passed to it.
.. index:: cv::gpu::getMinFilter_GPU
.. index:: gpu::getMinFilter_GPU
.. _cv::gpu::getMinFilter_GPU:
cv::gpu::getMinFilter_GPU
gpu::getMinFilter_GPU
-------------------------
.. c:function:: Ptr<BaseFilter_GPU> getMinFilter_GPU(int srcType, int dstType, const Size\& ksize, Point anchor = Point(-1,-1))
.. c:function:: Ptr<BaseFilter_GPU> getMinFilter_GPU(int srcType, int dstType, const Size& ksize, Point anchor = Point(-1,-1))
Creates minimum filter.

View File

@ -7,7 +7,7 @@ Image Processing
cv::gpu::meanShiftFiltering
---------------------------
.. c:function:: void meanShiftFiltering(const GpuMat\& src, GpuMat\& dst,
.. c:function:: void gpu::meanShiftFiltering(const GpuMat\& src, GpuMat\& dst,
int sp, int sr,
TermCriteria criteria = TermCriteria(TermCriteria::MAX_ITER
+ TermCriteria::EPS, 5, 1))
@ -28,7 +28,7 @@ cv::gpu::meanShiftFiltering
cv::gpu::meanShiftProc
----------------------
.. c:function:: void meanShiftProc(const GpuMat\& src, GpuMat\& dstr, GpuMat\& dstsp,
.. c:function:: void gpu::meanShiftProc(const GpuMat\& src, GpuMat\& dstr, GpuMat\& dstsp,
int sp, int sr,
TermCriteria criteria = TermCriteria(TermCriteria::MAX_ITER
+ TermCriteria::EPS, 5, 1))
@ -54,7 +54,7 @@ See also:
cv::gpu::meanShiftSegmentation
------------------------------
.. c:function:: void meanShiftSegmentation(const GpuMat\& src, Mat\& dst,
.. c:function:: void gpu::meanShiftSegmentation(const GpuMat\& src, Mat\& dst,
int sp, int sr, int minsize,
TermCriteria criteria = TermCriteria(TermCriteria::MAX_ITER
+ TermCriteria::EPS, 5, 1))
@ -77,9 +77,9 @@ cv::gpu::meanShiftSegmentation
cv::gpu::integral
-----------------
.. c:function:: void integral(const GpuMat\& src, GpuMat\& sum)
.. c:function:: void gpu::integral(const GpuMat\& src, GpuMat\& sum)
.. c:function:: void integral(const GpuMat\& src, GpuMat\& sum, GpuMat\& sqsum)
.. c:function:: void gpu::integral(const GpuMat\& src, GpuMat\& sum, GpuMat\& sqsum)
Computes integral image and squared integral image.
@ -96,7 +96,7 @@ See also:
cv::gpu::sqrIntegral
--------------------
.. c:function:: void sqrIntegral(const GpuMat\& src, GpuMat\& sqsum)
.. c:function:: void gpu::sqrIntegral(const GpuMat\& src, GpuMat\& sqsum)
Computes squared integral image.
@ -108,7 +108,7 @@ cv::gpu::sqrIntegral
cv::gpu::columnSum
------------------
.. c:function:: void columnSum(const GpuMat\& src, GpuMat\& sum)
.. c:function:: void gpu::columnSum(const GpuMat\& src, GpuMat\& sum)
Computes vertical (column) sum.
@ -120,7 +120,7 @@ cv::gpu::columnSum
cv::gpu::cornerHarris
---------------------
.. c:function:: void cornerHarris(const GpuMat\& src, GpuMat\& dst,
.. c:function:: void gpu::cornerHarris(const GpuMat\& src, GpuMat\& dst,
int blockSize, int ksize, double k,
int borderType=BORDER_REFLECT101)
@ -145,7 +145,7 @@ See also:
cv::gpu::cornerMinEigenVal
--------------------------
.. c:function:: void cornerMinEigenVal(const GpuMat\& src, GpuMat\& dst,
.. c:function:: void gpu::cornerMinEigenVal(const GpuMat\& src, GpuMat\& dst,
int blockSize, int ksize,
int borderType=BORDER_REFLECT101)
@ -170,7 +170,7 @@ See also:
cv::gpu::mulSpectrums
---------------------
.. c:function:: void mulSpectrums(const GpuMat\& a, const GpuMat\& b,
.. c:function:: void gpu::mulSpectrums(const GpuMat\& a, const GpuMat\& b,
GpuMat\& c, int flags, bool conjB=false)
Performs per-element multiplication of two Fourier spectrums.
@ -194,7 +194,7 @@ See also:
cv::gpu::mulAndScaleSpectrums
-----------------------------
.. c:function:: void mulAndScaleSpectrums(const GpuMat\& a, const GpuMat\& b,
.. c:function:: void gpu::mulAndScaleSpectrums(const GpuMat\& a, const GpuMat\& b,
GpuMat\& c, int flags, float scale, bool conjB=false)
Performs per-element multiplication of two Fourier spectrums and scales the result.
@ -219,8 +219,8 @@ See also:
.. index:: gpu::dft
cv::gpu::dft
------------ ``_`` ``_``
.. c:function:: void dft(const GpuMat\& src, GpuMat\& dst, Size dft_size, int flags=0)
------------
.. c:function:: void gpu::dft(const GpuMat\& src, GpuMat\& dst, Size dft_size, int flags=0)
Performs a forward or inverse discrete Fourier transform (1D or 2D) of floating point matrix. Can handle real matrices (CV32FC1) and complex matrices in the interleaved format (CV32FC2).
@ -259,10 +259,10 @@ See also:
cv::gpu::convolve
-----------------
.. c:function:: void convolve(const GpuMat\& image, const GpuMat\& templ, GpuMat\& result,
.. c:function:: void gpu::convolve(const GpuMat\& image, const GpuMat\& templ, GpuMat\& result,
bool ccorr=false)
.. c:function:: void convolve(const GpuMat\& image, const GpuMat\& templ, GpuMat\& result,
.. c:function:: void gpu::convolve(const GpuMat\& image, const GpuMat\& templ, GpuMat\& result,
bool ccorr, ConvolveBuf\& buf)
Computes convolution (or cross-correlation) of two images.
@ -316,7 +316,7 @@ Constructs a buffer for the convolve function with respectively arguments.
cv::gpu::matchTemplate
----------------------
.. c:function:: void matchTemplate(const GpuMat\& image, const GpuMat\& templ,
.. c:function:: void gpu::matchTemplate(const GpuMat\& image, const GpuMat\& templ,
GpuMat\& result, int method)
Computes a proximity map for a raster template and an image where the template is searched for.
@ -325,8 +325,7 @@ cv::gpu::matchTemplate
:param templ: Template image. Must have the same size and type as ``image`` .
:param result: Map containing comparison results ( ``CV_32FC1`` ). If ``image`` is :math:`W \times H` and
``templ`` is :math:`w \times h` then ``result`` must be :math:`(W-w+1) \times (H-h+1)` .
:param result: Map containing comparison results ( ``CV_32FC1`` ). If ``image`` is :math:`W \times H` and ``templ`` is :math:`w \times h` then ``result`` must be :math:`(W-w+1) \times (H-h+1)` .
:param method: Specifies the way which the template must be compared with the image.
@ -351,7 +350,7 @@ See also:
cv::gpu::remap
--------------
.. c:function:: void remap(const GpuMat\& src, GpuMat\& dst, const GpuMat\& xmap, const GpuMat\& ymap)
.. c:function:: void gpu::remap(const GpuMat\& src, GpuMat\& dst, const GpuMat\& xmap, const GpuMat\& ymap)
Applies a generic geometrical transformation to an image.
@ -378,9 +377,9 @@ See also:
cv::gpu::cvtColor
-----------------
.. c:function:: void cvtColor(const GpuMat\& src, GpuMat\& dst, int code, int dcn = 0)
.. c:function:: void gpu::cvtColor(const GpuMat\& src, GpuMat\& dst, int code, int dcn = 0)
.. c:function:: void cvtColor(const GpuMat\& src, GpuMat\& dst, int code, int dcn, const Stream\& stream)
.. c:function:: void gpu::cvtColor(const GpuMat\& src, GpuMat\& dst, int code, int dcn, const Stream\& stream)
Converts image from one color space to another.
@ -403,9 +402,9 @@ See also:
cv::gpu::threshold
------------------
.. c:function:: double threshold(const GpuMat\& src, GpuMat\& dst, double thresh, double maxval, int type)
.. c:function:: double gpu::threshold(const GpuMat\& src, GpuMat\& dst, double thresh, double maxval, int type)
.. c:function:: double threshold(const GpuMat\& src, GpuMat\& dst, double thresh, double maxval, int type, const Stream\& stream)
.. c:function:: double gpu::threshold(const GpuMat\& src, GpuMat\& dst, double thresh, double maxval, int type, const Stream\& stream)
Applies a fixed-level threshold to each array element.
@ -428,7 +427,7 @@ See also:
cv::gpu::resize
---------------
.. c:function:: void resize(const GpuMat\& src, GpuMat\& dst, Size dsize, double fx=0, double fy=0, int interpolation = INTER_LINEAR)
.. c:function:: void gpu::resize(const GpuMat\& src, GpuMat\& dst, Size dsize, double fx=0, double fy=0, int interpolation = INTER_LINEAR)
Resizes an image.
@ -468,7 +467,7 @@ See also:
cv::gpu::warpAffine
-------------------
.. c:function:: void warpAffine(const GpuMat\& src, GpuMat\& dst, const Mat\& M, Size dsize, int flags = INTER_LINEAR)
.. c:function:: void gpu::warpAffine(const GpuMat\& src, GpuMat\& dst, const Mat\& M, Size dsize, int flags = INTER_LINEAR)
Applies an affine transformation to an image.
@ -489,7 +488,7 @@ See also:
cv::gpu::warpPerspective
------------------------
.. c:function:: void warpPerspective(const GpuMat\& src, GpuMat\& dst, const Mat\& M, Size dsize, int flags = INTER_LINEAR)
.. c:function:: void gpu::warpPerspective(const GpuMat\& src, GpuMat\& dst, const Mat\& M, Size dsize, int flags = INTER_LINEAR)
Applies a perspective transformation to an image.
@ -511,7 +510,7 @@ See also:
cv::gpu::rotate
---------------
.. c:function:: void rotate(const GpuMat\& src, GpuMat\& dst, Size dsize, double angle, double xShift = 0, double yShift = 0, int interpolation = INTER_LINEAR)
.. c:function:: void gpu::rotate(const GpuMat\& src, GpuMat\& dst, Size dsize, double angle, double xShift = 0, double yShift = 0, int interpolation = INTER_LINEAR)
Rotates an image around the origin (0,0) and then shifts it.
@ -536,7 +535,7 @@ See also:
cv::gpu::copyMakeBorder
-----------------------
.. c:function:: void copyMakeBorder(const GpuMat\& src, GpuMat\& dst, int top, int bottom, int left, int right, const Scalar\& value = Scalar())
.. c:function:: void gpu::copyMakeBorder(const GpuMat\& src, GpuMat\& dst, int top, int bottom, int left, int right, const Scalar\& value = Scalar())
Copies 2D array to a larger destination array and pads borders with the given constant.
@ -554,7 +553,7 @@ See also:
cv::gpu::rectStdDev
-------------------
.. c:function:: void rectStdDev(const GpuMat\& src, const GpuMat\& sqr, GpuMat\& dst, const Rect\& rect)
.. c:function:: void gpu::rectStdDev(const GpuMat\& src, const GpuMat\& sqr, GpuMat\& dst, const Rect\& rect)
Computes standard deviation of integral images.
@ -570,7 +569,7 @@ cv::gpu::rectStdDev
cv::gpu::evenLevels
-------------------
.. c:function:: void evenLevels(GpuMat\& levels, int nLevels, int lowerLevel, int upperLevel)
.. c:function:: void gpu::evenLevels(GpuMat\& levels, int nLevels, int lowerLevel, int upperLevel)
Computes levels with even distribution.
@ -586,9 +585,9 @@ cv::gpu::evenLevels
cv::gpu::histEven
-----------------
.. c:function:: void histEven(const GpuMat\& src, GpuMat\& hist, int histSize, int lowerLevel, int upperLevel)
.. c:function:: void gpu::histEven(const GpuMat\& src, GpuMat\& hist, int histSize, int lowerLevel, int upperLevel)
.. c:function:: void histEven(const GpuMat\& src, GpuMat hist[4], int histSize[4], int lowerLevel[4], int upperLevel[4])
.. c:function:: void gpu::histEven(const GpuMat\& src, GpuMat hist[4], int histSize[4], int lowerLevel[4], int upperLevel[4])
Calculates histogram with evenly distributed bins.
@ -606,9 +605,9 @@ cv::gpu::histEven
cv::gpu::histRange
------------------
.. c:function:: void histRange(const GpuMat\& src, GpuMat\& hist, const GpuMat\& levels)
.. c:function:: void gpu::histRange(const GpuMat\& src, GpuMat\& hist, const GpuMat\& levels)
.. c:function:: void histRange(const GpuMat\& src, GpuMat hist[4], const GpuMat levels[4])
.. c:function:: void gpu::histRange(const GpuMat\& src, GpuMat hist[4], const GpuMat levels[4])
Calculates histogram with bins determined by levels array.

View File

@ -5,9 +5,9 @@ Matrix Reductions
.. index:: gpu::meanStdDev
cv::gpu::meanStdDev
gpu::meanStdDev
-------------------
.. c:function:: void meanStdDev(const GpuMat\& mtx, Scalar\& mean, Scalar\& stddev)
.. c:function:: void gpu::meanStdDev(const GpuMat\& mtx, Scalar\& mean, Scalar\& stddev)
Computes mean value and standard deviation of matrix elements.
@ -22,9 +22,9 @@ See also:
.. index:: gpu::norm
cv::gpu::norm
gpu::norm
-------------
.. c:function:: double norm(const GpuMat\& src, int normType=NORM_L2)
.. c:function:: double gpu::norm(const GpuMat\& src, int normType=NORM_L2)
Returns norm of matrix (or of two matrices difference).
@ -45,8 +45,7 @@ cv::gpu::norm
* **src1** First source matrix. ``CV_8UC1`` matrices are supported for now.
* **src2** Second source matrix. Must have the same size and type as ``src1``
.
* **src2** Second source matrix. Must have the same size and type as ``src1``.
* **normType** Norm type. ``NORM_L1`` , ``NORM_L2`` and ``NORM_INF`` are supported for now.
@ -55,11 +54,11 @@ See also:
.. index:: gpu::sum
cv::gpu::sum
gpu::sum
------------
.. c:function:: Scalar sum(const GpuMat\& src)
.. c:function:: Scalar gpu::sum(const GpuMat\& src)
.. c:function:: Scalar sum(const GpuMat\& src, GpuMat\& buf)
.. c:function:: Scalar gpu::sum(const GpuMat\& src, GpuMat\& buf)
Returns sum of matrix elements.
@ -72,11 +71,11 @@ See also:
.. index:: gpu::absSum
cv::gpu::absSum
gpu::absSum
---------------
.. c:function:: Scalar absSum(const GpuMat\& src)
.. c:function:: Scalar gpu::absSum(const GpuMat\& src)
.. c:function:: Scalar absSum(const GpuMat\& src, GpuMat\& buf)
.. c:function:: Scalar gpu::absSum(const GpuMat\& src, GpuMat\& buf)
Returns sum of matrix elements absolute values.
@ -86,11 +85,11 @@ cv::gpu::absSum
.. index:: gpu::sqrSum
cv::gpu::sqrSum
gpu::sqrSum
---------------
.. c:function:: Scalar sqrSum(const GpuMat\& src)
.. c:function:: Scalar gpu::sqrSum(const GpuMat\& src)
.. c:function:: Scalar sqrSum(const GpuMat\& src, GpuMat\& buf)
.. c:function:: Scalar gpu::sqrSum(const GpuMat\& src, GpuMat\& buf)
Returns squared sum of matrix elements.
@ -100,13 +99,11 @@ cv::gpu::sqrSum
.. index:: gpu::minMax
cv::gpu::minMax
gpu::minMax
---------------
.. c:function:: void minMax(const GpuMat\& src, double* minVal,
double* maxVal=0, const GpuMat\& mask=GpuMat())
.. c:function:: void gpu::minMax(const GpuMat\& src, double* minVal, double* maxVal=0, const GpuMat\& mask=GpuMat())
.. c:function:: void minMax(const GpuMat\& src, double* minVal, double* maxVal,
const GpuMat\& mask, GpuMat\& buf)
.. c:function:: void gpu::minMax(const GpuMat\& src, double* minVal, double* maxVal, const GpuMat\& mask, GpuMat\& buf)
Finds global minimum and maximum matrix elements and returns their values.
@ -127,13 +124,13 @@ See also:
.. index:: gpu::minMaxLoc
cv::gpu::minMaxLoc
gpu::minMaxLoc
------------------
.. c:function:: void minMaxLoc(const GpuMat\& src, double\* minVal, double* maxVal=0,
.. c:function:: void gpu::minMaxLoc(const GpuMat\& src, double\* minVal, double* maxVal=0,
Point* minLoc=0, Point* maxLoc=0,
const GpuMat\& mask=GpuMat())
.. c:function:: void minMaxLoc(const GpuMat\& src, double* minVal, double* maxVal,
.. c:function:: void gpu::minMaxLoc(const GpuMat\& src, double* minVal, double* maxVal,
Point* minLoc, Point* maxLoc, const GpuMat\& mask,
GpuMat\& valbuf, GpuMat\& locbuf)
@ -162,11 +159,11 @@ See also:
.. index:: gpu::countNonZero
cv::gpu::countNonZero
gpu::countNonZero
---------------------
.. c:function:: int countNonZero(const GpuMat\& src)
.. c:function:: int gpu::countNonZero(const GpuMat\& src)
.. c:function:: int countNonZero(const GpuMat\& src, GpuMat\& buf)
.. c:function:: int gpu::countNonZero(const GpuMat\& src, GpuMat\& buf)
Counts non-zero matrix elements.

View File

@ -5,9 +5,9 @@ Operations on Matrices
.. index:: gpu::transpose
cv::gpu::transpose
gpu::transpose
------------------
.. c:function:: void transpose(const GpuMat\& src, GpuMat\& dst)
.. c:function:: void gpu::transpose(const GpuMat\& src, GpuMat\& dst)
Transposes a matrix.
@ -20,9 +20,9 @@ See also:
.. index:: gpu::flip
cv::gpu::flip
gpu::flip
-------------
.. c:function:: void flip(const GpuMat\& a, GpuMat\& b, int flipCode)
.. c:function:: void gpu::flip(const GpuMat\& a, GpuMat\& b, int flipCode)
Flips a 2D matrix around vertical, horizontal or both axes.
@ -44,13 +44,13 @@ See also:
.. index:: gpu::LUT
cv::gpu::LUT
gpu::LUT
------------
.. math::
dst(I) = lut(src(I))
.. c:function:: void LUT(const GpuMat\& src, const Mat\& lut, GpuMat\& dst)
.. c:function:: void gpu::LUT(const GpuMat\& src, const Mat\& lut, GpuMat\& dst)
Transforms the source matrix into the destination matrix using given look-up table:
@ -65,11 +65,11 @@ See also:
.. index:: gpu::merge
cv::gpu::merge
gpu::merge
--------------
.. c:function:: void merge(const GpuMat* src, size_t n, GpuMat\& dst)
.. c:function:: void gpu::merge(const GpuMat* src, size_t n, GpuMat\& dst)
.. c:function:: void merge(const GpuMat* src, size_t n, GpuMat\& dst,
.. c:function:: void gpu::merge(const GpuMat* src, size_t n, GpuMat\& dst,
const Stream\& stream)
Makes a multi-channel matrix out of several single-channel matrices.
@ -98,11 +98,11 @@ See also:
.. index:: gpu::split
cv::gpu::split
gpu::split
--------------
.. c:function:: void split(const GpuMat\& src, GpuMat* dst)
.. c:function:: void gpu::split(const GpuMat\& src, GpuMat* dst)
.. c:function:: void split(const GpuMat\& src, GpuMat* dst, const Stream\& stream)
.. c:function:: void gpu::split(const GpuMat\& src, GpuMat* dst, const Stream\& stream)
Copies each plane of a multi-channel matrix into an array.
@ -112,9 +112,9 @@ cv::gpu::split
:param stream: Stream for the asynchronous version.
.. c:function:: void split(const GpuMat\& src, vector$<$GpuMat$>$\& dst)
.. c:function:: void gpu::split(const GpuMat\& src, vector$<$GpuMat$>$\& dst)
.. c:function:: void split(const GpuMat\& src, vector$<$GpuMat$>$\& dst,
.. c:function:: void gpu::split(const GpuMat\& src, vector$<$GpuMat$>$\& dst,
const Stream\& stream)
* **src** Source matrix.
@ -128,9 +128,9 @@ See also:
.. index:: gpu::magnitude
cv::gpu::magnitude
gpu::magnitude
------------------
.. c:function:: void magnitude(const GpuMat\& x, GpuMat\& magnitude)
.. c:function:: void gpu::magnitude(const GpuMat\& x, GpuMat\& magnitude)
Computes magnitudes of complex matrix elements.
@ -156,9 +156,9 @@ See also:
.. index:: gpu::magnitudeSqr
cv::gpu::magnitudeSqr
gpu::magnitudeSqr
---------------------
.. c:function:: void magnitudeSqr(const GpuMat\& x, GpuMat\& magnitude)
.. c:function:: void gpu::magnitudeSqr(const GpuMat\& x, GpuMat\& magnitude)
Computes squared magnitudes of complex matrix elements.
@ -181,9 +181,9 @@ cv::gpu::magnitudeSqr
.. index:: gpu::phase
cv::gpu::phase
gpu::phase
--------------
.. c:function:: void phase(const GpuMat\& x, const GpuMat\& y, GpuMat\& angle,
.. c:function:: void gpu::phase(const GpuMat\& x, const GpuMat\& y, GpuMat\& angle,
bool angleInDegrees=false)
.. c:function:: void phase(const GpuMat\& x, const GpuMat\& y, GpuMat\& angle,
@ -206,9 +206,9 @@ See also:
.. index:: gpu::cartToPolar
cv::gpu::cartToPolar
gpu::cartToPolar
--------------------
.. c:function:: void cartToPolar(const GpuMat\& x, const GpuMat\& y, GpuMat\& magnitude,
.. c:function:: void gpu::cartToPolar(const GpuMat\& x, const GpuMat\& y, GpuMat\& magnitude,
GpuMat\& angle, bool angleInDegrees=false)
.. c:function:: void cartToPolar(const GpuMat\& x, const GpuMat\& y, GpuMat\& magnitude,
@ -233,12 +233,12 @@ See also:
.. index:: gpu::polarToCart
cv::gpu::polarToCart
gpu::polarToCart
--------------------
.. c:function:: void polarToCart(const GpuMat\& magnitude, const GpuMat\& angle,
.. c:function:: void gpu::polarToCart(const GpuMat\& magnitude, const GpuMat\& angle,
GpuMat\& x, GpuMat\& y, bool angleInDegrees=false)
.. c:function:: void polarToCart(const GpuMat\& magnitude, const GpuMat\& angle,
.. c:function:: void gpu::polarToCart(const GpuMat\& magnitude, const GpuMat\& angle,
GpuMat\& x, GpuMat\& y, bool angleInDegrees,
const Stream\& stream)

View File

@ -5,9 +5,9 @@ Per-element Operations.
.. index:: gpu::add
cv::gpu::add
gpu::add
------------
.. c:function:: void add(const GpuMat\& a, const GpuMat\& b, GpuMat\& c)
.. c:function:: void gpu::add(const GpuMat\& a, const GpuMat\& b, GpuMat\& c)
Computes matrix-matrix or matrix-scalar sum.
@ -17,7 +17,7 @@ cv::gpu::add
:param c: Destination matrix. Will have the same size and type as ``a`` .
.. c:function:: void add(const GpuMat\& a, const Scalar\& sc, GpuMat\& c)
.. c:function:: void gpu::add(const GpuMat\& a, const Scalar\& sc, GpuMat\& c)
* **a** Source matrix. ``CV_32FC1`` and ``CV_32FC2`` matrixes are supported for now.
@ -30,9 +30,9 @@ See also:
.. index:: gpu::subtract
cv::gpu::subtract
gpu::subtract
-----------------
.. c:function:: void subtract(const GpuMat\& a, const GpuMat\& b, GpuMat\& c)
.. c:function:: void gpu::subtract(const GpuMat\& a, const GpuMat\& b, GpuMat\& c)
Subtracts matrix from another matrix (or scalar from matrix).
@ -55,9 +55,9 @@ See also:
.. index:: gpu::multiply
cv::gpu::multiply
gpu::multiply
-----------------
.. c:function:: void multiply(const GpuMat\& a, const GpuMat\& b, GpuMat\& c)
.. c:function:: void gpu::multiply(const GpuMat\& a, const GpuMat\& b, GpuMat\& c)
Computes per-element product of two matrices (or of matrix and scalar).
@ -80,9 +80,9 @@ See also:
.. index:: gpu::divide
cv::gpu::divide
gpu::divide
---------------
.. c:function:: void divide(const GpuMat\& a, const GpuMat\& b, GpuMat\& c)
.. c:function:: void gpu::divide(const GpuMat\& a, const GpuMat\& b, GpuMat\& c)
Performs per-element division of two matrices (or division of matrix by scalar).
@ -108,9 +108,9 @@ See also:
.. index:: gpu::exp
cv::gpu::exp
gpu::exp
------------
.. c:function:: void exp(const GpuMat\& a, GpuMat\& b)
.. c:function:: void gpu::exp(const GpuMat\& a, GpuMat\& b)
Computes exponent of each matrix element.
@ -123,9 +123,9 @@ See also:
.. index:: gpu::log
cv::gpu::log
gpu::log
------------
.. c:function:: void log(const GpuMat\& a, GpuMat\& b)
.. c:function:: void gpu::log(const GpuMat\& a, GpuMat\& b)
Computes natural logarithm of absolute value of each matrix element.
@ -138,9 +138,9 @@ See also:
.. index:: gpu::absdiff
cv::gpu::absdiff
gpu::absdiff
----------------
.. c:function:: void absdiff(const GpuMat\& a, const GpuMat\& b, GpuMat\& c)
.. c:function:: void gpu::absdiff(const GpuMat\& a, const GpuMat\& b, GpuMat\& c)
Computes per-element absolute difference of two matrices (or of matrix and scalar).
@ -163,9 +163,9 @@ See also:
.. index:: gpu::compare
cv::gpu::compare
gpu::compare
----------------
.. c:function:: void compare(const GpuMat\& a, const GpuMat\& b, GpuMat\& c, int cmpop)
.. c:function:: void gpu::compare(const GpuMat\& a, const GpuMat\& b, GpuMat\& c, int cmpop)
Compares elements of two matrices.
@ -188,16 +188,16 @@ cv::gpu::compare
See also:
:func:`compare` .
.. index:: cv::gpu::bitwise_not
.. index:: gpu::bitwise_not
.. _cv::gpu::bitwise_not:
.. _gpu::bitwise_not:
cv::gpu::bitwise_not
gpu::bitwise_not
--------------------
.. c:function:: void bitwise_not(const GpuMat\& src, GpuMat\& dst,
.. c:function:: void gpu::bitwise_not(const GpuMat\& src, GpuMat\& dst,
const GpuMat\& mask=GpuMat())
.. c:function:: void bitwise_not(const GpuMat\& src, GpuMat\& dst,
.. c:function:: void gpu::bitwise_not(const GpuMat\& src, GpuMat\& dst,
const GpuMat\& mask, const Stream\& stream)
Performs per-element bitwise inversion.
@ -213,16 +213,16 @@ cv::gpu::bitwise_not
See also:
.
.. index:: cv::gpu::bitwise_or
.. index:: gpu::bitwise_or
.. _cv::gpu::bitwise_or:
.. _gpu::bitwise_or:
cv::gpu::bitwise_or
gpu::bitwise_or
-------------------
.. c:function:: void bitwise_or(const GpuMat\& src1, const GpuMat\& src2, GpuMat\& dst,
.. c:function:: void gpu::bitwise_or(const GpuMat\& src1, const GpuMat\& src2, GpuMat\& dst,
const GpuMat\& mask=GpuMat())
.. c:function:: void bitwise_or(const GpuMat\& src1, const GpuMat\& src2, GpuMat\& dst,
.. c:function:: void gpu::bitwise_or(const GpuMat\& src1, const GpuMat\& src2, GpuMat\& dst,
const GpuMat\& mask, const Stream\& stream)
Performs per-element bitwise disjunction of two matrices.
@ -240,16 +240,16 @@ cv::gpu::bitwise_or
See also:
.
.. index:: cv::gpu::bitwise_and
.. index:: gpu::bitwise_and
.. _cv::gpu::bitwise_and:
.. _gpu::bitwise_and:
cv::gpu::bitwise_and
gpu::bitwise_and
--------------------
.. c:function:: void bitwise_and(const GpuMat\& src1, const GpuMat\& src2, GpuMat\& dst,
.. c:function:: void gpu::bitwise_and(const GpuMat\& src1, const GpuMat\& src2, GpuMat\& dst,
const GpuMat\& mask=GpuMat())
.. c:function:: void bitwise_and(const GpuMat\& src1, const GpuMat\& src2, GpuMat\& dst,
.. c:function:: void gpu::bitwise_and(const GpuMat\& src1, const GpuMat\& src2, GpuMat\& dst,
const GpuMat\& mask, const Stream\& stream)
Performs per-element bitwise conjunction of two matrices.
@ -267,16 +267,16 @@ cv::gpu::bitwise_and
See also:
.
.. index:: cv::gpu::bitwise_xor
.. index:: gpu::bitwise_xor
.. _cv::gpu::bitwise_xor:
.. _gpu::bitwise_xor:
cv::gpu::bitwise_xor
gpu::bitwise_xor
--------------------
.. c:function:: void bitwise_xor(const GpuMat\& src1, const GpuMat\& src2, GpuMat\& dst,
.. c:function:: void gpu::bitwise_xor(const GpuMat\& src1, const GpuMat\& src2, GpuMat\& dst,
const GpuMat\& mask=GpuMat())
.. c:function:: void bitwise_xor(const GpuMat\& src1, const GpuMat\& src2, GpuMat\& dst,
.. c:function:: void gpu::bitwise_xor(const GpuMat\& src1, const GpuMat\& src2, GpuMat\& dst,
const GpuMat\& mask, const Stream\& stream)
Performs per-element bitwise "exclusive or" of two matrices.
@ -296,11 +296,11 @@ See also:
.. index:: gpu::min
cv::gpu::min
gpu::min
------------
.. c:function:: void min(const GpuMat\& src1, const GpuMat\& src2, GpuMat\& dst)
.. c:function:: void gpu::min(const GpuMat\& src1, const GpuMat\& src2, GpuMat\& dst)
.. c:function:: void min(const GpuMat\& src1, const GpuMat\& src2, GpuMat\& dst,
.. c:function:: void gpu::min(const GpuMat\& src1, const GpuMat\& src2, GpuMat\& dst,
const Stream\& stream)
Computes per-element minimum of two matrices (or of matrix and scalar).
@ -313,9 +313,9 @@ cv::gpu::min
:param stream: Stream for the asynchronous version.
.. c:function:: void min(const GpuMat\& src1, double src2, GpuMat\& dst)
.. c:function:: void gpu::min(const GpuMat\& src1, double src2, GpuMat\& dst)
.. c:function:: void min(const GpuMat\& src1, double src2, GpuMat\& dst,
.. c:function:: void gpu::min(const GpuMat\& src1, double src2, GpuMat\& dst,
const Stream\& stream)
* **src1** Source matrix.
@ -331,11 +331,11 @@ See also:
.. index:: gpu::max
cv::gpu::max
gpu::max
------------
.. c:function:: void max(const GpuMat\& src1, const GpuMat\& src2, GpuMat\& dst)
.. c:function:: void gpu::max(const GpuMat\& src1, const GpuMat\& src2, GpuMat\& dst)
.. c:function:: void max(const GpuMat\& src1, const GpuMat\& src2, GpuMat\& dst,
.. c:function:: void gpu::max(const GpuMat\& src1, const GpuMat\& src2, GpuMat\& dst,
const Stream\& stream)
Computes per-element maximum of two matrices (or of matrix and scalar).

View File

@ -14,6 +14,7 @@ imdecode
:param buf: The input array of vector of bytes
:param flags: The same flags as in :ref:`imread`
The function reads image from the specified buffer in memory.
If the buffer is too short or contains invalid data, the empty matrix will be returned.
@ -35,6 +36,7 @@ imencode
:param buf: The output buffer; resized to fit the compressed image
:param params: The format-specific parameters; see :ref:`imwrite`
The function compresses the image and stores it in the memory buffer, which is resized to fit the result.
See
:ref:`imwrite` for the list of supported formats and the flags description.
@ -175,7 +177,7 @@ Class for video capturing from video files or cameras ::
protected:
...
};
..
The class provides C++ video capturing API. Here is how the class can be used: ::
@ -205,7 +207,7 @@ The class provides C++ video capturing API. Here is how the class can be used: :
// the camera will be deinitialized automatically in VideoCapture destructor
return 0;
}
..
.. index:: VideoCapture::VideoCapture
@ -361,5 +363,6 @@ Video writer class ::
protected:
...
};
..

View File

@ -360,10 +360,13 @@ bilateralFilter
:param src: The source 8-bit or floating-point, 1-channel or 3-channel image
:param dst: The destination image; will have the same size and the same type as ``src``
:param d: The diameter of each pixel neighborhood, that is used during filtering. If it is non-positive, it's computed from ``sigmaSpace``
:param sigmaColor: Filter sigma in the color space. Larger value of the parameter means that farther colors within the pixel neighborhood (see ``sigmaSpace`` ) will be mixed together, resulting in larger areas of semi-equal color
:param sigmaSpace: Filter sigma in the coordinate space. Larger value of the parameter means that farther pixels will influence each other (as long as their colors are close enough; see ``sigmaColor`` ). Then ``d>0`` , it specifies the neighborhood size regardless of ``sigmaSpace`` , otherwise ``d`` is proportional to ``sigmaSpace``
The function applies bilateral filtering to the input image, as described in
http://www.dai.ed.ac.uk/CVonline/LOCAL\_COPIES/MANDUCHI1/Bilateral\_Filtering.html
@ -378,6 +381,7 @@ blur
:param src: The source image
:param dst: The destination image; will have the same size and the same type as ``src``
:param ksize: The smoothing kernel size
:param anchor: The anchor point. The default value ``Point(-1,-1)`` means that the anchor is at the kernel center
@ -404,9 +408,11 @@ borderInterpolate
Computes source location of extrapolated pixel
:param p: 0-based coordinate of the extrapolated pixel along one of the axes, likely <0 or >= ``len``
:param len: length of the array along the corresponding axis
:param borderType: the border type, one of the ``BORDER_*`` , except for ``BORDER_TRANSPARENT`` and ``BORDER_ISOLATED`` . When ``borderType==BORDER_CONSTANT`` the function always returns -1, regardless of ``p`` and ``len``
The function computes and returns the coordinate of the donor pixel, corresponding to the specified extrapolated pixel when using the specified extrapolation border mode. For example, if we use ``BORDER_WRAP`` mode in the horizontal direction, ``BORDER_REFLECT_101`` in the vertical direction and want to compute value of the "virtual" pixel ``Point(-5, 100)`` in a floating-point image ``img`` , it will be ::
float val = img.at<float>(borderInterpolate(100, img.rows, BORDER_REFLECT_101),
@ -419,6 +425,7 @@ Normally, the function is not called directly; it is used inside
See also:
:func:`FilterEngine`,:func:`copyMakeBorder`
.. index:: boxFilter
boxFilter
@ -430,6 +437,7 @@ boxFilter
:param src: The source image
:param dst: The destination image; will have the same size and the same type as ``src``
:param ksize: The smoothing kernel size
:param anchor: The anchor point. The default value ``Point(-1,-1)`` means that the anchor is at the kernel center
@ -486,10 +494,13 @@ copyMakeBorder
:param src: The source image
:param dst: The destination image; will have the same type as ``src`` and the size ``Size(src.cols+left+right, src.rows+top+bottom)``
:param top, bottom, left, right: Specify how much pixels in each direction from the source image rectangle one needs to extrapolate, e.g. ``top=1, bottom=1, left=1, right=1`` mean that 1 pixel-wide border needs to be built
:param borderType: The border type; see :func:`borderInterpolate`
:param value: The border value if ``borderType==BORDER_CONSTANT``
The function copies the source image into the middle of the destination image. The areas to the left, to the right, above and below the copied source image will be filled with extrapolated pixels. This is not what
:func:`FilterEngine` or based on it filtering functions do (they extrapolate pixels on-fly), but what other more complex functions, including your own, may do to simplify image boundary handling.
@ -527,14 +538,19 @@ createBoxFilter
:param srcType: The source image type
:param sumType: The intermediate horizontal sum type; must have as many channels as ``srcType``
:param dstType: The destination image type; must have as many channels as ``srcType``
:param ksize: The aperture size
:param anchor: The anchor position with the kernel; negative values mean that the anchor is at the kernel center
:param normalize: Whether the sums are normalized or not; see :func:`boxFilter`
:param scale: Another way to specify normalization in lower-level ``getColumnSumFilter``
:param borderType: Which border type to use; see :func:`borderInterpolate`
The function is a convenience function that retrieves horizontal sum primitive filter with
:func:`getRowSumFilter` , vertical sum filter with
:func:`getColumnSumFilter` , constructs new
@ -558,14 +574,16 @@ createDerivFilter
:param srcType: The source image type
:param dstType: The destination image type; must have as many channels as ``srcType``
:param dx: The derivative order in respect with x
:param dy: The derivative order in respect with y
:param ksize: The aperture size; see :func:`getDerivKernels`
:param borderType: Which border type to use; see :func:`borderInterpolate`
The function
:func:`createDerivFilter` is a small convenience function that retrieves linear filter coefficients for computing image derivatives using
The function :func:`createDerivFilter` is a small convenience function that retrieves linear filter coefficients for computing image derivatives using
:func:`getDerivKernels` and then creates a separable linear filter with
:func:`createSeparableLinearFilter` . The function is used by
:func:`Sobel` and
@ -585,11 +603,14 @@ createGaussianFilter
:param type: The source and the destination image type
:param ksize: The aperture size; see :func:`getGaussianKernel`
:param sigmaX: The Gaussian sigma in the horizontal direction; see :func:`getGaussianKernel`
:param sigmaY: The Gaussian sigma in the vertical direction; if 0, then :math:`\texttt{sigmaY}\leftarrow\texttt{sigmaX}`
:param borderType: Which border type to use; see :func:`borderInterpolate`
The function
:func:`createGaussianFilter` computes Gaussian kernel coefficients and then returns separable linear filter for that kernel. The function is used by
The function :func:`createGaussianFilter` computes Gaussian kernel coefficients and then returns separable linear filter for that kernel. The function is used by
:func:`GaussianBlur` . Note that while the function takes just one data type, both for input and output, you can pass by this limitation by calling
:func:`getGaussianKernel` and then
:func:`createSeparableFilter` directly.
@ -610,6 +631,7 @@ createLinearFilter
:param srcType: The source image type
:param dstType: The destination image type; must have as many channels as ``srcType``
:param kernel: The 2D array of filter coefficients
:param anchor: The anchor point within the kernel; special value ``Point(-1,-1)`` means that the anchor is at the kernel center
@ -620,6 +642,7 @@ createLinearFilter
the parameter specifies the number of the fractional bits
:param rowBorderType, columnBorderType: The pixel extrapolation methods in the horizontal and the vertical directions; see :func:`borderInterpolate`
:param borderValue: Used in case of constant border
The function returns pointer to 2D linear filter for the specified kernel, the source array type and the destination array type. The function is a higher-level function that calls ``getLinearFilter`` and passes the retrieved 2D filter to
@ -644,6 +667,7 @@ createMorphologyFilter
Creates engine for non-separable morphological operations
:param op: The morphology operation id, ``MORPH_ERODE`` or ``MORPH_DILATE``
:param type: The input/output image type
:param element: The 2D 8-bit structuring element for the morphological operation. Non-zero elements indicate the pixels that belong to the element
@ -653,6 +677,7 @@ createMorphologyFilter
:param anchor: The anchor position within the structuring element; negative values mean that the anchor is at the center
:param rowBorderType, columnBorderType: The pixel extrapolation methods in the horizontal and the vertical directions; see :func:`borderInterpolate`
:param borderValue: The border value in case of a constant border. The default value, \ ``morphologyDefaultBorderValue`` , has the special meaning. It is transformed :math:`+\inf` for the erosion and to :math:`-\inf` for the dilation, which means that the minimum (maximum) is effectively computed only over the pixels that are inside the image.
The functions construct primitive morphological filtering operations or a filter engine based on them. Normally it's enough to use
@ -678,7 +703,9 @@ createSeparableLinearFilter
:param srcType: The source array type
:param dstType: The destination image type; must have as many channels as ``srcType``
:param bufType: The inermediate buffer type; must have as many channels as ``srcType``
:param rowKernel: The coefficients for filtering each row
:param columnKernel: The coefficients for filtering each column
@ -691,6 +718,7 @@ createSeparableLinearFilter
the parameter specifies the number of the fractional bits
:param rowBorderType, columnBorderType: The pixel extrapolation methods in the horizontal and the vertical directions; see :func:`borderInterpolate`
:param borderValue: Used in case of a constant border
:param symmetryType: The type of each of the row and column kernel; see :func:`getKernelType` .
@ -714,6 +742,7 @@ dilate
:param src: The source image
:param dst: The destination image. It will have the same size and the same type as ``src``
:param element: The structuring element used for dilation. If ``element=Mat()`` , a :math:`3\times 3` rectangular structuring element is used
:param anchor: Position of the anchor within the element. The default value :math:`(-1, -1)` means that the anchor is at the element center
@ -721,7 +750,9 @@ dilate
:param iterations: The number of times dilation is applied
:param borderType: The pixel extrapolation method; see :func:`borderInterpolate`
:param borderValue: The border value in case of a constant border. The default value has a special meaning, see :func:`createMorphologyFilter`
The function dilates the source image using the specified structuring element that determines the shape of a pixel neighborhood over which the maximum is taken:
.. math::
@ -743,6 +774,7 @@ erode
:param src: The source image
:param dst: The destination image. It will have the same size and the same type as ``src``
:param element: The structuring element used for dilation. If ``element=Mat()`` , a :math:`3\times 3` rectangular structuring element is used
:param anchor: Position of the anchor within the element. The default value :math:`(-1, -1)` means that the anchor is at the element center
@ -750,7 +782,9 @@ erode
:param iterations: The number of times erosion is applied
:param borderType: The pixel extrapolation method; see :func:`borderInterpolate`
:param borderValue: The border value in case of a constant border. The default value has a special meaning, see :func:`createMorphoogyFilter`
The function erodes the source image using the specified structuring element that determines the shape of a pixel neighborhood over which the minimum is taken:
.. math::
@ -761,6 +795,7 @@ The function supports the in-place mode. Erosion can be applied several ( ``iter
See also:
:func:`dilate`,:func:`morphologyEx`,:func:`createMorphologyFilter`
.. index:: filter2D
filter2D
@ -772,13 +807,17 @@ filter2D
:param src: The source image
:param dst: The destination image. It will have the same size and the same number of channels as ``src``
:param ddepth: The desired depth of the destination image. If it is negative, it will be the same as ``src.depth()``
:param kernel: Convolution kernel (or rather a correlation kernel), a single-channel floating point matrix. If you want to apply different kernels to different channels, split the image into separate color planes using :func:`split` and process them individually
:param anchor: The anchor of the kernel that indicates the relative position of a filtered point within the kernel. The anchor should lie within the kernel. The special default value (-1,-1) means that the anchor is at the kernel center
:param delta: The optional value added to the filtered pixels before storing them in ``dst``
:param borderType: The pixel extrapolation method; see :func:`borderInterpolate`
The function applies an arbitrary linear filter to the image. In-place operation is supported. When the aperture is partially outside the image, the function interpolates outlier pixel values according to the specified border mode.
The function does actually computes correlation, not the convolution:
@ -797,6 +836,7 @@ The function uses
See also:
:func:`sepFilter2D`,:func:`createLinearFilter`,:func:`dft`,:func:`matchTemplate`
.. index:: GaussianBlur
GaussianBlur
@ -808,9 +848,13 @@ GaussianBlur
:param src: The source image
:param dst: The destination image; will have the same size and the same type as ``src``
:param ksize: The Gaussian kernel size; ``ksize.width`` and ``ksize.height`` can differ, but they both must be positive and odd. Or, they can be zero's, then they are computed from ``sigma*``
:param sigmaX, sigmaY: The Gaussian kernel standard deviations in X and Y direction. If ``sigmaY`` is zero, it is set to be equal to ``sigmaX`` . If they are both zeros, they are computed from ``ksize.width`` and ``ksize.height`` , respectively, see :func:`getGaussianKernel` . To fully control the result regardless of possible future modification of all this semantics, it is recommended to specify all of ``ksize`` , ``sigmaX`` and ``sigmaY``
:param borderType: The pixel extrapolation method; see :func:`borderInterpolate`
The function convolves the source image with the specified Gaussian kernel. In-place filtering is supported.
See also:
@ -824,7 +868,9 @@ getDerivKernels
Returns filter coefficients for computing spatial image derivatives
:param kx: The output matrix of row filter coefficients; will have type ``ktype``
:param ky: The output matrix of column filter coefficients; will have type ``ktype``
:param dx: The derivative order in respect with x
:param dy: The derivative order in respect with y
@ -834,6 +880,7 @@ getDerivKernels
:param normalize: Indicates, whether to normalize (scale down) the filter coefficients or not. In theory the coefficients should have the denominator :math:`=2^{ksize*2-dx-dy-2}` . If you are going to filter floating-point images, you will likely want to use the normalized kernels. But if you compute derivatives of a 8-bit image, store the results in 16-bit image and wish to preserve all the fractional bits, you may want to set ``normalize=false`` .
:param ktype: The type of filter coefficients. It can be ``CV_32f`` or ``CV_64F``
The function computes and returns the filter coefficients for spatial image derivatives. When ``ksize=CV_SCHARR`` , the Scharr
:math:`3 \times 3` kernels are generated, see
:func:`Scharr` . Otherwise, Sobel kernels are generated, see
@ -853,6 +900,7 @@ getGaussianKernel
:param sigma: The Gaussian standard deviation. If it is non-positive, it is computed from ``ksize`` as \ ``sigma = 0.3*(ksize/2 - 1) + 0.8``
:param ktype: The type of filter coefficients. It can be ``CV_32f`` or ``CV_64F``
The function computes and returns the
:math:`\texttt{ksize} \times 1` matrix of Gaussian filter coefficients:
@ -893,6 +941,7 @@ The function analyzes the kernel coefficients and returns the corresponding kern
* **KERNEL_SMOOTH** All the kernel elements are non-negative and sum to 1. E.g. the Gaussian kernel is both smooth kernel and symmetrical, so the function will return ``KERNEL_SMOOTH | KERNEL_SYMMETRICAL``
* **KERNEL_INTEGER** Al the kernel coefficients are integer numbers. This flag can be combined with ``KERNEL_SYMMETRICAL`` or ``KERNEL_ASYMMETRICAL``
.. index:: getStructuringElement
getStructuringElement
@ -903,15 +952,15 @@ getStructuringElement
:param shape: The element shape, one of:
* ``MORPH_RECT`` - rectangular structuring element
* ``MORPH_RECT`` - rectangular structuring element
.. math::
E_{ij}=1
* ``MORPH_ELLIPSE`` - elliptic structuring element, i.e. a filled ellipse inscribed into the rectangle
``Rect(0, 0, esize.width, 0.esize.height)``
* ``MORPH_CROSS`` - cross-shaped structuring element:
* ``MORPH_ELLIPSE`` - elliptic structuring element, i.e. a filled ellipse inscribed into the rectangle ``Rect(0, 0, esize.width, 0.esize.height)``
* ``MORPH_CROSS`` - cross-shaped structuring element:
.. math::
@ -934,7 +983,9 @@ medianBlur
Smoothes image using median filter
:param src: The source 1-, 3- or 4-channel image. When ``ksize`` is 3 or 5, the image depth should be ``CV_8U`` , ``CV_16U`` or ``CV_32F`` . For larger aperture sizes it can only be ``CV_8U``
:param dst: The destination array; will have the same size and the same type as ``src``
:param ksize: The aperture linear size. It must be odd and more than 1, i.e. 3, 5, 7 ...
The function smoothes image using the median filter with
@ -953,6 +1004,7 @@ morphologyEx
:param src: Source image
:param dst: Destination image. It will have the same size and the same type as ``src``
:param element: Structuring element
:param op: Type of morphological operation, one of the following:
@ -970,7 +1022,9 @@ morphologyEx
:param iterations: Number of times erosion and dilation are applied
:param borderType: The pixel extrapolation method; see :func:`borderInterpolate`
:param borderValue: The border value in case of a constant border. The default value has a special meaning, see :func:`createMorphoogyFilter`
The function can perform advanced morphological transformations using erosion and dilation as basic operations.
Opening:
@ -1018,6 +1072,7 @@ Laplacian
:param src: Source image
:param dst: Destination image; will have the same size and the same number of channels as ``src``
:param ddepth: The desired depth of the destination image
:param ksize: The aperture size used to compute the second-derivative filters, see :func:`getDerivKernels` . It must be positive and odd
@ -1025,7 +1080,9 @@ Laplacian
:param scale: The optional scale factor for the computed Laplacian values (by default, no scaling is applied, see :func:`getDerivKernels` )
:param delta: The optional delta value, added to the results prior to storing them in ``dst``
:param borderType: The pixel extrapolation method, see :func:`borderInterpolate`
The function calculates the Laplacian of the source image by adding up the second x and y derivatives calculated using the Sobel operator:
.. math::
@ -1052,6 +1109,7 @@ pyrDown
:param src: The source image
:param dst: The destination image. It will have the specified size and the same type as ``src``
:param dstsize: Size of the destination image. By default it is computed as ``Size((src.cols+1)/2, (src.rows+1)/2)`` . But in any case the following conditions should be satisfied:
.. math::
@ -1078,6 +1136,7 @@ pyrUp
:param src: The source image
:param dst: The destination image. It will have the specified size and the same type as ``src``
:param dstsize: Size of the destination image. By default it is computed as ``Size(src.cols*2, (src.rows*2)`` . But in any case the following conditions should be satisfied:
.. math::
@ -1099,6 +1158,7 @@ sepFilter2D
:param src: The source image
:param dst: The destination image; will have the same size and the same number of channels as ``src``
:param ddepth: The destination image depth
:param rowKernel: The coefficients for filtering each row
@ -1110,6 +1170,7 @@ sepFilter2D
:param delta: The value added to the filtered results before storing them
:param borderType: The pixel extrapolation method; see :func:`borderInterpolate`
The function applies a separable linear filter to the image. That is, first, every row of ``src`` is filtered with 1D kernel ``rowKernel`` . Then, every column of the result is filtered with 1D kernel ``columnKernel`` and the final result shifted by ``delta`` is stored in ``dst`` .
See also:
@ -1126,6 +1187,7 @@ Sobel
:param src: The source image
:param dst: The destination image; will have the same size and the same number of channels as ``src``
:param ddepth: The destination image depth
:param xorder: Order of the derivative x
@ -1137,7 +1199,9 @@ Sobel
:param scale: The optional scale factor for the computed derivative values (by default, no scaling is applied, see :func:`getDerivKernels` )
:param delta: The optional delta value, added to the results prior to storing them in ``dst``
:param borderType: The pixel extrapolation method, see :func:`borderInterpolate`
In all cases except 1, an
:math:`\texttt{ksize} \times
\texttt{ksize}` separable kernel will be used to calculate the
@ -1192,6 +1256,7 @@ Scharr
:param src: The source image
:param dst: The destination image; will have the same size and the same number of channels as ``src``
:param ddepth: The destination image depth
:param xorder: Order of the derivative x
@ -1201,7 +1266,9 @@ Scharr
:param scale: The optional scale factor for the computed derivative values (by default, no scaling is applied, see :func:`getDerivKernels` )
:param delta: The optional delta value, added to the results prior to storing them in ``dst``
:param borderType: The pixel extrapolation method, see :func:`borderInterpolate`
The function computes the first x- or y- spatial image derivative using Scharr operator. The call
.. math::

View File

@ -139,7 +139,9 @@ getRectSubPix
:param center: Floating point coordinates of the extracted rectangle center within the source image. The center must be inside the image
:param dst: The extracted patch; will have the size ``patchSize`` and the same number of channels as ``src``
:param patchType: The depth of the extracted pixels. By default they will have the same depth as ``src``
The function ``getRectSubPix`` extracts pixels from ``src`` :
.. math::

View File

@ -210,6 +210,7 @@ equalizeHist
:param src: The source 8-bit single channel image
:param dst: The destination image; will have the same size and the same type as ``src``
The function equalizes the histogram of the input image using the following algorithm:
#.
@ -230,5 +231,5 @@ The function equalizes the histogram of the input image using the following algo
transform the image using
:math:`H'` as a look-up table:
:math:`\texttt{dst}(x,y) = H'(\texttt{src}(x,y))`
The algorithm normalizes the brightness and increases the contrast of the image.
The algorithm normalizes the brightness and increases the contrast of the image.

View File

@ -98,7 +98,7 @@ Boosting training parameters. ::
CvBoostParams( int boost_type, int weak_count, double weight_trim_rate,
int max_depth, bool use_surrogates, const float* priors );
};
..
The structure is derived from
:ref:`CvDTreeParams` , but not all of the decision tree parameters are supported. In particular, cross-validation is not supported.
@ -130,7 +130,7 @@ Weak tree classifier. ::
...
CvBoost* ensemble;
};
..
The weak classifier, a component of the boosted tree classifier
:ref:`CvBoost` , is a derivative of
@ -204,7 +204,7 @@ Boosted tree classifier. ::
CvSeq* weak;
...
};
..
.. index:: CvBoost::train

View File

@ -89,7 +89,7 @@ Decision tree node split. ::
ord;
};
};
..
.. index:: CvDTreeNode
@ -117,7 +117,7 @@ Decision tree node. ::
int depth;
...
};
..
Other numerous fields of ``CvDTreeNode`` are used internally at the training stage.
@ -154,7 +154,7 @@ Decision tree training parameters. ::
bool _use_1se_rule, bool _truncate_pruned_tree,
const float* _priors );
};
..
The structure contains all the decision tree training parameters. There is a default constructor that initializes all the parameters with the default values tuned for standalone classification tree. Any of the parameters can be overridden then, or the structure may be fully initialized using the advanced variant of the constructor.
@ -260,7 +260,7 @@ Decision tree training data and shared data for tree ensembles. ::
CvRNG rng;
};
..
This structure is mostly used internally for storing both standalone trees and tree ensembles efficiently. Basically, it contains 3 types of information:
@ -368,7 +368,7 @@ Decision tree. ::
CvDTreeTrainData* data;
};
..
.. index:: CvDTree::train

View File

@ -124,7 +124,7 @@ Parameters of the EM algorithm. ::
const CvMat** covs;
CvTermCriteria term_crit;
};
..
The structure has 2 constructors, the default one represents a rough rule-of-thumb, with another one it is possible to override a variety of parameters, from a single number of mixtures (the only essential problem-dependent parameter), to the initial values for the mixture parameters.
@ -186,7 +186,7 @@ EM model. ::
CvMat* inv_eigen_values;
CvMat** cov_rotate_mats;
};
..
.. index:: CvEM::train
@ -311,5 +311,5 @@ Example: Clustering random samples of multi-Gaussian distribution using EM ::
cvReleaseMat( &labels );
return 0;
}
..

View File

@ -43,7 +43,7 @@ K Nearest Neighbors model. ::
protected:
...
};
..
.. index:: CvKNearest::train
@ -164,5 +164,5 @@ If only a single input vector is passed, all output matrices are optional and th
cvReleaseMat( &trainData );
return 0;
}
..

View File

@ -121,7 +121,7 @@ Parameters of the MLP training algorithm. ::
double rp_dw0, rp_dw_plus, rp_dw_minus, rp_dw_min, rp_dw_max;
};
..
The structure has default constructor that initializes parameters for ``RPROP`` algorithm. There is also more advanced constructor to customize the parameters and/or choose backpropagation algorithm. Finally, the individual parameters can be adjusted after the structure is created.
@ -212,7 +212,7 @@ MLP model. ::
CvRNG rng;
};
..
Unlike many other models in ML that are constructed and trained at once, in the MLP model these steps are separated. First, a network with the specified topology is created using the non-default constructor or the method ``create`` . All the weights are set to zeros. Then the network is trained using the set of input and output vectors. The training procedure can be repeated more than once, i.e. the weights can be adjusted based on the new training data.

View File

@ -40,7 +40,7 @@ Bayes classifier for normally distributed data. ::
protected:
...
};
..
.. index:: CvNormalBayesClassifier::train

View File

@ -76,7 +76,7 @@ Training Parameters of Random Trees. ::
int _nactive_vars, int max_tree_count,
float forest_accuracy, int termcrit_type );
};
..
The set of training parameters for the forest is the superset of the training parameters for a single tree. However, Random trees do not need all the functionality/features of decision trees, most noticeably, the trees are not pruned, so the cross-validation parameters are not used.
@ -128,7 +128,7 @@ Random Trees. ::
int nclasses;
...
};
..
.. index:: CvRTrees::train
@ -295,5 +295,5 @@ Example: Prediction of mushroom goodness using random trees classifier ::
cvReleaseFileStorage(&storage);
return 0;
}
..

View File

@ -38,7 +38,7 @@ Base class for the statistical models in ML. ::
virtual void write( CvFileStorage* storage, const char* name )=0;
virtual void read( CvFileStorage* storage, CvFileNode* node )=0;
};
..
In this declaration some methods are commented off. Actually, these are methods for which there is no unified API (with the exception of the default constructor), however, there are many similarities in the syntax and semantics that are briefly described below in this section, as if they are a part of the base class.
@ -85,7 +85,7 @@ The destructor of the base class is declared as virtual, so it is safe to write
model = new CvDTree(... /* Decision tree params */);
...
delete model;
..
Normally, the destructor of each derived class does nothing, but in this instance it calls the overridden method ``clear()`` that deallocates all the memory.

View File

@ -82,7 +82,7 @@ Support Vector Machines. ::
protected:
...
};
..
.. index:: CvSVMParams
@ -114,7 +114,7 @@ SVM training parameters. ::
CvMat* class_weights; // for CV_SVM_C_SVC
CvTermCriteria term_crit; // termination criteria
};
..
The structure must be initialized and passed to the training method of
:ref:`CvSVM` .
@ -199,7 +199,6 @@ CvSVM::get_default_grid
* **CvSVM::COEF**
* **CvSVM::DEGREE**
.
The grid will be generated for the parameter with this ID.

View File

@ -30,7 +30,7 @@ Base class for computing feature values in cascade classifiers. ::
static Ptr<FeatureEvaluator> create(int type);
};
..
.. index:: FeatureEvaluator::read
@ -190,7 +190,7 @@ The cascade classifier class for object detection. ::
Ptr<FeatureEvaluator> feval; // pointer to feature evaluator
Ptr<CvHaarClassifierCascade> oldCascade; // pointer to old cascade
};
..
.. index:: CascadeClassifier::CascadeClassifier

Binary file not shown.

After

Width:  |  Height:  |  Size: 120 KiB

View File

@ -32,6 +32,7 @@ calcOpticalFlowPyrLK
:param flags: The operation flags:
* **OPTFLOW_USE_INITIAL_FLOW** use initial estimations stored in ``nextPts`` . If the flag is not set, then initially :math:`\texttt{nextPts}\leftarrow\texttt{prevPts}`
The function implements the sparse iterative version of the Lucas-Kanade optical flow in pyramids, see
Bouguet00
.
@ -86,6 +87,7 @@ updateMotionHistory
:param timestamp: Current time in milliseconds or other units
:param duration: Maximal duration of the motion track in the same units as ``timestamp``
The function updates the motion history image as following:
.. math::
@ -145,11 +147,15 @@ calcGlobalOrientation
Calculates the global motion orientation in some selected region.
:param orientation: Motion gradient orientation image, calculated by the function :func:`calcMotionGradient`
:param mask: Mask image. It may be a conjunction of a valid gradient mask, also calculated by :func:`calcMotionGradient` , and the mask of the region, whose direction needs to be calculated
:param mhi: The motion history image, calculated by :func:`updateMotionHistory`
:param timestamp: The timestamp passed to :func:`updateMotionHistory`
:param duration: Maximal duration of motion track in milliseconds, passed to :func:`updateMotionHistory`
The function calculates the average
motion direction in the selected region and returns the angle between
0 degrees and 360 degrees. The average direction is computed from
@ -165,9 +171,11 @@ CamShift
Finds the object center, size, and orientation
:param probImage: Back projection of the object histogram; see :func:`calcBackProject`
:param window: Initial search window
:param criteria: Stop criteria for the underlying :func:`meanShift`
The function implements the CAMSHIFT object tracking algrorithm
Bradski98
.
@ -237,7 +245,7 @@ Kalman filter class ::
// P(k)=(I-K(k)*H)*P'(k)
...
};
..
The class implements standard Kalman filter
http://en.wikipedia.org/wiki/Kalman_filter