mirror of
https://github.com/opencv/opencv.git
synced 2026-07-31 08:13:04 +04:00
the first round of cleaning up the RST docs
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -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
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -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 ::
|
||||
|
||||
|
||||
Reference in New Issue
Block a user