some more doc cleanup

This commit is contained in:
Vadim Pisarevsky
2011-03-03 07:29:55 +00:00
parent 4e6572acd9
commit f025e4739a
39 changed files with 1531 additions and 889 deletions

View File

@@ -11,8 +11,6 @@ descriptor extractors inherit
.. index:: DescriptorExtractor
.. _DescriptorExtractor:
DescriptorExtractor
-------------------
.. c:type:: DescriptorExtractor
@@ -40,7 +38,7 @@ Abstract base class for computing descriptors for image keypoints. ::
protected:
...
};
..
In this interface we assume a keypoint descriptor can be represented as a
dense, fixed-dimensional vector of some basic type. Most descriptors used
@@ -55,8 +53,7 @@ DescriptorExtractor::compute
--------------------------------
.. c:function:: void DescriptorExtractor::compute( const Mat\& image, vector<KeyPoint>\& keypoints, Mat\& descriptors ) const
Compute the descriptors for a set of keypoints detected in an image (first variant)
or image set (second variant).
Compute the descriptors for a set of keypoints detected in an image (first variant) or image set (second variant).
:param image: The image.
@@ -102,25 +99,22 @@ DescriptorExtractor::create
:func:`DescriptorExtractor`
.. c:function:: Ptr<DescriptorExtractor> DescriptorExtractor::create( const string\& descriptorExtractorType )
Descriptor extractor factory that creates of given type with
default parameters (rather using default constructor).
Descriptor extractor factory that creates of given type with default parameters (rather using default constructor).
:param descriptorExtractorType: Descriptor extractor type.
Now the following descriptor extractor types are supported:
\ ``"SIFT"`` --
:func:`SiftFeatureDetector`,\ ``"SURF"`` --
:func:`SurfFeatureDetector`,\ ``"BRIEF"`` --
:func:`BriefFeatureDetector` .
\
* ``"SIFT"`` -- :func:`SiftFeatureDetector`,
* ``"SURF"`` -- :func:`SurfFeatureDetector`,
* ``"BRIEF"`` -- :func:`BriefFeatureDetector` .
Also combined format is supported: descriptor extractor adapter name ( ``"Opponent"`` --
:func:`OpponentColorDescriptorExtractor` ) + descriptor extractor name (see above),
e.g. ``"OpponentSIFT"`` , etc.
.. index:: SiftDescriptorExtractor
.. _SiftDescriptorExtractor:
SiftDescriptorExtractor
-----------------------
.. c:type:: SiftDescriptorExtractor
@@ -147,12 +141,10 @@ Wrapping class for descriptors computing using
protected:
...
}
..
.. index:: SurfDescriptorExtractor
.. _SurfDescriptorExtractor:
SurfDescriptorExtractor
-----------------------
.. c:type:: SurfDescriptorExtractor
@@ -173,12 +165,10 @@ Wrapping class for descriptors computing using
protected:
...
}
..
.. index:: CalonderDescriptorExtractor
.. _CalonderDescriptorExtractor:
CalonderDescriptorExtractor
---------------------------
.. c:type:: CalonderDescriptorExtractor
@@ -199,7 +189,7 @@ Wrapping class for descriptors computing using
protected:
...
}
..
.. index:: OpponentColorDescriptorExtractor
@@ -227,7 +217,7 @@ them into a single color descriptor. ::
protected:
...
};
..
.. index:: BriefDescriptorExtractor
@@ -257,5 +247,5 @@ Strecha C., Fua P.: ''BRIEF: Binary Robust Independent Elementary Features.''
protected:
...
};
..

View File

@@ -40,7 +40,7 @@ train descriptor index, train image index and distance between descriptors. ::
// less is better
bool operator<( const DMatch &m ) const;
};
..
.. index:: DescriptorMatcher
@@ -102,16 +102,15 @@ with image set. ::
vector<Mat> trainDescCollection;
...
};
..
.. index:: DescriptorMatcher::add
DescriptorMatcher::add
-------------------------- ````
--------------------------
.. c:function:: void add( const vector<Mat>\& descriptors )
Add descriptors to train descriptor collection. If collection trainDescCollectionis not empty
the new descriptors are added to existing train descriptors.
Add descriptors to train descriptor collection. If collection trainDescCollectionis not empty the new descriptors are added to existing train descriptors.
:param descriptors: Descriptors to add. Each ``descriptors[i]`` is a set of descriptors
from the same (one) train image.
@@ -119,7 +118,7 @@ the new descriptors are added to existing train descriptors.
.. index:: DescriptorMatcher::getTrainDescriptors
DescriptorMatcher::getTrainDescriptors
------------------------------------------ ````
------------------------------------------
.. c:function:: const vector<Mat>\& getTrainDescriptors() const
Returns constant link to the train descriptor collection (i.e. trainDescCollection).
@@ -154,23 +153,15 @@ DescriptorMatcher::train
----------------------------
.. c:function:: void DescriptorMatcher::train()
Train descriptor matcher (e.g. train flann index). In all methods to match the method train()
is run every time before matching. Some descriptor matchers (e.g. BruteForceMatcher) have empty
implementation of this method, other matchers realy train their inner structures (e.g. FlannBasedMatcher
trains flann::Index)
Train descriptor matcher (e.g. train flann index). In all methods to match the method train() is run every time before matching. Some descriptor matchers (e.g. BruteForceMatcher) have empty implementation of this method, other matchers realy train their inner structures (e.g. FlannBasedMatcher trains flann::Index)
.. index:: DescriptorMatcher::match
DescriptorMatcher::match
---------------------------- ```` ```` ```` ````
----------------------------
.. c:function:: void DescriptorMatcher::match( const Mat\& queryDescriptors, const Mat\& trainDescriptors, vector<DMatch>\& matches, const Mat\& mask=Mat() ) const
Find the best match for each descriptor from a query set with train descriptors.
Supposed that the query descriptors are of keypoints detected on the same query image.
In first variant of this method train descriptors are set as input argument and
supposed that they are of keypoints detected on the same train image. In 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<uchar>(i,j)is non-zero.
Find the best match for each descriptor from a query set with train descriptors. Supposed that the query descriptors are of keypoints detected on the same query image. In first variant of this method train descriptors are set as input argument and supposed that they are of keypoints detected on the same train image. In 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<uchar>(i,j)is non-zero.
.. c:function:: void DescriptorMatcher::match( const Mat\& queryDescriptors, vector<DMatch>\& matches, const vector<Mat>\& masks=vector<Mat>() )
@@ -194,9 +185,7 @@ DescriptorMatcher::knnMatch
:func:`DescriptorMatcher::match`
.. 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
Find 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 distance increasing order.
Details about query and train descriptors see in .
Find 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 distance increasing order. Details about query and train descriptors see in .
.. c:function:: void DescriptorMatcher::knnMatch( const Mat\& queryDescriptors, vector<vector<DMatch> >\& matches, int k, const vector<Mat>\& masks=vector<Mat>(), bool compactResult=false )
@@ -215,9 +204,7 @@ DescriptorMatcher::radiusMatch
:func:`DescriptorMatcher::match`
.. 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
Find the best matches for each query descriptor which have distance less than given threshold.
Found matches are returned in distance increasing order. Details about query and train
descriptors see in .
Find the best matches for each query descriptor which have distance less than given threshold. Found matches are returned in distance increasing order. Details about query and train descriptors see in.
.. c:function:: void DescriptorMatcher::radiusMatch( const Mat\& queryDescriptors, vector<vector<DMatch> >\& matches, float maxDistance, const vector<Mat>\& masks=vector<Mat>(), bool compactResult=false )
@@ -246,8 +233,7 @@ DescriptorMatcher::create
:func:`DescriptorMatcher`
.. c:function:: Ptr<DescriptorMatcher> DescriptorMatcher::create( const string\& descriptorMatcherType )
Descriptor matcher factory that creates of
given type with default parameters (rather using default constructor).
Descriptor matcher factory that creates of given type with default parameters (rather using default constructor).
:param descriptorMatcherType: Descriptor matcher type.
@@ -261,9 +247,7 @@ BruteForceMatcher
-----------------
.. c:type:: BruteForceMatcher
Brute-force descriptor matcher. For each descriptor in the first set, this matcher finds the closest
descriptor in the second set by trying each one. This descriptor matcher supports masking
permissible matches between descriptor sets. ::
Brute-force descriptor matcher. For each descriptor in the first set, this matcher finds the closest descriptor in the second set by trying each one. This descriptor matcher supports masking permissible matches between descriptor sets. ::
template<class Distance>
class BruteForceMatcher : public DescriptorMatcher
@@ -277,10 +261,9 @@ permissible matches between descriptor sets. ::
protected:
...
}
..
For efficiency, BruteForceMatcher is templated on the distance metric.
For float descriptors, a common choice would be ``L2<float>`` . Class of supported distances are: ::
For efficiency, BruteForceMatcher is templated on the distance metric. For float descriptors, a common choice would be ``L2<float>``. Class of supported distances are: ::
template<typename T>
struct Accumulator
@@ -340,7 +323,7 @@ For float descriptors, a common choice would be ``L2<float>`` . Class of support
int size ) const;
...
};
..
.. index:: FlannBasedMatcher
@@ -350,14 +333,7 @@ FlannBasedMatcher
-----------------
.. c:type:: FlannBasedMatcher
Flann based descriptor matcher. This matcher trains
:func:`flann::Index` on
train descriptor collection and calls it's nearest search methods to find best matches.
So this matcher may be faster in cases of matching to large train collection than
brute force matcher. ``FlannBasedMatcher`` does not support masking permissible
matches between descriptor sets, because
:func:`flann::Index` does not
support this. ::
Flann based descriptor matcher. This matcher trains :func:`flann::Index` on train descriptor collection and calls it's nearest search methods to find best matches. So this matcher may be faster in cases of matching to large train collection than brute force matcher. ``FlannBasedMatcher`` does not support masking permissible matches between descriptor sets, because :func:`flann::Index` does not support this. ::
class FlannBasedMatcher : public DescriptorMatcher
{
@@ -376,5 +352,6 @@ support this. ::
protected:
...
};
..

View File

@@ -10,13 +10,13 @@ inherit
.. index:: KeyPoint
.. _KeyPoint:
.. KeyPoint:
KeyPoint
--------
.. c:type:: KeyPoint
Data structure for salient point detectors. ::
Data structure for salient point detectors. ::
class KeyPoint
{
@@ -65,7 +65,7 @@ Data structure for salient point detectors. ::
void write(FileStorage& fs, const string& name, const vector<KeyPoint>& keypoints);
// reads vector of keypoints from the specified file storage node
void read(const FileNode& node, CV_OUT vector<KeyPoint>& keypoints);
..
.. index:: FeatureDetector
@@ -97,7 +97,7 @@ Abstract base class for 2D image feature detectors. ::
protected:
...
};
..
.. index:: FeatureDetector::detect
@@ -150,8 +150,7 @@ FeatureDetector::create
:func:`FeatureDetector`
.. c:function:: Ptr<FeatureDetector> FeatureDetector::create( const string\& detectorType )
Feature detector factory that creates of given type with
default parameters (rather using default constructor).
Feature detector factory that creates of given type with default parameters (rather using default constructor).
:param detectorType: Feature detector type.
@@ -190,7 +189,7 @@ Wrapping class for feature detection using
protected:
...
};
..
.. index:: GoodFeaturesToTrackDetector
@@ -233,7 +232,7 @@ Wrapping class for feature detection using
protected:
...
};
..
.. index:: MserFeatureDetector
@@ -259,7 +258,7 @@ Wrapping class for feature detection using
protected:
...
};
..
.. index:: StarFeatureDetector
@@ -283,7 +282,7 @@ Wrapping class for feature detection using
protected:
...
};
..
.. index:: SiftFeatureDetector
@@ -312,7 +311,7 @@ Wrapping class for feature detection using
protected:
...
};
..
.. index:: SurfFeatureDetector
@@ -335,7 +334,7 @@ Wrapping class for feature detection using
protected:
...
};
..
.. index:: GridAdaptedFeatureDetector
@@ -345,8 +344,7 @@ GridAdaptedFeatureDetector
--------------------------
.. c:type:: GridAdaptedFeatureDetector
Adapts a detector to partition the source image into a grid and detect
points in each cell. ::
Adapts a detector to partition the source image into a grid and detect points in each cell. ::
class GridAdaptedFeatureDetector : public FeatureDetector
{
@@ -366,7 +364,7 @@ points in each cell. ::
protected:
...
};
..
.. index:: PyramidAdaptedFeatureDetector
@@ -376,8 +374,7 @@ PyramidAdaptedFeatureDetector
-----------------------------
.. c:type:: PyramidAdaptedFeatureDetector
Adapts a detector to detect points over multiple levels of a Gaussian
pyramid. Useful for detectors that are not inherently scaled. ::
Adapts a detector to detect points over multiple levels of a Gaussian pyramid. Useful for detectors that are not inherently scaled. ::
class PyramidAdaptedFeatureDetector : public FeatureDetector
{
@@ -389,18 +386,24 @@ pyramid. Useful for detectors that are not inherently scaled. ::
protected:
...
};
..
.. index:: DynamicAdaptedFeatureDetector
.. _DynamicAdaptedFeatureDetector:
DynamicAdaptedFeatureDetector
-----------------------------
.. c:type:: DynamicAdaptedFeatureDetector
An adaptively adjusting detector that iteratively detects until the desired number
of features are found.
An adaptively adjusting detector that iteratively detects until the desired number of features are 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 will "remember" the parameters
used on the last detection. In this way, the detector may be used for consistent numbers
@@ -429,16 +432,7 @@ Here is a sample of how to create a DynamicAdaptedFeatureDetector. ::
//number of keypoints are found
Ptr<FeatureDetector> detector(new DynamicAdaptedFeatureDetector (100, 110, 10,
new FastAdjuster(20,true)));
.. ::
class DynamicAdaptedFeatureDetector: public FeatureDetector
{
public:
DynamicAdaptedFeatureDetector( const Ptr<AdjusterAdapter>& adjaster,
int min_features=400, int max_features=500, int max_iters=5 );
...
};
..
.. index:: DynamicAdaptedFeatureDetector::DynamicAdaptedFeatureDetector
@@ -460,28 +454,26 @@ DynamicAdaptedFeatureDetector::DynamicAdaptedFeatureDetector
.. index:: AdjusterAdapter
.. _AdjusterAdapter:
AdjusterAdapter
---------------
.. c:type:: AdjusterAdapter
A feature detector parameter adjuster interface, this is used by the
:func:`DynamicAdaptedFeatureDetector` and is a wrapper for
:func:`FeatureDetecto` r that allow them to be adjusted after a detection.
A feature detector parameter adjuster interface, this is used by the :func:`DynamicAdaptedFeatureDetector` and is a wrapper for :func:`FeatureDetecto` r that allow them to be adjusted after a 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
:func:`FastAdjuster`,:func:`StarAdjuster`,:func:`SurfAdjuster` for concrete implementations. ::
:func:`FastAdjuster`,:func:`StarAdjuster`,:func:`SurfAdjuster` for concrete implementations.
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;
};
..
.. index:: AdjusterAdapter::tooFew
@@ -489,8 +481,7 @@ AdjusterAdapter::tooFew
---------------------------
.. c:function:: virtual void tooFew(int min, int n_detected) = 0
Too few features were detected so, adjust the detector parameters accordingly - so that the next
detection detects more features.
Too few features were detected so, adjust the detector parameters accordingly - so that the next detection detects more features.
:param min: This minimum desired number features.
@@ -502,7 +493,7 @@ An example implementation of this is ::
{
thresh_--;
}
..
.. index:: AdjusterAdapter::tooMany
@@ -510,8 +501,7 @@ 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.
Too many features were detected so, adjust the detector parameters accordingly - so that the next detection detects less features.
:param max: This maximum desired number features.
@@ -523,7 +513,7 @@ An example implementation of this is ::
{
thresh_++;
}
..
.. index:: AdjusterAdapter::good
@@ -531,28 +521,504 @@ 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.
Are params maxed out or still valid? Returns false if the parameters can't be adjusted any more. An example implementation of this is ::
bool FastAdjuster::good() const
{
return (thresh_ > 1) && (thresh_ < 200);
}
.. index:: FastAdjuster
FastAdjuster
------------
.. c:type:: FastAdjuster
:func:`AdjusterAdapter` for the :func:`FastFeatureDetector`. This will basically decrement or increment the threshhold by 1 ::
class FastAdjuster FastAdjuster: public AdjusterAdapter
{
public:
FastAdjuster(int init_thresh = 20, bool nonmax = true);
...
};
.. index:: StarAdjuster
StarAdjuster
------------
.. c:type:: StarAdjuster
:func:`AdjusterAdapter` for the :func:`StarFeatureDetector` . This adjusts the responseThreshhold of StarFeatureDetector. ::
class StarAdjuster: public AdjusterAdapter
{
StarAdjuster(double initial_thresh = 30.0);
...
};
.. index:: SurfAdjuster
SurfAdjuster
------------
.. c:type:: SurfAdjuster
:func:`AdjusterAdapter` for the :func:`SurfFeatureDetector` . This adjusts the hessianThreshold of SurfFeatureDetector. ::
class SurfAdjuster: public SurfAdjuster
{
SurfAdjuster();
...
};
.. index:: FeatureDetector
FeatureDetector
---------------
.. c:type:: FeatureDetector
Abstract base class for 2D image feature detectors. ::
class CV_EXPORTS FeatureDetector
{
public:
virtual ~FeatureDetector();
void detect( const Mat& image, vector<KeyPoint>& keypoints,
const Mat& mask=Mat() ) const;
void detect( const vector<Mat>& images,
vector<vector<KeyPoint> >& keypoints,
const vector<Mat>& masks=vector<Mat>() ) const;
virtual void read(const FileNode&);
virtual void write(FileStorage&) const;
static Ptr<FeatureDetector> create( const string& detectorType );
protected:
...
};
.. index:: FeatureDetector::detect
FeatureDetector::detect
---------------------------
.. c:function:: void FeatureDetector::detect( const Mat\& image, vector<KeyPoint>\& keypoints, const Mat\& mask=Mat() ) const
Detect keypoints in an image (first variant) or image set (second variant).
:param image: The image.
:param keypoints: The detected keypoints.
:param mask: Mask specifying where to look for keypoints (optional). 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
* **images** Images set.
* **keypoints** Collection of keypoints detected in an input images. keypoints[i] is a set of keypoints detected in an images[i].
* **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 )
Read feature detector object from file node.
:param fn: File node from which detector will be read.
.. index:: FeatureDetector::write
FeatureDetector::write
--------------------------
.. c:function:: void FeatureDetector::write( FileStorage\& fs ) const
Write feature detector object to file storage.
:param fs: File storage in which detector will be written.
.. index:: FeatureDetector::create
FeatureDetector::create
---------------------------
:func:`FeatureDetector`
.. c:function:: Ptr<FeatureDetector> FeatureDetector::create( const string\& detectorType )
Feature detector factory that creates of given type with default parameters (rather using 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` .
Also combined format is supported: feature detector adapter name ( ``"Grid"`` --
:func:`GridAdaptedFeatureDetector`,``"Pyramid"`` --
:func:`PyramidAdaptedFeatureDetector` ) + feature detector name (see above),
e.g. ``"GridFAST"``,``"PyramidSTAR"`` , etc.
.. index:: FastFeatureDetector
FastFeatureDetector
-------------------
.. c:type:: FastFeatureDetector
Wrapping class for feature detection using
:func:`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 :func:`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 :func:`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 :func:`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 :func:`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 :func:`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
Adapts 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 will be keeped.
* gridRows Grid rows 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
Adapts a detector to detect points over multiple levels of a Gaussian pyramid. Useful 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
An adaptively adjusting detector that iteratively detects until the desired number of features are 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 will "remember" the parameters
used on the last detection. In this way, the detector may be used for consistent numbers
of keypoints in a sets of images that are temporally related such as video streams or
panorama series.
The DynamicAdaptedFeatureDetector uses another detector such as FAST or SURF to do the dirty work,
with the help of an AdjusterAdapter.
After a detection, and an unsatisfactory number of features are detected,
the AdjusterAdapter will adjust the detection parameters so that the next detection will
result in more or less 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...
Here is a sample of how to create a 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 )
DynamicAdaptedFeatureDetector constructor.
:param adjaster: An :func:`AdjusterAdapter` that will do the detection and parameter
adjustment
:param min_features: This minimum desired number features.
:param max_features: The maximum desired number of features.
:param max_iters: The maximum number of times to try to adjust the feature detector parameters. For the :func:`FastAdjuster` this number can be high,
but with Star or Surf, many iterations can get time consuming. At each iteration the detector is rerun, so keep this in mind when choosing this value.
.. index:: AdjusterAdapter
AdjusterAdapter
---------------
.. c:type:: AdjusterAdapter
A feature detector parameter adjuster interface, this is used by the :func:`DynamicAdaptedFeatureDetector` and is a wrapper for :func:`FeatureDetecto` r that allow them to be adjusted after a 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
:func:`FastAdjuster`,:func:`StarAdjuster`,:func:`SurfAdjuster` for concrete implementations.
.. index:: AdjusterAdapter::tooFew
AdjusterAdapter::tooFew
---------------------------
.. c:function:: virtual void tooFew(int min, int n_detected) = 0
Too few features were detected so, adjust the detector parameters accordingly - so that the next detection detects more features.
:param min: This minimum desired number features.
:param n_detected: The actual number detected last run.
An example implementation of this is ::
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
Too many features were detected so, adjust the detector parameters accordingly - so that the next detection detects less features.
:param max: This maximum desired number features.
:param n_detected: The actual number detected last run.
An example implementation of this is ::
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 can't be adjusted any more. An example implementation of this is ::
bool FastAdjuster::good() const
{
return (thresh_ > 1) && (thresh_ < 200);
}
..
.. index:: FastAdjuster
.. _FastAdjuster:
FastAdjuster
------------
.. c:type:: FastAdjuster
An
:func:`AdjusterAdapter` for the
:func:`FastFeatureDetector` . This will basically decrement or increment the
threshhold by 1 ::
:func:`AdjusterAdapter` for the :func:`FastFeatureDetector`. This will basically decrement or increment the threshhold by 1 ::
class FastAdjuster FastAdjuster: public AdjusterAdapter
{
@@ -560,45 +1026,38 @@ threshhold by 1 ::
FastAdjuster(int init_thresh = 20, bool nonmax = true);
...
};
..
.. index:: StarAdjuster
.. _StarAdjuster:
StarAdjuster
------------
.. c:type:: StarAdjuster
An
:func:`AdjusterAdapter` for the
:func:`StarFeatureDetector` . This adjusts the responseThreshhold of
StarFeatureDetector. ::
:func:`AdjusterAdapter` for the :func:`StarFeatureDetector` . This adjusts the responseThreshhold of StarFeatureDetector. ::
class StarAdjuster: public AdjusterAdapter
{
StarAdjuster(double initial_thresh = 30.0);
...
};
..
.. index:: SurfAdjuster
.. _SurfAdjuster:
SurfAdjuster
------------
.. c:type:: SurfAdjuster
An
:func:`AdjusterAdapter` for the
:func:`SurfFeatureDetector` . This adjusts the hessianThreshold of
SurfFeatureDetector. ::
:func:`AdjusterAdapter` for the :func:`SurfFeatureDetector` . This adjusts the hessianThreshold of SurfFeatureDetector. ::
class SurfAdjuster: public SurfAdjuster
{
SurfAdjuster();
...
};
..

View File

@@ -25,7 +25,7 @@ There is
:func:`DescriptorExtractor` and
:func:`DescriptorMatcher` for these purposes too, but their interfaces are intended for descriptors
represented as vectors in a multidimensional space. ``GenericDescriptorMatcher`` is a more generic interface for descriptors.
As
:func:`DescriptorMatcher`,``GenericDescriptorMatcher`` has two groups
of match methods: for matching keypoints of one image with other image or
with image set. ::
@@ -88,7 +88,7 @@ with image set. ::
protected:
...
};
..
.. index:: GenericDescriptorMatcher::add
@@ -96,9 +96,7 @@ GenericDescriptorMatcher::add
---------------------------------
.. c:function:: void GenericDescriptorMatcher::add( const vector<Mat>\& images, vector<vector<KeyPoint> >\& keypoints )
Adds images and keypoints from them to the train collection (descriptors are supposed to be calculated here).
If train collection is not empty new image and keypoints from them will be added to
existing data.
Adds images and keypoints from them to the train collection (descriptors are supposed to be calculated here). If train collection is not empty new image and keypoints from them will be added to existing data.
:param images: Image collection.
@@ -135,8 +133,7 @@ GenericDescriptorMatcher::train
-----------------------------------
.. c:function:: void GenericDescriptorMatcher::train()
Train the object, e.g. tree-based structure to extract descriptors or
to optimize descriptors matching.
Train the object, e.g. tree-based structure to extract descriptors or to optimize descriptors matching.
.. index:: GenericDescriptorMatcher::isMaskSupported
@@ -153,8 +150,7 @@ GenericDescriptorMatcher::classify
:func:`GenericDescriptorMatcher::add`
.. c:function:: void GenericDescriptorMatcher::classify( const Mat\& queryImage, vector<KeyPoint>\& queryKeypoints, const Mat\& trainImage, vector<KeyPoint>\& trainKeypoints ) const
Classifies query keypoints under keypoints of one train image qiven as input argument
(first version of the method) or train image collection that set using (second version).
Classifies query keypoints under keypoints of one train image qiven as input argument (first version of the method) or train image collection that set using (second version).
.. c:function:: void GenericDescriptorMatcher::classify( const Mat\& queryImage, vector<KeyPoint>\& queryKeypoints )
@@ -173,9 +169,7 @@ GenericDescriptorMatcher::match
:func:`GenericDescriptorMatcher::add` :func:`DescriptorMatcher::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
Find best match for query keypoints to the training set. In first version of method
one train image and keypoints detected on it - are input arguments. In second version
query keypoints are matched to training collectin that set using . As in the mask can be set.
Find best match for query keypoints to the training set. In first version of method one train image and keypoints detected on it - are input arguments. In second version query keypoints are matched to training collectin that set using . As in the mask can be set.
.. c:function:: void GenericDescriptorMatcher::match( const Mat\& queryImage, vector<KeyPoint>\& queryKeypoints, vector<DMatch>\& matches, const vector<Mat>\& masks=vector<Mat>() )
@@ -204,9 +198,7 @@ GenericDescriptorMatcher::knnMatch
:func:`GenericDescriptorMatcher::match` :func:`DescriptorMatcher::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
Find 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 distance increasing order.
Details see in and .
Find 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 distance increasing order. Details see in and.
.. 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 )
@@ -217,8 +209,7 @@ GenericDescriptorMatcher::radiusMatch
:func:`GenericDescriptorMatcher::match` :func:`DescriptorMatcher::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
Find the best matches for each query keypoint which have distance less than given threshold.
Found matches are returned in distance increasing order. Details see in and .
Find the best matches for each query keypoint which have distance less than given threshold. Found matches are returned in distance increasing order. Details see in and .
.. 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 )
@@ -309,12 +300,10 @@ Wrapping class for computing, matching and classification of descriptors using
protected:
...
};
..
.. index:: FernDescriptorMatcher
.. _FernDescriptorMatcher:
FernDescriptorMatcher
---------------------
.. c:type:: FernDescriptorMatcher
@@ -368,7 +357,7 @@ Wrapping class for computing, matching and classification of descriptors using
protected:
...
};
..
.. index:: VectorDescriptorMatcher
@@ -400,11 +389,11 @@ Class used for matching descriptors that can be described as vectors in a finite
protected:
...
};
..
Example of creating: ::
VectorDescriptorMatcher matcher( new SurfDescriptorExtractor,
new BruteForceMatcher<L2<float> > );
..

View File

@@ -7,12 +7,11 @@ 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 )
.. 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 )
This function draws matches of keypints from two images on output image.
Match is a line connecting two keypoints (circles).
This function draws matches of keypints from two images on output image. Match is a line connecting two keypoints (circles).
.. 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 )
.. 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 )
:param img1: First source image.
@@ -24,45 +23,43 @@ Match is a line connecting two keypoints (circles).
:param matches: Matches from first image to second one, i.e. ``keypoints1[i]`` has corresponding point ``keypoints2[matches[i]]`` .
:param outImg: Output image. Its content depends on ``flags`` value
what is drawn in output image. See below possible ``flags`` bit values.
:param outImg: Output image. Its content depends on ``flags`` value what is drawn in output image. See below possible ``flags`` bit values.
:param matchColor: Color of matches (lines and connected keypoints).
If ``matchColor==Scalar::all(-1)`` color will be generated randomly.
:param matchColor: Color of matches (lines and connected keypoints). If ``matchColor==Scalar::all(-1)`` color will be generated randomly.
:param singlePointColor: Color of single keypoints (circles), i.e. keypoints not having the matches.
If ``singlePointColor==Scalar::all(-1)`` color will be generated randomly.
:param singlePointColor: Color of single keypoints (circles), i.e. keypoints not having the matches. If ``singlePointColor==Scalar::all(-1)`` color will be generated randomly.
:param matchesMask: Mask determining which matches will be drawn. If mask is empty all matches will be drawn.
:param flags: Each bit of ``flags`` sets some feature of drawing.
Possible ``flags`` bit values is defined by ``DrawMatchesFlags`` , see below. ::
:param flags: Each bit of ``flags`` sets some feature of drawing. Possible ``flags`` bit values is defined by ``DrawMatchesFlags`` ::
struct DrawMatchesFlags
{
enum{ DEFAULT = 0, // Output image matrix will be created (Mat::create),
// i.e. existing memory of output image may be reused.
// Two source image, matches and single keypoints
// will be drawn.
// For each keypoint only the center point will be
// drawn (without the circle around keypoint with
// keypoint size and orientation).
DRAW_OVER_OUTIMG = 1, // Output image matrix will not be
// created (Mat::create). Matches will be drawn
// on existing content of output image.
NOT_DRAW_SINGLE_POINTS = 2, // Single keypoints will not be drawn.
DRAW_RICH_KEYPOINTS = 4 // For each keypoint the circle around
// keypoint with keypoint size and orientation will
// be drawn.
struct DrawMatchesFlags
{
enum{ DEFAULT = 0, // Output image matrix will be created (Mat::create),
// i.e. existing memory of output image may be reused.
// Two source image, matches and single keypoints
// will be drawn.
// For each keypoint only the center point will be
// drawn (without the circle around keypoint with
// keypoint size and orientation).
DRAW_OVER_OUTIMG = 1, // Output image matrix will not be
// created (Mat::create). Matches will be drawn
// on existing content of output image.
NOT_DRAW_SINGLE_POINTS = 2, // Single keypoints will not be drawn.
DRAW_RICH_KEYPOINTS = 4 // For each keypoint the circle around
// keypoint with keypoint size and orientation will
// be drawn.
};
};
};
..
..
.. index:: drawKeypoints
drawKeypoints
-----------------
.. c:function:: void drawKeypoints( const Mat\& image, const vector<KeyPoint>\& keypoints, Mat\& outImg, const Scalar\& color=Scalar::all(-1), int flags=DrawMatchesFlags::DEFAULT )
.. c:function:: void drawKeypoints( const Mat& image, const vector<KeyPoint>& keypoints, Mat& outImg, const Scalar& color=Scalar::all(-1), int flags=DrawMatchesFlags::DEFAULT )
Draw keypoints.
@@ -70,14 +67,9 @@ drawKeypoints
:param keypoints: Keypoints from source image.
:param outImg: Output image. Its content depends on ``flags`` value
what is drawn in output image. See possible ``flags`` bit values.
:param outImg: Output image. Its content depends on ``flags`` value what is drawn in output image. See possible ``flags`` bit values.
:param color: Color of keypoints
:param color: Color of keypoints.
.
:param flags: Each bit of ``flags`` sets some feature of drawing.
Possible ``flags`` bit values is defined by ``DrawMatchesFlags`` ,
see above in :func:`drawMatches` .
:param flags: Each bit of ``flags`` sets some feature of drawing. Possible ``flags`` bit values is defined by ``DrawMatchesFlags``, see above in :func:`drawMatches` .

View File

@@ -36,12 +36,12 @@ Lixin Fan, Jutta Willamowski, Cedric Bray, 2004. ::
protected:
...
};
..
.. index:: BOWTrainer::add
BOWTrainer::add
------------------- ````
-------------------
.. c:function:: void BOWTrainer::add( const Mat\& descriptors )
Add descriptors to training set. The training set will be clustered using clustermethod to construct vocabulary.
@@ -70,14 +70,11 @@ BOWTrainer::cluster
-----------------------
.. c:function:: Mat BOWTrainer::cluster() const
Cluster train descriptors. Vocabulary consists from cluster centers. So this method
returns vocabulary. In first method variant the stored in object train descriptors will be
clustered, in second variant -- input descriptors will be clustered.
Cluster train descriptors. Vocabulary consists from cluster centers. So this method returns vocabulary. In first method variant the stored in object train descriptors will be clustered, in second variant -- input descriptors will be clustered.
.. c:function:: Mat BOWTrainer::cluster( const Mat\& descriptors ) const
:param descriptors: Descriptors to cluster. Each row of ``descriptors`` matrix is a one descriptor. Descriptors will not be added
to the inner train descriptor set.
:param descriptors: Descriptors to cluster. Each row of ``descriptors`` matrix is a one descriptor. Descriptors will not be added to the inner train descriptor set.
.. index:: BOWKMeansTrainer
@@ -103,7 +100,7 @@ BOWKMeansTrainer
protected:
...
};
..
To gain an understanding of constructor parameters see
:func:`kmeans` function
@@ -117,35 +114,32 @@ BOWImgDescriptorExtractor
-------------------------
.. c:type:: BOWImgDescriptorExtractor
Class to compute image descriptor using ''bad of visual words''. In few,
such computing consists from the following steps:
1. Compute descriptors for given image and it's keypoints set,
\
2. Find nearest visual words from vocabulary for each keypoint descriptor,
\
3. Image descriptor is a normalized histogram of vocabulary words encountered in the image. I.e.
``i`` -bin of the histogram is a frequency of ``i`` -word of vocabulary in the given image. ::
Class to compute image descriptor using ''bad of visual words''. In few, such computing consists from the following steps:
class BOWImgDescriptorExtractor
{
public:
BOWImgDescriptorExtractor( const Ptr<DescriptorExtractor>& dextractor,
const Ptr<DescriptorMatcher>& dmatcher );
virtual ~BOWImgDescriptorExtractor(){}
#. Compute descriptors for given image and it's keypoints set
#. Find nearest visual words from vocabulary for each keypoint descriptor,
#. Image descriptor is a normalized histogram of vocabulary words encountered in the image. I.e. ``i`` -bin of the histogram is a frequency of ``i`` -word of vocabulary in the given image. ::
void setVocabulary( const Mat& vocabulary );
const Mat& getVocabulary() const;
void compute( const Mat& image, vector<KeyPoint>& keypoints,
Mat& imgDescriptor,
vector<vector<int> >* pointIdxsOfClusters=0,
Mat* descriptors=0 );
int descriptorSize() const;
int descriptorType() const;
class BOWImgDescriptorExtractor
{
public:
BOWImgDescriptorExtractor( const Ptr<DescriptorExtractor>& dextractor,
const Ptr<DescriptorMatcher>& dmatcher );
virtual ~BOWImgDescriptorExtractor(){}
void setVocabulary( const Mat& vocabulary );
const Mat& getVocabulary() const;
void compute( const Mat& image, vector<KeyPoint>& keypoints,
Mat& imgDescriptor,
vector<vector<int> >* pointIdxsOfClusters=0,
Mat* descriptors=0 );
int descriptorSize() const;
int descriptorType() const;
protected:
...
};
protected:
...
};
..
.. index:: BOWImgDescriptorExtractor::BOWImgDescriptorExtractor
@@ -155,11 +149,9 @@ BOWImgDescriptorExtractor::BOWImgDescriptorExtractor
Constructor.
:param dextractor: Descriptor extractor that will be used to compute descriptors
for input image and it's keypoints.
:param dextractor: Descriptor extractor that will be used to compute descriptors for input image and it's keypoints.
:param dmatcher: Descriptor matcher that will be used to find nearest word of trained vocabulary to
each keupoints descriptor of the image.
:param dmatcher: Descriptor matcher that will be used to find nearest word of trained vocabulary to each keupoints descriptor of the image.
.. index:: BOWImgDescriptorExtractor::setVocabulary
@@ -169,8 +161,7 @@ BOWImgDescriptorExtractor::setVocabulary
Method to set visual vocabulary.
:param vocabulary: Vocabulary (can be trained using inheritor of :func:`BOWTrainer` ).
Each row of vocabulary is a one visual word (cluster center).
:param vocabulary: Vocabulary (can be trained using inheritor of :func:`BOWTrainer` ). Each row of vocabulary is a one visual word (cluster center).
.. index:: BOWImgDescriptorExtractor::getVocabulary
@@ -194,8 +185,7 @@ BOWImgDescriptorExtractor::compute
:param imgDescriptor: This is output, i.e. computed image descriptor.
:param pointIdxsOfClusters: Indices of keypoints which belong to the cluster, i.e. ``pointIdxsOfClusters[i]`` is keypoint indices which belong
to the ``i-`` cluster (word of vocabulary) (returned if it is not 0.)
:param pointIdxsOfClusters: Indices of keypoints which belong to the cluster, i.e. ``pointIdxsOfClusters[i]`` is keypoint indices which belong to the ``i-`` cluster (word of vocabulary) (returned if it is not 0.)
:param descriptors: Descriptors of the image keypoints (returned if it is not 0.)