提交 4bb893aa 编写于 作者: V Vadim Pisarevsky

the first round of cleaning up the RST docs

上级 eb8c0b8b
......@@ -5,9 +5,9 @@ Clustering
.. index:: kmeans
cv::kmeans
kmeans
----------
.. cfunction:: double kmeans( const Mat\& samples, int clusterCount, Mat\& labels, TermCriteria termcrit, int attempts, int flags, Mat* centers )
.. c:function:: double kmeans( const Mat\& samples, int clusterCount, Mat\& labels, TermCriteria termcrit, int attempts, int flags, Mat* centers )
Finds the centers of clusters and groups the input samples around the clusters.
......@@ -53,11 +53,11 @@ attempts to 1, initialize labels each time using some custom algorithm and pass
.. index:: partition
cv::partition
partition
-------------
.. cfunction:: template<typename _Tp, class _EqPredicate> int
.. c:function:: template<typename _Tp, class _EqPredicate> int
.. cfunction:: partition( const vector<_Tp>\& vec, vector<int>\& labels, _EqPredicate predicate=_EqPredicate())
.. c:function:: partition( const vector<_Tp>\& vec, vector<int>\& labels, _EqPredicate predicate=_EqPredicate())
Splits an element set into equivalency classes.
......
......@@ -31,9 +31,9 @@ Also, note that the functions do not support alpha-transparency - when the targe
.. index:: circle
cv::circle
circle
----------
.. cfunction:: void circle(Mat\& img, Point center, int radius, const Scalar\& color, int thickness=1, int lineType=8, int shift=0)
.. c:function:: void circle(Mat& img, Point center, int radius, const Scalar& color, int thickness=1, int lineType=8, int shift=0)
Draws a circle
......@@ -56,11 +56,11 @@ given center and radius.
.. index:: clipLine
cv::clipLine
clipLine
------------
.. cfunction:: bool clipLine(Size imgSize, Point\& pt1, Point\& pt2)
.. c:function:: bool clipLine(Size imgSize, Point& pt1, Point& pt2)
.. cfunction:: bool clipLine(Rect imgRect, Point\& pt1, Point\& pt2)
.. c:function:: bool clipLine(Rect imgRect, Point& pt1, Point& pt2)
Clips the line against the image rectangle
......@@ -76,11 +76,11 @@ They return ``false`` if the line segment is completely outside the rectangle an
.. index:: ellipse
cv::ellipse
ellipse
-----------
.. cfunction:: void ellipse(Mat\& img, Point center, Size axes, double angle, double startAngle, double endAngle, const Scalar\& color, int thickness=1, int lineType=8, int shift=0)
.. c:function:: void ellipse(Mat& img, Point center, Size axes, double angle, double startAngle, double endAngle, const Scalar& color, int thickness=1, int lineType=8, int shift=0)
.. cfunction:: void ellipse(Mat\& img, const RotatedRect\& box, const Scalar\& color, int thickness=1, int lineType=8)
.. c:function:: void ellipse(Mat& img, const RotatedRect& box, const Scalar& color, int thickness=1, int lineType=8)
Draws a simple or thick elliptic arc or an fills ellipse sector.
......@@ -120,9 +120,9 @@ Parameters of Elliptic Arc
.. index:: ellipse2Poly
cv::ellipse2Poly
ellipse2Poly
----------------
.. cfunction:: void ellipse2Poly( Point center, Size axes, int angle, int startAngle, int endAngle, int delta, vector<Point>\& pts )
.. c:function:: void ellipse2Poly( Point center, Size axes, int angle, int startAngle, int endAngle, int delta, vector<Point>& pts )
Approximates an elliptic arc with a polyline
......@@ -141,9 +141,9 @@ The function ``ellipse2Poly`` computes the vertices of a polyline that approxima
.. index:: fillConvexPoly
cv::fillConvexPoly
fillConvexPoly
------------------
.. cfunction:: void fillConvexPoly(Mat\& img, const Point* pts, int npts, const Scalar\& color, int lineType=8, int shift=0)
.. c:function:: void fillConvexPoly(Mat& img, const Point* pts, int npts, const Scalar& color, int lineType=8, int shift=0)
Fills a convex polygon.
......@@ -166,9 +166,9 @@ line) twice at the most (though, its top-most and/or the bottom edge could be ho
.. index:: fillPoly
cv::fillPoly
fillPoly
------------
.. cfunction:: void fillPoly(Mat\& img, const Point** pts, const int* npts, int ncontours, const Scalar\& color, int lineType=8, int shift=0, Point offset=Point() )
.. c:function:: void fillPoly(Mat& img, const Point** pts, const int* npts, int ncontours, const Scalar& color, int lineType=8, int shift=0, Point offset=Point() )
Fills the area bounded by one or more polygons
......@@ -192,9 +192,9 @@ areas with holes, contours with self-intersections (some of thier parts), and so
.. index:: getTextSize
cv::getTextSize
getTextSize
---------------
.. cfunction:: Size getTextSize(const string\& text, int fontFace, double fontScale, int thickness, int* baseLine)
.. c:function:: Size getTextSize(const string& text, int fontFace, double fontScale, int thickness, int* baseLine)
Calculates the width and height of a text string.
......@@ -234,13 +234,12 @@ That is, the following code will render some text, the tight box surrounding it
// then put the text itself
putText(img, text, textOrg, fontFace, fontScale,
Scalar::all(255), thickness, 8);
..
.. index:: line
cv::line
line
--------
.. cfunction:: void line(Mat\& img, Point pt1, Point pt2, const Scalar\& color, int thickness=1, int lineType=8, int shift=0)
.. c:function:: void line(Mat& img, Point pt1, Point pt2, const Scalar& color, int thickness=1, int lineType=8, int shift=0)
Draws a line segment connecting two points
......@@ -277,7 +276,7 @@ the line color, the user may use the macro ``CV_RGB(r, g, b)`` .
LineIterator
------------
.. ctype:: LineIterator
.. c:type:: LineIterator
Class for iterating pixels on a raster line ::
......@@ -304,7 +303,6 @@ Class for iterating pixels on a raster line ::
int minusDelta, plusDelta;
int minusStep, plusStep;
};
..
The class ``LineIterator`` is used to get each pixel of a raster line. It can be treated as versatile implementation of the Bresenham algorithm, where you can stop at each pixel and do some extra processing, for example, grab pixel values along the line, or draw a line with some effect (e.g. with XOR operation).
......@@ -317,13 +315,12 @@ The number of pixels along the line is store in ``LineIterator::count`` . ::
for(int i = 0; i < it.count; i++, ++it)
buf[i] = *(const Vec3b)*it;
..
.. index:: rectangle
cv::rectangle
rectangle
-------------
.. cfunction:: void rectangle(Mat\& img, Point pt1, Point pt2, const Scalar\& color, int thickness=1, int lineType=8, int shift=0)
.. c:function:: void rectangle(Mat& img, Point pt1, Point pt2, const Scalar& color, int thickness=1, int lineType=8, int shift=0)
Draws a simple, thick, or filled up-right rectangle.
......@@ -345,9 +342,9 @@ The function ``rectangle`` draws a rectangle outline or a filled rectangle, whic
.. index:: polylines
cv::polylines
polylines
-------------
.. cfunction:: void polylines(Mat\& img, const Point** pts, const int* npts, int ncontours, bool isClosed, const Scalar\& color, int thickness=1, int lineType=8, int shift=0 )
.. c:function:: void polylines(Mat& img, const Point** pts, const int* npts, int ncontours, bool isClosed, const Scalar& color, int thickness=1, int lineType=8, int shift=0 )
Draws several polygonal curves
......@@ -373,9 +370,9 @@ The function ``polylines`` draws one or more polygonal curves.
.. index:: putText
cv::putText
putText
-----------
.. cfunction:: void putText( Mat\& img, const string\& text, Point org, int fontFace, double fontScale, Scalar color, int thickness=1, int lineType=8, bool bottomLeftOrigin=false )
.. c:function:: void putText( Mat& img, const string& text, Point org, int fontFace, double fontScale, Scalar color, int thickness=1, int lineType=8, bool bottomLeftOrigin=false )
Draws a text string
......
......@@ -5,9 +5,9 @@ Utility and System Functions and Macros
.. index:: alignPtr
cv::alignPtr
alignPtr
------------
.. cfunction:: template<typename _Tp> _Tp* alignPtr(_Tp* ptr, int n=sizeof(_Tp))
.. c:function:: template<typename _Tp> _Tp* alignPtr(_Tp* ptr, int n=sizeof(_Tp))
Aligns pointer to the specified number of bytes
......@@ -23,9 +23,9 @@ The function returns the aligned pointer of the same type as the input pointer:
.. index:: alignSize
cv::alignSize
alignSize
-------------
.. cfunction:: size_t alignSize(size_t sz, int n)
.. c:function:: size_t alignSize(size_t sz, int n)
Aligns a buffer size to the specified number of bytes
......@@ -41,9 +41,9 @@ The function returns the minimum number that is greater or equal to ``sz`` and i
.. index:: allocate
cv::allocate
allocate
------------
.. cfunction:: template<typename _Tp> _Tp* allocate(size_t n)
.. c:function:: template<typename _Tp> _Tp* allocate(size_t n)
Allocates an array of elements
......@@ -53,9 +53,9 @@ The generic function ``allocate`` allocates buffer for the specified number of e
.. index:: deallocate
cv::deallocate
deallocate
--------------
.. cfunction:: template<typename _Tp> void deallocate(_Tp* ptr, size_t n)
.. c:function:: template<typename _Tp> void deallocate(_Tp* ptr, size_t n)
Allocates an array of elements
......@@ -73,7 +73,7 @@ The generic function ``deallocate`` deallocates the buffer allocated with
CV_Assert
---------
.. cfunction:: CV_Assert(expr)
.. c:function:: CV_Assert(expr)
Checks a condition at runtime. ::
......@@ -88,13 +88,13 @@ The macros ``CV_Assert`` and ``CV_DbgAssert`` evaluate the specified expression
.. index:: error
cv::error
error
---------
.. cfunction:: void error( const Exception\& exc )
.. c:function:: void error( const Exception\& exc )
.. cfunction:: \#define CV_Error( code, msg ) <...>
.. c:function:: \#define CV_Error( code, msg ) <...>
.. cfunction:: \#define CV_Error_( code, args ) <...>
.. c:function:: \#define CV_Error_( code, args ) <...>
Signals an error and raises the exception
......@@ -120,7 +120,7 @@ The macro ``CV_Error_`` can be used to construct the error message on-fly to inc
Exception
---------
.. ctype:: Exception
.. c:type:: Exception
The exception class passed to error ::
......@@ -152,9 +152,9 @@ The class ``Exception`` encapsulates all or almost all the necessary information
.. index:: fastMalloc
cv::fastMalloc
fastMalloc
--------------
.. cfunction:: void* fastMalloc(size_t size)
.. c:function:: void* fastMalloc(size_t size)
Allocates aligned memory buffer
......@@ -164,9 +164,9 @@ The function allocates buffer of the specified size and returns it. When the buf
.. index:: fastFree
cv::fastFree
fastFree
------------
.. cfunction:: void fastFree(void* ptr)
.. c:function:: void fastFree(void* ptr)
Deallocates memory buffer
......@@ -178,9 +178,9 @@ If NULL pointer is passed, the function does nothing.
.. index:: format
cv::format
format
----------
.. cfunction:: string format( const char* fmt, ... )
.. c:function:: string format( const char* fmt, ... )
Returns a text string formatted using printf-like expression
......@@ -191,9 +191,9 @@ The function acts like ``sprintf`` , but forms and returns STL string. It can be
.. index:: getNumThreads
cv::getNumThreads
getNumThreads
-----------------
.. cfunction:: int getNumThreads()
.. c:function:: int getNumThreads()
Returns the number of threads used by OpenCV
......@@ -204,9 +204,9 @@ See also:
.. index:: getThreadNum
cv::getThreadNum
getThreadNum
----------------
.. cfunction:: int getThreadNum()
.. c:function:: int getThreadNum()
Returns index of the currently executed thread
......@@ -217,9 +217,9 @@ See also:
.. index:: getTickCount
cv::getTickCount
getTickCount
----------------
.. cfunction:: int64 getTickCount()
.. c:function:: int64 getTickCount()
Returns the number of ticks
......@@ -229,9 +229,9 @@ It can be used to initialize
.. index:: getTickFrequency
cv::getTickFrequency
getTickFrequency
--------------------
.. cfunction:: double getTickFrequency()
.. c:function:: double getTickFrequency()
Returns the number of ticks per second
......@@ -245,9 +245,9 @@ That is, the following code computes the execution time in seconds. ::
.. index:: setNumThreads
cv::setNumThreads
setNumThreads
-----------------
.. cfunction:: void setNumThreads(int nthreads)
.. c:function:: void setNumThreads(int nthreads)
Sets the number of threads used by OpenCV
......
......@@ -9,7 +9,7 @@ XML/YAML Persistence
FileStorage
-----------
.. ctype:: FileStorage
.. c:type:: FileStorage
The XML/YAML file storage class ::
......@@ -73,7 +73,7 @@ The XML/YAML file storage class ::
FileNode
--------
.. ctype:: FileNode
.. c:type:: FileNode
The XML/YAML file node class ::
......@@ -124,7 +124,7 @@ The XML/YAML file node class ::
FileNodeIterator
----------------
.. ctype:: FileNodeIterator
.. c:type:: FileNodeIterator
The XML/YAML file node iterator class ::
......
......@@ -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.
......@@ -9,7 +9,7 @@ Camera Calibration and 3d Reconstruction
gpu::StereoBM_GPU
-----------------
.. ctype:: gpu::StereoBM_GPU
.. c:type:: gpu::StereoBM_GPU
The class for computing stereo correspondence using block matching algorithm. ::
......@@ -39,7 +39,7 @@ The class for computing stereo correspondence using block matching algorithm. ::
...
};
..
This class computes the disparity map using block matching algorithm. The class also performs pre- and post- filtering steps: sobel prefiltering (if PREFILTER_XSOBEL flag is set) and low textureness filtering (if averageTexThreshols
:math:`>` 0). If ``avergeTexThreshold = 0`` low textureness filtering is disabled, otherwise disparity is set to 0 in each point ``(x, y)`` where for left image
......@@ -51,9 +51,9 @@ This class computes the disparity map using block matching algorithm. The class
cv::gpu::StereoBM_GPU::StereoBM_GPU
-----------------------------------_
.. cfunction:: StereoBM_GPU::StereoBM_GPU()
.. c:function:: StereoBM_GPU::StereoBM_GPU()
.. cfunction:: StereoBM_GPU::StereoBM_GPU(int preset, int ndisparities = DEFAULT_NDISP, int winSize = DEFAULT_WINSZ)
.. c:function:: StereoBM_GPU::StereoBM_GPU(int preset, int ndisparities = DEFAULT_NDISP, int winSize = DEFAULT_WINSZ)
StereoBMGPU constructors.
......@@ -73,9 +73,9 @@ cv::gpu::StereoBM_GPU::StereoBM_GPU
cv::gpu::StereoBM_GPU::operator ()
----------------------------------
.. cfunction:: void StereoBM_GPU::operator() (const GpuMat\& left, const GpuMat\& right, GpuMat\& disparity)
.. c:function:: void StereoBM_GPU::operator() (const GpuMat\& left, const GpuMat\& right, GpuMat\& disparity)
.. cfunction:: void StereoBM_GPU::operator() (const GpuMat\& left, const GpuMat\& right, GpuMat\& disparity, const Stream\& stream)
.. c:function:: void StereoBM_GPU::operator() (const GpuMat\& left, const GpuMat\& right, GpuMat\& disparity, const Stream\& stream)
The stereo correspondence operator. Finds the disparity for the specified rectified stereo pair.
......@@ -93,7 +93,7 @@ cv::gpu::StereoBM_GPU::operator ()
cv::gpu::StereoBM_GPU::checkIfGpuCallReasonable
-----------------------------------------------
.. cfunction:: bool StereoBM_GPU::checkIfGpuCallReasonable()
.. c:function:: bool StereoBM_GPU::checkIfGpuCallReasonable()
Some heuristics that tries to estmate if the current GPU will be faster then CPU in this algorithm. It queries current active device.
......@@ -103,7 +103,7 @@ cv::gpu::StereoBM_GPU::checkIfGpuCallReasonable
gpu::StereoBeliefPropagation
----------------------------
.. ctype:: gpu::StereoBeliefPropagation
.. c:type:: gpu::StereoBeliefPropagation
The class for computing stereo correspondence using belief propagation algorithm. ::
......@@ -147,7 +147,7 @@ The class for computing stereo correspondence using belief propagation algorithm
...
};
..
The class implements Pedro F. Felzenszwalb algorithm
felzenszwalb_bp
......@@ -171,9 +171,9 @@ for data cost storage. ``width_step`` is the number of bytes in a line including
cv::gpu::StereoBeliefPropagation::StereoBeliefPropagation
---------------------------------------------------------
.. cfunction:: StereoBeliefPropagation::StereoBeliefPropagation( int ndisp = DEFAULT_NDISP, int iters = DEFAULT_ITERS, int levels = DEFAULT_LEVELS, int msg_type = CV_32F)
.. c:function:: StereoBeliefPropagation::StereoBeliefPropagation( int ndisp = DEFAULT_NDISP, int iters = DEFAULT_ITERS, int levels = DEFAULT_LEVELS, int msg_type = CV_32F)
.. cfunction:: StereoBeliefPropagation::StereoBeliefPropagation( int ndisp, int iters, int levels, float max_data_term, float data_weight, float max_disc_term, float disc_single_jump, int msg_type = CV_32F)
.. c:function:: StereoBeliefPropagation::StereoBeliefPropagation( int ndisp, int iters, int levels, float max_data_term, float data_weight, float max_disc_term, float disc_single_jump, int msg_type = CV_32F)
StereoBeliefPropagation constructors.
......@@ -216,7 +216,7 @@ By default ``StereoBeliefPropagation`` uses floating-point arithmetics and ``CV_
cv::gpu::StereoBeliefPropagation::estimateRecommendedParams
----------------------------------------------------------- ```` ```` ```` ```` ````
.. cfunction:: void StereoBeliefPropagation::estimateRecommendedParams( int width, int height, int\& ndisp, int\& iters, int\& levels)
.. c:function:: void StereoBeliefPropagation::estimateRecommendedParams( int width, int height, int\& ndisp, int\& iters, int\& levels)
Some heuristics that tries to compute recommended parameters (ndisp, itersand levels) for specified image size (widthand height).
......@@ -224,9 +224,9 @@ cv::gpu::StereoBeliefPropagation::estimateRecommendedParams
cv::gpu::StereoBeliefPropagation::operator ()
---------------------------------------------
.. cfunction:: void StereoBeliefPropagation::operator()( const GpuMat\& left, const GpuMat\& right, GpuMat\& disparity)
.. c:function:: void StereoBeliefPropagation::operator()( const GpuMat\& left, const GpuMat\& right, GpuMat\& disparity)
.. cfunction:: void StereoBeliefPropagation::operator()( const GpuMat\& left, const GpuMat\& right, GpuMat\& disparity, Stream\& stream)
.. c:function:: void StereoBeliefPropagation::operator()( const GpuMat\& left, const GpuMat\& right, GpuMat\& disparity, Stream\& stream)
The stereo correspondence operator. Finds the disparity for the specified rectified stereo pair or data cost.
......@@ -238,9 +238,9 @@ cv::gpu::StereoBeliefPropagation::operator ()
:param stream: Stream for the asynchronous version.
.. cfunction:: void StereoBeliefPropagation::operator()( const GpuMat\& data, GpuMat\& disparity)
.. c:function:: void StereoBeliefPropagation::operator()( const GpuMat\& data, GpuMat\& disparity)
.. cfunction:: void StereoBeliefPropagation::operator()( const GpuMat\& data, GpuMat\& disparity, Stream\& stream)
.. c:function:: void StereoBeliefPropagation::operator()( const GpuMat\& data, GpuMat\& disparity, Stream\& stream)
* **data** The user specified data cost. It must have ``msg_type`` type and :math:`\texttt{imgRows} \cdot \texttt{ndisp} \times \texttt{imgCols}` size.
......@@ -254,7 +254,7 @@ cv::gpu::StereoBeliefPropagation::operator ()
gpu::StereoConstantSpaceBP
--------------------------
.. ctype:: gpu::StereoConstantSpaceBP
.. c:type:: gpu::StereoConstantSpaceBP
The class for computing stereo correspondence using constant space belief propagation algorithm. ::
......@@ -305,7 +305,7 @@ The class for computing stereo correspondence using constant space belief propag
...
};
..
The class implements Q. Yang algorithm
qx_csbp
......@@ -315,9 +315,9 @@ qx_csbp
cv::gpu::StereoConstantSpaceBP::StereoConstantSpaceBP
-----------------------------------------------------
.. cfunction:: StereoConstantSpaceBP::StereoConstantSpaceBP(int ndisp = DEFAULT_NDISP, int iters = DEFAULT_ITERS, int levels = DEFAULT_LEVELS, int nr_plane = DEFAULT_NR_PLANE, int msg_type = CV_32F)
.. c:function:: StereoConstantSpaceBP::StereoConstantSpaceBP(int ndisp = DEFAULT_NDISP, int iters = DEFAULT_ITERS, int levels = DEFAULT_LEVELS, int nr_plane = DEFAULT_NR_PLANE, int msg_type = CV_32F)
.. cfunction:: StereoConstantSpaceBP::StereoConstantSpaceBP(int ndisp, int iters, int levels, int nr_plane, float max_data_term, float data_weight, float max_disc_term, float disc_single_jump, int min_disp_th = 0, int msg_type = CV_32F)
.. c:function:: StereoConstantSpaceBP::StereoConstantSpaceBP(int ndisp, int iters, int levels, int nr_plane, float max_data_term, float data_weight, float max_disc_term, float disc_single_jump, int min_disp_th = 0, int msg_type = CV_32F)
StereoConstantSpaceBP constructors.
......@@ -364,7 +364,7 @@ By default ``StereoConstantSpaceBP`` uses floating-point arithmetics and ``CV_32
cv::gpu::StereoConstantSpaceBP::estimateRecommendedParams
--------------------------------------------------------- ```` ```` ```` ``_`` ```` ````
.. cfunction:: void StereoConstantSpaceBP::estimateRecommendedParams( int width, int height, int\& ndisp, int\& iters, int\& levels, int\& nr_plane)
.. c:function:: void StereoConstantSpaceBP::estimateRecommendedParams( int width, int height, int\& ndisp, int\& iters, int\& levels, int\& nr_plane)
Some heuristics that tries to compute parameters (ndisp, iters, levelsand nrplane) for specified image size (widthand height).
......@@ -372,9 +372,9 @@ cv::gpu::StereoConstantSpaceBP::estimateRecommendedParams
cv::gpu::StereoConstantSpaceBP::operator ()
-------------------------------------------
.. cfunction:: void StereoConstantSpaceBP::operator()( const GpuMat\& left, const GpuMat\& right, GpuMat\& disparity)
.. c:function:: void StereoConstantSpaceBP::operator()( const GpuMat\& left, const GpuMat\& right, GpuMat\& disparity)
.. cfunction:: void StereoConstantSpaceBP::operator()( const GpuMat\& left, const GpuMat\& right, GpuMat\& disparity, Stream\& stream)
.. c:function:: void StereoConstantSpaceBP::operator()( const GpuMat\& left, const GpuMat\& right, GpuMat\& disparity, Stream\& stream)
The stereo correspondence operator. Finds the disparity for the specified rectified stereo pair.
......@@ -392,7 +392,7 @@ cv::gpu::StereoConstantSpaceBP::operator ()
gpu::DisparityBilateralFilter
-----------------------------
.. ctype:: gpu::DisparityBilateralFilter
.. c:type:: gpu::DisparityBilateralFilter
The class for disparity map refinement using joint bilateral filtering. ::
......@@ -417,7 +417,7 @@ The class for disparity map refinement using joint bilateral filtering. ::
...
};
..
The class implements Q. Yang algorithm
qx_csbp
......@@ -427,9 +427,9 @@ qx_csbp
cv::gpu::DisparityBilateralFilter::DisparityBilateralFilter
-----------------------------------------------------------
.. cfunction:: DisparityBilateralFilter::DisparityBilateralFilter( int ndisp = DEFAULT_NDISP, int radius = DEFAULT_RADIUS, int iters = DEFAULT_ITERS)
.. c:function:: DisparityBilateralFilter::DisparityBilateralFilter( int ndisp = DEFAULT_NDISP, int radius = DEFAULT_RADIUS, int iters = DEFAULT_ITERS)
.. cfunction:: DisparityBilateralFilter::DisparityBilateralFilter( int ndisp, int radius, int iters, float edge_threshold, float max_disc_threshold, float sigma_range)
.. c:function:: DisparityBilateralFilter::DisparityBilateralFilter( int ndisp, int radius, int iters, float edge_threshold, float max_disc_threshold, float sigma_range)
DisparityBilateralFilter constructors.
......@@ -449,9 +449,9 @@ cv::gpu::DisparityBilateralFilter::DisparityBilateralFilter
cv::gpu::DisparityBilateralFilter::operator ()
----------------------------------------------
.. cfunction:: void DisparityBilateralFilter::operator()( const GpuMat\& disparity, const GpuMat\& image, GpuMat\& dst)
.. c:function:: void DisparityBilateralFilter::operator()( const GpuMat\& disparity, const GpuMat\& image, GpuMat\& dst)
.. cfunction:: void DisparityBilateralFilter::operator()( const GpuMat\& disparity, const GpuMat\& image, GpuMat\& dst, Stream\& stream)
.. c:function:: void DisparityBilateralFilter::operator()( const GpuMat\& disparity, const GpuMat\& image, GpuMat\& dst, Stream\& stream)
Refines disparity map using joint bilateral filtering.
......@@ -467,9 +467,9 @@ cv::gpu::DisparityBilateralFilter::operator ()
cv::gpu::drawColorDisp
----------------------
.. cfunction:: void drawColorDisp(const GpuMat\& src_disp, GpuMat\& dst_disp, int ndisp)
.. c:function:: void drawColorDisp(const GpuMat\& src_disp, GpuMat\& dst_disp, int ndisp)
.. cfunction:: void drawColorDisp(const GpuMat\& src_disp, GpuMat\& dst_disp, int ndisp, const Stream\& stream)
.. c:function:: void drawColorDisp(const GpuMat\& src_disp, GpuMat\& dst_disp, int ndisp, const Stream\& stream)
Does coloring of disparity image.
......@@ -489,9 +489,9 @@ This function converts
cv::gpu::reprojectImageTo3D
---------------------------
.. cfunction:: void reprojectImageTo3D(const GpuMat\& disp, GpuMat\& xyzw, const Mat\& Q)
.. c:function:: void reprojectImageTo3D(const GpuMat\& disp, GpuMat\& xyzw, const Mat\& Q)
.. cfunction:: void reprojectImageTo3D(const GpuMat\& disp, GpuMat\& xyzw, const Mat\& Q, const Stream\& stream)
.. c:function:: void reprojectImageTo3D(const GpuMat\& disp, GpuMat\& xyzw, const Mat\& Q, const Stream\& stream)
Reprojects disparity image to 3D space.
......
此差异已折叠。
此差异已折叠。
*************************************
highgui. High-level GUI and Media I/O
*************************************
While OpenCV was designed for use in full-scale
applications and can be used within functionally rich UI frameworks (such as Qt, WinForms or Cocoa) or without any UI at all, sometimes there is a need to try some functionality quickly and visualize the results. This is what the HighGUI module has been designed for.
It provides easy interface to:
*
create and manipulate windows that can display images and "remember" their content (no need to handle repaint events from OS)
*
add trackbars to the windows, handle simple mouse events as well as keyboard commmands
*
read and write images to/from disk or memory.
*
read video from camera or file and write video to a file.
.. toctree::
:maxdepth: 2
highgui_user_interface
highgui_reading_and_writing_images_and_video
highgui_qt_new_functions
此差异已折叠。
此差异已折叠。
......@@ -5,9 +5,9 @@ Motion Analysis and Object Tracking
.. index:: accumulate
cv::accumulate
accumulate
--------------
.. cfunction:: void accumulate( const Mat\& src, Mat\& dst, const Mat\& mask=Mat() )
.. c:function:: void accumulate( const Mat\& src, Mat\& dst, const Mat\& mask=Mat() )
Adds image to the accumulator.
......@@ -31,9 +31,9 @@ See also:
:func:`accumulateSquare`,:func:`accumulateProduct`,:func:`accumulateWeighted`
.. index:: accumulateSquare
cv::accumulateSquare
accumulateSquare
--------------------
.. cfunction:: void accumulateSquare( const Mat\& src, Mat\& dst, const Mat\& mask=Mat() )
.. c:function:: void accumulateSquare( const Mat\& src, Mat\& dst, const Mat\& mask=Mat() )
Adds the square of the source image to the accumulator.
......@@ -55,9 +55,9 @@ See also:
:func:`accumulateSquare`,:func:`accumulateProduct`,:func:`accumulateWeighted`
.. index:: accumulateProduct
cv::accumulateProduct
accumulateProduct
---------------------
.. cfunction:: void accumulateProduct( const Mat\& src1, const Mat\& src2, Mat\& dst, const Mat\& mask=Mat() )
.. c:function:: void accumulateProduct( const Mat\& src1, const Mat\& src2, Mat\& dst, const Mat\& mask=Mat() )
Adds the per-element product of two input images to the accumulator.
......@@ -80,9 +80,9 @@ See also:
:func:`accumulate`,:func:`accumulateSquare`,:func:`accumulateWeighted`
.. index:: accumulateWeighted
cv::accumulateWeighted
accumulateWeighted
----------------------
.. cfunction:: void accumulateWeighted( const Mat\& src, Mat\& dst, double alpha, const Mat\& mask=Mat() )
.. c:function:: void accumulateWeighted( const Mat\& src, Mat\& dst, double alpha, const Mat\& mask=Mat() )
Updates the running average.
......
......@@ -5,9 +5,9 @@ Object Detection
.. index:: matchTemplate
cv::matchTemplate
matchTemplate
-----------------
.. cfunction:: void matchTemplate( const Mat\& image, const Mat\& templ, Mat\& result, int method )
.. c:function:: void matchTemplate( const Mat\& image, const Mat\& templ, Mat\& result, int method )
Compares a template against overlapped image regions.
......
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册