Commit b60a277e authored by Elena Fedotova's avatar Elena Fedotova

Purpose: 2nd review cycle.

parent 0d58749f
...@@ -5,9 +5,9 @@ Common Interfaces of Descriptor Extractors ...@@ -5,9 +5,9 @@ Common Interfaces of Descriptor Extractors
Extractors of keypoint descriptors in OpenCV have wrappers with a common interface that enables you to easily switch Extractors of keypoint descriptors in OpenCV have wrappers with a common interface that enables you to easily switch
between different algorithms solving the same problem. This section is devoted to computing descriptors between different algorithms solving the same problem. This section is devoted to computing descriptors
that are represented as vectors in a multidimensional space. All objects that implement the ``vector`` represented as vectors in a multidimensional space. All objects that implement the ``vector``
descriptor extractors inherit the descriptor extractors inherit the
:ref:`DescriptorExtractor` interface. :ocv:class:`DescriptorExtractor` interface.
.. index:: DescriptorExtractor .. index:: DescriptorExtractor
...@@ -15,7 +15,7 @@ DescriptorExtractor ...@@ -15,7 +15,7 @@ DescriptorExtractor
------------------- -------------------
.. ocv:class:: DescriptorExtractor .. ocv:class:: DescriptorExtractor
Abstract base class for computing descriptors for image keypoints :: Abstract base class for computing descriptors for image keypoints. ::
class CV_EXPORTS DescriptorExtractor class CV_EXPORTS DescriptorExtractor
{ {
...@@ -45,7 +45,7 @@ dense, fixed-dimension vector of a basic type. Most descriptors ...@@ -45,7 +45,7 @@ dense, fixed-dimension vector of a basic type. Most descriptors
follow this pattern as it simplifies computing follow this pattern as it simplifies computing
distances between descriptors. Therefore, a collection of distances between descriptors. Therefore, a collection of
descriptors is represented as descriptors is represented as
:ref:`Mat` , where each row is a keypoint descriptor. :ocv:class:`Mat` , where each row is a keypoint descriptor.
.. index:: DescriptorExtractor::compute .. index:: DescriptorExtractor::compute
...@@ -57,9 +57,9 @@ DescriptorExtractor::compute ...@@ -57,9 +57,9 @@ DescriptorExtractor::compute
:param image: Image. :param image: Image.
:param keypoints: Keypoints. Keypoints for which a descriptor cannot be computed are removed. Somtimes new keypoints can be added, eg SIFT duplicates keypoint with several dominant orientations (for each orientation). :param keypoints: Keypoints. Keypoints for which a descriptor cannot be computed are removed. Sometimes new keypoints can be added, for example: ``SIFT`` duplicates keypoint with several dominant orientations (for each orientation).
:param descriptors: Descriptors. Row i is the descriptor for keypoint i. :param descriptors: Descriptors. Row ``i`` is the descriptor for keypoint ``i``.
.. ocv:function:: void DescriptorExtractor::compute( const vector<Mat>& images, vector<vector<KeyPoint> >& keypoints, vector<Mat>& descriptors ) const .. ocv:function:: void DescriptorExtractor::compute( const vector<Mat>& images, vector<vector<KeyPoint> >& keypoints, vector<Mat>& descriptors ) const
...@@ -103,13 +103,13 @@ DescriptorExtractor::create ...@@ -103,13 +103,13 @@ DescriptorExtractor::create
The current implementation supports the following types of a descriptor extractor: The current implementation supports the following types of a descriptor extractor:
* ``"SIFT"`` -- :ref:`SiftDescriptorExtractor` * ``"SIFT"`` -- :ocv:class:`SiftDescriptorExtractor`
* ``"SURF"`` -- :ref:`SurfDescriptorExtractor` * ``"SURF"`` -- :ocv:class:`SurfDescriptorExtractor`
* ``"ORB"`` -- :ref:`OrbDescriptorExtractor` * ``"ORB"`` -- :ocv:class:`OrbDescriptorExtractor`
* ``"BRIEF"`` -- :ref:`BriefDescriptorExtractor` * ``"BRIEF"`` -- :ocv:class:`BriefDescriptorExtractor`
A combined format is also supported: descriptor extractor adapter name ( ``"Opponent"`` -- A combined format is also supported: descriptor extractor adapter name ( ``"Opponent"`` --
:ref:`OpponentColorDescriptorExtractor` ) + descriptor extractor name (see above), :ocv:class:`OpponentColorDescriptorExtractor` ) + descriptor extractor name (see above),
for example: ``"OpponentSIFT"`` . for example: ``"OpponentSIFT"`` .
.. index:: SiftDescriptorExtractor .. index:: SiftDescriptorExtractor
...@@ -121,7 +121,7 @@ SiftDescriptorExtractor ...@@ -121,7 +121,7 @@ SiftDescriptorExtractor
.. ocv:class:: SiftDescriptorExtractor .. ocv:class:: SiftDescriptorExtractor
Wrapping class for computing descriptors by using the Wrapping class for computing descriptors by using the
:ref:`SIFT` class :: :ocv:class::`SIFT` class. ::
class SiftDescriptorExtractor : public DescriptorExtractor class SiftDescriptorExtractor : public DescriptorExtractor
{ {
...@@ -153,7 +153,7 @@ SurfDescriptorExtractor ...@@ -153,7 +153,7 @@ SurfDescriptorExtractor
.. ocv:class:: SurfDescriptorExtractor .. ocv:class:: SurfDescriptorExtractor
Wrapping class for computing descriptors by using the Wrapping class for computing descriptors by using the
:ref:`SURF` class :: :ocv:class:`SURF` class. ::
class SurfDescriptorExtractor : public DescriptorExtractor class SurfDescriptorExtractor : public DescriptorExtractor
{ {
...@@ -179,7 +179,7 @@ OrbDescriptorExtractor ...@@ -179,7 +179,7 @@ OrbDescriptorExtractor
.. ocv:class:: OrbDescriptorExtractor .. ocv:class:: OrbDescriptorExtractor
Wrapping class for computing descriptors by using the Wrapping class for computing descriptors by using the
:ref:`ORB` class :: :ocv:class:`ORB` class. ::
template<typename T> template<typename T>
class ORbDescriptorExtractor : public DescriptorExtractor class ORbDescriptorExtractor : public DescriptorExtractor
...@@ -203,7 +203,7 @@ CalonderDescriptorExtractor ...@@ -203,7 +203,7 @@ CalonderDescriptorExtractor
.. ocv:class:: CalonderDescriptorExtractor .. ocv:class:: CalonderDescriptorExtractor
Wrapping class for computing descriptors by using the Wrapping class for computing descriptors by using the
:ref:`RTreeClassifier` class :: :ocv:class:`RTreeClassifier` class. ::
template<typename T> template<typename T>
class CalonderDescriptorExtractor : public DescriptorExtractor class CalonderDescriptorExtractor : public DescriptorExtractor
...@@ -258,7 +258,7 @@ BriefDescriptorExtractor ...@@ -258,7 +258,7 @@ BriefDescriptorExtractor
Class for computing BRIEF descriptors described in a paper of Calonder M., Lepetit V., Class for computing BRIEF descriptors described in a paper of Calonder M., Lepetit V.,
Strecha C., Fua P. *BRIEF: Binary Robust Independent Elementary Features* , Strecha C., Fua P. *BRIEF: Binary Robust Independent Elementary Features* ,
11th European Conference on Computer Vision (ECCV), Heraklion, Crete. LNCS Springer, September 2010 :: 11th European Conference on Computer Vision (ECCV), Heraklion, Crete. LNCS Springer, September 2010. ::
class BriefDescriptorExtractor : public DescriptorExtractor class BriefDescriptorExtractor : public DescriptorExtractor
{ {
......
...@@ -6,8 +6,8 @@ Common Interfaces of Descriptor Matchers ...@@ -6,8 +6,8 @@ Common Interfaces of Descriptor Matchers
Matchers of keypoint descriptors in OpenCV have wrappers with a common interface that enables you to easily switch Matchers of keypoint descriptors in OpenCV have wrappers with a common interface that enables you to easily switch
between different algorithms solving the same problem. This section is devoted to matching descriptors between different algorithms solving the same problem. This section is devoted to matching descriptors
that are represented as vectors in a multidimensional space. All objects that implement ``vector`` that are represented as vectors in a multidimensional space. All objects that implement ``vector``
descriptor matchers inherit descriptor matchers inherit the
:ref:`DescriptorMatcher` interface. :ocv:class:`DescriptorMatcher` interface.
.. index:: DMatch .. index:: DMatch
...@@ -18,7 +18,7 @@ DMatch ...@@ -18,7 +18,7 @@ DMatch
.. ocv:class:: DMatch .. ocv:class:: DMatch
Class for matching keypoint descriptors: query descriptor index, Class for matching keypoint descriptors: query descriptor index,
train descriptor index, train image index, and distance between descriptors :: train descriptor index, train image index, and distance between descriptors. ::
struct DMatch struct DMatch
{ {
...@@ -48,7 +48,7 @@ train descriptor index, train image index, and distance between descriptors :: ...@@ -48,7 +48,7 @@ train descriptor index, train image index, and distance between descriptors ::
DescriptorMatcher DescriptorMatcher
----------------- -----------------
.. c:type:: DescriptorMatcher .. ocv:class:: DescriptorMatcher
Abstract base class for matching keypoint descriptors. It has two groups Abstract base class for matching keypoint descriptors. It has two groups
of match methods: for matching descriptors of an image with another image or of match methods: for matching descriptors of an image with another image or
...@@ -198,7 +198,7 @@ DescriptorMatcher::knnMatch ...@@ -198,7 +198,7 @@ DescriptorMatcher::knnMatch
:param k: Count of best matches found per each query descriptor or less if a query descriptor has less than k possible matches in total. :param k: Count of best matches found per each query descriptor or less if a query descriptor has less than k possible matches in total.
:param compactResult: Parameter that is used when the mask (or masks) is not empty. If ``compactResult`` is false, the ``matches`` vector has the same size as ``queryDescriptors`` rows. If ``compactResult`` is true, the ``matches`` vector does not contain matches for fully masked-out query descriptors. :param compactResult: Parameter used when the mask (or masks) is not empty. If ``compactResult`` is false, the ``matches`` vector has the same size as ``queryDescriptors`` rows. If ``compactResult`` is true, the ``matches`` vector does not contain matches for fully masked-out query descriptors.
These extended variants of :ocv:func:`DescriptorMatcher::match` methods find several best matches for each query descriptor. The matches are returned in the distance increasing order. See :ocv:func:`DescriptorMatcher::match` for the details about query and train descriptors. These extended variants of :ocv:func:`DescriptorMatcher::match` methods find several best matches for each query descriptor. The matches are returned in the distance increasing order. See :ocv:func:`DescriptorMatcher::match` for the details about query and train descriptors.
...@@ -220,9 +220,9 @@ DescriptorMatcher::radiusMatch ...@@ -220,9 +220,9 @@ DescriptorMatcher::radiusMatch
:param masks: Set of masks. Each ``masks[i]`` specifies permissible matches between the input query descriptors and stored train descriptors from the i-th image ``trainDescCollection[i]``. :param masks: Set of masks. Each ``masks[i]`` specifies permissible matches between the input query descriptors and stored train descriptors from the i-th image ``trainDescCollection[i]``.
:param matches: The found matches. :param matches: Found matches.
:param compactResult: Parameter that is used when the mask (or masks) is not empty. If ``compactResult`` is false, the ``matches`` vector has the same size as ``queryDescriptors`` rows. If ``compactResult`` is true, the ``matches`` vector does not contain matches for fully masked-out query descriptors. :param compactResult: Parameter used when the mask (or masks) is not empty. If ``compactResult`` is false, the ``matches`` vector has the same size as ``queryDescriptors`` rows. If ``compactResult`` is true, the ``matches`` vector does not contain matches for fully masked-out query descriptors.
:param maxDistance: Threshold for the distance between matched descriptors. :param maxDistance: Threshold for the distance between matched descriptors.
...@@ -265,7 +265,7 @@ DescriptorMatcher::create ...@@ -265,7 +265,7 @@ DescriptorMatcher::create
BruteForceMatcher BruteForceMatcher
----------------- -----------------
.. c:type:: BruteForceMatcher .. ocv:class:: 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 of 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 of descriptor sets. ::
...@@ -351,9 +351,9 @@ For efficiency, ``BruteForceMatcher`` is used as a template parameterized with t ...@@ -351,9 +351,9 @@ For efficiency, ``BruteForceMatcher`` is used as a template parameterized with t
FlannBasedMatcher FlannBasedMatcher
----------------- -----------------
.. c:type:: FlannBasedMatcher .. ocv:class:: FlannBasedMatcher
Flann-based descriptor matcher. This matcher trains :ref:`flann::Index` on a train descriptor collection and calls its nearest search methods to find the best matches. So, this matcher may be faster when matching a large train collection than the brute force matcher. ``FlannBasedMatcher`` does not support masking permissible matches of descriptor sets because :ocv:func:`flann::Index` does not support this. :: Flann-based descriptor matcher. This matcher trains :ocv:func:`flann::Index` on a train descriptor collection and calls its nearest search methods to find the best matches. So, this matcher may be faster when matching a large train collection than the brute force matcher. ``FlannBasedMatcher`` does not support masking permissible matches of descriptor sets because ``flann::Index`` does not support this. ::
class FlannBasedMatcher : public DescriptorMatcher class FlannBasedMatcher : public DescriptorMatcher
{ {
......
...@@ -17,7 +17,7 @@ GenericDescriptorMatcher ...@@ -17,7 +17,7 @@ GenericDescriptorMatcher
------------------------ ------------------------
.. ocv:class:: GenericDescriptorMatcher .. ocv:class:: GenericDescriptorMatcher
Abstract interface for extracting and matching a keypoint descriptor. There are also :ref:`DescriptorExtractor` and :ref:`DescriptorMatcher` for these purposes but their interfaces are intended for descriptors represented as vectors in a multidimensional space. ``GenericDescriptorMatcher`` is a more generic interface for descriptors. :ref:`DescriptorMatcher` and ``GenericDescriptorMatcher`` have two groups of match methods: for matching keypoints of an image with another image or with an image set. :: Abstract interface for extracting and matching a keypoint descriptor. There are also :ocv:class:`DescriptorExtractor` and :ocv:class:`DescriptorMatcher` for these purposes but their interfaces are intended for descriptors represented as vectors in a multidimensional space. ``GenericDescriptorMatcher`` is a more generic interface for descriptors. ``DescriptorMatcher`` and ``GenericDescriptorMatcher`` have two groups of match methods: for matching keypoints of an image with another image or with an image set. ::
class GenericDescriptorMatcher class GenericDescriptorMatcher
{ {
...@@ -129,7 +129,7 @@ GenericDescriptorMatcher::isMaskSupported ...@@ -129,7 +129,7 @@ GenericDescriptorMatcher::isMaskSupported
--------------------------------------------- ---------------------------------------------
.. ocv:function:: void GenericDescriptorMatcher::isMaskSupported() .. ocv:function:: void GenericDescriptorMatcher::isMaskSupported()
Returns true if a generic descriptor matcher supports masking permissible matches. Returns ``true`` if a generic descriptor matcher supports masking permissible matches.
.. index:: GenericDescriptorMatcher::classify .. index:: GenericDescriptorMatcher::classify
...@@ -139,7 +139,7 @@ GenericDescriptorMatcher::classify ...@@ -139,7 +139,7 @@ GenericDescriptorMatcher::classify
.. ocv:function:: void GenericDescriptorMatcher::classify( const Mat& queryImage, vector<KeyPoint>& queryKeypoints ) .. ocv:function:: void GenericDescriptorMatcher::classify( const Mat& queryImage, vector<KeyPoint>& queryKeypoints )
Classify keypoints from a query set. Classifies keypoints from a query set.
:param queryImage: Query image. :param queryImage: Query image.
...@@ -149,15 +149,15 @@ GenericDescriptorMatcher::classify ...@@ -149,15 +149,15 @@ GenericDescriptorMatcher::classify
:param trainKeypoints: Keypoints from a train image. :param trainKeypoints: Keypoints from a train image.
The method classifies each keypoint from a query set. The first variant of the method takes a train image and its keypoints as an input argument. The second variant uses the internally stored training collection that can be built using the ``GenericDescriptorMatcher::add`` method. The method classifies each keypoint from a query set. The first variant of the method takes a train image and its keypoints as an input argument. The second variant uses the internally stored training collection that can be built using the ``GenericDescriptorMatcher::add`` method.
The methods do the following: The methods do the following:
#. #.
Call the ``GenericDescriptorMatcher::match`` method to find correspondence between the query set and the training set. Call the ``GenericDescriptorMatcher::match`` method to find correspondence between the query set and the training set.
#. #.
Sey the ``class_id`` field of each keypoint from the query set to ``class_id`` of the corresponding keypoint from the training set. Set the ``class_id`` field of each keypoint from the query set to ``class_id`` of the corresponding keypoint from the training set.
.. index:: GenericDescriptorMatcher::match .. index:: GenericDescriptorMatcher::match
...@@ -167,7 +167,7 @@ GenericDescriptorMatcher::match ...@@ -167,7 +167,7 @@ GenericDescriptorMatcher::match
.. ocv:function:: void GenericDescriptorMatcher::match( const Mat& queryImage, vector<KeyPoint>& queryKeypoints, vector<DMatch>& matches, const vector<Mat>& masks=vector<Mat>() ) .. ocv:function:: void GenericDescriptorMatcher::match( const Mat& queryImage, vector<KeyPoint>& queryKeypoints, vector<DMatch>& matches, const vector<Mat>& masks=vector<Mat>() )
Find the best match in the training set for each keypoint from the query set. Finds the best match in the training set for each keypoint from the query set.
:param queryImage: Query image. :param queryImage: Query image.
...@@ -179,11 +179,11 @@ GenericDescriptorMatcher::match ...@@ -179,11 +179,11 @@ GenericDescriptorMatcher::match
:param matches: Matches. If a query descriptor (keypoint) is masked out in ``mask`` , match is added for this descriptor. So, ``matches`` size may be smaller than the query keypoints count. :param matches: Matches. If a query descriptor (keypoint) is masked out in ``mask`` , match is added for this descriptor. So, ``matches`` size may be smaller than the query keypoints count.
:param mask: Mask specifying permissible matches between input query and train keypoints. :param mask: Mask specifying permissible matches between an input query and train keypoints.
:param masks: Set of masks. Each ``masks[i]`` specifies permissible matches between input query keypoints and stored train keypoints from the i-th image. :param masks: Set of masks. Each ``masks[i]`` specifies permissible matches between input query keypoints and stored train keypoints from the i-th image.
The methods find the best match for each query keypoint. In the first variant of the method, a train image and its keypoints are the input arguments. In the second variant, query keypoints are matched to the internally stored training collection that can be built using ``GenericDescriptorMatcher::add`` method. Optional mask (or masks) can be passed to specify which query and training descriptors can be matched. Namely, ``queryKeypoints[i]`` can be matched with ``trainKeypoints[j]`` only if ``mask.at<uchar>(i,j)`` is non-zero. The methods find the best match for each query keypoint. In the first variant of the method, a train image and its keypoints are the input arguments. In the second variant, query keypoints are matched to the internally stored training collection that can be built using the ``GenericDescriptorMatcher::add`` method. Optional mask (or masks) can be passed to specify which query and training descriptors can be matched. Namely, ``queryKeypoints[i]`` can be matched with ``trainKeypoints[j]`` only if ``mask.at<uchar>(i,j)`` is non-zero.
.. index:: GenericDescriptorMatcher::knnMatch .. index:: GenericDescriptorMatcher::knnMatch
...@@ -193,7 +193,7 @@ GenericDescriptorMatcher::knnMatch ...@@ -193,7 +193,7 @@ GenericDescriptorMatcher::knnMatch
.. ocv: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 ) .. ocv: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 )
Find the ``k`` best matches for each query keypoint. Finds the ``k`` best matches for each query keypoint.
The methods are extended variants of ``GenericDescriptorMatch::match``. The parameters are similar, and the the semantics is similar to ``DescriptorMatcher::knnMatch``. But this class does not require explicitly computed keypoint descriptors. The methods are extended variants of ``GenericDescriptorMatch::match``. The parameters are similar, and the the semantics is similar to ``DescriptorMatcher::knnMatch``. But this class does not require explicitly computed keypoint descriptors.
...@@ -205,9 +205,9 @@ GenericDescriptorMatcher::radiusMatch ...@@ -205,9 +205,9 @@ GenericDescriptorMatcher::radiusMatch
.. ocv: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 ) .. ocv: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 )
For each query keypoint, find the training keypoints not farther than the specified distance. For each query keypoint, finds the training keypoints not farther than the specified distance.
The methods are similar to ``DescriptorMatcher::radiusM. But this class does not require explicitly computed keypoint descriptors. The methods are similar to ``DescriptorMatcher::radius``. But this class does not require explicitly computed keypoint descriptors.
.. index:: GenericDescriptorMatcher::read .. index:: GenericDescriptorMatcher::read
...@@ -246,7 +246,7 @@ OneWayDescriptorMatcher ...@@ -246,7 +246,7 @@ OneWayDescriptorMatcher
.. ocv:class:: OneWayDescriptorMatcher .. ocv:class:: OneWayDescriptorMatcher
Wrapping class for computing, matching, and classifying descriptors using the Wrapping class for computing, matching, and classifying descriptors using the
:ref:`OneWayDescriptorBase` class :: :ocv:class:`OneWayDescriptorBase` class. ::
class OneWayDescriptorMatcher : public GenericDescriptorMatcher class OneWayDescriptorMatcher : public GenericDescriptorMatcher
{ {
...@@ -305,7 +305,7 @@ FernDescriptorMatcher ...@@ -305,7 +305,7 @@ FernDescriptorMatcher
.. ocv:class:: FernDescriptorMatcher .. ocv:class:: FernDescriptorMatcher
Wrapping class for computing, matching, and classifying descriptors using the Wrapping class for computing, matching, and classifying descriptors using the
:ref:`FernClassifier` class :: :ocv:class:`FernClassifier` class. ::
class FernDescriptorMatcher : public GenericDescriptorMatcher class FernDescriptorMatcher : public GenericDescriptorMatcher
{ {
...@@ -363,7 +363,7 @@ VectorDescriptorMatcher ...@@ -363,7 +363,7 @@ VectorDescriptorMatcher
----------------------- -----------------------
.. ocv:class:: VectorDescriptorMatcher .. ocv:class:: VectorDescriptorMatcher
Class used for matching descriptors that can be described as vectors in a finite-dimensional space :: Class used for matching descriptors that can be described as vectors in a finite-dimensional space. ::
class CV_EXPORTS VectorDescriptorMatcher : public GenericDescriptorMatcher class CV_EXPORTS VectorDescriptorMatcher : public GenericDescriptorMatcher
{ {
......
...@@ -10,13 +10,13 @@ drawMatches ...@@ -10,13 +10,13 @@ drawMatches
.. ocv: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 ) .. ocv: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 )
Draw the found matches of keypoints from two images Draws the found matches of keypoints from two images.
:param img1: The first source image. :param img1: First source image.
:param keypoints1: Keypoints from the first source image. :param keypoints1: Keypoints from the first source image.
:param img2: The second source image. :param img2: Second source image.
:param keypoints2: Keypoints from the second source image. :param keypoints2: Keypoints from the second source image.
...@@ -75,5 +75,5 @@ drawKeypoints ...@@ -75,5 +75,5 @@ drawKeypoints
:param color: Color of keypoints. :param color: Color of keypoints.
:param flags: Flags setting drawing features. Possible ``flags`` bit values are defined by ``DrawMatchesFlags``. See details above in :ref:`drawMatches` . :param flags: Flags setting drawing features. Possible ``flags`` bit values are defined by ``DrawMatchesFlags``. See details above in :ocv:func:`drawMatches` .
...@@ -9,7 +9,7 @@ FAST ...@@ -9,7 +9,7 @@ FAST
-------- --------
.. ocv:function:: void FAST( const Mat& image, vector<KeyPoint>& keypoints, int threshold, bool nonmaxSupression=true ) .. ocv:function:: void FAST( const Mat& image, vector<KeyPoint>& keypoints, int threshold, bool nonmaxSupression=true )
Detects corners using the FAST algorithm by E. Rosten (*Machine learning for high-speed corner detection*, 2006). Detects corners using the FAST algorithm by E. Rosten (*Machine Learning for High-speed Corner Detection*, 2006).
:param image: Image where keypoints (corners) are detected. :param image: Image where keypoints (corners) are detected.
...@@ -27,7 +27,7 @@ MSER ...@@ -27,7 +27,7 @@ MSER
---- ----
.. ocv:class:: MSER .. ocv:class:: MSER
Maximally stable extremal region extractor :: Maximally stable extremal region extractor. ::
class MSER : public CvMSERParams class MSER : public CvMSERParams
{ {
...@@ -56,7 +56,7 @@ StarDetector ...@@ -56,7 +56,7 @@ StarDetector
------------ ------------
.. ocv:class:: StarDetector .. ocv:class:: StarDetector
Class implementing the Star keypoint detector :: Class implementing the ``Star`` keypoint detector. ::
class StarDetector : CvStarDetectorParams class StarDetector : CvStarDetectorParams
{ {
...@@ -89,13 +89,11 @@ The class implements a modified version of the ``CenSurE`` keypoint detector des ...@@ -89,13 +89,11 @@ The class implements a modified version of the ``CenSurE`` keypoint detector des
.. index:: SIFT .. index:: SIFT
.. _SIFT:
SIFT SIFT
---- ----
.. ocv:class:: SIFT .. ocv:class:: SIFT
Class for extracting keypoints and computing descriptors using the Scale Invariant Feature Transform (SIFT) approach :: Class for extracting keypoints and computing descriptors using the Scale Invariant Feature Transform (SIFT) approach. ::
class CV_EXPORTS SIFT class CV_EXPORTS SIFT
{ {
...@@ -179,13 +177,11 @@ Class for extracting keypoints and computing descriptors using the Scale Invaria ...@@ -179,13 +177,11 @@ Class for extracting keypoints and computing descriptors using the Scale Invaria
.. index:: SURF .. index:: SURF
.. _SURF:
SURF SURF
---- ----
.. ocv:class:: SURF .. ocv:class:: SURF
Class for extracting Speeded Up Robust Features from an image :: Class for extracting Speeded Up Robust Features from an image. ::
class SURF : public CvSURFParams class SURF : public CvSURFParams
{ {
...@@ -214,18 +210,16 @@ The class implements the Speeded Up Robust Features descriptor ...@@ -214,18 +210,16 @@ The class implements the Speeded Up Robust Features descriptor
[Bay06]. [Bay06].
There is a fast multi-scale Hessian keypoint detector that can be used to find keypoints There is a fast multi-scale Hessian keypoint detector that can be used to find keypoints
(default option). But the descriptors can be also computed for the user-specified keypoints. (default option). But the descriptors can be also computed for the user-specified keypoints.
The algorithm can be used for object tracking and localization, image stitching, and so on. See the ``find_obj.cpp`` demo in OpenCV samples directory. The algorithm can be used for object tracking and localization, image stitching, and so on. See the ``find_obj.cpp`` demo in the OpenCV samples directory.
.. index:: ORB .. index:: ORB
.. _ORB:
ORB ORB
---- ----
.. ocv:class:: ORB .. ocv:class:: ORB
Class for extracting ORB features and descriptors from an image :: Class for extracting ORB features and descriptors from an image. ::
class ORB class ORB
{ {
...@@ -272,18 +266,17 @@ Class for extracting ORB features and descriptors from an image :: ...@@ -272,18 +266,17 @@ Class for extracting ORB features and descriptors from an image ::
bool useProvidedKeypoints=false) const; bool useProvidedKeypoints=false) const;
}; };
The class implements ORB The class implements ORB.
.. index:: RandomizedTree .. index:: RandomizedTree
.. _RandomizedTree:
RandomizedTree RandomizedTree
-------------- --------------
.. ocv:class:: RandomizedTree .. ocv:class:: RandomizedTree
Class containing a base structure for ``RTreeClassifier`` :: Class containing a base structure for ``RTreeClassifier``. ::
class CV_EXPORTS RandomizedTree class CV_EXPORTS RandomizedTree
{ {
...@@ -423,7 +416,7 @@ RTreeNode ...@@ -423,7 +416,7 @@ RTreeNode
--------- ---------
.. ocv:class:: RTreeNode .. ocv:class:: RTreeNode
Class containing a base structure for ``RandomizedTree`` :: Class containing a base structure for ``RandomizedTree``. ::
struct RTreeNode struct RTreeNode
{ {
...@@ -451,7 +444,7 @@ RTreeClassifier ...@@ -451,7 +444,7 @@ RTreeClassifier
--------------- ---------------
.. ocv:class:: RTreeClassifier .. ocv:class:: RTreeClassifier
Class containing ``RTreeClassifier``. It represents the Calonder descriptor that was originally introduced by Michael Calonder. :: Class containing ``RTreeClassifier``. It represents the Calonder descriptor originally introduced by Michael Calonder. ::
class CV_EXPORTS RTreeClassifier class CV_EXPORTS RTreeClassifier
{ {
...@@ -569,7 +562,7 @@ RTreeClassifier::getSparseSignature ...@@ -569,7 +562,7 @@ RTreeClassifier::getSparseSignature
:param sig: Output signature (array dimension is ``reduced_num_dim)`` . :param sig: Output signature (array dimension is ``reduced_num_dim)`` .
:param thresh: Threshold that is used for compressing the signature. :param thresh: Threshold used for compressing the signature.
.. index:: RTreeClassifier::countNonZeroElements .. index:: RTreeClassifier::countNonZeroElements
......
...@@ -75,7 +75,7 @@ BOWKMeansTrainer ...@@ -75,7 +75,7 @@ BOWKMeansTrainer
---------------- ----------------
.. ocv:class:: BOWKMeansTrainer .. ocv:class:: BOWKMeansTrainer
:ref:`kmeans` -based class to train visual vocabulary using the *bag of visual words* approach. :ocv:func:`kmeans` -based class to train visual vocabulary using the *bag of visual words* approach.
:: ::
class BOWKMeansTrainer : public BOWTrainer class BOWKMeansTrainer : public BOWTrainer
...@@ -97,19 +97,19 @@ BOWKMeansTrainer::BOWKMeansTrainer ...@@ -97,19 +97,19 @@ BOWKMeansTrainer::BOWKMeansTrainer
---------------- ----------------
.. ocv:function:: BOWKMeansTrainer::BOWKMeansTrainer( int clusterCount, const TermCriteria& termcrit=TermCriteria(), int attempts=3, int flags=KMEANS_PP_CENTERS ); .. ocv:function:: BOWKMeansTrainer::BOWKMeansTrainer( int clusterCount, const TermCriteria& termcrit=TermCriteria(), int attempts=3, int flags=KMEANS_PP_CENTERS );
To understand constructor parameters, see :ref:`kmeans` function arguments. See :ocv:func:`kmeans` function parameters.
BOWImgDescriptorExtractor BOWImgDescriptorExtractor
------------------------- -------------------------
.. ocv:class:: BOWImgDescriptorExtractor .. ocv:class:: BOWImgDescriptorExtractor
Class to compute an image descriptor using the ''bag of visual words''. Such a computation consists of the following steps: Class to compute an image descriptor using the *bag of visual words*. Such a computation consists of the following steps:
#. Compute descriptors for a given image and its keypoints set. #. Compute descriptors for a given image and its keypoints set.
#. Find the nearest visual words from the vocabulary for each keypoint descriptor. #. Find the nearest visual words from the vocabulary for each keypoint descriptor.
#. Compute the bag-of-words image descriptor as is a normalized histogram of vocabulary words encountered in the image. The ``i``-th bin of the histogram is a frequency of ``i``-th word of the vocabulary in the given image. #. Compute the bag-of-words image descriptor as is a normalized histogram of vocabulary words encountered in the image. The ``i``-th bin of the histogram is a frequency of ``i``-th word of the vocabulary in the given image.
Here is the class declaration :: The class declaration is the following: ::
class BOWImgDescriptorExtractor class BOWImgDescriptorExtractor
{ {
...@@ -138,7 +138,7 @@ BOWImgDescriptorExtractor::BOWImgDescriptorExtractor ...@@ -138,7 +138,7 @@ BOWImgDescriptorExtractor::BOWImgDescriptorExtractor
-------------------------------------------------------- --------------------------------------------------------
.. ocv:function:: BOWImgDescriptorExtractor::BOWImgDescriptorExtractor( const Ptr<DescriptorExtractor>& dextractor, const Ptr<DescriptorMatcher>& dmatcher ) .. ocv:function:: BOWImgDescriptorExtractor::BOWImgDescriptorExtractor( const Ptr<DescriptorExtractor>& dextractor, const Ptr<DescriptorMatcher>& dmatcher )
The class constructor. Constructs a class.
:param dextractor: Descriptor extractor that is used to compute descriptors for an input image and its keypoints. :param dextractor: Descriptor extractor that is used to compute descriptors for an input image and its keypoints.
...@@ -152,7 +152,7 @@ BOWImgDescriptorExtractor::setVocabulary ...@@ -152,7 +152,7 @@ BOWImgDescriptorExtractor::setVocabulary
Sets a visual vocabulary. Sets a visual vocabulary.
:param vocabulary: Vocabulary (can be trained using the inheritor of :ref:`BOWTrainer` ). Each row of the vocabulary is a visual word (cluster center). :param vocabulary: Vocabulary (can be trained using the inheritor of :ocv:class:`BOWTrainer` ). Each row of the vocabulary is a visual word (cluster center).
.. index:: BOWImgDescriptorExtractor::getVocabulary .. index:: BOWImgDescriptorExtractor::getVocabulary
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment