reviewed ? marks in features2d
authorVadim Pisarevsky <no@email>
Wed, 11 May 2011 23:31:50 +0000 (23:31 +0000)
committerVadim Pisarevsky <no@email>
Wed, 11 May 2011 23:31:50 +0000 (23:31 +0000)
modules/features2d/doc/common_interfaces_of_descriptor_extractors.rst
modules/features2d/doc/common_interfaces_of_descriptor_matchers.rst
modules/features2d/doc/common_interfaces_of_feature_detectors.rst
modules/features2d/doc/common_interfaces_of_generic_descriptor_matchers.rst
modules/features2d/doc/drawing_function_of_keypoints_and_matches.rst
modules/features2d/doc/feature_detection_and_description.rst
modules/features2d/doc/object_categorization.rst
modules/imgproc/doc/feature_detection.rst

index 3d52e21..860bc99 100644 (file)
@@ -13,7 +13,7 @@ descriptor extractors inherit the
 
 DescriptorExtractor
 -------------------
-.. c:type:: DescriptorExtractor
+.. cpp:class:: DescriptorExtractor
 
 Abstract base class for computing descriptors for image keypoints ::
 
@@ -95,9 +95,9 @@ DescriptorExtractor::write
 
 DescriptorExtractor::create
 -------------------------------
-.. c:function:: Ptr<DescriptorExtractor>  DescriptorExtractor::create( const string\& descriptorExtractorType )
+.. c:function:: Ptr<DescriptorExtractor>  DescriptorExtractor::create( const string& descriptorExtractorType )
 
-    Creates a descriptor extractor of a given type with the default parameters (using the default constructor).??
+    Creates a descriptor extractor by name.
 
     :param descriptorExtractorType: Descriptor extractor type.
 
@@ -115,7 +115,7 @@ for example: ``"OpponentSIFT"`` .
 
 SiftDescriptorExtractor
 -----------------------
-.. c:type:: SiftDescriptorExtractor
+.. cpp:class:: SiftDescriptorExtractor
 
 Wrapping class for computing descriptors by using the
 :ref:`SIFT` class ::
@@ -145,7 +145,7 @@ Wrapping class for computing descriptors by using the
 
 SurfDescriptorExtractor
 -----------------------
-.. c:type:: SurfDescriptorExtractor
+.. cpp:class:: SurfDescriptorExtractor
 
 Wrapping class for computing descriptors by using the
 :ref:`SURF` class ::
@@ -169,7 +169,7 @@ Wrapping class for computing descriptors by using the
 
 CalonderDescriptorExtractor
 ---------------------------
-.. c:type:: CalonderDescriptorExtractor
+.. cpp:class:: CalonderDescriptorExtractor
 
 Wrapping class for computing descriptors by using the
 :ref:`RTreeClassifier` class ::
@@ -195,7 +195,7 @@ Wrapping class for computing descriptors by using the
 
 OpponentColorDescriptorExtractor
 --------------------------------
-.. c:type:: OpponentColorDescriptorExtractor
+.. cpp:class:: OpponentColorDescriptorExtractor
 
 Class adapting a descriptor extractor to compute descriptors in the Opponent Color Space
 (refer to Van de Sande et al., CGIV 2008 *Color Descriptors for Object Category Recognition*).
@@ -223,7 +223,7 @@ them into a single color descriptor. ::
 
 BriefDescriptorExtractor
 ------------------------
-.. c:type:: BriefDescriptorExtractor
+.. cpp:class:: BriefDescriptorExtractor
 
 Class for computing BRIEF descriptors described in a paper of Calonder M., Lepetit V.,
 Strecha C., Fua P. *BRIEF: Binary Robust Independent Elementary Features* ,
index dca86cf..0d47eb5 100644 (file)
@@ -15,10 +15,10 @@ descriptor matchers inherit
 
 DMatch
 ------
-.. c:type:: DMatch
+.. cpp:class:: DMatch
 
 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
     {
@@ -108,7 +108,7 @@ with an image set. ::
 
 DescriptorMatcher::add
 --------------------------
-.. c:function:: void add( const vector<Mat>\& descriptors )
+.. cpp:function:: void add( const vector<Mat>& descriptors )
 
     Adds descriptors to train a descriptor collection. If the collection ``trainDescCollectionis`` is not empty, the new descriptors are added to existing train descriptors.
 
@@ -118,7 +118,7 @@ DescriptorMatcher::add
 
 DescriptorMatcher::getTrainDescriptors
 ------------------------------------------
-.. c:function:: const vector<Mat>\& getTrainDescriptors() const
+.. cpp:function:: const vector<Mat>& getTrainDescriptors() const
 
     Returns a constant link to the train descriptor collection ``trainDescCollection`` .
 
@@ -126,7 +126,7 @@ DescriptorMatcher::getTrainDescriptors
 
 DescriptorMatcher::clear
 ----------------------------
-.. c:function:: void DescriptorMatcher::clear()
+.. cpp:function:: void DescriptorMatcher::clear()
 
     Clears the train descriptor collection.
 
@@ -134,7 +134,7 @@ DescriptorMatcher::clear
 
 DescriptorMatcher::empty
 ----------------------------
-.. c:function:: bool DescriptorMatcher::empty() const
+.. cpp:function:: bool DescriptorMatcher::empty() const
 
     Returns true if there are no train descriptors in the collection.
 
@@ -142,7 +142,7 @@ DescriptorMatcher::empty
 
 DescriptorMatcher::isMaskSupported
 --------------------------------------
-.. c:function:: bool DescriptorMatcher::isMaskSupported()
+.. cpp:function:: bool DescriptorMatcher::isMaskSupported()
 
     Returns true if the descriptor matcher supports masking permissible matches.
 
@@ -150,7 +150,7 @@ DescriptorMatcher::isMaskSupported
 
 DescriptorMatcher::train
 ----------------------------
-.. c:function:: void DescriptorMatcher::train()
+.. cpp:function:: void DescriptorMatcher::train()
 
     Trains a descriptor matcher (for example, the flann index). In all methods to match, the method ``train()`` is run every time before matching. Some descriptor matchers (for example, ``BruteForceMatcher``) have an empty implementation of this method. Other matchers really train their inner structures (for example, ``FlannBasedMatcher`` trains ``flann::Index`` ).
 
@@ -158,11 +158,11 @@ DescriptorMatcher::train
 
 DescriptorMatcher::match
 ----------------------------
-.. c:function:: void DescriptorMatcher::match( const Mat\& queryDescriptors,                           const Mat\& trainDescriptors,               vector<DMatch>\& matches,              const Mat\& mask=Mat() ) const
+.. cpp:function:: void DescriptorMatcher::match( const Mat& queryDescriptors,                           const Mat& trainDescriptors, vector<DMatch>& matches, const Mat& mask=Mat() ) const
 
-    Finds the best match for each descriptor from a query set with train descriptors. Query descriptors are supposed to belong?? to keypoints detected on the same query image. In the first variant of this method, train descriptors are set as an input argument and are supposed to belong to keypoints detected on the same train image. In the second variant of the method, train descriptors collection that was set by ``addmethod`` is used. Optional mask (or masks) can be set to describe descriptors that can be matched. ``queryDescriptors[i]`` can be matched with ``trainDescriptors[j]`` only if ``mask.at<uchar>(i,j)`` is non-zero.?? 
+.. cpp:function:: void DescriptorMatcher::match( const Mat& queryDescriptors,                                   vector<DMatch>& matches, const vector<Mat>& masks=vector<Mat>() )
 
-.. c:function:: void DescriptorMatcher::match( const Mat\& queryDescriptors,                                   vector<DMatch>\& matches,                  const vector<Mat>\& masks=vector<Mat>() )
+    Find the best match for each descriptor from a query set.
 
     :param queryDescriptors: Query set of descriptors.
 
@@ -174,45 +174,51 @@ DescriptorMatcher::match
 
     :param masks: Set of masks. Each  ``masks[i]``  specifies permissible matches between input query descriptors and stored train descriptors from the i-th image ``trainDescCollection[i]``.
 
+In the first variant of this method, the train descriptors are passed as an input argument. In the second variant of the method, train descriptors collection that was set by ``DescriptorMatcher::add`` is used. Optional mask (or masks) can be passed to specify, which query and training descriptors can be matched. Namely, ``queryDescriptors[i]`` can be matched with ``trainDescriptors[j]`` only if ``mask.at<uchar>(i,j)`` is non-zero. 
+
 .. index:: DescriptorMatcher::knnMatch
 
 DescriptorMatcher::knnMatch
 -------------------------------
-.. 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
+.. cpp:function:: void DescriptorMatcher::knnMatch( const Mat& queryDescriptors,       const Mat& trainDescriptors,       vector<vector<DMatch> >& matches,       int k, const Mat& mask=Mat(),       bool compactResult=false ) const
 
-    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 the distance increasing order. See the details about query and train descriptors in ??.
+.. cpp:function:: void DescriptorMatcher::knnMatch( const Mat& queryDescriptors,           vector<vector<DMatch> >& matches, int k,      const vector<Mat>& masks=vector<Mat>(),       bool compactResult=false )
 
-.. c:function:: void DescriptorMatcher::knnMatch( const Mat\& queryDescriptors,           vector<vector<DMatch> >\& matches, int k,      const vector<Mat>\& masks=vector<Mat>(),       bool compactResult=false )
+    Find the k best matches for each descriptor from a query set.
 
     :param queryDescriptors, trainDescriptors, mask, masks: See  :ref:`DescriptorMatcher::match` .
 
     :param matches: Mathes. Each  ``matches[i]``  is k or less matches for the same query descriptor.
 
-    :param k: Count of best matches found per each query descriptor (or less if it is not possible).
+    :param k: Count of best matches found per each query descriptor (or less if some 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.
 
+These are extended variants of :cpp:func:`DescriptorMatcher::match` methods. They find several best matches for each query descriptor. The matches are returned in the distance increasing order. See :cpp:func:`DescriptorMatcher::match` for the details about query and train descriptors. 
+
 .. index:: DescriptorMatcher::radiusMatch
 
 DescriptorMatcher::radiusMatch
 ----------------------------------
-.. 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
+.. cpp:function:: void DescriptorMatcher::radiusMatch( const Mat& queryDescriptors,           const Mat& trainDescriptors,           vector<vector<DMatch> >& matches,           float maxDistance, const Mat& mask=Mat(),           bool compactResult=false ) const
 
-    Finds the best matches for each query descriptor that has a distance smaller than the given threshold. Found matches are returned in the distance increasing order. See the details about query and train descriptors in ??.
+.. cpp:function:: void DescriptorMatcher::radiusMatch( const Mat& queryDescriptors,           vector<vector<DMatch> >& matches,           float maxDistance,      const vector<Mat>& masks=vector<Mat>(),       bool compactResult=false )
 
-.. c:function:: void DescriptorMatcher::radiusMatch( const Mat\& queryDescriptors,           vector<vector<DMatch> >\& matches,           float maxDistance,      const vector<Mat>\& masks=vector<Mat>(),       bool compactResult=false )
+    For each query descriptor, find the training descriptors not farther than the specified distance.
 
     :param queryDescriptors, trainDescriptors, mask, masks: See :ref:`DescriptorMatcher::match` .
 
     :param matches, compactResult: See :ref:`DescriptorMatcher::knnMatch` .
 
-    :param maxDistance: Threshold for found match distances.
+    :param maxDistance: Threshold on the distance between matched descriptors.
+    
+For each query descriptor the methods find all the training descriptors such that the distance between the query descriptor and the training descriptor is equal or smaller than ``maxDistance``. Found matches are returned in the distance increasing order.
 
 .. index:: DescriptorMatcher::clone
 
 DescriptorMatcher::clone
 ----------------------------
-.. c:function:: Ptr<DescriptorMatcher> \\DescriptorMatcher::clone( bool emptyTrainData ) const
+.. cpp:function:: Ptr<DescriptorMatcher> DescriptorMatcher::clone( bool emptyTrainData ) const
 
     Clones the matcher.
 
@@ -224,13 +230,16 @@ DescriptorMatcher::clone
 
 DescriptorMatcher::create
 -----------------------------
-.. c:function:: Ptr<DescriptorMatcher> DescriptorMatcher::create( const string\& descriptorMatcherType )
+.. cpp:function:: Ptr<DescriptorMatcher> DescriptorMatcher::create( const string& descriptorMatcherType )
 
     Creates a descriptor matcher of a given type with the default parameters (using default constructor).
 
-    :param descriptorMatcherType: Descriptor matcher type.??broken param formatting
-
-Now the following matcher types are supported: ``BruteForce`` (it uses ``L2`` ), ``BruteForce-L1`` ,``BruteForce-Hamming`` ,``BruteForce-HammingLUT`` , and ``FlannBased`` .
+    :param descriptorMatcherType: Descriptor matcher type. Now the following matcher types are supported:
+        * ``BruteForce`` (it uses ``L2`` ),
+        * ``BruteForce-L1``,
+        * ``BruteForce-Hamming``,
+        * ``BruteForce-HammingLUT``, and
+        * ``FlannBased``.
 
 .. index:: BruteForceMatcher
 
@@ -256,7 +265,7 @@ Brute-force descriptor matcher. For each descriptor in the first set, this match
     }
 
 
-For efficiency, ``BruteForceMatcher`` is used as a template for the distance metric??. For float descriptors, ``L2<float>`` is a common choice. The following distances are supported: ::
+For efficiency, ``BruteForceMatcher`` is used as a template, parameterized with the distance type. For float descriptors, ``L2<float>`` is a common choice. The following distances are supported: ::
 
     template<typename T>
     struct Accumulator
index 48e03fe..2e1b296 100644 (file)
@@ -14,7 +14,7 @@ inherit the
 
 KeyPoint
 --------
-.. c:type:: KeyPoint
+.. cpp:class:: KeyPoint
 
 Data structure for salient point detectors ::
 
@@ -75,7 +75,7 @@ Data structure for salient point detectors ::
 
 FeatureDetector
 ---------------
-.. c:type:: FeatureDetector
+.. cpp:class:: FeatureDetector
 
 Abstract base class for 2D image feature detectors ::
 
@@ -105,7 +105,7 @@ Abstract base class for 2D image feature detectors ::
 
 FeatureDetector::detect
 ---------------------------
-.. c:function:: void FeatureDetector::detect( const Mat\& image,                                vector<KeyPoint>\& keypoints,                                 const Mat\& mask=Mat() ) const
+.. cpp:function:: void FeatureDetector::detect( const Mat& image,                                vector<KeyPoint>& keypoints,                                 const Mat& mask=Mat() ) const
 
     Detects keypoints in an image (first variant) or image set (second variant).
 
@@ -115,7 +115,7 @@ FeatureDetector::detect
 
     :param mask: Mask specifying where to look for keypoints (optional). It 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
+.. cpp:function:: void FeatureDetector::detect( const vector<Mat>& images,                                                            vector<vector<KeyPoint> >& keypoints,                                                             const vector<Mat>& masks=vector<Mat>() ) const
 
     :param images: Image set.
 
@@ -127,7 +127,7 @@ FeatureDetector::detect
 
 FeatureDetector::read
 -------------------------
-.. c:function:: void FeatureDetector::read( const FileNode\& fn )
+.. cpp:function:: void FeatureDetector::read( const FileNode& fn )
 
     Reads a feature detector object from a file node.
 
@@ -137,7 +137,7 @@ FeatureDetector::read
 
 FeatureDetector::write
 --------------------------
-.. c:function:: void FeatureDetector::write( FileStorage\& fs ) const
+.. cpp:function:: void FeatureDetector::write( FileStorage& fs ) const
 
     Writes a feature detector object to a file storage.
 
@@ -147,9 +147,9 @@ FeatureDetector::write
 
 FeatureDetector::create
 ---------------------------
-.. c:function:: Ptr<FeatureDetector> FeatureDetector::create( const string\& detectorType )
+.. cpp:function:: Ptr<FeatureDetector> FeatureDetector::create( const string& detectorType )
 
-    Creates a feature detector of a given type with the default parameters (using the default constructor).??
+    Creates a feature detector by its name.
 
     :param detectorType: Feature detector type.
 
@@ -174,7 +174,7 @@ for example: ``"GridFAST"``, ``"PyramidSTAR"`` .
 
 FastFeatureDetector
 -------------------
-.. c:type:: FastFeatureDetector
+.. cpp:class:: FastFeatureDetector
 
 Wrapping class for feature detection using the
 :ref:`FAST` method ::
@@ -196,7 +196,7 @@ Wrapping class for feature detection using the
 
 GoodFeaturesToTrackDetector
 ---------------------------
-.. c:type:: GoodFeaturesToTrackDetector
+.. cpp:class:: GoodFeaturesToTrackDetector
 
 Wrapping class for feature detection using the
 :ref:`goodFeaturesToTrack` function ::
@@ -239,7 +239,7 @@ Wrapping class for feature detection using the
 
 MserFeatureDetector
 -------------------
-.. c:type:: MserFeatureDetector
+.. cpp:class:: MserFeatureDetector
 
 Wrapping class for feature detection using the
 :ref:`MSER` class ::
@@ -265,7 +265,7 @@ Wrapping class for feature detection using the
 
 StarFeatureDetector
 -------------------
-.. c:type:: StarFeatureDetector
+.. cpp:class:: StarFeatureDetector
 
 Wrapping class for feature detection using the
 :ref:`StarDetector` class ::
@@ -289,7 +289,7 @@ Wrapping class for feature detection using the
 
 SiftFeatureDetector
 -------------------
-.. c:type:: SiftFeatureDetector
+.. cpp:class:: SiftFeatureDetector
 
 Wrapping class for feature detection using the
 :ref:`SIFT` class ::
@@ -318,7 +318,7 @@ Wrapping class for feature detection using the
 
 SurfFeatureDetector
 -------------------
-.. c:type:: SurfFeatureDetector
+.. cpp:class:: SurfFeatureDetector
 
 Wrapping class for feature detection using the
 :ref:`SURF` class ::
@@ -341,7 +341,7 @@ Wrapping class for feature detection using the
 
 GridAdaptedFeatureDetector
 --------------------------
-.. c:type:: GridAdaptedFeatureDetector
+.. cpp:class:: GridAdaptedFeatureDetector
 
 Class adapting a detector to partition the source image into a grid and detect points in each cell ::
 
@@ -371,7 +371,7 @@ Class adapting a detector to partition the source image into a grid and detect p
 
 PyramidAdaptedFeatureDetector
 -----------------------------
-.. c:type:: PyramidAdaptedFeatureDetector
+.. cpp:class:: PyramidAdaptedFeatureDetector
 
 Class adapting a detector to detect points over multiple levels of a Gaussian pyramid. Consider using this class for detectors that are not inherently scaled. ::
 
@@ -392,14 +392,14 @@ Class adapting a detector to detect points over multiple levels of a Gaussian py
 DynamicAdaptedFeatureDetector
 -----------------------------
 
-.. c:type:: DynamicAdaptedFeatureDetector
+.. cpp:class:: DynamicAdaptedFeatureDetector
 
 Adaptively adjusting detector that iteratively detects features until the desired number is found ::
 
        class DynamicAdaptedFeatureDetector: public FeatureDetector
        {
        public:
-           DynamicAdaptedFeatureDetector( const Ptr<AdjusterAdapter>& adjaster,
+           DynamicAdaptedFeatureDetector( const Ptr<AdjusterAdapter>& adjuster,
                int min_features=400, int max_features=500, int max_iters=5 );
            ...
        };
@@ -411,7 +411,7 @@ panorama series.
 
 ``DynamicAdaptedFeatureDetector``  uses another detector such as FAST or SURF to do the dirty work,
 with the help of ``AdjusterAdapter`` .
-If the detected number of features is not enough,??
+If the detected number of features is not large enough,
 ``AdjusterAdapter`` adjusts the detection parameters so that the next detection 
 results in bigger or smaller number of features.  This is repeated until either the number of desired features are found
 or the parameters are maxed out.
@@ -419,8 +419,7 @@ or the parameters are maxed out.
 Adapters can be easily implemented for any detector via the
 ``AdjusterAdapter`` interface.
 
-Beware that this is not thread-safe since the adjustment of parameters breaks the const??
-of the detection routine.
+Beware that this is not thread-safe since the adjustment of parameters requires modification of the feature detector class instance.
 
 Example of creating ``DynamicAdaptedFeatureDetector`` : ::
 
@@ -438,11 +437,11 @@ Example of creating ``DynamicAdaptedFeatureDetector`` : ::
 
 DynamicAdaptedFeatureDetector::DynamicAdaptedFeatureDetector
 ----------------------------------------------------------------
-.. c:function:: DynamicAdaptedFeatureDetector::DynamicAdaptedFeatureDetector(       const Ptr<AdjusterAdapter>\& adjaster,       int min_features,   int max_features,   int max_iters )
+.. cpp:function:: DynamicAdaptedFeatureDetector::DynamicAdaptedFeatureDetector(       const Ptr<AdjusterAdapter>& adjuster,       int min_features,   int max_features,   int max_iters )
 
-``DynamicAdaptedFeatureDetector`` constructor
+    The class constructor
 
-    :param adjaster:  :ref:`AdjusterAdapter`  that detects features and adjusts parameters.??parameter formatting is broken here
+    :param adjuster:  :ref:`AdjusterAdapter`  that detects features and adjusts parameters.
 
     :param min_features: Minimum desired number of features.
 
@@ -455,9 +454,9 @@ DynamicAdaptedFeatureDetector::DynamicAdaptedFeatureDetector
 AdjusterAdapter
 ---------------
 
-.. c:type:: AdjusterAdapter
+.. cpp:class:: AdjusterAdapter
 
-Class providing an interface for adjusting parameters of a feature detector. This interface is used by :ref:`DynamicAdaptedFeatureDetector` . It is a wrapper for :ref:`FeatureDetector` that enables adjusting parameters after detection.?? ::
+Class providing an interface for adjusting parameters of a feature detector. This interface is used by :ref:`DynamicAdaptedFeatureDetector` . It is a wrapper for :ref:`FeatureDetector` that enables adjusting parameters after feature detection. ::
   
      class AdjusterAdapter: public FeatureDetector
      {
@@ -479,9 +478,9 @@ See
 
 AdjusterAdapter::tooFew
 ---------------------------
-.. c:function:: virtual void tooFew(int min, int n_detected) = 0
+.. cpp:function:: void AdjusterAdapter::tooFew(int min, int n_detected)
 
-       Adjusts the detector parameters to detect more features.
+    Adjusts the detector parameters to detect more features.
 
     :param min: Minimum desired number of features.
 
@@ -499,7 +498,7 @@ Example: ::
 
 AdjusterAdapter::tooMany
 ----------------------------
-.. c:function:: virtual void tooMany(int max, int n_detected) = 0
+.. cpp:function:: void AdjusterAdapter::tooMany(int max, int n_detected)
 
     Adjusts the detector parameters to detect less features.
 
@@ -519,7 +518,7 @@ Example: ::
 
 AdjusterAdapter::good
 -------------------------
-.. c:function:: virtual bool good() const = 0
+.. cpp:function:: bool AdjusterAdapter::good() const
 
     Returns false if the detector parameters cannot be adjusted any more. 
 
@@ -536,9 +535,9 @@ Example: ::
 FastAdjuster
 ------------
 
-.. c:type:: FastAdjuster
+.. cpp:class:: FastAdjuster
 
-:ref:`AdjusterAdapter` for :ref:`FastFeatureDetector`. This class decrements or increments the threshhold by 1.?? ::
+:ref:`AdjusterAdapter` for :ref:`FastFeatureDetector`. This class decreases or increases the threshold value by 1 ::
 
         class FastAdjuster FastAdjuster: public AdjusterAdapter
         {
@@ -552,7 +551,7 @@ FastAdjuster
 StarAdjuster
 ------------
 
-.. c:type:: StarAdjuster
+.. cpp:class:: StarAdjuster
 
 :ref:`AdjusterAdapter` for :ref:`StarFeatureDetector` .  This class adjusts the ``responseThreshhold`` of ``StarFeatureDetector`` .  ::
 
@@ -567,7 +566,7 @@ StarAdjuster
 SurfAdjuster
 ------------
 
-.. c:type:: SurfAdjuster
+.. cpp:class:: SurfAdjuster
 
 :ref:`AdjusterAdapter` for :ref:`SurfFeatureDetector` .  This class adjusts the ``hessianThreshold`` of ``SurfFeatureDetector`` . ::
 
@@ -581,7 +580,7 @@ SurfAdjuster
 
 FeatureDetector
 ---------------
-.. c:type:: FeatureDetector
+.. cpp:class:: FeatureDetector
 
 Abstract base class for 2D image feature detectors ::
 
@@ -605,462 +604,3 @@ Abstract base class for 2D image feature detectors ::
     protected:
     ...
     };
-
-
-.. index:: FeatureDetector::detect
-
-FeatureDetector::detect
----------------------------
-.. c:function:: void FeatureDetector::detect( const Mat\& image,                                vector<KeyPoint>\& keypoints,                                 const Mat\& mask=Mat() ) const
-
-    Detects keypoints in an image (first variant) or image set (second variant).
-
-    :param image: Image.
-
-    :param keypoints: Detected keypoints.
-
-    :param mask: Mask specifying where to look for keypoints (optional). It 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
-
-    :param images: Image set.
-
-    :param keypoints: Collection of keypoints detected in an input image. ``keypoints[i]`` is a set of keypoints detected in ``images[i]`` .
-
-    :param 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 )
-
-    Reads a feature detector object from a file node.
-
-    :param fn: File node from which the detector is read.
-
-.. index:: FeatureDetector::write
-
-FeatureDetector::write
---------------------------
-.. c:function:: void FeatureDetector::write( FileStorage\& fs ) const
-
-    Writes a feature detector object to a file storage.
-
-    :param fs: File storage where the detector is written.
-
-.. index:: FeatureDetector::create
-
-FeatureDetector::create
----------------------------
-.. c:function:: Ptr<FeatureDetector> FeatureDetector::create( const string\& detectorType )??
-
-    Creates a feature detector of a given type with the default parameters (using the default constructor).??
-
-    :param detectorType: Feature detector type.
-
-Now the following detector types are supported:
-
- * ``"FAST"`` -- :ref:`FastFeatureDetector`
- * ``"STAR"`` -- :ref:`StarFeatureDetector`
- * ``"SIFT"`` -- :ref:`SiftFeatureDetector`
- * ``"SURF"`` -- :ref:`SurfFeatureDetector`
- * ``"MSER"`` -- :ref:`MserFeatureDetector`
- * ``"GFTT"`` -- :ref:`GfttFeatureDetector`
- * ``"HARRIS"`` -- :ref:`HarrisFeatureDetector`
-
-A combined format is also supported: feature detector adapter name ( ``"Grid"`` --
-:ref:`GridAdaptedFeatureDetector` , ``"Pyramid"`` --
-:ref:`PyramidAdaptedFeatureDetector` ) + feature detector name (see above),
-for example: ``"GridFAST"`` , ``"PyramidSTAR"`` .
-
-.. index:: FastFeatureDetector
-
-FastFeatureDetector
--------------------
-.. c:type:: FastFeatureDetector
-
-Wrapping class for feature detection using the
-:ref:`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 the :ref:`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 the :ref:`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 the :ref:`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 the :ref:`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 the :ref:`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
-
-Class adapting 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 are kept.
-         * gridRows            Grid row 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
-
-Class adapting a detector to detect points over multiple levels of a Gaussian pyramid. Consider using this class 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
-
-Adaptively adjusting detector that iteratively detects features until the desired number is 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 "remembers" the parameters
-used on the last detection. In this case, the detector may be used for consistent numbers
-of keypoints in a set of images that are temporally related, such as video streams or
-panorama series.
-
-``DynamicAdaptedFeatureDetector`` uses another detector such as FAST or SURF to do the dirty work,
-with the help of ``AdjusterAdapter`` .
-If the number of detected features is not enough,
-``AdjusterAdapter`` adjusts the detection parameters so that the next detection 
-results in a bigger or smaller number of 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.
-
-Example of creating ``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 )
-
-       Provides the ``DynamicAdaptedFeatureDetector`` constructor.??
-
-    :param adjaster:  :ref:`AdjusterAdapter`  that detects features and adjusts parameters.??formatting issue again
-
-    :param min_features: Minimum desired number of features.
-
-    :param max_features: Maximum desired number of features.
-
-    :param max_iters: Maximum number of times to try adjusting the feature detector parameters. For  :ref:`FastAdjuster` , this number can be high, but with ``Star`` or ``Surf``  many iterations can be time-consuming.  At each iteration the detector is rerun. 
-
-.. index:: AdjusterAdapter
-
-AdjusterAdapter
----------------
-
-.. c:type:: AdjusterAdapter
-
-Class providing an interface for adjusting parameters of a feature detector. This interface is used by :ref:`DynamicAdaptedFeatureDetector` . It is a wrapper for :ref:`FeatureDetector` that enables adjusting parameters after 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
-:ref:`FastAdjuster`,
-:ref:`StarAdjuster`,
-:ref:`SurfAdjuster` for concrete implementations.
-
-.. index:: AdjusterAdapter::tooFew
-
-AdjusterAdapter::tooFew
----------------------------
-.. c:function:: virtual void tooFew(int min, int n_detected) = 0
-
-       Adjusts the detector parameters to detect more features.
-
-    :param min: Minimum desired number of features.
-
-    :param n_detected: Number of features detected during the latest run.
-
-Example: ::
-
-    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
-
-    Adjusts the detector parameters to detect less features.
-
-    :param max: Maximum desired number of features.
-
-    :param n_detected: Number of features detected during the latest run.
-
-Example: ::
-
-    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 cannot be adjusted any more.
-
-Example: ::
-
-        bool FastAdjuster::good() const
-        {
-            return (thresh > 1) && (thresh < 200);
-        }
-
-.. index:: FastAdjuster
-
-FastAdjuster
-------------
-
-.. c:type:: FastAdjuster
-
-:ref:`AdjusterAdapter` for :ref:`FastFeatureDetector`. This class decrements or increments the threshhld by 1. ::
-
-    class FastAdjuster FastAdjuster: public AdjusterAdapter
-    {
-    public:
-            FastAdjuster(int init_thresh = 20, bool nonmax = true);
-            ...
-    };
-
-
-.. index:: StarAdjuster
-
-StarAdjuster
-------------
-
-.. c:type:: StarAdjuster
-
-:ref:`AdjusterAdapter` for :ref:`StarFeatureDetector` .  This classadjusts the responseThreshhold of StarFeatureDetector. ::
-
-    class StarAdjuster: public AdjusterAdapter
-    {
-            StarAdjuster(double initial_thresh = 30.0);
-            ...
-    };
-
-
-.. index:: SurfAdjuster
-
-SurfAdjuster
-------------
-
-.. c:type:: SurfAdjuster
-
-:ref:`AdjusterAdapter` for :ref:`SurfFeatureDetector` .  This class adjusts the ``hessianThreshold`` of ``SurfFeatureDetector`` . ::
-
-    class SurfAdjuster: public SurfAdjuster
-    {
-            SurfAdjuster();
-            ...
-    };
-
-..
-
index 73404ce..5a1ca08 100644 (file)
@@ -16,7 +16,7 @@ There are descriptors such as the One-way descriptor and Ferns that have the ``G
 
 GenericDescriptorMatcher
 ------------------------
-.. c:type:: GenericDescriptorMatcher
+.. cpp: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. ::
 
@@ -84,9 +84,9 @@ Abstract interface for extracting and matching a keypoint descriptor. There are
 
 GenericDescriptorMatcher::add
 ---------------------------------
-.. c:function:: void GenericDescriptorMatcher::add( const vector<Mat>\& images,                        vector<vector<KeyPoint> >\& keypoints )
+.. cpp:function:: void GenericDescriptorMatcher::add( const vector<Mat>& images,                        vector<vector<KeyPoint> >& keypoints )
 
-    Adds images and their keypoints to a train collection (descriptors are supposed to be calculated here). If the train collection is not empty, a new image and its keypoints is added to existing data.??
+    Adds images and their keypoints to the training collection, stored in the class instance.
 
     :param images: Image collection.
 
@@ -96,7 +96,7 @@ GenericDescriptorMatcher::add
 
 GenericDescriptorMatcher::getTrainImages
 --------------------------------------------
-.. c:function:: const vector<Mat>\& GenericDescriptorMatcher::getTrainImages() const
+.. cpp:function:: const vector<Mat>& GenericDescriptorMatcher::getTrainImages() const
 
     Returns a train image collection.
 
@@ -104,7 +104,7 @@ GenericDescriptorMatcher::getTrainImages
 
 GenericDescriptorMatcher::getTrainKeypoints
 -----------------------------------------------
-.. c:function:: const vector<vector<KeyPoint> >\&  GenericDescriptorMatcher::getTrainKeypoints() const
+.. cpp:function:: const vector<vector<KeyPoint> >&  GenericDescriptorMatcher::getTrainKeypoints() const
 
     Returns a train keypoints collection.
 
@@ -112,7 +112,7 @@ GenericDescriptorMatcher::getTrainKeypoints
 
 GenericDescriptorMatcher::clear
 -----------------------------------
-.. c:function:: void GenericDescriptorMatcher::clear()
+.. cpp:function:: void GenericDescriptorMatcher::clear()
 
     Clears a train collection (images and keypoints).
 
@@ -120,7 +120,7 @@ GenericDescriptorMatcher::clear
 
 GenericDescriptorMatcher::train
 -----------------------------------
-.. c:function:: void GenericDescriptorMatcher::train()
+.. cpp:function:: void GenericDescriptorMatcher::train()
 
     Trains an object, for example, a tree-based structure, to extract descriptors or to optimize descriptors matching.
 
@@ -128,7 +128,7 @@ GenericDescriptorMatcher::train
 
 GenericDescriptorMatcher::isMaskSupported
 ---------------------------------------------
-.. c:function:: void GenericDescriptorMatcher::isMaskSupported()
+.. cpp:function:: void GenericDescriptorMatcher::isMaskSupported()
 
     Returns true if a generic descriptor matcher supports masking permissible matches.
 
@@ -136,11 +136,11 @@ GenericDescriptorMatcher::isMaskSupported
 
 GenericDescriptorMatcher::classify
 --------------------------------------
-.. c:function:: void GenericDescriptorMatcher::classify(  const Mat\& queryImage,           vector<KeyPoint>\& queryKeypoints,           const Mat\& trainImage,           vector<KeyPoint>\& trainKeypoints ) const
+.. cpp:function:: void GenericDescriptorMatcher::classify(  const Mat& queryImage,           vector<KeyPoint>& queryKeypoints,           const Mat& trainImage,           vector<KeyPoint>& trainKeypoints ) const
 
-    Classifies query keypoints under keypoints of a train image qiven as an input argument (first version of the method) or a train image collection (second version).??
+.. cpp:function:: void GenericDescriptorMatcher::classify( const Mat& queryImage,           vector<KeyPoint>& queryKeypoints )
 
-.. c:function:: void GenericDescriptorMatcher::classify( const Mat\& queryImage,           vector<KeyPoint>\& queryKeypoints )
+    Classify keypoints from the query set.
 
     :param queryImage: Query image.
 
@@ -150,15 +150,25 @@ GenericDescriptorMatcher::classify
 
     :param trainKeypoints: Keypoints from the train image.
 
+    The method classify each keypoint from the query set. The first variant of method takes the training image and its keypoints as an input argument. The second variant uses the internally stored training collection, which can be built using ``GenericDescriptorMatcher::add`` method.
+    
+    The methods do the following:
+    
+    #.
+        They call ``GenericDescriptorMatcher::match`` method to find correspondence between the query set and the training set.
+        
+    #.
+        ``class_id`` field of each keypoint from the query set is set to ``class_id`` of the corresponding keypoint from the training set.
+
 .. index:: GenericDescriptorMatcher::match
 
 GenericDescriptorMatcher::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
+.. cpp:function:: void GenericDescriptorMatcher::match(           const Mat& queryImage, vector<KeyPoint>& queryKeypoints,      const Mat& trainImage, vector<KeyPoint>& trainKeypoints,      vector<DMatch>& matches, const Mat& mask=Mat() ) const
 
-    Finds the best match for query keypoints to the training set. In the first version of the method, a train image and keypoints detected on it are input arguments. In the second version, query keypoints are matched to a training collection set using ??. As in the mask can be set.??
+.. cpp:function:: void GenericDescriptorMatcher::match(           const Mat& queryImage, vector<KeyPoint>& queryKeypoints,          vector<DMatch>& matches,           const vector<Mat>& masks=vector<Mat>() )
 
-.. c: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.
 
     :param queryImage: Query image.
 
@@ -174,31 +184,37 @@ GenericDescriptorMatcher::match
 
     :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, which 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.
+
 .. index:: GenericDescriptorMatcher::knnMatch
 
 GenericDescriptorMatcher::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
+.. cpp: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
 
-    Finds 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 the distance increasing order. See details in ??.
+.. cpp: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 )
 
-.. 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 )
+    Find 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``, except that this class does not require explicitly computed keypoint descriptors.
 
 .. index:: GenericDescriptorMatcher::radiusMatch
 
 GenericDescriptorMatcher::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
+.. cpp: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
+
+.. cpp: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 )
 
-    Finds the best matches for each query keypoint that has a distance smaller than the given threshold. Found matches are returned in the distance increasing order. See details see in ??.
+    For each query keypoint, find the training keypoints not farther than the specified distance.
 
-.. 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 )
+The methods are similar to ``DescriptorMatcher::radiusMatch``, except that this class does not require explicitly computed keypoint descriptors.
 
 .. index:: GenericDescriptorMatcher::read
 
 GenericDescriptorMatcher::read
 ----------------------------------
-.. c:function:: void GenericDescriptorMatcher::read( const FileNode\& fn )
+.. cpp:function:: void GenericDescriptorMatcher::read( const FileNode& fn )
 
     Reads a matcher object from a file node.
 
@@ -206,7 +222,7 @@ GenericDescriptorMatcher::read
 
 GenericDescriptorMatcher::write
 -----------------------------------
-.. c:function:: void GenericDescriptorMatcher::write( FileStorage\& fs ) const
+.. cpp:function:: void GenericDescriptorMatcher::write( FileStorage& fs ) const
 
     Writes a match object to a file storage.
 
@@ -214,7 +230,7 @@ GenericDescriptorMatcher::write
 
 GenericDescriptorMatcher::clone
 -----------------------------------
-.. c:function:: Ptr<GenericDescriptorMatcher>\\GenericDescriptorMatcher::clone( bool emptyTrainData ) const
+.. cpp:function:: Ptr<GenericDescriptorMatcher> GenericDescriptorMatcher::clone( bool emptyTrainData ) const
 
     Clones the matcher.
 
@@ -228,7 +244,7 @@ GenericDescriptorMatcher::clone
 
 OneWayDescriptorMatcher
 -----------------------
-.. c:type:: OneWayDescriptorMatcher
+.. cpp:class:: OneWayDescriptorMatcher
 
 Wrapping class for computing, matching, and classifying descriptors using the
 :ref:`OneWayDescriptorBase` class ::
@@ -287,7 +303,7 @@ Wrapping class for computing, matching, and classifying descriptors using the
 
 FernDescriptorMatcher
 ---------------------
-.. c:type:: FernDescriptorMatcher
+.. cpp:class:: FernDescriptorMatcher
 
 Wrapping class for computing, matching, and classifying descriptors using the
 :ref:`FernClassifier` class ::
@@ -346,7 +362,7 @@ Wrapping class for computing, matching, and classifying descriptors using the
 
 VectorDescriptorMatcher
 -----------------------
-.. c:type:: VectorDescriptorMatcher
+.. cpp:class:: VectorDescriptorMatcher
 
 Class used for matching descriptors that can be described as vectors in a finite-dimensional space ::
 
index 30e9d87..0611732 100644 (file)
@@ -6,9 +6,9 @@ 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 )
+.. cpp: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<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 )
+.. cpp: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: The first source image.
 
@@ -61,7 +61,7 @@ This function draws matches of keypoints from two images in the output image. Ma
 
 drawKeypoints
 -----------------
-.. c:function:: void drawKeypoints( const Mat& image,           const vector<KeyPoint>& keypoints,           Mat& outImg, const Scalar& color=Scalar::all(-1),           int flags=DrawMatchesFlags::DEFAULT )
+.. cpp:function:: void drawKeypoints( const Mat& image,           const vector<KeyPoint>& keypoints,           Mat& outImg, const Scalar& color=Scalar::all(-1),           int flags=DrawMatchesFlags::DEFAULT )
 
     Draws keypoints.
 
index 5790695..99413a1 100644 (file)
@@ -25,7 +25,7 @@ FAST
 
 MSER
 ----
-.. c:type:: MSER
+.. cpp:class:: MSER
 
 Maximally stable extremal region extractor ::
 
@@ -54,7 +54,7 @@ http://en.wikipedia.org/wiki/Maximally_stable_extremal_regions).
 
 StarDetector
 ------------
-.. c:type:: StarDetector
+.. cpp:class:: StarDetector
 
 Class implementing the Star keypoint detector ::
 
@@ -93,7 +93,7 @@ The class implements a modified version of the ``CenSurE`` keypoint detector des
 
 SIFT
 ----
-.. c:type:: SIFT
+.. cpp:class:: SIFT
 
 Class for extracting keypoints and computing descriptors using the Scale Invariant Feature Transform (SIFT) approach ::
 
@@ -183,7 +183,7 @@ Class for extracting keypoints and computing descriptors using the Scale Invaria
 
 SURF
 ----
-.. c:type:: SURF
+.. cpp:class:: SURF
 
 Class for extracting Speeded Up Robust Features from an image ::
 
@@ -221,7 +221,7 @@ The algorithm can be used for object tracking and localization, image stitching,
 
 RandomizedTree
 --------------
-.. c:type:: RandomizedTree
+.. cpp:class:: RandomizedTree
 
 Class containing a base structure for ``RTreeClassifier`` ::
 
@@ -361,7 +361,7 @@ RandomizedTree::applyQuantization
 
 RTreeNode
 ---------
-.. c:type:: RTreeNode
+.. cpp:class:: RTreeNode
 
 Class containing a base structure for ``RandomizedTree`` ::
 
@@ -389,7 +389,7 @@ Class containing a base structure for ``RandomizedTree`` ::
 
 RTreeClassifier
 ---------------
-.. c:type:: RTreeClassifier
+.. cpp:class:: RTreeClassifier
 
 Class containing ``RTreeClassifier`` . It represents the Calonder descriptor that was originally introduced by Michael Calonder. ::
 
index 4ffdcab..f31b558 100644 (file)
@@ -11,7 +11,7 @@ This section describes approaches based on local 2D features and used to categor
 
 BOWTrainer
 ----------
-.. c:type:: BOWTrainer
+.. cpp:class:: BOWTrainer
 
 Abstract base class for training the *bag of visual words* vocabulary from a set of descriptors.
 For details, see, for example, *Visual Categorization with Bags of Keypoints* by Gabriella Csurka, Christopher R. Dance,
@@ -41,7 +41,7 @@ Lixin Fan, Jutta Willamowski, Cedric Bray, 2004. ::
 
 BOWTrainer::add
 -------------------
-.. c:function:: void BOWTrainer::add( const Mat\& descriptors )
+.. c:function:: void BOWTrainer::add( const Mat& descriptors )
 
     Adds descriptors to a training set. The training set is clustered using ``clustermethod`` to construct the vocabulary.
 
@@ -51,7 +51,7 @@ BOWTrainer::add
 
 BOWTrainer::getDescriptors
 ------------------------------
-.. c:function:: const vector<Mat>\& BOWTrainer::getDescriptors() const
+.. c:function:: const vector<Mat>& BOWTrainer::getDescriptors() const
 
     Returns a training set of descriptors.
 
@@ -59,7 +59,7 @@ BOWTrainer::getDescriptors
 
 BOWTrainer::descripotorsCount
 ---------------------------------
-.. c:function:: const vector<Mat>\& BOWTrainer::descripotorsCount() const
+.. c:function:: const vector<Mat>& BOWTrainer::descripotorsCount() const
 
     Returns the count of all descriptors stored in the training set.
 
@@ -71,7 +71,7 @@ BOWTrainer::cluster
 
     Clusters train descriptors. The vocabulary consists of cluster centers. So, this method returns the vocabulary. In the first variant of the method, train descriptors stored in the object are clustered. In the second variant, input descriptors are clustered.
 
-.. c:function:: Mat BOWTrainer::cluster( const Mat\& descriptors ) const
+.. c:function:: Mat BOWTrainer::cluster( const Mat& descriptors ) const
 
     :param descriptors: Descriptors to cluster. Each row of  the ``descriptors``  matrix is a descriptor. Descriptors are not added to the inner train descriptor set.
 
@@ -81,7 +81,7 @@ BOWTrainer::cluster
 
 BOWKMeansTrainer
 ----------------
-.. c:type:: BOWKMeansTrainer
+.. cpp:class:: BOWKMeansTrainer
 
 :ref:`kmeans` -based class to train visual vocabulary using the *bag of visual words* approach ::
 
@@ -111,13 +111,15 @@ arguments.
 
 BOWImgDescriptorExtractor
 -------------------------
-.. c:type:: BOWImgDescriptorExtractor
+.. cpp:class:: BOWImgDescriptorExtractor
 
 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.
     #. Find the nearest visual words from the vocabulary for each keypoint descriptor.
-    #. Image descriptor is a normalized histogram of vocabulary words encountered in the image. This means that the ``i`` -th bin of the histogram is a frequency of ``i`` -th word of the vocabulary in the given image.??this is not a step ::
+    #. 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 ::
 
         class BOWImgDescriptorExtractor
         {
@@ -144,9 +146,9 @@ Class to compute an image descriptor using the ''bag of visual words''. Such a c
 
 BOWImgDescriptorExtractor::BOWImgDescriptorExtractor
 --------------------------------------------------------
-.. c:function:: BOWImgDescriptorExtractor::BOWImgDescriptorExtractor(           const Ptr<DescriptorExtractor>\& dextractor,          const Ptr<DescriptorMatcher>\& dmatcher )
+.. c:function:: BOWImgDescriptorExtractor::BOWImgDescriptorExtractor(           const Ptr<DescriptorExtractor>& dextractor,          const Ptr<DescriptorMatcher>& dmatcher )
 
-    Constructs ??.
+    The class constructor.
 
     :param dextractor: Descriptor extractor that is used to compute descriptors for an input image and its keypoints.
 
@@ -156,7 +158,7 @@ BOWImgDescriptorExtractor::BOWImgDescriptorExtractor
 
 BOWImgDescriptorExtractor::setVocabulary
 --------------------------------------------
-.. c:function:: void BOWImgDescriptorExtractor::setVocabulary( const Mat\& vocabulary )
+.. c:function:: void BOWImgDescriptorExtractor::setVocabulary( const Mat& vocabulary )
 
     Sets a visual vocabulary.
 
@@ -166,7 +168,7 @@ BOWImgDescriptorExtractor::setVocabulary
 
 BOWImgDescriptorExtractor::getVocabulary
 --------------------------------------------
-.. c:function:: const Mat\& BOWImgDescriptorExtractor::getVocabulary() const
+.. c:function:: const Mat& BOWImgDescriptorExtractor::getVocabulary() const
 
     Returns the set vocabulary.
 
@@ -174,11 +176,11 @@ BOWImgDescriptorExtractor::getVocabulary
 
 BOWImgDescriptorExtractor::compute
 --------------------------------------
-.. c:function:: void BOWImgDescriptorExtractor::compute( const Mat\& image,           vector<KeyPoint>\& keypoints, Mat\& imgDescriptor,           vector<vector<int> >* pointIdxsOfClusters=0,           Mat* descriptors=0 )
+.. c:function:: void BOWImgDescriptorExtractor::compute( const Mat& image,           vector<KeyPoint>& keypoints, Mat& imgDescriptor,           vector<vector<int> >* pointIdxsOfClusters=0,           Mat* descriptors=0 )
 
     Computes an image descriptor using the set visual vocabulary.
 
-    :param image: Image. Descriptor is computed for each image.??
+    :param image: Image, for which the descriptor is computed.
 
     :param keypoints: Keypoints detected in the input image.
 
index b652c50..75e61ee 100644 (file)
@@ -235,9 +235,7 @@ The function finds the most prominent corners in the image or in the specified i
     :func:`cornerHarris` .
     
 #.
-    Function performs a non-maximum?? suppression (the local maximums in
-    :math:`3\times 3`     neighborhood
-    are retained).
+    Function performs a non-maximum suppression (the local maximums in *3 x 3* neighborhood are retained).
 
 #.
     The corners with the minimal eigenvalue less than
@@ -247,10 +245,7 @@ The function finds the most prominent corners in the image or in the specified i
     The remaining corners are sorted by the quality measure in the descending order.
 
 #.
-    Function throws away each corner
-    :math:`pt_j`     if there is a stronger corner
-    :math:`pt_i`     (
-    :math:`i < j`     ) so that the distance between them is less than ``minDistance`` .
+    Then the function throws away each corner for which there is a stronger corner at a distance less than ``maxDistance``.
     
 The function can be used to initialize a point-based tracker of an object.
 
@@ -278,7 +273,7 @@ HoughCircles
 
     :param circles: Output vector of found circles. Each vector is encoded as a 3-element floating-point vector  :math:`(x, y, radius)` .
     
-    :param method: desc required?? Currently, the only implemented method is  ``CV_HOUGH_GRADIENT`` , which is basically  *21HT* , described in  Yuen90 .
+    :param method: The detection method to use. Currently, the only implemented method is  ``CV_HOUGH_GRADIENT`` , which is basically  *21HT* , described in  [Yuen90].
 
     :param dp: Inverse ratio of the accumulator resolution to the image resolution. For example, if  ``dp=1`` , the accumulator has the same resolution as the input image. If  ``dp=2`` , the accumulator has half as big width and height.
 
@@ -286,7 +281,7 @@ HoughCircles
 
     :param param1: The first method-specific parameter. In case of  ``CV_HOUGH_GRADIENT`` , it is the higher threshold of the two passed to  the :func:`Canny`  edge detector (the lower one is twice smaller).
 
-    :param param2: The second method-specific parameter. In case of  ``CV_HOUGH_GRADIENT`` , it is the accumulator threshold at the center of ?? detection stage. The smaller it is, the more false circles may be detected. Circles, corresponding to the larger accumulator values, will be returned first
+    :param param2: The second method-specific parameter. In case of  ``CV_HOUGH_GRADIENT`` , it is the accumulator threshold for the circle centers at the detection stage. The smaller it is, the more false circles may be detected. Circles, corresponding to the larger accumulator values, will be returned first
 
     :param minRadius: Minimum circle radius.