started work on API & doc synchronization (in particular, Mat& => Input/OutputArray in the descriptions)

This commit is contained in:
Vadim Pisarevsky
2011-06-07 22:51:31 +00:00
parent 927b5c88ea
commit c7a42e9682
52 changed files with 1782 additions and 2048 deletions

View File

@@ -51,7 +51,7 @@ descriptors is represented as
DescriptorExtractor::compute
--------------------------------
.. c:function:: void DescriptorExtractor::compute( const Mat\& image, vector<KeyPoint>\& keypoints, Mat\& descriptors ) const
.. cpp:function:: void DescriptorExtractor::compute( const Mat& image, vector<KeyPoint>& keypoints, Mat& descriptors ) const
Computes the descriptors for a set of keypoints detected in an image (first variant) or image set (second variant).
@@ -61,7 +61,7 @@ DescriptorExtractor::compute
:param descriptors: Descriptors. Row i is the descriptor for keypoint i.
.. c:function:: void DescriptorExtractor::compute( const vector<Mat>\& images, vector<vector<KeyPoint> >\& keypoints, vector<Mat>\& descriptors ) const
.. cpp:function:: void DescriptorExtractor::compute( const vector<Mat>& images, vector<vector<KeyPoint> >& keypoints, vector<Mat>& descriptors ) const
:param images: Image set.
@@ -75,7 +75,7 @@ DescriptorExtractor::compute
DescriptorExtractor::read
-----------------------------
.. c:function:: void DescriptorExtractor::read( const FileNode\& fn )
.. cpp:function:: void DescriptorExtractor::read( const FileNode& fn )
Reads the object of a descriptor extractor from a file node.
@@ -85,7 +85,7 @@ DescriptorExtractor::read
DescriptorExtractor::write
------------------------------
.. c:function:: void DescriptorExtractor::write( FileStorage\& fs ) const
.. cpp:function:: void DescriptorExtractor::write( FileStorage& fs ) const
Writes the object of a descriptor extractor to a file storage.
@@ -95,7 +95,7 @@ DescriptorExtractor::write
DescriptorExtractor::create
-------------------------------
.. c:function:: Ptr<DescriptorExtractor> DescriptorExtractor::create( const string& descriptorExtractorType )
.. cpp:function:: Ptr<DescriptorExtractor> DescriptorExtractor::create( const string& descriptorExtractorType )
Creates a descriptor extractor by name.

View File

@@ -7,7 +7,7 @@ Feature Detection and Description
FAST
--------
.. c:function:: void FAST( const Mat& image, vector<KeyPoint>& keypoints, int threshold, bool nonmaxSupression=true )
.. cpp:function:: void FAST( const Mat& image, vector<KeyPoint>& keypoints, int threshold, bool nonmaxSupression=true )
Detects corners using the FAST algorithm by E. Rosten (*Machine learning for high-speed corner detection*, 2006).
@@ -355,11 +355,11 @@ Class containing a base structure for ``RTreeClassifier`` ::
RandomizedTree::train
-------------------------
.. 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)
.. cpp: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 an input set of keypoints.
.. 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)
.. cpp: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)
:param base_set: Vector of the ``BaseKeypoint`` type. It contains image keypoints used for training.
@@ -379,9 +379,9 @@ RandomizedTree::train
RandomizedTree::read
------------------------
.. c:function:: read(const char* file_name, int num_quant_bits)
.. cpp:function:: read(const char* file_name, int num_quant_bits)
.. c:function:: read(std::istream &is, int num_quant_bits)
.. cpp:function:: read(std::istream &is, int num_quant_bits)
Reads a pre-saved randomized tree from a file or stream.
@@ -395,11 +395,11 @@ RandomizedTree::read
RandomizedTree::write
-------------------------
.. c:function:: void write(const char* file_name) const
.. cpp:function:: void write(const char* file_name) const
Writes the current randomized tree to a file or stream.
.. c:function:: void write(std::ostream \&os) const
.. cpp:function:: void write(std::ostream \&os) const
:param file_name: Name of the file where randomized tree data is stored.
@@ -409,7 +409,7 @@ RandomizedTree::write
RandomizedTree::applyQuantization
-------------------------------------
.. c:function:: void applyQuantization(int num_quant_bits)
.. cpp:function:: void applyQuantization(int num_quant_bits)
Applies quantization to the current randomized tree.
@@ -519,11 +519,11 @@ Class containing ``RTreeClassifier``. It represents the Calonder descriptor that
RTreeClassifier::train
--------------------------
.. 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)
.. cpp: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 classifier using an input set of keypoints.
.. 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)
.. cpp: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)
:param base_set: Vector of the ``BaseKeypoint`` type. It contains image keypoints used for training.
@@ -547,11 +547,11 @@ RTreeClassifier::train
RTreeClassifier::getSignature
---------------------------------
.. c:function:: void getSignature(IplImage *patch, uchar *sig)
.. cpp:function:: void getSignature(IplImage *patch, uchar *sig)
Returns a signature for an image patch.
.. c:function:: void getSignature(IplImage *patch, float *sig)
.. cpp:function:: void getSignature(IplImage *patch, float *sig)
:param patch: Image patch to calculate the signature for.
:param sig: Output signature (array dimension is ``reduced_num_dim)`` .
@@ -561,7 +561,7 @@ RTreeClassifier::getSignature
RTreeClassifier::getSparseSignature
---------------------------------------
.. c:function:: void getSparseSignature(IplImage *patch, float *sig, float thresh)
.. cpp:function:: void getSparseSignature(IplImage *patch, float *sig, float thresh)
Returns a signature for an image patch similarly to ``getSignature`` but uses a threshold for removing all signature elements below the threshold so that the signature is compressed.
@@ -575,7 +575,7 @@ RTreeClassifier::getSparseSignature
RTreeClassifier::countNonZeroElements
-----------------------------------------
.. c:function:: static int countNonZeroElements(float *vec, int n, double tol=1e-10)
.. cpp:function:: static int countNonZeroElements(float *vec, int n, double tol=1e-10)
Returns the number of non-zero elements in an input array.
@@ -589,11 +589,11 @@ RTreeClassifier::countNonZeroElements
RTreeClassifier::read
-------------------------
.. c:function:: read(const char* file_name)
.. cpp:function:: read(const char* file_name)
Reads a pre-saved ``RTreeClassifier`` from a file or stream.
.. c:function:: read(std::istream& is)
.. cpp:function:: read(std::istream& is)
:param file_name: Name of the file that contains randomized tree data.
@@ -603,11 +603,11 @@ RTreeClassifier::read
RTreeClassifier::write
--------------------------
.. c:function:: void write(const char* file_name) const
.. cpp:function:: void write(const char* file_name) const
Writes the current ``RTreeClassifier`` to a file or stream.
.. c:function:: void write(std::ostream &os) const
.. cpp:function:: void write(std::ostream &os) const
:param file_name: Name of the file where randomized tree data is stored.
@@ -617,7 +617,7 @@ RTreeClassifier::write
RTreeClassifier::setQuantization
------------------------------------
.. c:function:: void setQuantization(int num_quant_bits)
.. cpp:function:: void setQuantization(int num_quant_bits)
Applies quantization to the current randomized tree.

View File

@@ -41,7 +41,7 @@ Lixin Fan, Jutta Willamowski, Cedric Bray, 2004. ::
BOWTrainer::add
-------------------
.. c:function:: void BOWTrainer::add( const Mat& descriptors )
.. cpp:function:: void BOWTrainer::add( const Mat& descriptors )
Adds descriptors to a training set. The training set is clustered using ``clustermethod`` to construct the vocabulary.
@@ -51,7 +51,7 @@ BOWTrainer::add
BOWTrainer::getDescriptors
------------------------------
.. c:function:: const vector<Mat>& BOWTrainer::getDescriptors() const
.. cpp:function:: const vector<Mat>& BOWTrainer::getDescriptors() const
Returns a training set of descriptors.
@@ -59,7 +59,7 @@ BOWTrainer::getDescriptors
BOWTrainer::descripotorsCount
---------------------------------
.. c:function:: const vector<Mat>& BOWTrainer::descripotorsCount() const
.. cpp:function:: const vector<Mat>& BOWTrainer::descripotorsCount() const
Returns the count of all descriptors stored in the training set.
@@ -67,11 +67,11 @@ BOWTrainer::descripotorsCount
BOWTrainer::cluster
-----------------------
.. c:function:: Mat BOWTrainer::cluster() const
.. cpp:function:: Mat BOWTrainer::cluster() const
Clusters train descriptors. The vocabulary consists of cluster centers. So, this method returns the vocabulary. In the first variant of the method, train descriptors stored in the object are clustered. In the second variant, input descriptors are clustered.
.. c:function:: Mat BOWTrainer::cluster( const Mat& descriptors ) const
.. cpp:function:: Mat BOWTrainer::cluster( const Mat& descriptors ) const
:param descriptors: Descriptors to cluster. Each row of the ``descriptors`` matrix is a descriptor. Descriptors are not added to the inner train descriptor set.
@@ -146,7 +146,7 @@ Here is the class declaration ::
BOWImgDescriptorExtractor::BOWImgDescriptorExtractor
--------------------------------------------------------
.. c:function:: BOWImgDescriptorExtractor::BOWImgDescriptorExtractor( const Ptr<DescriptorExtractor>& dextractor, const Ptr<DescriptorMatcher>& dmatcher )
.. cpp:function:: BOWImgDescriptorExtractor::BOWImgDescriptorExtractor( const Ptr<DescriptorExtractor>& dextractor, const Ptr<DescriptorMatcher>& dmatcher )
The class constructor.
@@ -158,7 +158,7 @@ BOWImgDescriptorExtractor::BOWImgDescriptorExtractor
BOWImgDescriptorExtractor::setVocabulary
--------------------------------------------
.. c:function:: void BOWImgDescriptorExtractor::setVocabulary( const Mat& vocabulary )
.. cpp:function:: void BOWImgDescriptorExtractor::setVocabulary( const Mat& vocabulary )
Sets a visual vocabulary.
@@ -168,7 +168,7 @@ BOWImgDescriptorExtractor::setVocabulary
BOWImgDescriptorExtractor::getVocabulary
--------------------------------------------
.. c:function:: const Mat& BOWImgDescriptorExtractor::getVocabulary() const
.. cpp:function:: const Mat& BOWImgDescriptorExtractor::getVocabulary() const
Returns the set vocabulary.
@@ -176,7 +176,7 @@ BOWImgDescriptorExtractor::getVocabulary
BOWImgDescriptorExtractor::compute
--------------------------------------
.. c:function:: void BOWImgDescriptorExtractor::compute( const Mat& image, vector<KeyPoint>& keypoints, Mat& imgDescriptor, vector<vector<int> >* pointIdxsOfClusters=0, Mat* descriptors=0 )
.. cpp:function:: void BOWImgDescriptorExtractor::compute( const Mat& image, vector<KeyPoint>& keypoints, Mat& imgDescriptor, vector<vector<int> >* pointIdxsOfClusters=0, Mat* descriptors=0 )
Computes an image descriptor using the set visual vocabulary.
@@ -194,7 +194,7 @@ BOWImgDescriptorExtractor::compute
BOWImgDescriptorExtractor::descriptorSize
---------------------------------------------
.. c:function:: int BOWImgDescriptorExtractor::descriptorSize() const
.. cpp:function:: int BOWImgDescriptorExtractor::descriptorSize() const
Returns an image discriptor size if the vocabulary is set. Otherwise, it returns 0.
@@ -202,7 +202,7 @@ BOWImgDescriptorExtractor::descriptorSize
BOWImgDescriptorExtractor::descriptorType
---------------------------------------------
.. c:function:: int BOWImgDescriptorExtractor::descriptorType() const
.. cpp:function:: int BOWImgDescriptorExtractor::descriptorType() const
Returns an image descriptor type.