: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.
: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.
..ocv:function:: DynamicAdaptedFeatureDetector::DynamicAdaptedFeatureDetector( const Ptr<AdjusterAdapter>& adjuster, int min_features, int max_features, int max_iters )
: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;
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``. ::
: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.