From 12d98a7d18844b854301d25d205b60271d2cbe0c Mon Sep 17 00:00:00 2001 From: Elena Fedotova Date: Sun, 8 May 2011 15:30:00 +0000 Subject: [PATCH] Purpose: completed the feature2d chapter --- .../common_interfaces_of_descriptor_extractors.rst | 18 +-- .../common_interfaces_of_descriptor_matchers.rst | 14 +-- .../doc/common_interfaces_of_feature_detectors.rst | 131 +++++++++++---------- ...n_interfaces_of_generic_descriptor_matchers.rst | 3 +- .../drawing_function_of_keypoints_and_matches.rst | 2 +- .../doc/feature_detection_and_description.rst | 62 +++++----- modules/features2d/doc/object_categorization.rst | 12 +- 7 files changed, 121 insertions(+), 121 deletions(-) diff --git a/modules/features2d/doc/common_interfaces_of_descriptor_extractors.rst b/modules/features2d/doc/common_interfaces_of_descriptor_extractors.rst index 480f933..3d52e21 100644 --- a/modules/features2d/doc/common_interfaces_of_descriptor_extractors.rst +++ b/modules/features2d/doc/common_interfaces_of_descriptor_extractors.rst @@ -41,7 +41,7 @@ Abstract base class for computing descriptors for image keypoints :: In this interface, a keypoint descriptor can be represented as a -dense, fixed-dimensional vector of a basic type. Most descriptors +dense, fixed-dimension vector of a basic type. Most descriptors follow this pattern as it simplifies computing distances between descriptors. Therefore, a collection of descriptors is represented as @@ -103,13 +103,13 @@ DescriptorExtractor::create The current implementation supports the following types of a descriptor extractor: - * ``"SIFT"`` -- :func:`SiftFeatureDetector` - * ``"SURF"`` -- :func:`SurfFeatureDetector` - * ``"BRIEF"`` -- :func:`BriefFeatureDetector` + * ``"SIFT"`` -- :ref:`SiftFeatureDetector` + * ``"SURF"`` -- :ref:`SurfFeatureDetector` + * ``"BRIEF"`` -- :ref:`BriefFeatureDetector` A combined format is also supported: descriptor extractor adapter name ( ``"Opponent"`` -- :ref:`OpponentColorDescriptorExtractor` ) + descriptor extractor name (see above), -for example, ``"OpponentSIFT"`` . +for example: ``"OpponentSIFT"`` . .. index:: SiftDescriptorExtractor @@ -117,7 +117,7 @@ SiftDescriptorExtractor ----------------------- .. c:type:: SiftDescriptorExtractor -Wrapping class for descriptors computing using the +Wrapping class for computing descriptors by using the :ref:`SIFT` class :: class SiftDescriptorExtractor : public DescriptorExtractor @@ -147,7 +147,7 @@ SurfDescriptorExtractor ----------------------- .. c:type:: SurfDescriptorExtractor -Wrapping class for computing descriptors using the +Wrapping class for computing descriptors by using the :ref:`SURF` class :: class SurfDescriptorExtractor : public DescriptorExtractor @@ -171,7 +171,7 @@ CalonderDescriptorExtractor --------------------------- .. c:type:: CalonderDescriptorExtractor -Wrapping class for computing descriptors using the +Wrapping class for computing descriptors by using the :ref:`RTreeClassifier` class :: template @@ -197,7 +197,7 @@ OpponentColorDescriptorExtractor -------------------------------- .. c:type:: OpponentColorDescriptorExtractor -Class adapting a descriptor extractor to compute descripors in the Opponent Color Space +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*). Input RGB image is transformed in the Opponent Color Space. Then, an unadapted descriptor extractor (set in the constructor) computes descriptors on each of three channels and concatenates diff --git a/modules/features2d/doc/common_interfaces_of_descriptor_matchers.rst b/modules/features2d/doc/common_interfaces_of_descriptor_matchers.rst index 096936c..dca86cf 100644 --- a/modules/features2d/doc/common_interfaces_of_descriptor_matchers.rst +++ b/modules/features2d/doc/common_interfaces_of_descriptor_matchers.rst @@ -136,7 +136,7 @@ DescriptorMatcher::empty ---------------------------- .. c:function:: bool DescriptorMatcher::empty() const - Returns true if there are not train descriptors in the collection. + Returns true if there are no train descriptors in the collection. .. index:: DescriptorMatcher::isMaskSupported @@ -160,7 +160,7 @@ DescriptorMatcher::match ---------------------------- .. c:function:: void DescriptorMatcher::match( const Mat\& queryDescriptors, const Mat\& trainDescriptors, vector\& 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 be of 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 be of keypoints detected on the same train image. In the second variant of the method, train descriptors collection that was set using ``addmethod`` is used. Optional mask (or masks) can be set to describe which descriptors can be matched. ``queryDescriptors[i]`` can be matched with ``trainDescriptors[j]`` only if ``mask.at(i,j)`` is non-zero.?? what does "of keypoints" mean? + 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(i,j)`` is non-zero.?? .. c:function:: void DescriptorMatcher::match( const Mat\& queryDescriptors, vector\& matches, const vector\& masks=vector() ) @@ -172,7 +172,7 @@ DescriptorMatcher::match :param mask: Mask specifying permissible matches between an input query and train matrices of descriptors. - :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]`` . + :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]``. .. index:: DescriptorMatcher::knnMatch @@ -196,7 +196,6 @@ DescriptorMatcher::knnMatch DescriptorMatcher::radiusMatch ---------------------------------- -:func:`DescriptorMatcher::match` .. c:function:: void DescriptorMatcher::radiusMatch( const Mat\& queryDescriptors, const Mat\& trainDescriptors, vector >\& 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 ??. @@ -225,14 +224,13 @@ DescriptorMatcher::clone DescriptorMatcher::create ----------------------------- -:func:`DescriptorMatcher` .. c:function:: Ptr 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. + :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"`` . +Now the following matcher types are supported: ``BruteForce`` (it uses ``L2`` ), ``BruteForce-L1`` ,``BruteForce-Hamming`` ,``BruteForce-HammingLUT`` , and ``FlannBased`` . .. index:: BruteForceMatcher @@ -258,7 +256,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, a common choice is ``L2`` . The following class of supported distances is used: :: +For efficiency, ``BruteForceMatcher`` is used as a template for the distance metric??. For float descriptors, ``L2`` is a common choice. The following distances are supported: :: template struct Accumulator diff --git a/modules/features2d/doc/common_interfaces_of_feature_detectors.rst b/modules/features2d/doc/common_interfaces_of_feature_detectors.rst index edddedb..48e03fe 100644 --- a/modules/features2d/doc/common_interfaces_of_feature_detectors.rst +++ b/modules/features2d/doc/common_interfaces_of_feature_detectors.rst @@ -149,24 +149,24 @@ FeatureDetector::create --------------------------- .. c:function:: Ptr FeatureDetector::create( const string\& detectorType ) - Creates a feature detector of a given type with the default parameters (or using the default constructor).?? + Creates a feature detector of a given type with the default parameters (using the default constructor).?? :param detectorType: Feature detector type. The following detector types are supported: -* ``"FAST"`` -- :func:`FastFeatureDetector` -* ``"STAR"`` -- :func:`StarFeatureDetector` -* ``"SIFT"`` -- :func:`SiftFeatureDetector` -* ``"SURF"`` -- :func:`SurfFeatureDetector` -* ``"MSER"`` -- :func:`MserFeatureDetector` -* ``"GFTT"`` -- :func:`GfttFeatureDetector` -* ``"HARRIS"`` -- :func:`HarrisFeatureDetector` +* ``"FAST"`` -- :ref:`FastFeatureDetector` +* ``"STAR"`` -- :ref:`StarFeatureDetector` +* ``"SIFT"`` -- :ref:`SiftFeatureDetector` +* ``"SURF"`` -- :ref:`SurfFeatureDetector` +* ``"MSER"`` -- :ref:`MserFeatureDetector` +* ``"GFTT"`` -- :ref:`GfttFeatureDetector` +* ``"HARRIS"`` -- :ref:`HarrisFeatureDetector` Also a combined format is supported: feature detector adapter name ( ``"Grid"`` -- -:func:`GridAdaptedFeatureDetector`, ``"Pyramid"`` -- -:func:`PyramidAdaptedFeatureDetector` ) + feature detector name (see above), -for example, ``"GridFAST"``, ``"PyramidSTAR"`` . +:ref:`GridAdaptedFeatureDetector`, ``"Pyramid"`` -- +:ref:`PyramidAdaptedFeatureDetector` ) + feature detector name (see above), +for example: ``"GridFAST"``, ``"PyramidSTAR"`` . .. index:: FastFeatureDetector @@ -177,7 +177,7 @@ FastFeatureDetector .. c:type:: FastFeatureDetector Wrapping class for feature detection using the -:func:`FAST` method :: +:ref:`FAST` method :: class FastFeatureDetector : public FeatureDetector { @@ -199,7 +199,7 @@ GoodFeaturesToTrackDetector .. c:type:: GoodFeaturesToTrackDetector Wrapping class for feature detection using the -:func:`goodFeaturesToTrack` function :: +:ref:`goodFeaturesToTrack` function :: class GoodFeaturesToTrackDetector : public FeatureDetector { @@ -242,7 +242,7 @@ MserFeatureDetector .. c:type:: MserFeatureDetector Wrapping class for feature detection using the -:func:`MSER` class :: +:ref:`MSER` class :: class MserFeatureDetector : public FeatureDetector { @@ -268,7 +268,7 @@ StarFeatureDetector .. c:type:: StarFeatureDetector Wrapping class for feature detection using the -:func:`StarDetector` class :: +:ref:`StarDetector` class :: class StarFeatureDetector : public FeatureDetector { @@ -292,7 +292,7 @@ SiftFeatureDetector .. c:type:: SiftFeatureDetector Wrapping class for feature detection using the -:func:`SIFT` class :: +:ref:`SIFT` class :: class SiftFeatureDetector : public FeatureDetector { @@ -321,7 +321,7 @@ SurfFeatureDetector .. c:type:: SurfFeatureDetector Wrapping class for feature detection using the -:func:`SURF` class :: +:ref:`SURF` class :: class SurfFeatureDetector : public FeatureDetector { @@ -404,7 +404,7 @@ Adaptively adjusting detector that iteratively detects features until the desire ... }; -If the detector is persisted, it will "remember" the parameters +If the detector is persisted, it "remembers" the parameters used for the last detection. In this case, the detector may be used for consistent numbers of keypoints in a set of temporally related images, such as video streams or panorama series. @@ -413,7 +413,7 @@ panorama series. with the help of ``AdjusterAdapter`` . If the detected number of features is not enough,?? ``AdjusterAdapter`` adjusts the detection parameters so that the next detection -results in more or less features. This is repeated until either the number of desired features are found +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. Adapters can be easily implemented for any detector via the @@ -422,7 +422,7 @@ Adapters can be easily implemented for any detector via the Beware that this is not thread-safe since the adjustment of parameters breaks the const?? of the detection routine. -Here is a sample of how to create ``DynamicAdaptedFeatureDetector`` : :: +Example of creating ``DynamicAdaptedFeatureDetector`` : :: //sample usage: //will create a detector that attempts to find @@ -442,13 +442,13 @@ DynamicAdaptedFeatureDetector::DynamicAdaptedFeatureDetector ``DynamicAdaptedFeatureDetector`` constructor - :param adjaster: :func:`AdjusterAdapter` that detects features and adjusts parameters.??parameter formatting is broken here + :param adjaster: :ref:`AdjusterAdapter` that detects features and adjusts parameters.??parameter formatting is broken here - :param min_features: Minimum desired number features. + :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 :func:`FastAdjuster` , this number can be high, but with ``Star`` or ``Surf`` , many iterations can be time-comsuming. At each iteration the detector is rerun. + :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-comsuming. At each iteration the detector is rerun. .. index:: AdjusterAdapter @@ -457,7 +457,7 @@ AdjusterAdapter .. c:type:: AdjusterAdapter -Class providing an interface for adjusting parameters of a feature detector. This interface is used by :func:`DynamicAdaptedFeatureDetector` . It is a wrapper for :func:`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 detection.?? :: class AdjusterAdapter: public FeatureDetector { @@ -470,9 +470,9 @@ Class providing an interface for adjusting parameters of a feature detector. Thi See -:func:`FastAdjuster`, -:func:`StarAdjuster`, -:func:`SurfAdjuster` for concrete implementations. +:ref:`FastAdjuster`, +:ref:`StarAdjuster`, +:ref:`SurfAdjuster` for concrete implementations. .. index:: AdjusterAdapter::tooFew @@ -501,7 +501,7 @@ AdjusterAdapter::tooMany ---------------------------- .. c:function:: virtual void tooMany(int max, int n_detected) = 0 - Adjusts the detector parameters detect less features. + Adjusts the detector parameters to detect less features. :param max: Maximum desired number of features. @@ -538,7 +538,7 @@ FastAdjuster .. c:type:: FastAdjuster -:func:`AdjusterAdapter` for :func:`FastFeatureDetector`. This class decrements or increments the threshhold by 1.?? :: +:ref:`AdjusterAdapter` for :ref:`FastFeatureDetector`. This class decrements or increments the threshhold by 1.?? :: class FastAdjuster FastAdjuster: public AdjusterAdapter { @@ -554,7 +554,7 @@ StarAdjuster .. c:type:: StarAdjuster -:func:`AdjusterAdapter` for :func:`StarFeatureDetector` . This class adjusts the ``responseThreshhold`` of ``StarFeatureDetector`` . :: +:ref:`AdjusterAdapter` for :ref:`StarFeatureDetector` . This class adjusts the ``responseThreshhold`` of ``StarFeatureDetector`` . :: class StarAdjuster: public AdjusterAdapter { @@ -569,7 +569,7 @@ SurfAdjuster .. c:type:: SurfAdjuster -:func:`AdjusterAdapter` for :func:`SurfFeatureDetector` . This class adjusts the ``hessianThreshold`` of ``SurfFeatureDetector`` . :: +:ref:`AdjusterAdapter` for :ref:`SurfFeatureDetector` . This class adjusts the ``hessianThreshold`` of ``SurfFeatureDetector`` . :: class SurfAdjuster: public SurfAdjuster { @@ -657,23 +657,24 @@ FeatureDetector::create --------------------------- .. c:function:: Ptr FeatureDetector::create( const string\& detectorType )?? - Creates a feature detector of a given type with the default parameters (or using the default constructor).?? + 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"`` -- :func:`FastFeatureDetector` - * ``"STAR"`` -- :func:`StarFeatureDetector` - * ``"SIFT"`` -- :func:`SiftFeatureDetector` - * ``"SURF"`` -- :func:`SurfFeatureDetector` - * ``"MSER"`` -- :func:`MserFeatureDetector` - * ``"GFTT"`` -- :func:`GfttFeatureDetector` - * ``"HARRIS"`` -- :func:`HarrisFeatureDetector` + + * ``"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"`` -- -:func:`GridAdaptedFeatureDetector` , ``"Pyramid"`` -- -:func:`PyramidAdaptedFeatureDetector` ) + feature detector name (see above), -for example, ``"GridFAST"`` , ``"PyramidSTAR"`` . +:ref:`GridAdaptedFeatureDetector` , ``"Pyramid"`` -- +:ref:`PyramidAdaptedFeatureDetector` ) + feature detector name (see above), +for example: ``"GridFAST"`` , ``"PyramidSTAR"`` . .. index:: FastFeatureDetector @@ -682,7 +683,7 @@ FastFeatureDetector .. c:type:: FastFeatureDetector Wrapping class for feature detection using the -:func:`FAST` method :: +:ref:`FAST` method :: class FastFeatureDetector : public FeatureDetector { @@ -701,7 +702,7 @@ GoodFeaturesToTrackDetector --------------------------- .. c:type:: GoodFeaturesToTrackDetector - Wrapping class for feature detection using the :func:`goodFeaturesToTrack` function :: + Wrapping class for feature detection using the :ref:`goodFeaturesToTrack` function :: class GoodFeaturesToTrackDetector : public FeatureDetector { @@ -741,7 +742,7 @@ MserFeatureDetector ------------------- .. c:type:: MserFeatureDetector - Wrapping class for feature detection using the :func:`MSER` class :: + Wrapping class for feature detection using the :ref:`MSER` class :: class MserFeatureDetector : public FeatureDetector { @@ -764,7 +765,7 @@ StarFeatureDetector ------------------- .. c:type:: StarFeatureDetector -Wrapping class for feature detection using the :func:`StarDetector` class :: +Wrapping class for feature detection using the :ref:`StarDetector` class :: class StarFeatureDetector : public FeatureDetector { @@ -785,7 +786,7 @@ SiftFeatureDetector ------------------- .. c:type:: SiftFeatureDetector -Wrapping class for feature detection using the :func:`SIFT` class :: +Wrapping class for feature detection using the :ref:`SIFT` class :: class SiftFeatureDetector : public FeatureDetector { @@ -811,7 +812,7 @@ SurfFeatureDetector ------------------- .. c:type:: SurfFeatureDetector -Wrapping class for feature detection using the :func:`SURF` class :: +Wrapping class for feature detection using the :ref:`SURF` class :: class SurfFeatureDetector : public FeatureDetector { @@ -906,7 +907,7 @@ 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?? +Beware that this is not thread-safe as the adjustment of parameters breaks the const?? of the detection routine. Example of creating ``DynamicAdaptedFeatureDetector``: :: @@ -927,13 +928,13 @@ DynamicAdaptedFeatureDetector::DynamicAdaptedFeatureDetector Provides the ``DynamicAdaptedFeatureDetector`` constructor.?? - :param adjaster: :func:`AdjusterAdapter` that detects features and adjusts parameters.??formatting issue again + :param adjaster: :ref:`AdjusterAdapter` that detects features and adjusts parameters.??formatting issue again - :param min_features: Minimum desired number features. + :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 :func:`FastAdjuster` , this number can be high, but with ``Star`` or ``Surf`` , many iterations can be time-consuming. At each iteration the detector is rerun. + :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 @@ -942,7 +943,7 @@ AdjusterAdapter .. c:type:: AdjusterAdapter -Class providing an interface for adjusting parameters of a feature detector. This interface is used by :func:`DynamicAdaptedFeatureDetector` . It is a wrapper for :func:`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 detection. :: class AdjusterAdapter: public FeatureDetector { @@ -954,9 +955,9 @@ Class providing an interface for adjusting parameters of a feature detector. Thi }; See -:func:`FastAdjuster`, -:func:`StarAdjuster`, -:func:`SurfAdjuster` for concrete implementations. +:ref:`FastAdjuster`, +:ref:`StarAdjuster`, +:ref:`SurfAdjuster` for concrete implementations. .. index:: AdjusterAdapter::tooFew @@ -984,13 +985,13 @@ AdjusterAdapter::tooMany ---------------------------- .. c:function:: virtual void tooMany(int max, int n_detected) = 0 - Too many features were detected so, adjust the detector parameters accordingly - so that the next detection detects less features. + Adjusts the detector parameters to detect less features. - :param max: This maximum desired number features. + :param max: Maximum desired number of features. - :param n_detected: The actual number detected last run. + :param n_detected: Number of features detected during the latest run. -An example implementation of this is :: +Example: :: void FastAdjuster::tooMany(int min, int n_detected) { @@ -1004,7 +1005,9 @@ AdjusterAdapter::good ------------------------- .. c:function:: virtual bool good() const = 0 - Are params maxed out or still valid? Returns false if the parameters can't be adjusted any more. An example implementation of this is :: + Are params maxed out or still valid?? Returns false if the parameters cannot be adjusted any more. + +Example: :: bool FastAdjuster::good() const { @@ -1018,7 +1021,7 @@ FastAdjuster .. c:type:: FastAdjuster - :func:`AdjusterAdapter` for the :func:`FastFeatureDetector`. This will basically decrement or increment the threshhold by 1 :: +:ref:`AdjusterAdapter` for :ref:`FastFeatureDetector`. This class decrements or increments the threshhld by 1. :: class FastAdjuster FastAdjuster: public AdjusterAdapter { @@ -1035,7 +1038,7 @@ StarAdjuster .. c:type:: StarAdjuster - :func:`AdjusterAdapter` for the :func:`StarFeatureDetector` . This adjusts the responseThreshhold of StarFeatureDetector. :: +:ref:`AdjusterAdapter` for :ref:`StarFeatureDetector` . This classadjusts the responseThreshhold of StarFeatureDetector. :: class StarAdjuster: public AdjusterAdapter { @@ -1051,7 +1054,7 @@ SurfAdjuster .. c:type:: SurfAdjuster - :func:`AdjusterAdapter` for the :func:`SurfFeatureDetector` . This adjusts the hessianThreshold of SurfFeatureDetector. :: +:ref:`AdjusterAdapter` for :ref:`SurfFeatureDetector` . This class adjusts the ``hessianThreshold`` of ``SurfFeatureDetector`` . :: class SurfAdjuster: public SurfAdjuster { diff --git a/modules/features2d/doc/common_interfaces_of_generic_descriptor_matchers.rst b/modules/features2d/doc/common_interfaces_of_generic_descriptor_matchers.rst index 56776d4..73404ce 100644 --- a/modules/features2d/doc/common_interfaces_of_generic_descriptor_matchers.rst +++ b/modules/features2d/doc/common_interfaces_of_generic_descriptor_matchers.rst @@ -18,7 +18,7 @@ GenericDescriptorMatcher ------------------------ .. c:type:: GenericDescriptorMatcher -Abstract interface for extracting and matching a keypoint descriptor. There are aslo :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 :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. :: class GenericDescriptorMatcher { @@ -154,7 +154,6 @@ GenericDescriptorMatcher::classify GenericDescriptorMatcher::match ----------------------------------- -:func:`GenericDescriptorMatcher::add` :func:`DescriptorMatcher::match` .. c:function:: void GenericDescriptorMatcher::match( const Mat\& queryImage, vector\& queryKeypoints, const Mat\& trainImage, vector\& trainKeypoints, vector\& 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.?? diff --git a/modules/features2d/doc/drawing_function_of_keypoints_and_matches.rst b/modules/features2d/doc/drawing_function_of_keypoints_and_matches.rst index e29391c..30e9d87 100644 --- a/modules/features2d/doc/drawing_function_of_keypoints_and_matches.rst +++ b/modules/features2d/doc/drawing_function_of_keypoints_and_matches.rst @@ -30,7 +30,7 @@ drawMatches :param flags: Flags setting drawing features. Possible ``flags`` bit values are defined by ``DrawMatchesFlags``. -This function draws matches of keypints from two images in the output image. Match is a line connecting two keypoints (circles). The structure ``DrawMatchesFlags`` is defined as follows: +This function draws matches of keypoints from two images in the output image. Match is a line connecting two keypoints (circles). The structure ``DrawMatchesFlags`` is defined as follows: .. code-block:: cpp diff --git a/modules/features2d/doc/feature_detection_and_description.rst b/modules/features2d/doc/feature_detection_and_description.rst index 4cc3618..5790695 100644 --- a/modules/features2d/doc/feature_detection_and_description.rst +++ b/modules/features2d/doc/feature_detection_and_description.rst @@ -84,7 +84,7 @@ Class implementing the Star keypoint detector :: void operator()(const Mat& image, vector& keypoints) const; }; -The class implements a modified version of the CenSurE keypoint detector described in +The class implements a modified version of the ``CenSurE`` keypoint detector described in [Agrawal08]. .. index:: SIFT @@ -301,19 +301,19 @@ RandomizedTree::train .. c:function:: void train(std::vector const& base_set, RNG& rng, PatchGenerator& make_patch, int depth, int views, size_t reduced_num_dim, int num_quant_bits) - :param base_set: Vector of ``BaseKeypoint`` type. Contains keypoints from the image that are used for training + :param base_set: Vector of ``BaseKeypoint`` type. Contains image keypoints used for training. - :param rng: Random numbers generator is used for training + :param rng: Random-number generator used for training. - :param make_patch: Patch generator is used for training + :param make_patch: Patch generator used for training. - :param depth: Maximum tree depth + :param depth: Maximum tree depth. - :param views: The number of random views of each keypoint neighborhood to generate + :param views: Number of random views of each keypoint neighborhood to generate. - :param reduced_num_dim: Number of dimensions are used in compressed signature + :param reduced_num_dim: Number of dimensions used in the compressed signature. - :param num_quant_bits: Number of bits are used for quantization + :param num_quant_bits: Number of bits used for quantization. .. index:: RandomizedTree::read @@ -323,13 +323,13 @@ RandomizedTree::read .. c:function:: read(std::istream &is, int num_quant_bits) - Read a pre-saved randomized tree from a file or stream. + Reads a pre-saved randomized tree from a file or stream. :param file_name: Name of the file that contains randomized tree data. :param is: Input stream associated with the file that contains randomized tree data. - :param num_quant_bits: Number of bits are used for quantization + :param num_quant_bits: Number of bits used for quantization. .. index:: RandomizedTree::write @@ -353,7 +353,7 @@ RandomizedTree::applyQuantization Applies quantization to the current randomized tree. - :param num_quant_bits: Number of bits are used for quantization + :param num_quant_bits: Number of bits used for quantization. .. index:: RTreeNode @@ -391,7 +391,7 @@ RTreeClassifier --------------- .. c:type:: RTreeClassifier -Class containing ``RTreeClassifier`` . It represents the Calonder descriptor that was originally introduced by Michael Calonder :: +Class containing ``RTreeClassifier`` . It represents the Calonder descriptor that was originally introduced by Michael Calonder. :: class CV_EXPORTS RTreeClassifier { @@ -465,23 +465,23 @@ RTreeClassifier::train .. c:function:: void train(vector const& base_set, RNG& rng, PatchGenerator& make_patch, int num_trees = RTreeClassifier::DEFAULT_TREES, int depth = DEFAULT_DEPTH, int views = DEFAULT_VIEWS, size_t reduced_num_dim = DEFAULT_REDUCED_NUM_DIM, int num_quant_bits = DEFAULT_NUM_QUANT_BITS, bool print_status = true) - :param base_set: Vector of ``BaseKeypoint`` type. Contains image keypoints used for training + :param base_set: Vector of ``BaseKeypoint`` type. It contains image keypoints used for training. - :param rng: Random-number generator is used for training + :param rng: Random-number generator used for training. - :param make_patch: Patch generator is used for training + :param make_patch: Patch generator used for training. - :param num_trees: Number of randomized trees used in RTreeClassificator + :param num_trees: Number of randomized trees used in ``RTreeClassificator`` . - :param depth: Maximum tree depth + :param depth: Maximum tree depth. - :param views: The number of random views of each keypoint neighborhood to generate + :param views: Number of random views of each keypoint neighborhood to generate. - :param reduced_num_dim: Number of dimensions are used in compressed signature + :param reduced_num_dim: Number of dimensions used in the compressed signature. - :param num_quant_bits: Number of bits are used for quantization + :param num_quant_bits: Number of bits used for quantization. - :param print_status: Print current status of training on the console + :param print_status: Current status of training printed on the console. .. index:: RTreeClassifier::getSignature @@ -493,8 +493,8 @@ RTreeClassifier::getSignature .. c:function:: void getSignature(IplImage *patch, float *sig) - :param patch: Image patch to calculate signature for - :param sig: Output signature (array dimension is ``reduced_num_dim)`` + :param patch: Image patch to calculate the signature for. + :param sig: Output signature (array dimension is ``reduced_num_dim)`` . .. index:: RTreeClassifier::getSparseSignature @@ -503,13 +503,13 @@ RTreeClassifier::getSparseSignature .. c:function:: void getSparseSignature(IplImage *patch, float *sig, float thresh) - Similarly to ``getSignature``, but it uses a threshold for removing all signature elements below the threshold so that the signature is compressed. + Returns a signature for an image patch similarly to ``getSignature`` but uses a threshold for removing all signature elements below the threshold so that the signature is compressed. - :param patch: Image patch to calculate signature for + :param patch: Image patch to calculate the nsignature for. - :param sig: Output signature (array dimension is ``reduced_num_dim)`` + :param sig: Output signature (array dimension is ``reduced_num_dim)`` . - :param thresh: The threshold that is used for compressing the signature + :param thresh: Threshold that is used for compressing the signature. .. index:: RTreeClassifier::countNonZeroElements @@ -523,7 +523,7 @@ RTreeClassifier::countNonZeroElements :param n: Input vector size. - :param tol: The threshold used for counting elements. We take all elements are less than ``tol`` as zero elements + :param tol: Threshold used for counting elements. All elements less than ``tol`` are considered as zero elements. .. index:: RTreeClassifier::read @@ -545,7 +545,7 @@ RTreeClassifier::write -------------------------- .. c:function:: void write(const char* file_name) const - Writes the current RTreeClassifier to a file or stream. + Writes the current ``RTreeClassifier`` to a file or stream. .. c:function:: void write(std::ostream &os) const @@ -561,9 +561,9 @@ RTreeClassifier::setQuantization Applies quantization to the current randomized tree. - :param num_quant_bits: Number of bits are used for quantization + :param num_quant_bits: Number of bits used for quantization. -The example below demonstrates the usage of ``RTreeClassifier`` for feature matching. There are test and train images and features are extracted from both with SURF. Output is +The example below demonstrates the usage of ``RTreeClassifier`` for matching the features. The features are extracted from the test and train images with SURF. Output is :math:`best\_corr` and :math:`best\_corr\_idx` arrays that keep the best probabilities and corresponding features indices for every train feature. :: diff --git a/modules/features2d/doc/object_categorization.rst b/modules/features2d/doc/object_categorization.rst index ce639e7..4ffdcab 100644 --- a/modules/features2d/doc/object_categorization.rst +++ b/modules/features2d/doc/object_categorization.rst @@ -3,7 +3,7 @@ Object Categorization .. highlight:: cpp -This section describes some approaches based on local 2D features and used to categorize objects. +This section describes approaches based on local 2D features and used to categorize objects. .. index:: BOWTrainer @@ -13,7 +13,7 @@ BOWTrainer ---------- .. c:type:: BOWTrainer -Abstract base class for training the ''bag of visual words'' vocabulary from a set of descriptors. +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, Lixin Fan, Jutta Willamowski, Cedric Bray, 2004. :: @@ -43,7 +43,7 @@ BOWTrainer::add ------------------- .. c:function:: void BOWTrainer::add( const Mat\& descriptors ) - Adds descriptors to a training set. The training set ise clustered using ``clustermethod`` to construct the vocabulary. + Adds descriptors to a training set. The training set is clustered using ``clustermethod`` to construct the vocabulary. :param descriptors: Descriptors to add to a training set. Each row of the ``descriptors`` matrix is a descriptor. @@ -83,7 +83,7 @@ BOWKMeansTrainer ---------------- .. c:type:: BOWKMeansTrainer -:ref:`kmeans` -based class to train visual vocabulary using the ''bag of visual words'' approach :: +:ref:`kmeans` -based class to train visual vocabulary using the *bag of visual words* approach :: class BOWKMeansTrainer : public BOWTrainer { @@ -178,11 +178,11 @@ BOWImgDescriptorExtractor::compute Computes an image descriptor using the set visual vocabulary. - :param image: Image. Image descriptor is computed for this. + :param image: Image. Descriptor is computed for each image.?? :param keypoints: Keypoints detected in the input image. - :param imgDescriptor: Output computed image descriptor. + :param imgDescriptor: Computed output image descriptor. :param pointIdxsOfClusters: Indices of keypoints that belong to the cluster. This means that ``pointIdxsOfClusters[i]`` are keypoint indices that belong to the ``i`` -th cluster (word of vocabulary) returned if it is non-zero. -- 2.7.4