From 4f86b30abcec2f7e75c145aee9708a5112c65a6b Mon Sep 17 00:00:00 2001 From: Maria Dimashova Date: Fri, 17 Jun 2011 13:23:28 +0000 Subject: [PATCH] fixed #1140 and made some other updates of features2d docs --- doc/check_docs_whitelist.txt | 6 ++ .../common_interfaces_of_descriptor_extractors.rst | 2 +- .../common_interfaces_of_descriptor_matchers.rst | 4 +- .../doc/common_interfaces_of_feature_detectors.rst | 107 ++------------------- modules/features2d/doc/object_categorization.rst | 22 ++--- 5 files changed, 25 insertions(+), 116 deletions(-) diff --git a/doc/check_docs_whitelist.txt b/doc/check_docs_whitelist.txt index fd78901..a131584 100644 --- a/doc/check_docs_whitelist.txt +++ b/doc/check_docs_whitelist.txt @@ -31,6 +31,12 @@ cv::BaseRowFilter cv::BaseColumnFilter cv::Moments +###################################### features2d################################### +cv::BOWKMeansTrainer::cluster +cv::BOWTrainer::BOWTrainer +cv::BOWTrainer::clear +cv::AdjusterAdapter::clone + ######################################## calib3d ################################### CvLevMarq Mat cv::findFundamentalMat( InputArray points1, InputArray points2, OutputArray mask, int method=FM_RANSAC, double param1=3., double param2=0.99) diff --git a/modules/features2d/doc/common_interfaces_of_descriptor_extractors.rst b/modules/features2d/doc/common_interfaces_of_descriptor_extractors.rst index 1ce22cb..b0e4ef7 100644 --- a/modules/features2d/doc/common_interfaces_of_descriptor_extractors.rst +++ b/modules/features2d/doc/common_interfaces_of_descriptor_extractors.rst @@ -57,7 +57,7 @@ DescriptorExtractor::compute :param image: Image. - :param keypoints: Keypoints. Keypoints for which a descriptor cannot be computed are removed. + :param keypoints: Keypoints. Keypoints for which a descriptor cannot be computed are removed. Somtimes new keypoints can be added, eg SIFT duplicates keypoint with several dominant orientations (for each orientation). :param descriptors: Descriptors. Row i is the descriptor for keypoint i. diff --git a/modules/features2d/doc/common_interfaces_of_descriptor_matchers.rst b/modules/features2d/doc/common_interfaces_of_descriptor_matchers.rst index 49f780d..11cad9d 100644 --- a/modules/features2d/doc/common_interfaces_of_descriptor_matchers.rst +++ b/modules/features2d/doc/common_interfaces_of_descriptor_matchers.rst @@ -158,9 +158,9 @@ DescriptorMatcher::train DescriptorMatcher::match ---------------------------- -.. ocv:function:: void DescriptorMatcher::match( const Mat& queryDescriptors, const Mat& trainDescriptors, vector& matches, const Mat& mask=Mat() ) const +.. ocv:function:: void DescriptorMatcher::match( const Mat& queryDescriptors, const Mat& trainDescriptors, vector& matches, const Mat& mask=Mat() ) const -.. ocv:function:: void DescriptorMatcher::match( const Mat& queryDescriptors, vector& matches, const vector& masks=vector() ) +.. ocv:function:: void DescriptorMatcher::match( const Mat& queryDescriptors, vector& matches, const vector& masks=vector() ) Finds the best match for each descriptor from a query set. diff --git a/modules/features2d/doc/common_interfaces_of_feature_detectors.rst b/modules/features2d/doc/common_interfaces_of_feature_detectors.rst index 67a7fa8..91e9b06 100644 --- a/modules/features2d/doc/common_interfaces_of_feature_detectors.rst +++ b/modules/features2d/doc/common_interfaces_of_feature_detectors.rst @@ -8,10 +8,6 @@ between different algorithms solving the same problem. All objects that implemen inherit the :ref:`FeatureDetector` interface. -.. index:: KeyPoint - -.. KeyPoint: - KeyPoint -------- .. ocv:class:: KeyPoint @@ -68,11 +64,6 @@ Data structure for salient point detectors :: .. - -.. index:: FeatureDetector - -.. _FeatureDetector: - FeatureDetector --------------- .. ocv:class:: FeatureDetector @@ -100,9 +91,6 @@ Abstract base class for 2D image feature detectors :: ... }; - -.. index:: FeatureDetector::detect - FeatureDetector::detect --------------------------- .. ocv:function:: void FeatureDetector::detect( const Mat& image, vector& keypoints, const Mat& mask=Mat() ) const @@ -123,8 +111,6 @@ FeatureDetector::detect :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 the ``masks`` vector must be a char matrix with non-zero values in the region of interest. -.. index:: FeatureDetector::read - FeatureDetector::read ------------------------- .. ocv:function:: void FeatureDetector::read( const FileNode& fn ) @@ -133,8 +119,6 @@ FeatureDetector::read :param fn: File node from which the detector is read. -.. index:: FeatureDetector::write - FeatureDetector::write -------------------------- .. ocv:function:: void FeatureDetector::write( FileStorage& fs ) const @@ -143,8 +127,6 @@ FeatureDetector::write :param fs: File storage where the detector is written. -.. index:: FeatureDetector::create - FeatureDetector::create --------------------------- .. ocv:function:: Ptr FeatureDetector::create( const string& detectorType ) @@ -169,10 +151,6 @@ Also a combined format is supported: feature detector adapter name ( ``"Grid"`` :ref:`PyramidAdaptedFeatureDetector` ) + feature detector name (see above), for example: ``"GridFAST"``, ``"PyramidSTAR"`` . -.. index:: FastFeatureDetector - -.. _FastFeatureDetector: - FastFeatureDetector ------------------- .. ocv:class:: FastFeatureDetector @@ -190,11 +168,6 @@ Wrapping class for feature detection using the ... }; - -.. index:: GoodFeaturesToTrackDetector - -.. _GoodFeaturesToTrackDetector: - GoodFeaturesToTrackDetector --------------------------- .. ocv:class:: GoodFeaturesToTrackDetector @@ -233,11 +206,6 @@ Wrapping class for feature detection using the ... }; - -.. index:: MserFeatureDetector - -.. _MserFeatureDetector: - MserFeatureDetector ------------------- .. ocv:class:: MserFeatureDetector @@ -260,10 +228,6 @@ Wrapping class for feature detection using the }; -.. index:: StarFeatureDetector - -.. _StarFeatureDetector: - StarFeatureDetector ------------------- .. ocv:class:: StarFeatureDetector @@ -283,11 +247,6 @@ Wrapping class for feature detection using the ... }; - -.. index:: SiftFeatureDetector - -.. _SiftFeatureDetector: - SiftFeatureDetector ------------------- .. ocv:class:: SiftFeatureDetector @@ -312,11 +271,6 @@ Wrapping class for feature detection using the ... }; - -.. index:: SurfFeatureDetector - -.. _SurfFeatureDetector: - SurfFeatureDetector ------------------- .. ocv:class:: SurfFeatureDetector @@ -336,10 +290,6 @@ Wrapping class for feature detection using the }; -.. index:: OrbFeatureDetector - -.. _OrbFeatureDetector: - OrbFeatureDetector ------------------- .. ocv:class:: OrbFeatureDetector @@ -357,11 +307,6 @@ Wrapping class for feature detection using the ... }; - -.. index:: SimpleBlobDetector - -.. _SimpleBlobDetector: - SimpleBlobDetector ------------------- .. ocv:class:: SimpleBlobDetector @@ -419,11 +364,6 @@ This class performs several filtrations of returned blobs. You should set ``filt Default values of parameters are tuned to extract dark circular blobs. - -.. index:: GridAdaptedFeatureDetector - -.. _GridAdaptedFeatureDetector: - GridAdaptedFeatureDetector -------------------------- .. ocv:class:: GridAdaptedFeatureDetector @@ -449,11 +389,6 @@ Class adapting a detector to partition the source image into a grid and detect p ... }; - -.. index:: PyramidAdaptedFeatureDetector - -.. _PyramidAdaptedFeatureDetector: - PyramidAdaptedFeatureDetector ----------------------------- .. ocv:class:: PyramidAdaptedFeatureDetector @@ -472,11 +407,8 @@ Class adapting a detector to detect points over multiple levels of a Gaussian py }; -.. index:: DynamicAdaptedFeatureDetector - DynamicAdaptedFeatureDetector ----------------------------- - .. ocv:class:: DynamicAdaptedFeatureDetector Adaptively adjusting detector that iteratively detects features until the desired number is found :: @@ -516,10 +448,6 @@ Example of creating ``DynamicAdaptedFeatureDetector`` : :: Ptr detector(new DynamicAdaptedFeatureDetector (100, 110, 10, new FastAdjuster(20,true))); - - -.. index:: DynamicAdaptedFeatureDetector::DynamicAdaptedFeatureDetector - DynamicAdaptedFeatureDetector::DynamicAdaptedFeatureDetector ---------------------------------------------------------------- .. ocv:function:: DynamicAdaptedFeatureDetector::DynamicAdaptedFeatureDetector( const Ptr& adjuster, int min_features, int max_features, int max_iters ) @@ -534,11 +462,8 @@ DynamicAdaptedFeatureDetector::DynamicAdaptedFeatureDetector :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 - AdjusterAdapter --------------- - .. ocv: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 feature detection. :: @@ -546,10 +471,12 @@ Class providing an interface for adjusting parameters of a feature detector. Thi 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; + 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; + virtual Ptr clone() const = 0; + static Ptr create( const string& detectorType ); }; @@ -558,9 +485,6 @@ See :ref:`StarAdjuster`, :ref:`SurfAdjuster` for concrete implementations. - -.. index:: AdjusterAdapter::tooFew - AdjusterAdapter::tooFew --------------------------- .. ocv:function:: void AdjusterAdapter::tooFew(int min, int n_detected) @@ -578,9 +502,6 @@ Example: :: thresh_--; } - -.. index:: AdjusterAdapter::tooMany - AdjusterAdapter::tooMany ---------------------------- .. ocv:function:: void AdjusterAdapter::tooMany(int max, int n_detected) @@ -599,8 +520,6 @@ Example: :: } -.. index:: AdjusterAdapter::good - AdjusterAdapter::good ------------------------- .. ocv:function:: bool AdjusterAdapter::good() const @@ -614,12 +533,14 @@ Example: :: return (thresh_ > 1) && (thresh_ < 200); } +AdjusterAdapter::create +------------------------- +.. ocv:function:: Ptr AdjusterAdapter::create( const string& detectorType ) -.. index:: FastAdjuster + Creates adjuster adapter by name ``detectorType``. The detector name is the same as in :ocv:func:`FeatureDetector::create`, but now supported ``"FAST"``, ``"STAR"`` and ``"SURF"`` only. FastAdjuster ------------ - .. ocv:class:: FastAdjuster :ref:`AdjusterAdapter` for :ref:`FastFeatureDetector`. This class decreases or increases the threshold value by 1. :: @@ -631,11 +552,8 @@ FastAdjuster ... }; -.. index:: StarAdjuster - StarAdjuster ------------ - .. ocv:class:: StarAdjuster :ref:`AdjusterAdapter` for :ref:`StarFeatureDetector`. This class adjusts the ``responseThreshhold`` of ``StarFeatureDetector``. :: @@ -646,11 +564,8 @@ StarAdjuster ... }; -.. index:: SurfAdjuster - SurfAdjuster ------------ - .. ocv:class:: SurfAdjuster :ref:`AdjusterAdapter` for :ref:`SurfFeatureDetector`. This class adjusts the ``hessianThreshold`` of ``SurfFeatureDetector``. :: @@ -661,8 +576,6 @@ SurfAdjuster ... }; -.. index:: FeatureDetector - FeatureDetector --------------- .. ocv:class:: FeatureDetector diff --git a/modules/features2d/doc/object_categorization.rst b/modules/features2d/doc/object_categorization.rst index 3c99038..782e835 100644 --- a/modules/features2d/doc/object_categorization.rst +++ b/modules/features2d/doc/object_categorization.rst @@ -5,10 +5,6 @@ Object Categorization This section describes approaches based on local 2D features and used to categorize objects. -.. index:: BOWTrainer - -.. _BOWTrainer: - BOWTrainer ---------- .. ocv:class:: BOWTrainer @@ -36,9 +32,6 @@ Lixin Fan, Jutta Willamowski, Cedric Bray, 2004. :: ... }; - -.. index:: BOWTrainer::add - BOWTrainer::add ------------------- .. ocv:function:: void BOWTrainer::add( const Mat& descriptors ) @@ -47,7 +40,6 @@ BOWTrainer::add :param descriptors: Descriptors to add to a training set. Each row of the ``descriptors`` matrix is a descriptor. -.. index:: BOWTrainer::getDescriptors BOWTrainer::getDescriptors ------------------------------ @@ -83,7 +75,8 @@ BOWKMeansTrainer ---------------- .. ocv:class:: 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 { @@ -100,14 +93,11 @@ BOWKMeansTrainer ... }; +BOWKMeansTrainer::BOWKMeansTrainer +---------------- +.. ocv:function:: BOWKMeansTrainer::BOWKMeansTrainer( int clusterCount, const TermCriteria& termcrit=TermCriteria(), int attempts=3, int flags=KMEANS_PP_CENTERS ); -To understand constructor parameters, see -:ref:`kmeans` function -arguments. - -.. index:: BOWImgDescriptorExtractor - -.. _BOWImgDescriptorExtractor: + To understand constructor parameters, see :ref:`kmeans` function arguments. BOWImgDescriptorExtractor ------------------------- -- 2.7.4