mirror of
https://github.com/opencv/opencv.git
synced 2026-07-30 07:43:03 +04:00
the first round of cleaning up the RST docs
This commit is contained in:
@@ -15,7 +15,7 @@ descriptor extractors inherit
|
||||
|
||||
DescriptorExtractor
|
||||
-------------------
|
||||
.. ctype:: DescriptorExtractor
|
||||
.. c:type:: DescriptorExtractor
|
||||
|
||||
Abstract base class for computing descriptors for image keypoints. ::
|
||||
|
||||
@@ -51,9 +51,9 @@ descriptors as a
|
||||
|
||||
.. index:: DescriptorExtractor::compute
|
||||
|
||||
cv::DescriptorExtractor::compute
|
||||
DescriptorExtractor::compute
|
||||
--------------------------------
|
||||
.. cfunction:: void DescriptorExtractor::compute( const Mat\& image, vector<KeyPoint>\& keypoints, Mat\& descriptors ) const
|
||||
.. 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).
|
||||
@@ -64,7 +64,7 @@ or image set (second variant).
|
||||
|
||||
:param descriptors: The descriptors. Row i is the descriptor for keypoint i.
|
||||
|
||||
.. cfunction:: void DescriptorExtractor::compute( const vector<Mat>\& images, vector<vector<KeyPoint> >\& keypoints, vector<Mat>\& descriptors ) const
|
||||
.. c:function:: void DescriptorExtractor::compute( const vector<Mat>\& images, vector<vector<KeyPoint> >\& keypoints, vector<Mat>\& descriptors ) const
|
||||
|
||||
* **images** The image set.
|
||||
|
||||
@@ -77,9 +77,9 @@ or image set (second variant).
|
||||
|
||||
.. index:: DescriptorExtractor::read
|
||||
|
||||
cv::DescriptorExtractor::read
|
||||
DescriptorExtractor::read
|
||||
-----------------------------
|
||||
.. cfunction:: void DescriptorExtractor::read( const FileNode\& fn )
|
||||
.. c:function:: void DescriptorExtractor::read( const FileNode\& fn )
|
||||
|
||||
Read descriptor extractor object from file node.
|
||||
|
||||
@@ -87,9 +87,9 @@ cv::DescriptorExtractor::read
|
||||
|
||||
.. index:: DescriptorExtractor::write
|
||||
|
||||
cv::DescriptorExtractor::write
|
||||
DescriptorExtractor::write
|
||||
------------------------------
|
||||
.. cfunction:: void DescriptorExtractor::write( FileStorage\& fs ) const
|
||||
.. c:function:: void DescriptorExtractor::write( FileStorage\& fs ) const
|
||||
|
||||
Write descriptor extractor object to file storage.
|
||||
|
||||
@@ -97,10 +97,10 @@ cv::DescriptorExtractor::write
|
||||
|
||||
.. index:: DescriptorExtractor::create
|
||||
|
||||
cv::DescriptorExtractor::create
|
||||
DescriptorExtractor::create
|
||||
-------------------------------
|
||||
:func:`DescriptorExtractor`
|
||||
.. cfunction:: Ptr<DescriptorExtractor> DescriptorExtractor::create( const string\& descriptorExtractorType )
|
||||
.. c:function:: Ptr<DescriptorExtractor> DescriptorExtractor::create( const string\& descriptorExtractorType )
|
||||
|
||||
Descriptor extractor factory that creates of given type with
|
||||
default parameters (rather using default constructor).
|
||||
@@ -123,7 +123,7 @@ e.g. ``"OpponentSIFT"`` , etc.
|
||||
|
||||
SiftDescriptorExtractor
|
||||
-----------------------
|
||||
.. ctype:: SiftDescriptorExtractor
|
||||
.. c:type:: SiftDescriptorExtractor
|
||||
|
||||
Wrapping class for descriptors computing using
|
||||
:func:`SIFT` class. ::
|
||||
@@ -155,7 +155,7 @@ Wrapping class for descriptors computing using
|
||||
|
||||
SurfDescriptorExtractor
|
||||
-----------------------
|
||||
.. ctype:: SurfDescriptorExtractor
|
||||
.. c:type:: SurfDescriptorExtractor
|
||||
|
||||
Wrapping class for descriptors computing using
|
||||
:func:`SURF` class. ::
|
||||
@@ -181,7 +181,7 @@ Wrapping class for descriptors computing using
|
||||
|
||||
CalonderDescriptorExtractor
|
||||
---------------------------
|
||||
.. ctype:: CalonderDescriptorExtractor
|
||||
.. c:type:: CalonderDescriptorExtractor
|
||||
|
||||
Wrapping class for descriptors computing using
|
||||
:func:`RTreeClassifier` class. ::
|
||||
@@ -207,7 +207,7 @@ Wrapping class for descriptors computing using
|
||||
|
||||
OpponentColorDescriptorExtractor
|
||||
--------------------------------
|
||||
.. ctype:: OpponentColorDescriptorExtractor
|
||||
.. c:type:: OpponentColorDescriptorExtractor
|
||||
|
||||
Adapts a descriptor extractor to compute descripors in Opponent Color Space
|
||||
(refer to van de Sande et al., CGIV 2008 "Color Descriptors for Object Category Recognition").
|
||||
@@ -235,7 +235,7 @@ them into a single color descriptor. ::
|
||||
|
||||
BriefDescriptorExtractor
|
||||
------------------------
|
||||
.. ctype:: BriefDescriptorExtractor
|
||||
.. c:type:: BriefDescriptorExtractor
|
||||
|
||||
Class for computing BRIEF descriptors described in paper of Calonder M., Lepetit V.,
|
||||
Strecha C., Fua P.: ''BRIEF: Binary Robust Independent Elementary Features.''
|
||||
|
||||
@@ -15,7 +15,7 @@ descriptor matchers inherit
|
||||
|
||||
DMatch
|
||||
------
|
||||
.. ctype:: DMatch
|
||||
.. c:type:: DMatch
|
||||
|
||||
Match between two keypoint descriptors: query descriptor index,
|
||||
train descriptor index, train image index and distance between descriptors. ::
|
||||
@@ -48,7 +48,7 @@ train descriptor index, train image index and distance between descriptors. ::
|
||||
|
||||
DescriptorMatcher
|
||||
-----------------
|
||||
.. ctype:: DescriptorMatcher
|
||||
.. c:type:: DescriptorMatcher
|
||||
|
||||
Abstract base class for matching keypoint descriptors. It has two groups
|
||||
of match methods: for matching descriptors of one image with other image or
|
||||
@@ -106,9 +106,9 @@ with image set. ::
|
||||
|
||||
.. index:: DescriptorMatcher::add
|
||||
|
||||
cv::DescriptorMatcher::add
|
||||
DescriptorMatcher::add
|
||||
-------------------------- ````
|
||||
.. cfunction:: void add( const vector<Mat>\& descriptors )
|
||||
.. 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.
|
||||
@@ -118,41 +118,41 @@ the new descriptors are added to existing train descriptors.
|
||||
|
||||
.. index:: DescriptorMatcher::getTrainDescriptors
|
||||
|
||||
cv::DescriptorMatcher::getTrainDescriptors
|
||||
DescriptorMatcher::getTrainDescriptors
|
||||
------------------------------------------ ````
|
||||
.. cfunction:: const vector<Mat>\& getTrainDescriptors() const
|
||||
.. c:function:: const vector<Mat>\& getTrainDescriptors() const
|
||||
|
||||
Returns constant link to the train descriptor collection (i.e. trainDescCollection).
|
||||
|
||||
.. index:: DescriptorMatcher::clear
|
||||
|
||||
cv::DescriptorMatcher::clear
|
||||
DescriptorMatcher::clear
|
||||
----------------------------
|
||||
.. cfunction:: void DescriptorMatcher::clear()
|
||||
.. c:function:: void DescriptorMatcher::clear()
|
||||
|
||||
Clear train descriptor collection.
|
||||
|
||||
.. index:: DescriptorMatcher::empty
|
||||
|
||||
cv::DescriptorMatcher::empty
|
||||
DescriptorMatcher::empty
|
||||
----------------------------
|
||||
.. cfunction:: bool DescriptorMatcher::empty() const
|
||||
.. c:function:: bool DescriptorMatcher::empty() const
|
||||
|
||||
Return true if there are not train descriptors in collection.
|
||||
|
||||
.. index:: DescriptorMatcher::isMaskSupported
|
||||
|
||||
cv::DescriptorMatcher::isMaskSupported
|
||||
DescriptorMatcher::isMaskSupported
|
||||
--------------------------------------
|
||||
.. cfunction:: bool DescriptorMatcher::isMaskSupported()
|
||||
.. c:function:: bool DescriptorMatcher::isMaskSupported()
|
||||
|
||||
Returns true if descriptor matcher supports masking permissible matches.
|
||||
|
||||
.. index:: DescriptorMatcher::train
|
||||
|
||||
cv::DescriptorMatcher::train
|
||||
DescriptorMatcher::train
|
||||
----------------------------
|
||||
.. cfunction:: void 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
|
||||
@@ -161,9 +161,9 @@ trains flann::Index)
|
||||
|
||||
.. index:: DescriptorMatcher::match
|
||||
|
||||
cv::DescriptorMatcher::match
|
||||
DescriptorMatcher::match
|
||||
---------------------------- ```` ```` ```` ````
|
||||
.. cfunction:: void DescriptorMatcher::match( const Mat\& queryDescriptors, const Mat\& trainDescriptors, vector<DMatch>\& matches, const Mat\& mask=Mat() ) const
|
||||
.. 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.
|
||||
@@ -172,7 +172,7 @@ supposed that they are of keypoints detected on the same train image. In second
|
||||
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.
|
||||
|
||||
.. cfunction:: void DescriptorMatcher::match( const Mat\& queryDescriptors, vector<DMatch>\& matches, const vector<Mat>\& masks=vector<Mat>() )
|
||||
.. c:function:: void DescriptorMatcher::match( const Mat\& queryDescriptors, vector<DMatch>\& matches, const vector<Mat>\& masks=vector<Mat>() )
|
||||
|
||||
:param queryDescriptors: Query set of descriptors.
|
||||
|
||||
@@ -189,16 +189,16 @@ Optional mask (or masks) can be set to describe which descriptors can be matched
|
||||
|
||||
.. index:: DescriptorMatcher::knnMatch
|
||||
|
||||
cv::DescriptorMatcher::knnMatch
|
||||
DescriptorMatcher::knnMatch
|
||||
-------------------------------
|
||||
:func:`DescriptorMatcher::match`
|
||||
.. cfunction:: void DescriptorMatcher::knnMatch( const Mat\& queryDescriptors, const Mat\& trainDescriptors, vector<vector<DMatch> >\& matches, int k, const Mat\& mask=Mat(), bool compactResult=false ) const
|
||||
.. 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 .
|
||||
|
||||
.. cfunction:: void DescriptorMatcher::knnMatch( const Mat\& queryDescriptors, vector<vector<DMatch> >\& matches, int k, const vector<Mat>\& masks=vector<Mat>(), bool compactResult=false )
|
||||
.. c:function:: void DescriptorMatcher::knnMatch( const Mat\& queryDescriptors, vector<vector<DMatch> >\& matches, int k, const vector<Mat>\& masks=vector<Mat>(), bool compactResult=false )
|
||||
|
||||
:param queryDescriptors, trainDescriptors, mask, masks: See in :func:`DescriptorMatcher::match` .
|
||||
|
||||
@@ -210,16 +210,16 @@ Details about query and train descriptors see in .
|
||||
|
||||
.. index:: DescriptorMatcher::radiusMatch
|
||||
|
||||
cv::DescriptorMatcher::radiusMatch
|
||||
DescriptorMatcher::radiusMatch
|
||||
----------------------------------
|
||||
:func:`DescriptorMatcher::match`
|
||||
.. cfunction:: void DescriptorMatcher::radiusMatch( const Mat\& queryDescriptors, const Mat\& trainDescriptors, vector<vector<DMatch> >\& matches, float maxDistance, const Mat\& mask=Mat(), bool compactResult=false ) const
|
||||
.. 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 .
|
||||
|
||||
.. cfunction:: void DescriptorMatcher::radiusMatch( const Mat\& queryDescriptors, vector<vector<DMatch> >\& matches, float maxDistance, const vector<Mat>\& masks=vector<Mat>(), bool compactResult=false )
|
||||
.. c:function:: void DescriptorMatcher::radiusMatch( const Mat\& queryDescriptors, vector<vector<DMatch> >\& matches, float maxDistance, const vector<Mat>\& masks=vector<Mat>(), bool compactResult=false )
|
||||
|
||||
:param queryDescriptors, trainDescriptors, mask, masks: See in :func:`DescriptorMatcher::match` .
|
||||
|
||||
@@ -229,9 +229,9 @@ descriptors see in .
|
||||
|
||||
.. index:: DescriptorMatcher::clone
|
||||
|
||||
cv::DescriptorMatcher::clone
|
||||
DescriptorMatcher::clone
|
||||
----------------------------
|
||||
.. cfunction:: Ptr<DescriptorMatcher> \\DescriptorMatcher::clone( bool emptyTrainData ) const
|
||||
.. c:function:: Ptr<DescriptorMatcher> \\DescriptorMatcher::clone( bool emptyTrainData ) const
|
||||
|
||||
Clone the matcher.
|
||||
|
||||
@@ -241,10 +241,10 @@ cv::DescriptorMatcher::clone
|
||||
|
||||
.. index:: DescriptorMatcher::create
|
||||
|
||||
cv::DescriptorMatcher::create
|
||||
DescriptorMatcher::create
|
||||
-----------------------------
|
||||
:func:`DescriptorMatcher`
|
||||
.. cfunction:: Ptr<DescriptorMatcher> DescriptorMatcher::create( const string\& descriptorMatcherType )
|
||||
.. c:function:: Ptr<DescriptorMatcher> DescriptorMatcher::create( const string\& descriptorMatcherType )
|
||||
|
||||
Descriptor matcher factory that creates of
|
||||
given type with default parameters (rather using default constructor).
|
||||
@@ -259,7 +259,7 @@ Now the following matcher types are supported: ``"BruteForce"`` (it uses ``L2``
|
||||
|
||||
BruteForceMatcher
|
||||
-----------------
|
||||
.. ctype:: 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
|
||||
@@ -348,7 +348,7 @@ For float descriptors, a common choice would be ``L2<float>`` . Class of support
|
||||
|
||||
FlannBasedMatcher
|
||||
-----------------
|
||||
.. ctype:: FlannBasedMatcher
|
||||
.. c:type:: FlannBasedMatcher
|
||||
|
||||
Flann based descriptor matcher. This matcher trains
|
||||
:func:`flann::Index` on
|
||||
|
||||
@@ -14,7 +14,7 @@ inherit
|
||||
|
||||
KeyPoint
|
||||
--------
|
||||
.. ctype:: KeyPoint
|
||||
.. c:type:: KeyPoint
|
||||
|
||||
Data structure for salient point detectors. ::
|
||||
|
||||
@@ -73,7 +73,7 @@ Data structure for salient point detectors. ::
|
||||
|
||||
FeatureDetector
|
||||
---------------
|
||||
.. ctype:: FeatureDetector
|
||||
.. c:type:: FeatureDetector
|
||||
|
||||
Abstract base class for 2D image feature detectors. ::
|
||||
|
||||
@@ -101,9 +101,9 @@ Abstract base class for 2D image feature detectors. ::
|
||||
|
||||
.. index:: FeatureDetector::detect
|
||||
|
||||
cv::FeatureDetector::detect
|
||||
FeatureDetector::detect
|
||||
---------------------------
|
||||
.. cfunction:: void FeatureDetector::detect( const Mat\& image, vector<KeyPoint>\& keypoints, const Mat\& mask=Mat() ) const
|
||||
.. 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).
|
||||
|
||||
@@ -114,7 +114,7 @@ cv::FeatureDetector::detect
|
||||
:param mask: Mask specifying where to look for keypoints (optional). Must be a char matrix
|
||||
with non-zero values in the region of interest.
|
||||
|
||||
.. cfunction:: void FeatureDetector::detect( const vector<Mat>\& images, vector<vector<KeyPoint> >\& keypoints, const vector<Mat>\& masks=vector<Mat>() ) const
|
||||
.. c:function:: void FeatureDetector::detect( const vector<Mat>\& images, vector<vector<KeyPoint> >\& keypoints, const vector<Mat>\& masks=vector<Mat>() ) const
|
||||
|
||||
* **images** Images set.
|
||||
|
||||
@@ -125,9 +125,9 @@ cv::FeatureDetector::detect
|
||||
|
||||
.. index:: FeatureDetector::read
|
||||
|
||||
cv::FeatureDetector::read
|
||||
FeatureDetector::read
|
||||
-------------------------
|
||||
.. cfunction:: void FeatureDetector::read( const FileNode\& fn )
|
||||
.. c:function:: void FeatureDetector::read( const FileNode\& fn )
|
||||
|
||||
Read feature detector object from file node.
|
||||
|
||||
@@ -135,9 +135,9 @@ cv::FeatureDetector::read
|
||||
|
||||
.. index:: FeatureDetector::write
|
||||
|
||||
cv::FeatureDetector::write
|
||||
FeatureDetector::write
|
||||
--------------------------
|
||||
.. cfunction:: void FeatureDetector::write( FileStorage\& fs ) const
|
||||
.. c:function:: void FeatureDetector::write( FileStorage\& fs ) const
|
||||
|
||||
Write feature detector object to file storage.
|
||||
|
||||
@@ -145,10 +145,10 @@ cv::FeatureDetector::write
|
||||
|
||||
.. index:: FeatureDetector::create
|
||||
|
||||
cv::FeatureDetector::create
|
||||
FeatureDetector::create
|
||||
---------------------------
|
||||
:func:`FeatureDetector`
|
||||
.. cfunction:: Ptr<FeatureDetector> FeatureDetector::create( const string\& detectorType )
|
||||
.. c:function:: Ptr<FeatureDetector> FeatureDetector::create( const string\& detectorType )
|
||||
|
||||
Feature detector factory that creates of given type with
|
||||
default parameters (rather using default constructor).
|
||||
@@ -176,7 +176,7 @@ e.g. ``"GridFAST"``,``"PyramidSTAR"`` , etc.
|
||||
|
||||
FastFeatureDetector
|
||||
-------------------
|
||||
.. ctype:: FastFeatureDetector
|
||||
.. c:type:: FastFeatureDetector
|
||||
|
||||
Wrapping class for feature detection using
|
||||
:func:`FAST` method. ::
|
||||
@@ -198,7 +198,7 @@ Wrapping class for feature detection using
|
||||
|
||||
GoodFeaturesToTrackDetector
|
||||
---------------------------
|
||||
.. ctype:: GoodFeaturesToTrackDetector
|
||||
.. c:type:: GoodFeaturesToTrackDetector
|
||||
|
||||
Wrapping class for feature detection using
|
||||
:func:`goodFeaturesToTrack` function. ::
|
||||
@@ -241,7 +241,7 @@ Wrapping class for feature detection using
|
||||
|
||||
MserFeatureDetector
|
||||
-------------------
|
||||
.. ctype:: MserFeatureDetector
|
||||
.. c:type:: MserFeatureDetector
|
||||
|
||||
Wrapping class for feature detection using
|
||||
:func:`MSER` class. ::
|
||||
@@ -267,7 +267,7 @@ Wrapping class for feature detection using
|
||||
|
||||
StarFeatureDetector
|
||||
-------------------
|
||||
.. ctype:: StarFeatureDetector
|
||||
.. c:type:: StarFeatureDetector
|
||||
|
||||
Wrapping class for feature detection using
|
||||
:func:`StarDetector` class. ::
|
||||
@@ -291,7 +291,7 @@ Wrapping class for feature detection using
|
||||
|
||||
SiftFeatureDetector
|
||||
-------------------
|
||||
.. ctype:: SiftFeatureDetector
|
||||
.. c:type:: SiftFeatureDetector
|
||||
|
||||
Wrapping class for feature detection using
|
||||
:func:`SIFT` class. ::
|
||||
@@ -320,7 +320,7 @@ Wrapping class for feature detection using
|
||||
|
||||
SurfFeatureDetector
|
||||
-------------------
|
||||
.. ctype:: SurfFeatureDetector
|
||||
.. c:type:: SurfFeatureDetector
|
||||
|
||||
Wrapping class for feature detection using
|
||||
:func:`SURF` class. ::
|
||||
@@ -343,7 +343,7 @@ Wrapping class for feature detection using
|
||||
|
||||
GridAdaptedFeatureDetector
|
||||
--------------------------
|
||||
.. ctype:: GridAdaptedFeatureDetector
|
||||
.. c:type:: GridAdaptedFeatureDetector
|
||||
|
||||
Adapts a detector to partition the source image into a grid and detect
|
||||
points in each cell. ::
|
||||
@@ -374,7 +374,7 @@ points in each cell. ::
|
||||
|
||||
PyramidAdaptedFeatureDetector
|
||||
-----------------------------
|
||||
.. ctype:: 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. ::
|
||||
@@ -397,7 +397,7 @@ pyramid. Useful for detectors that are not inherently scaled. ::
|
||||
|
||||
DynamicAdaptedFeatureDetector
|
||||
-----------------------------
|
||||
.. ctype:: DynamicAdaptedFeatureDetector
|
||||
.. c:type:: DynamicAdaptedFeatureDetector
|
||||
|
||||
An adaptively adjusting detector that iteratively detects until the desired number
|
||||
of features are found.
|
||||
@@ -442,9 +442,9 @@ Here is a sample of how to create a DynamicAdaptedFeatureDetector. ::
|
||||
|
||||
.. index:: DynamicAdaptedFeatureDetector::DynamicAdaptedFeatureDetector
|
||||
|
||||
cv::DynamicAdaptedFeatureDetector::DynamicAdaptedFeatureDetector
|
||||
DynamicAdaptedFeatureDetector::DynamicAdaptedFeatureDetector
|
||||
----------------------------------------------------------------
|
||||
.. cfunction:: DynamicAdaptedFeatureDetector::DynamicAdaptedFeatureDetector( const Ptr<AdjusterAdapter>\& adjaster, int min_features, int max_features, int max_iters )
|
||||
.. c:function:: DynamicAdaptedFeatureDetector::DynamicAdaptedFeatureDetector( const Ptr<AdjusterAdapter>\& adjaster, int min_features, int max_features, int max_iters )
|
||||
|
||||
DynamicAdaptedFeatureDetector constructor.
|
||||
|
||||
@@ -464,7 +464,7 @@ cv::DynamicAdaptedFeatureDetector::DynamicAdaptedFeatureDetector
|
||||
|
||||
AdjusterAdapter
|
||||
---------------
|
||||
.. ctype:: AdjusterAdapter
|
||||
.. c:type:: AdjusterAdapter
|
||||
|
||||
A feature detector parameter adjuster interface, this is used by the
|
||||
:func:`DynamicAdaptedFeatureDetector` and is a wrapper for
|
||||
@@ -485,9 +485,9 @@ See
|
||||
|
||||
.. index:: AdjusterAdapter::tooFew
|
||||
|
||||
cv::AdjusterAdapter::tooFew
|
||||
AdjusterAdapter::tooFew
|
||||
---------------------------
|
||||
.. cfunction:: virtual void tooFew(int min, int n_detected) = 0
|
||||
.. 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.
|
||||
@@ -506,9 +506,9 @@ An example implementation of this is ::
|
||||
|
||||
.. index:: AdjusterAdapter::tooMany
|
||||
|
||||
cv::AdjusterAdapter::tooMany
|
||||
AdjusterAdapter::tooMany
|
||||
----------------------------
|
||||
.. cfunction:: virtual void tooMany(int max, int n_detected) = 0
|
||||
.. 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.
|
||||
@@ -527,9 +527,9 @@ An example implementation of this is ::
|
||||
|
||||
.. index:: AdjusterAdapter::good
|
||||
|
||||
cv::AdjusterAdapter::good
|
||||
AdjusterAdapter::good
|
||||
-------------------------
|
||||
.. cfunction:: virtual bool good() const = 0
|
||||
.. 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.
|
||||
|
||||
@@ -547,7 +547,7 @@ An example implementation of this is ::
|
||||
|
||||
FastAdjuster
|
||||
------------
|
||||
.. ctype:: FastAdjuster
|
||||
.. c:type:: FastAdjuster
|
||||
|
||||
An
|
||||
:func:`AdjusterAdapter` for the
|
||||
@@ -568,7 +568,7 @@ threshhold by 1 ::
|
||||
|
||||
StarAdjuster
|
||||
------------
|
||||
.. ctype:: StarAdjuster
|
||||
.. c:type:: StarAdjuster
|
||||
|
||||
An
|
||||
:func:`AdjusterAdapter` for the
|
||||
@@ -588,7 +588,7 @@ StarFeatureDetector. ::
|
||||
|
||||
SurfAdjuster
|
||||
------------
|
||||
.. ctype:: SurfAdjuster
|
||||
.. c:type:: SurfAdjuster
|
||||
|
||||
An
|
||||
:func:`AdjusterAdapter` for the
|
||||
|
||||
@@ -18,7 +18,7 @@ There are descriptors such as One way descriptor and Ferns that have ``GenericDe
|
||||
|
||||
GenericDescriptorMatcher
|
||||
------------------------
|
||||
.. ctype:: GenericDescriptorMatcher
|
||||
.. c:type:: GenericDescriptorMatcher
|
||||
|
||||
Abstract interface for a keypoint descriptor extracting and matching.
|
||||
There is
|
||||
@@ -92,9 +92,9 @@ with image set. ::
|
||||
|
||||
.. index:: GenericDescriptorMatcher::add
|
||||
|
||||
cv::GenericDescriptorMatcher::add
|
||||
GenericDescriptorMatcher::add
|
||||
---------------------------------
|
||||
.. cfunction:: void GenericDescriptorMatcher::add( const vector<Mat>\& images, vector<vector<KeyPoint> >\& keypoints )
|
||||
.. 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
|
||||
@@ -107,56 +107,56 @@ existing data.
|
||||
|
||||
.. index:: GenericDescriptorMatcher::getTrainImages
|
||||
|
||||
cv::GenericDescriptorMatcher::getTrainImages
|
||||
GenericDescriptorMatcher::getTrainImages
|
||||
--------------------------------------------
|
||||
.. cfunction:: const vector<Mat>\& GenericDescriptorMatcher::getTrainImages() const
|
||||
.. c:function:: const vector<Mat>\& GenericDescriptorMatcher::getTrainImages() const
|
||||
|
||||
Returns train image collection.
|
||||
|
||||
.. index:: GenericDescriptorMatcher::getTrainKeypoints
|
||||
|
||||
cv::GenericDescriptorMatcher::getTrainKeypoints
|
||||
GenericDescriptorMatcher::getTrainKeypoints
|
||||
-----------------------------------------------
|
||||
.. cfunction:: const vector<vector<KeyPoint> >\& GenericDescriptorMatcher::getTrainKeypoints() const
|
||||
.. c:function:: const vector<vector<KeyPoint> >\& GenericDescriptorMatcher::getTrainKeypoints() const
|
||||
|
||||
Returns train keypoints collection.
|
||||
|
||||
.. index:: GenericDescriptorMatcher::clear
|
||||
|
||||
cv::GenericDescriptorMatcher::clear
|
||||
GenericDescriptorMatcher::clear
|
||||
-----------------------------------
|
||||
.. cfunction:: void GenericDescriptorMatcher::clear()
|
||||
.. c:function:: void GenericDescriptorMatcher::clear()
|
||||
|
||||
Clear train collection (iamges and keypoints).
|
||||
|
||||
.. index:: GenericDescriptorMatcher::train
|
||||
|
||||
cv::GenericDescriptorMatcher::train
|
||||
GenericDescriptorMatcher::train
|
||||
-----------------------------------
|
||||
.. cfunction:: void GenericDescriptorMatcher::train()
|
||||
.. c:function:: void GenericDescriptorMatcher::train()
|
||||
|
||||
Train the object, e.g. tree-based structure to extract descriptors or
|
||||
to optimize descriptors matching.
|
||||
|
||||
.. index:: GenericDescriptorMatcher::isMaskSupported
|
||||
|
||||
cv::GenericDescriptorMatcher::isMaskSupported
|
||||
GenericDescriptorMatcher::isMaskSupported
|
||||
---------------------------------------------
|
||||
.. cfunction:: void GenericDescriptorMatcher::isMaskSupported()
|
||||
.. c:function:: void GenericDescriptorMatcher::isMaskSupported()
|
||||
|
||||
Returns true if generic descriptor matcher supports masking permissible matches.
|
||||
|
||||
.. index:: GenericDescriptorMatcher::classify
|
||||
|
||||
cv::GenericDescriptorMatcher::classify
|
||||
GenericDescriptorMatcher::classify
|
||||
--------------------------------------
|
||||
:func:`GenericDescriptorMatcher::add`
|
||||
.. cfunction:: void GenericDescriptorMatcher::classify( const Mat\& queryImage, vector<KeyPoint>\& queryKeypoints, const Mat\& trainImage, vector<KeyPoint>\& trainKeypoints ) const
|
||||
.. 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).
|
||||
|
||||
.. cfunction:: void GenericDescriptorMatcher::classify( const Mat\& queryImage, vector<KeyPoint>\& queryKeypoints )
|
||||
.. c:function:: void GenericDescriptorMatcher::classify( const Mat\& queryImage, vector<KeyPoint>\& queryKeypoints )
|
||||
|
||||
:param queryImage: The query image.
|
||||
|
||||
@@ -168,16 +168,16 @@ cv::GenericDescriptorMatcher::classify
|
||||
|
||||
.. index:: GenericDescriptorMatcher::match
|
||||
|
||||
cv::GenericDescriptorMatcher::match
|
||||
GenericDescriptorMatcher::match
|
||||
-----------------------------------
|
||||
:func:`GenericDescriptorMatcher::add` :func:`DescriptorMatcher::match`
|
||||
.. cfunction:: void GenericDescriptorMatcher::match( const Mat\& queryImage, vector<KeyPoint>\& queryKeypoints, const Mat\& trainImage, vector<KeyPoint>\& trainKeypoints, vector<DMatch>\& matches, const Mat\& mask=Mat() ) const
|
||||
.. 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.
|
||||
|
||||
.. cfunction:: void GenericDescriptorMatcher::match( const Mat\& queryImage, vector<KeyPoint>\& queryKeypoints, vector<DMatch>\& matches, const vector<Mat>\& masks=vector<Mat>() )
|
||||
.. c:function:: void GenericDescriptorMatcher::match( const Mat\& queryImage, vector<KeyPoint>\& queryKeypoints, vector<DMatch>\& matches, const vector<Mat>\& masks=vector<Mat>() )
|
||||
|
||||
:param queryImage: Query image.
|
||||
|
||||
@@ -199,50 +199,50 @@ query keypoints are matched to training collectin that set using . As in the mas
|
||||
|
||||
.. index:: GenericDescriptorMatcher::knnMatch
|
||||
|
||||
cv::GenericDescriptorMatcher::knnMatch
|
||||
GenericDescriptorMatcher::knnMatch
|
||||
--------------------------------------
|
||||
:func:`GenericDescriptorMatcher::match` :func:`DescriptorMatcher::knnMatch`
|
||||
.. cfunction:: 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
|
||||
.. 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 .
|
||||
|
||||
.. cfunction:: void GenericDescriptorMatcher::knnMatch( const Mat\& queryImage, vector<KeyPoint>\& queryKeypoints, vector<vector<DMatch> >\& matches, int k, const vector<Mat>\& masks=vector<Mat>(), bool compactResult=false )
|
||||
.. c:function:: void GenericDescriptorMatcher::knnMatch( const Mat\& queryImage, vector<KeyPoint>\& queryKeypoints, vector<vector<DMatch> >\& matches, int k, const vector<Mat>\& masks=vector<Mat>(), bool compactResult=false )
|
||||
|
||||
.. index:: GenericDescriptorMatcher::radiusMatch
|
||||
|
||||
cv::GenericDescriptorMatcher::radiusMatch
|
||||
GenericDescriptorMatcher::radiusMatch
|
||||
-----------------------------------------
|
||||
:func:`GenericDescriptorMatcher::match` :func:`DescriptorMatcher::radiusMatch`
|
||||
.. cfunction:: 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
|
||||
.. 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 .
|
||||
|
||||
.. cfunction:: void GenericDescriptorMatcher::radiusMatch( const Mat\& queryImage, vector<KeyPoint>\& queryKeypoints, vector<vector<DMatch> >\& matches, float maxDistance, const vector<Mat>\& masks=vector<Mat>(), bool compactResult=false )
|
||||
.. 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 )
|
||||
|
||||
.. index:: GenericDescriptorMatcher::read
|
||||
|
||||
cv::GenericDescriptorMatcher::read
|
||||
GenericDescriptorMatcher::read
|
||||
----------------------------------
|
||||
.. cfunction:: void GenericDescriptorMatcher::read( const FileNode\& fn )
|
||||
.. c:function:: void GenericDescriptorMatcher::read( const FileNode\& fn )
|
||||
|
||||
Reads matcher object from a file node.
|
||||
|
||||
.. index:: GenericDescriptorMatcher::write
|
||||
|
||||
cv::GenericDescriptorMatcher::write
|
||||
GenericDescriptorMatcher::write
|
||||
-----------------------------------
|
||||
.. cfunction:: void GenericDescriptorMatcher::write( FileStorage\& fs ) const
|
||||
.. c:function:: void GenericDescriptorMatcher::write( FileStorage\& fs ) const
|
||||
|
||||
Writes match object to a file storage
|
||||
|
||||
.. index:: GenericDescriptorMatcher::clone
|
||||
|
||||
cv::GenericDescriptorMatcher::clone
|
||||
GenericDescriptorMatcher::clone
|
||||
-----------------------------------
|
||||
.. cfunction:: Ptr<GenericDescriptorMatcher>\\GenericDescriptorMatcher::clone( bool emptyTrainData ) const
|
||||
.. c:function:: Ptr<GenericDescriptorMatcher>\\GenericDescriptorMatcher::clone( bool emptyTrainData ) const
|
||||
|
||||
Clone the matcher.
|
||||
|
||||
@@ -256,7 +256,7 @@ cv::GenericDescriptorMatcher::clone
|
||||
|
||||
OneWayDescriptorMatcher
|
||||
-----------------------
|
||||
.. ctype:: OneWayDescriptorMatcher
|
||||
.. c:type:: OneWayDescriptorMatcher
|
||||
|
||||
Wrapping class for computing, matching and classification of descriptors using
|
||||
:func:`OneWayDescriptorBase` class. ::
|
||||
@@ -317,7 +317,7 @@ Wrapping class for computing, matching and classification of descriptors using
|
||||
|
||||
FernDescriptorMatcher
|
||||
---------------------
|
||||
.. ctype:: FernDescriptorMatcher
|
||||
.. c:type:: FernDescriptorMatcher
|
||||
|
||||
Wrapping class for computing, matching and classification of descriptors using
|
||||
:func:`FernClassifier` class. ::
|
||||
@@ -376,7 +376,7 @@ Wrapping class for computing, matching and classification of descriptors using
|
||||
|
||||
VectorDescriptorMatcher
|
||||
-----------------------
|
||||
.. ctype:: VectorDescriptorMatcher
|
||||
.. c:type:: VectorDescriptorMatcher
|
||||
|
||||
Class used for matching descriptors that can be described as vectors in a finite-dimensional space. ::
|
||||
|
||||
|
||||
@@ -5,14 +5,14 @@ Drawing Function of Keypoints and Matches
|
||||
|
||||
.. index:: drawMatches
|
||||
|
||||
cv::drawMatches
|
||||
drawMatches
|
||||
---------------
|
||||
.. cfunction:: 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).
|
||||
|
||||
.. cfunction:: 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.
|
||||
|
||||
@@ -60,9 +60,9 @@ Match is a line connecting two keypoints (circles).
|
||||
|
||||
.. index:: drawKeypoints
|
||||
|
||||
cv::drawKeypoints
|
||||
drawKeypoints
|
||||
-----------------
|
||||
.. cfunction:: 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.
|
||||
|
||||
|
||||
@@ -5,9 +5,9 @@ Feature detection and description
|
||||
|
||||
.. index:: FAST
|
||||
|
||||
cv::FAST
|
||||
FAST
|
||||
--------
|
||||
.. cfunction:: void FAST( const Mat\& image, vector<KeyPoint>\& keypoints, int threshold, bool nonmaxSupression=true )
|
||||
.. c:function:: void FAST( const Mat& image, vector<KeyPoint>& keypoints, int threshold, bool nonmaxSupression=true )
|
||||
|
||||
Detects corners using FAST algorithm by E. Rosten (''Machine learning for high-speed corner detection'', 2006).
|
||||
|
||||
@@ -26,7 +26,7 @@ cv::FAST
|
||||
|
||||
MSER
|
||||
----
|
||||
.. ctype:: MSER
|
||||
.. c:type:: MSER
|
||||
|
||||
Maximally-Stable Extremal Region Extractor ::
|
||||
|
||||
@@ -45,11 +45,9 @@ Maximally-Stable Extremal Region Extractor ::
|
||||
// the optional mask marks the area where MSERs are searched for
|
||||
void operator()( const Mat& image, vector<vector<Point> >& msers, const Mat& mask ) const;
|
||||
};
|
||||
..
|
||||
|
||||
The class encapsulates all the parameters of MSER (see
|
||||
http://en.wikipedia.org/wiki/Maximally_stable_extremal_regions
|
||||
) extraction algorithm.
|
||||
http://en.wikipedia.org/wiki/Maximally_stable_extremal_regions) extraction algorithm.
|
||||
|
||||
.. index:: StarDetector
|
||||
|
||||
@@ -57,7 +55,7 @@ http://en.wikipedia.org/wiki/Maximally_stable_extremal_regions
|
||||
|
||||
StarDetector
|
||||
------------
|
||||
.. ctype:: StarDetector
|
||||
.. c:type:: StarDetector
|
||||
|
||||
Implements Star keypoint detector ::
|
||||
|
||||
@@ -86,7 +84,6 @@ Implements Star keypoint detector ::
|
||||
// finds keypoints in an image
|
||||
void operator()(const Mat& image, vector<KeyPoint>& keypoints) const;
|
||||
};
|
||||
..
|
||||
|
||||
The class implements a modified version of CenSurE keypoint detector described in
|
||||
Agrawal08
|
||||
@@ -97,7 +94,7 @@ Agrawal08
|
||||
|
||||
SIFT
|
||||
----
|
||||
.. ctype:: SIFT
|
||||
.. c:type:: SIFT
|
||||
|
||||
Class for extracting keypoints and computing descriptors using approach named Scale Invariant Feature Transform (SIFT). ::
|
||||
|
||||
@@ -179,7 +176,7 @@ Class for extracting keypoints and computing descriptors using approach named Sc
|
||||
protected:
|
||||
...
|
||||
};
|
||||
..
|
||||
|
||||
|
||||
.. index:: SURF
|
||||
|
||||
@@ -187,14 +184,14 @@ Class for extracting keypoints and computing descriptors using approach named Sc
|
||||
|
||||
SURF
|
||||
----
|
||||
.. ctype:: SURF
|
||||
.. c:type:: SURF
|
||||
|
||||
Class for extracting Speeded Up Robust Features from an image. ::
|
||||
|
||||
class SURF : public CvSURFParams
|
||||
{
|
||||
public:
|
||||
// default constructor
|
||||
// c:function::default constructor
|
||||
SURF();
|
||||
// constructor that initializes all the algorithm parameters
|
||||
SURF(double _hessianThreshold, int _nOctaves=4,
|
||||
@@ -213,11 +210,8 @@ Class for extracting Speeded Up Robust Features from an image. ::
|
||||
vector<float>& descriptors,
|
||||
bool useProvidedKeypoints=false) const;
|
||||
};
|
||||
..
|
||||
|
||||
The class ``SURF`` implements Speeded Up Robust Features descriptor
|
||||
Bay06
|
||||
.
|
||||
The class ``SURF`` implements Speeded Up Robust Features descriptor Bay06.
|
||||
There is fast multi-scale Hessian keypoint detector that can be used to find the keypoints
|
||||
(which is the default option), but the descriptors can be also computed for the user-specified keypoints.
|
||||
The function can be used for object tracking and localization, image stitching etc. See the ``find_obj.cpp`` demo in OpenCV samples directory.
|
||||
@@ -228,7 +222,7 @@ The function can be used for object tracking and localization, image stitching e
|
||||
|
||||
RandomizedTree
|
||||
--------------
|
||||
.. ctype:: RandomizedTree
|
||||
.. c:type:: RandomizedTree
|
||||
|
||||
The class contains base structure for ``RTreeClassifier`` ::
|
||||
|
||||
@@ -241,10 +235,10 @@ The class contains base structure for ``RTreeClassifier`` ::
|
||||
~RandomizedTree();
|
||||
|
||||
void train(std::vector<BaseKeypoint> const& base_set,
|
||||
cv::RNG &rng, int depth, int views,
|
||||
RNG &rng, int depth, int views,
|
||||
size_t reduced_num_dim, int num_quant_bits);
|
||||
void train(std::vector<BaseKeypoint> const& base_set,
|
||||
cv::RNG &rng, PatchGenerator &make_patch, int depth,
|
||||
RNG &rng, PatchGenerator &make_patch, int depth,
|
||||
int views, size_t reduced_num_dim, int num_quant_bits);
|
||||
|
||||
// following two funcs are EXPERIMENTAL
|
||||
@@ -281,11 +275,11 @@ The class contains base structure for ``RTreeClassifier`` ::
|
||||
uchar **posteriors2_; // 16-bytes aligned posteriors
|
||||
std::vector<int> leaf_counts_;
|
||||
|
||||
void createNodes(int num_nodes, cv::RNG &rng);
|
||||
void createNodes(int num_nodes, RNG &rng);
|
||||
void allocPosteriorsAligned(int num_leaves, int num_classes);
|
||||
void freePosteriors(int which);
|
||||
// which: 1=posteriors_, 2=posteriors2_, 3=both
|
||||
void init(int classes, int depth, cv::RNG &rng);
|
||||
void init(int classes, int depth, RNG &rng);
|
||||
void addExample(int class_id, uchar* patch_data);
|
||||
void finalize(size_t reduced_num_dim, int num_quant_bits);
|
||||
int getIndex(uchar* patch_data) const;
|
||||
@@ -297,19 +291,18 @@ The class contains base structure for ``RTreeClassifier`` ::
|
||||
void compressLeaves(size_t reduced_num_dim);
|
||||
void estimateQuantPercForPosteriors(float perc[2]);
|
||||
};
|
||||
..
|
||||
|
||||
.. index:: RandomizedTree::train
|
||||
|
||||
cv::RandomizedTree::train
|
||||
RandomizedTree::train
|
||||
-------------------------
|
||||
.. cfunction:: void train(std::vector<BaseKeypoint> const\& base_set, cv::RNG \&rng, PatchGenerator \&make_patch, int depth, int views, size_t reduced_num_dim, int num_quant_bits)
|
||||
.. c:function:: void train(std::vector<BaseKeypoint> const& base_set, RNG& rng, PatchGenerator& make_patch, int depth, int views, size_t reduced_num_dim, int num_quant_bits)
|
||||
|
||||
Trains a randomized tree using input set of keypoints
|
||||
|
||||
.. cfunction:: void train(std::vector<BaseKeypoint> const\& base_set, cv::RNG \&rng, PatchGenerator \&make_patch, int depth, int views, size_t reduced_num_dim, int num_quant_bits)
|
||||
.. c:function:: void train(std::vector<BaseKeypoint> const& base_set, RNG& rng, PatchGenerator& make_patch, int depth, int views, size_t reduced_num_dim, int num_quant_bits)
|
||||
|
||||
{Vector of ``BaseKeypoint`` type. Contains keypoints from the image are used for training}
|
||||
{Vector of ``BaseKeypoint`` type. Contains keypoints from the image are used for training}
|
||||
{Random numbers generator is used for training}
|
||||
{Patch generator is used for training}
|
||||
{Maximum tree depth}
|
||||
@@ -319,13 +312,13 @@ cv::RandomizedTree::train
|
||||
|
||||
.. index:: RandomizedTree::read
|
||||
|
||||
cv::RandomizedTree::read
|
||||
RandomizedTree::read
|
||||
------------------------
|
||||
.. cfunction:: read(const char* file_name, int num_quant_bits)
|
||||
.. c:function:: read(const char* file_name, int num_quant_bits)
|
||||
|
||||
Reads pre-saved randomized tree from file or stream
|
||||
|
||||
.. cfunction:: read(std::istream \&is, int num_quant_bits)
|
||||
.. c:function:: read(std::istream \&is, int num_quant_bits)
|
||||
|
||||
:param file_name: Filename of file contains randomized tree data
|
||||
|
||||
@@ -335,13 +328,13 @@ cv::RandomizedTree::read
|
||||
|
||||
.. index:: RandomizedTree::write
|
||||
|
||||
cv::RandomizedTree::write
|
||||
RandomizedTree::write
|
||||
-------------------------
|
||||
.. cfunction:: void write(const char* file_name) const
|
||||
.. c:function:: void write(const char* file_name) const
|
||||
|
||||
Writes current randomized tree to a file or stream
|
||||
|
||||
.. cfunction:: void write(std::ostream \&os) const
|
||||
.. c:function:: void write(std::ostream \&os) const
|
||||
|
||||
:param file_name: Filename of file where randomized tree data will be stored
|
||||
|
||||
@@ -349,9 +342,9 @@ cv::RandomizedTree::write
|
||||
|
||||
.. index:: RandomizedTree::applyQuantization
|
||||
|
||||
cv::RandomizedTree::applyQuantization
|
||||
RandomizedTree::applyQuantization
|
||||
-------------------------------------
|
||||
.. cfunction:: void applyQuantization(int num_quant_bits)
|
||||
.. c:function:: void applyQuantization(int num_quant_bits)
|
||||
|
||||
Applies quantization to the current randomized tree
|
||||
|
||||
@@ -363,7 +356,7 @@ cv::RandomizedTree::applyQuantization
|
||||
|
||||
RTreeNode
|
||||
---------
|
||||
.. ctype:: RTreeNode
|
||||
.. c:type:: RTreeNode
|
||||
|
||||
The class contains base structure for ``RandomizedTree`` ::
|
||||
|
||||
@@ -384,7 +377,6 @@ The class contains base structure for ``RandomizedTree`` ::
|
||||
return patch_data[offset1] > patch_data[offset2];
|
||||
}
|
||||
};
|
||||
..
|
||||
|
||||
.. index:: RTreeClassifier
|
||||
|
||||
@@ -392,7 +384,7 @@ The class contains base structure for ``RandomizedTree`` ::
|
||||
|
||||
RTreeClassifier
|
||||
---------------
|
||||
.. ctype:: RTreeClassifier
|
||||
.. c:type:: RTreeClassifier
|
||||
|
||||
The class contains ``RTreeClassifier`` . It represents calonder descriptor which was originally introduced by Michael Calonder ::
|
||||
|
||||
@@ -405,7 +397,7 @@ The class contains ``RTreeClassifier`` . It represents calonder descriptor which
|
||||
RTreeClassifier();
|
||||
|
||||
void train(std::vector<BaseKeypoint> const& base_set,
|
||||
cv::RNG &rng,
|
||||
RNG &rng,
|
||||
int num_trees = RTreeClassifier::DEFAULT_TREES,
|
||||
int depth = DEFAULT_DEPTH,
|
||||
int views = DEFAULT_VIEWS,
|
||||
@@ -413,7 +405,7 @@ The class contains ``RTreeClassifier`` . It represents calonder descriptor which
|
||||
int num_quant_bits = DEFAULT_NUM_QUANT_BITS,
|
||||
bool print_status = true);
|
||||
void train(std::vector<BaseKeypoint> const& base_set,
|
||||
cv::RNG &rng,
|
||||
RNG &rng,
|
||||
PatchGenerator &make_patch,
|
||||
int num_trees = RTreeClassifier::DEFAULT_TREES,
|
||||
int depth = DEFAULT_DEPTH,
|
||||
@@ -457,17 +449,16 @@ The class contains ``RTreeClassifier`` . It represents calonder descriptor which
|
||||
int original_num_classes_;
|
||||
bool keep_floats_;
|
||||
};
|
||||
..
|
||||
|
||||
.. index:: RTreeClassifier::train
|
||||
|
||||
cv::RTreeClassifier::train
|
||||
RTreeClassifier::train
|
||||
--------------------------
|
||||
.. cfunction:: void train(std::vector<BaseKeypoint> const\& base_set, cv::RNG \&rng, 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)
|
||||
.. c:function:: void train(vector<BaseKeypoint> const& base_set, RNG& rng, 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)
|
||||
|
||||
Trains a randomized tree classificator using input set of keypoints
|
||||
|
||||
.. cfunction:: void train(std::vector<BaseKeypoint> const\& base_set, cv::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)
|
||||
.. c:function:: void train(vector<BaseKeypoint> 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)
|
||||
|
||||
{Vector of ``BaseKeypoint`` type. Contains keypoints from the image are used for training}
|
||||
{Random numbers generator is used for training}
|
||||
@@ -481,34 +472,35 @@ cv::RTreeClassifier::train
|
||||
|
||||
.. index:: RTreeClassifier::getSignature
|
||||
|
||||
cv::RTreeClassifier::getSignature
|
||||
RTreeClassifier::getSignature
|
||||
---------------------------------
|
||||
.. cfunction:: void getSignature(IplImage *patch, uchar *sig)
|
||||
.. c:function:: void getSignature(IplImage *patch, uchar *sig)
|
||||
|
||||
Returns signature for image patch
|
||||
|
||||
.. cfunction:: void getSignature(IplImage *patch, float *sig)
|
||||
.. c:function:: void getSignature(IplImage *patch, float *sig)
|
||||
|
||||
{Image patch to calculate signature for}
|
||||
{Output signature (array dimension is ``reduced_num_dim)`` }
|
||||
|
||||
.. index:: RTreeClassifier::getSparseSignature
|
||||
|
||||
cv::RTreeClassifier::getSparseSignature
|
||||
--------------------------------------- ````
|
||||
.. cfunction:: void getSparseSignature(IplImage *patch, float *sig, float thresh)
|
||||
RTreeClassifier::getSparseSignature
|
||||
---------------------------------------
|
||||
|
||||
.. c:function:: void getSparseSignature(IplImage *patch, float *sig, float thresh)
|
||||
|
||||
The function is simular to getSignaturebut uses the threshold for removing all signature elements less than the threshold. So that the signature is compressed
|
||||
|
||||
{Image patch to calculate signature for}
|
||||
{Output signature (array dimension is ``reduced_num_dim)`` }
|
||||
{Output signature (array dimension is ``reduced_num_dim)``}
|
||||
{The threshold that is used for compressing the signature}
|
||||
|
||||
.. index:: RTreeClassifier::countNonZeroElements
|
||||
|
||||
cv::RTreeClassifier::countNonZeroElements
|
||||
RTreeClassifier::countNonZeroElements
|
||||
-----------------------------------------
|
||||
.. cfunction:: static int countNonZeroElements(float *vec, int n, double tol=1e-10)
|
||||
.. c:function:: static int countNonZeroElements(float *vec, int n, double tol=1e-10)
|
||||
|
||||
The function returns the number of non-zero elements in the input array.
|
||||
|
||||
@@ -520,13 +512,13 @@ cv::RTreeClassifier::countNonZeroElements
|
||||
|
||||
.. index:: RTreeClassifier::read
|
||||
|
||||
cv::RTreeClassifier::read
|
||||
RTreeClassifier::read
|
||||
-------------------------
|
||||
.. cfunction:: read(const char* file_name)
|
||||
.. c:function:: read(const char* file_name)
|
||||
|
||||
Reads pre-saved RTreeClassifier from file or stream
|
||||
|
||||
.. cfunction:: read(std::istream \&is)
|
||||
.. c:function:: read(std::istream& is)
|
||||
|
||||
:param file_name: Filename of file contains randomized tree data
|
||||
|
||||
@@ -534,13 +526,13 @@ cv::RTreeClassifier::read
|
||||
|
||||
.. index:: RTreeClassifier::write
|
||||
|
||||
cv::RTreeClassifier::write
|
||||
RTreeClassifier::write
|
||||
--------------------------
|
||||
.. cfunction:: void write(const char* file_name) const
|
||||
.. c:function:: void write(const char* file_name) const
|
||||
|
||||
Writes current RTreeClassifier to a file or stream
|
||||
|
||||
.. cfunction:: void write(std::ostream \&os) const
|
||||
.. c:function:: void write(std::ostream \&os) const
|
||||
|
||||
:param file_name: Filename of file where randomized tree data will be stored
|
||||
|
||||
@@ -548,9 +540,9 @@ cv::RTreeClassifier::write
|
||||
|
||||
.. index:: RTreeClassifier::setQuantization
|
||||
|
||||
cv::RTreeClassifier::setQuantization
|
||||
RTreeClassifier::setQuantization
|
||||
------------------------------------
|
||||
.. cfunction:: void setQuantization(int num_quant_bits)
|
||||
.. c:function:: void setQuantization(int num_quant_bits)
|
||||
|
||||
Applies quantization to the current randomized tree
|
||||
|
||||
@@ -569,26 +561,26 @@ Below there is an example of ``RTreeClassifier`` usage for feature matching. The
|
||||
cvExtractSURF( train_image, 0, &objectKeypoints, &objectDescriptors,
|
||||
storage, params );
|
||||
|
||||
cv::RTreeClassifier detector;
|
||||
int patch_width = cv::PATCH_SIZE;
|
||||
iint patch_height = cv::PATCH_SIZE;
|
||||
vector<cv::BaseKeypoint> base_set;
|
||||
RTreeClassifier detector;
|
||||
int patch_width = PATCH_SIZE;
|
||||
iint patch_height = PATCH_SIZE;
|
||||
vector<BaseKeypoint> base_set;
|
||||
int i=0;
|
||||
CvSURFPoint* point;
|
||||
for (i=0;i<(n_points > 0 ? n_points : objectKeypoints->total);i++)
|
||||
{
|
||||
point=(CvSURFPoint*)cvGetSeqElem(objectKeypoints,i);
|
||||
base_set.push_back(
|
||||
cv::BaseKeypoint(point->pt.x,point->pt.y,train_image));
|
||||
BaseKeypoint(point->pt.x,point->pt.y,train_image));
|
||||
}
|
||||
|
||||
//Detector training
|
||||
cv::RNG rng( cvGetTickCount() );
|
||||
cv::PatchGenerator gen(0,255,2,false,0.7,1.3,-CV_PI/3,CV_PI/3,
|
||||
RNG rng( cvGetTickCount() );
|
||||
PatchGenerator gen(0,255,2,false,0.7,1.3,-CV_PI/3,CV_PI/3,
|
||||
-CV_PI/3,CV_PI/3);
|
||||
|
||||
printf("RTree Classifier training...n");
|
||||
detector.train(base_set,rng,gen,24,cv::DEFAULT_DEPTH,2000,
|
||||
detector.train(base_set,rng,gen,24,DEFAULT_DEPTH,2000,
|
||||
(int)base_set.size(), detector.DEFAULT_NUM_QUANT_BITS);
|
||||
printf("Donen");
|
||||
|
||||
@@ -643,5 +635,5 @@ Below there is an example of ``RTreeClassifier`` usage for feature matching. The
|
||||
}
|
||||
cvResetImageROI(test_image);
|
||||
}
|
||||
..
|
||||
|
||||
..
|
||||
|
||||
@@ -12,7 +12,7 @@ are described in this section.
|
||||
|
||||
BOWTrainer
|
||||
----------
|
||||
.. ctype:: BOWTrainer
|
||||
.. c:type:: BOWTrainer
|
||||
|
||||
Abstract base class for training ''bag of visual words'' vocabulary from a set of descriptors.
|
||||
See e.g. ''Visual Categorization with Bags of Keypoints'' of Gabriella Csurka, Christopher R. Dance,
|
||||
@@ -40,9 +40,9 @@ Lixin Fan, Jutta Willamowski, Cedric Bray, 2004. ::
|
||||
|
||||
.. index:: BOWTrainer::add
|
||||
|
||||
cv::BOWTrainer::add
|
||||
BOWTrainer::add
|
||||
------------------- ````
|
||||
.. cfunction:: void BOWTrainer::add( const Mat\& descriptors )
|
||||
.. c:function:: void BOWTrainer::add( const Mat\& descriptors )
|
||||
|
||||
Add descriptors to training set. The training set will be clustered using clustermethod to construct vocabulary.
|
||||
|
||||
@@ -50,31 +50,31 @@ cv::BOWTrainer::add
|
||||
|
||||
.. index:: BOWTrainer::getDescriptors
|
||||
|
||||
cv::BOWTrainer::getDescriptors
|
||||
BOWTrainer::getDescriptors
|
||||
------------------------------
|
||||
.. cfunction:: const vector<Mat>\& BOWTrainer::getDescriptors() const
|
||||
.. c:function:: const vector<Mat>\& BOWTrainer::getDescriptors() const
|
||||
|
||||
Returns training set of descriptors.
|
||||
|
||||
.. index:: BOWTrainer::descripotorsCount
|
||||
|
||||
cv::BOWTrainer::descripotorsCount
|
||||
BOWTrainer::descripotorsCount
|
||||
---------------------------------
|
||||
.. cfunction:: const vector<Mat>\& BOWTrainer::descripotorsCount() const
|
||||
.. c:function:: const vector<Mat>\& BOWTrainer::descripotorsCount() const
|
||||
|
||||
Returns count of all descriptors stored in the training set.
|
||||
|
||||
.. index:: BOWTrainer::cluster
|
||||
|
||||
cv::BOWTrainer::cluster
|
||||
BOWTrainer::cluster
|
||||
-----------------------
|
||||
.. cfunction:: Mat BOWTrainer::cluster() const
|
||||
.. 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.
|
||||
|
||||
.. cfunction:: Mat BOWTrainer::cluster( const Mat\& descriptors ) const
|
||||
.. 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.
|
||||
@@ -85,7 +85,7 @@ clustered, in second variant -- input descriptors will be clustered.
|
||||
|
||||
BOWKMeansTrainer
|
||||
----------------
|
||||
.. ctype:: BOWKMeansTrainer
|
||||
.. c:type:: BOWKMeansTrainer
|
||||
|
||||
:func:`kmeans` based class to train visual vocabulary using the ''bag of visual words'' approach. ::
|
||||
|
||||
@@ -115,7 +115,7 @@ arguments.
|
||||
|
||||
BOWImgDescriptorExtractor
|
||||
-------------------------
|
||||
.. ctype:: BOWImgDescriptorExtractor
|
||||
.. c:type:: BOWImgDescriptorExtractor
|
||||
|
||||
Class to compute image descriptor using ''bad of visual words''. In few,
|
||||
such computing consists from the following steps:
|
||||
@@ -149,9 +149,9 @@ Class to compute image descriptor using ''bad of visual words''. In few,
|
||||
|
||||
.. index:: BOWImgDescriptorExtractor::BOWImgDescriptorExtractor
|
||||
|
||||
cv::BOWImgDescriptorExtractor::BOWImgDescriptorExtractor
|
||||
BOWImgDescriptorExtractor::BOWImgDescriptorExtractor
|
||||
--------------------------------------------------------
|
||||
.. cfunction:: BOWImgDescriptorExtractor::BOWImgDescriptorExtractor( const Ptr<DescriptorExtractor>\& dextractor, const Ptr<DescriptorMatcher>\& dmatcher )
|
||||
.. c:function:: BOWImgDescriptorExtractor::BOWImgDescriptorExtractor( const Ptr<DescriptorExtractor>\& dextractor, const Ptr<DescriptorMatcher>\& dmatcher )
|
||||
|
||||
Constructor.
|
||||
|
||||
@@ -163,9 +163,9 @@ cv::BOWImgDescriptorExtractor::BOWImgDescriptorExtractor
|
||||
|
||||
.. index:: BOWImgDescriptorExtractor::setVocabulary
|
||||
|
||||
cv::BOWImgDescriptorExtractor::setVocabulary
|
||||
BOWImgDescriptorExtractor::setVocabulary
|
||||
--------------------------------------------
|
||||
.. cfunction:: void BOWImgDescriptorExtractor::setVocabulary( const Mat\& vocabulary )
|
||||
.. c:function:: void BOWImgDescriptorExtractor::setVocabulary( const Mat\& vocabulary )
|
||||
|
||||
Method to set visual vocabulary.
|
||||
|
||||
@@ -174,17 +174,17 @@ cv::BOWImgDescriptorExtractor::setVocabulary
|
||||
|
||||
.. index:: BOWImgDescriptorExtractor::getVocabulary
|
||||
|
||||
cv::BOWImgDescriptorExtractor::getVocabulary
|
||||
BOWImgDescriptorExtractor::getVocabulary
|
||||
--------------------------------------------
|
||||
.. cfunction:: const Mat\& BOWImgDescriptorExtractor::getVocabulary() const
|
||||
.. c:function:: const Mat\& BOWImgDescriptorExtractor::getVocabulary() const
|
||||
|
||||
Returns set vocabulary.
|
||||
|
||||
.. index:: BOWImgDescriptorExtractor::compute
|
||||
|
||||
cv::BOWImgDescriptorExtractor::compute
|
||||
BOWImgDescriptorExtractor::compute
|
||||
--------------------------------------
|
||||
.. cfunction:: void BOWImgDescriptorExtractor::compute( const Mat\& image, vector<KeyPoint>\& keypoints, Mat\& imgDescriptor, vector<vector<int> >* pointIdxsOfClusters=0, Mat* descriptors=0 )
|
||||
.. c:function:: void BOWImgDescriptorExtractor::compute( const Mat\& image, vector<KeyPoint>\& keypoints, Mat\& imgDescriptor, vector<vector<int> >* pointIdxsOfClusters=0, Mat* descriptors=0 )
|
||||
|
||||
Compute image descriptor using set visual vocabulary.
|
||||
|
||||
@@ -201,17 +201,17 @@ cv::BOWImgDescriptorExtractor::compute
|
||||
|
||||
.. index:: BOWImgDescriptorExtractor::descriptorSize
|
||||
|
||||
cv::BOWImgDescriptorExtractor::descriptorSize
|
||||
BOWImgDescriptorExtractor::descriptorSize
|
||||
---------------------------------------------
|
||||
.. cfunction:: int BOWImgDescriptorExtractor::descriptorSize() const
|
||||
.. c:function:: int BOWImgDescriptorExtractor::descriptorSize() const
|
||||
|
||||
Returns image discriptor size, if vocabulary was set, and 0 otherwise.
|
||||
|
||||
.. index:: BOWImgDescriptorExtractor::descriptorType
|
||||
|
||||
cv::BOWImgDescriptorExtractor::descriptorType
|
||||
BOWImgDescriptorExtractor::descriptorType
|
||||
---------------------------------------------
|
||||
.. cfunction:: int BOWImgDescriptorExtractor::descriptorType() const
|
||||
.. c:function:: int BOWImgDescriptorExtractor::descriptorType() const
|
||||
|
||||
Returns image descriptor type.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user