Some reST syntax correction. Now the PDF documentation builds correctly under Windows using MIKTEX. Some update on the tutorial structure. Some CSS syntax correction. Windows Install Tutorial v0.4.
This commit is contained in:
@@ -215,7 +215,7 @@ If you need a more flexible type, use :ocv:class:`Mat` . The elements of the mat
|
||||
7, 8, 9);
|
||||
cout << sum(Mat(m*m.t())) << endl;
|
||||
|
||||
|
||||
|
||||
Vec
|
||||
---
|
||||
.. ocv:class:: Vec
|
||||
@@ -303,6 +303,8 @@ The static method ``Range::all()`` returns a special variable that means "the wh
|
||||
}
|
||||
|
||||
|
||||
.. _Ptr:
|
||||
|
||||
Ptr
|
||||
---
|
||||
.. ocv:class:: Ptr
|
||||
@@ -838,23 +840,23 @@ The method makes a new header for the specified matrix row and returns it. This
|
||||
|
||||
.. note::
|
||||
|
||||
In the current implementation, the following code does not work as expected: ::
|
||||
In the current implementation, the following code does not work as expected: ::
|
||||
|
||||
Mat A;
|
||||
...
|
||||
A.row(i) = A.row(j); // will not work
|
||||
Mat A;
|
||||
...
|
||||
A.row(i) = A.row(j); // will not work
|
||||
|
||||
|
||||
This happens because ``A.row(i)`` forms a temporary header that is further assigned to another header. Remember that each of these operations is O(1), that is, no data is copied. Thus, the above assignment is not true if you may have expected the j-th row to be copied to the i-th row. To achieve that, you should either turn this simple assignment into an expression or use the
|
||||
:ocv:func:`Mat::copyTo` method: ::
|
||||
This happens because ``A.row(i)`` forms a temporary header that is further assigned to another header. Remember that each of these operations is O(1), that is, no data is copied. Thus, the above assignment is not true if you may have expected the j-th row to be copied to the i-th row. To achieve that, you should either turn this simple assignment into an expression or use the
|
||||
:ocv:func:`Mat::copyTo` method: ::
|
||||
|
||||
Mat A;
|
||||
...
|
||||
// works, but looks a bit obscure.
|
||||
A.row(i) = A.row(j) + 0;
|
||||
Mat A;
|
||||
...
|
||||
// works, but looks a bit obscure.
|
||||
A.row(i) = A.row(j) + 0;
|
||||
|
||||
// this is a bit longe, but the recommended method.
|
||||
Mat Ai = A.row(i); M.row(j).copyTo(Ai);
|
||||
// this is a bit longe, but the recommended method.
|
||||
Mat Ai = A.row(i); M.row(j).copyTo(Ai);
|
||||
|
||||
Mat::col
|
||||
------------
|
||||
@@ -955,6 +957,8 @@ so that the destination matrix is reallocated if needed. While ``m.copyTo(m);``
|
||||
|
||||
When the operation mask is specified, and the ``Mat::create`` call shown above reallocated the matrix, the newly allocated matrix is initialized with all zeros before copying the data.
|
||||
|
||||
.. _Mat::convertTo:
|
||||
|
||||
Mat::convertTo
|
||||
------------------
|
||||
.. ocv:function:: void Mat::convertTo( OutputArray m, int rtype, double alpha=1, double beta=0 ) const
|
||||
@@ -1116,7 +1120,7 @@ Mat::zeros
|
||||
:param cols: Number of columns.
|
||||
|
||||
:param size: Alternative to the matrix size specification ``Size(cols, rows)`` .
|
||||
|
||||
|
||||
:param sizes: Array of integers specifying the array shape.
|
||||
|
||||
:param type: Created matrix type.
|
||||
@@ -1145,8 +1149,8 @@ Mat::ones
|
||||
:param cols: Number of columns.
|
||||
|
||||
:param size: Alternative to the matrix size specification ``Size(cols, rows)`` .
|
||||
|
||||
:param sizes: Array of integers specifying the array shape.
|
||||
|
||||
:param sizes: Array of integers specifying the array shape.
|
||||
|
||||
:param type: Created matrix type.
|
||||
|
||||
@@ -1171,7 +1175,7 @@ Mat::eye
|
||||
:param cols: Number of columns.
|
||||
|
||||
:param size: Alternative matrix size specification as ``Size(cols, rows)`` .
|
||||
|
||||
|
||||
:param type: Created matrix type.
|
||||
|
||||
The method returns a Matlab-style identity matrix initializer, similarly to
|
||||
@@ -1197,7 +1201,7 @@ Mat::create
|
||||
:param cols: New number of columns.
|
||||
|
||||
:param size: Alternative new matrix size specification: ``Size(cols, rows)``
|
||||
|
||||
|
||||
:param sizes: Array of integers specifying a new array shape.
|
||||
|
||||
:param type: New matrix type.
|
||||
@@ -1207,7 +1211,7 @@ This is one of the key ``Mat`` methods. Most new-style OpenCV functions and meth
|
||||
#.
|
||||
If the current array shape and the type match the new ones, return immediately. Otherwise, de-reference the previous data by calling
|
||||
:ocv:func:`Mat::release`.
|
||||
|
||||
|
||||
#.
|
||||
Initialize the new header.
|
||||
|
||||
@@ -1361,9 +1365,9 @@ Mat::operator()
|
||||
Extracts a rectangular submatrix.
|
||||
|
||||
:param rowRange: Start and end row of the extracted submatrix. The upper boundary is not included. To select all the rows, use ``Range::all()``.
|
||||
|
||||
|
||||
:param colRange: Start and end column of the extracted submatrix. The upper boundary is not included. To select all the columns, use ``Range::all()``.
|
||||
|
||||
|
||||
:param roi: Extracted submatrix specified as a rectangle.
|
||||
|
||||
:param ranges: Array of selected ranges along each array dimension.
|
||||
@@ -1612,7 +1616,7 @@ Mat::at
|
||||
:param i, j, k: Indices along the dimensions 0, 1, and 2, respectively.
|
||||
|
||||
:param pt: Element position specified as ``Point(j,i)`` .
|
||||
|
||||
|
||||
:param idx: Array of ``Mat::dims`` indices.
|
||||
|
||||
The template methods return a reference to the specified array element. For the sake of higher performance, the index range checks are only performed in the Debug configuration.
|
||||
@@ -1728,7 +1732,7 @@ To use ``Mat_`` for multi-channel images/matrices, pass ``Vec`` as a ``Mat_`` pa
|
||||
|
||||
|
||||
NAryMatIterator
|
||||
--------------
|
||||
---------------
|
||||
.. ocv:class:: NAryMatIterator
|
||||
|
||||
n-ary multi-dimensional array iterator. ::
|
||||
|
@@ -65,7 +65,7 @@ Splits an element set into equivalency classes.
|
||||
:param vec: Set of elements stored as a vector.
|
||||
|
||||
:param labels: Output vector of labels. It contains as many elements as ``vec``. Each label ``labels[i]`` is a 0-based cluster index of ``vec[i]`` .
|
||||
|
||||
|
||||
:param predicate: Equivalence predicate (pointer to a boolean function of two arguments or an instance of the class that has the method ``bool operator()(const _Tp& a, const _Tp& b)`` ). The predicate returns ``true`` when the elements are certainly in the same class, and returns ``false`` if they may or may not be in the same class.
|
||||
|
||||
The generic function ``partition`` implements an
|
||||
@@ -76,4 +76,4 @@ http://en.wikipedia.org/wiki/Disjoint-set_data_structure
|
||||
. The function
|
||||
returns the number of equivalency classes.
|
||||
|
||||
.. [Arthur2007] Arthur and S. Vassilvitskii “k-means++: the advantages of careful seeding”, Proceedings of the eighteenth annual ACM-SIAM symposium on Discrete algorithms, 2007
|
||||
.. [Arthur2007] Arthur and S. Vassilvitskii <EFBFBD>k-means++: the advantages of careful seeding<EFBFBD>, Proceedings of the eighteenth annual ACM-SIAM symposium on Discrete algorithms, 2007
|
||||
|
@@ -34,7 +34,7 @@ Draws a circle.
|
||||
|
||||
.. ocv:pyfunction:: cv2.circle(img, center, radius, color[, thickness[, lineType[, shift]]]) -> None
|
||||
|
||||
.. ocv:cfunction:: void cvCircle( CvArr* img, CvPoint center, int radius, CvScalar color, int thickness=1, int lineType=8, int shift=0 )
|
||||
.. ocv:function:: void cvCircle( CvArr* img, CvPoint center, int radius, CvScalar color, int thickness=1, int lineType=8, int shift=0 )
|
||||
.. ocv:pyoldfunction:: cv.Circle(img, center, radius, color, thickness=1, lineType=8, shift=0)-> None
|
||||
|
||||
:param img: Image where the circle is drawn.
|
||||
@@ -63,7 +63,7 @@ Clips the line against the image rectangle.
|
||||
|
||||
.. ocv:pyfunction:: cv2.clipLine(imgRect, pt1, pt2) -> retval, pt1, pt2
|
||||
|
||||
.. ocv:cfunction:: int cvClipLine( CvSize imgSize, CvPoint* pt1, CvPoint* pt2 )
|
||||
.. ocv:function:: int cvClipLine( CvSize imgSize, CvPoint* pt1, CvPoint* pt2 )
|
||||
.. ocv:pyoldfunction:: cv.ClipLine(imgSize, pt1, pt2) -> (clippedPt1, clippedPt2)
|
||||
|
||||
:param imgSize: Image size. The image rectangle is ``Rect(0, 0, imgSize.width, imgSize.height)`` .
|
||||
@@ -88,10 +88,10 @@ Draws a simple or thick elliptic arc or fills an ellipse sector.
|
||||
.. ocv:pyfunction:: cv2.ellipse(img, center, axes, angle, startAngle, endAngle, color[, thickness[, lineType[, shift]]]) -> None
|
||||
.. ocv:pyfunction:: cv2.ellipse(img, box, color[, thickness[, lineType]]) -> None
|
||||
|
||||
.. ocv:cfunction:: void cvEllipse( CvArr* img, CvPoint center, CvSize axes, double angle, double startAngle, double endAngle, CvScalar color, int thickness=1, int lineType=8, int shift=0 )
|
||||
.. ocv:function:: void cvEllipse( CvArr* img, CvPoint center, CvSize axes, double angle, double startAngle, double endAngle, CvScalar color, int thickness=1, int lineType=8, int shift=0 )
|
||||
.. ocv:pyoldfunction:: cv.Ellipse(img, center, axes, angle, startAngle, endAngle, color, thickness=1, lineType=8, shift=0)-> None
|
||||
|
||||
.. ocv:cfunction:: void cvEllipseBox( CvArr* img, CvBox2D box, CvScalar color, int thickness=1, int lineType=8, int shift=0 )
|
||||
.. ocv:function:: void cvEllipseBox( CvArr* img, CvBox2D box, CvScalar color, int thickness=1, int lineType=8, int shift=0 )
|
||||
.. ocv:pyoldfunction:: cv.EllipseBox(img, box, color, thickness=1, lineType=8, shift=0)-> None
|
||||
|
||||
:param img: Image.
|
||||
@@ -137,9 +137,9 @@ Approximates an elliptic arc with a polyline.
|
||||
:param center: Center of the arc.
|
||||
|
||||
:param axes: Half-sizes of the arc. See the :ocv:func:`ellipse` for details.
|
||||
|
||||
|
||||
:param angle: Rotation angle of the ellipse in degrees. See the :ocv:func:`ellipse` for details.
|
||||
|
||||
|
||||
:param startAngle: Starting angle of the elliptic arc in degrees.
|
||||
|
||||
:param endAngle: Ending angle of the elliptic arc in degrees.
|
||||
@@ -161,7 +161,7 @@ Fills a convex polygon.
|
||||
|
||||
.. ocv:pyfunction:: cv2.fillConvexPoly(img, points, color[, lineType[, shift]]) -> None
|
||||
|
||||
.. ocv:cfunction:: void cvFillConvexPoly( CvArr* img, CvPoint* pts, int npts, CvScalar color, int lineType=8, int shift=0 )
|
||||
.. ocv:function:: void cvFillConvexPoly( CvArr* img, CvPoint* pts, int npts, CvScalar color, int lineType=8, int shift=0 )
|
||||
.. ocv:pyoldfunction:: cv.FillConvexPoly(img, pn, color, lineType=8, shift=0)-> None
|
||||
|
||||
:param img: Image.
|
||||
@@ -190,7 +190,7 @@ Fills the area bounded by one or more polygons.
|
||||
|
||||
.. ocv:pyfunction:: cv2.fillPoly(img, pts, color[, lineType[, shift[, offset]]]) -> None
|
||||
|
||||
.. ocv:cfunction:: void cvFillPoly( CvArr* img, CvPoint** pts, int* npts, int contours, CvScalar color, int lineType=8, int shift=0 )
|
||||
.. ocv:function:: void cvFillPoly( CvArr* img, CvPoint** pts, int* npts, int contours, CvScalar color, int lineType=8, int shift=0 )
|
||||
.. ocv:pyoldfunction:: cv.FillPoly(img, polys, color, lineType=8, shift=0)-> None
|
||||
|
||||
:param img: Image.
|
||||
@@ -220,7 +220,7 @@ Calculates the width and height of a text string.
|
||||
|
||||
.. ocv:pyfunction:: cv2.getTextSize(text, fontFace, fontScale, thickness) -> retval, baseLine
|
||||
|
||||
.. ocv:cfunction:: void cvGetTextSize( const char* textString, const CvFont* font, CvSize* textSize, int* baseline )
|
||||
.. ocv:function:: void cvGetTextSize( const char* textString, const CvFont* font, CvSize* textSize, int* baseline )
|
||||
.. ocv:pyoldfunction:: cv.GetTextSize(textString, font)-> (textSize, baseline)
|
||||
|
||||
:param text: Input text string.
|
||||
@@ -271,7 +271,7 @@ InitFont
|
||||
--------
|
||||
Initializes font structure (OpenCV 1.x API).
|
||||
|
||||
.. cfunction:: void cvInitFont( CvFont* font, int fontFace, double hscale, double vscale, double shear=0, int thickness=1, int lineType=8 )
|
||||
.. c:function:: void cvInitFont( CvFont* font, int fontFace, double hscale, double vscale, double shear=0, int thickness=1, int lineType=8 )
|
||||
|
||||
:param font: Pointer to the font structure initialized by the function
|
||||
|
||||
@@ -315,6 +315,7 @@ The function initializes the font structure that can be passed to text rendering
|
||||
|
||||
.. seealso:: :ocv:cfunc:`PutText`
|
||||
|
||||
.. _Line:
|
||||
|
||||
line
|
||||
--------
|
||||
@@ -324,7 +325,7 @@ Draws a line segment connecting two points.
|
||||
|
||||
.. ocv:pyfunction:: cv2.line(img, pt1, pt2, color[, thickness[, lineType[, shift]]]) -> None
|
||||
|
||||
.. ocv:cfunction:: void cvLine( CvArr* img, CvPoint pt1, CvPoint pt2, CvScalar color, int thickness=1, int lineType=8, int shift=0 )
|
||||
.. ocv:function:: void cvLine( CvArr* img, CvPoint pt1, CvPoint pt2, CvScalar color, int thickness=1, int lineType=8, int shift=0 )
|
||||
.. ocv:pyoldfunction:: cv.Line(img, pt1, pt2, color, thickness=1, lineType=8, shift=0)-> None
|
||||
|
||||
:param img: Image.
|
||||
@@ -405,7 +406,7 @@ Draws a simple, thick, or filled up-right rectangle.
|
||||
|
||||
.. ocv:pyfunction:: cv2.rectangle(img, pt1, pt2, color[, thickness[, lineType[, shift]]]) -> None
|
||||
|
||||
.. ocv:cfunction:: void cvRectangle( CvArr* img, CvPoint pt1, CvPoint pt2, CvScalar color, int thickness=1, int lineType=8, int shift=0 )
|
||||
.. ocv:function:: void cvRectangle( CvArr* img, CvPoint pt1, CvPoint pt2, CvScalar color, int thickness=1, int lineType=8, int shift=0 )
|
||||
.. ocv:pyoldfunction:: cv.Rectangle(img, pt1, pt2, color, thickness=1, lineType=8, shift=0)-> None
|
||||
|
||||
:param img: Image.
|
||||
@@ -436,7 +437,7 @@ Draws several polygonal curves.
|
||||
|
||||
.. ocv:pyfunction:: cv2.polylines(img, pts, isClosed, color[, thickness[, lineType[, shift]]]) -> None
|
||||
|
||||
.. ocv:cfunction:: void cvPolyLine( CvArr* img, CvPoint** pts, int* npts, int contours, int isClosed, CvScalar color, int thickness=1, int lineType=8, int shift=0 )
|
||||
.. ocv:function:: void cvPolyLine( CvArr* img, CvPoint** pts, int* npts, int contours, int isClosed, CvScalar color, int thickness=1, int lineType=8, int shift=0 )
|
||||
|
||||
.. ocv:pyoldfunction:: cv.PolyLine(img, polys, isClosed, color, thickness=1, lineType=8, shift=0)-> None
|
||||
|
||||
@@ -470,7 +471,7 @@ Draws a text string.
|
||||
|
||||
.. ocv:pyfunction:: cv2.putText(img, text, org, fontFace, fontScale, color[, thickness[, linetype[, bottomLeftOrigin]]]) -> None
|
||||
|
||||
.. ocv:cfunction:: void cvPutText( CvArr* img, const char* text, CvPoint org, const CvFont* font, CvScalar color )
|
||||
.. ocv:function:: void cvPutText( CvArr* img, const char* text, CvPoint org, const CvFont* font, CvScalar color )
|
||||
.. ocv:pyoldfunction:: cv.PutText(img, text, org, font, color)-> None
|
||||
|
||||
:param img: Image.
|
||||
|
@@ -175,6 +175,7 @@ Multi-channel (``n``-channel) types can be specified using the following options
|
||||
* ``CV_8UC(n)`` ... ``CV_64FC(n)`` or ``CV_MAKETYPE(CV_8U, n)`` ... ``CV_MAKETYPE(CV_64F, n)`` macros when the number of channels is more than 4 or unknown at the compilation time.
|
||||
|
||||
.. note:: ``CV_32FC1 == CV_32F``, ``CV_32FC2 == CV_32FC(2) == CV_MAKETYPE(CV_32F, 2)``, and ``CV_MAKETYPE(depth, n) == ((x&7)<<3) + (n-1)``. This means that the constant type is formed from the ``depth``, taking the lowest 3 bits, and the number of channels minus 1, taking the next ``log2(CV_CN_MAX)`` bits.
|
||||
|
||||
Examples::
|
||||
|
||||
Mat mtx(3, 3, CV_32F); // make a 3x3 floating-point matrix
|
||||
|
@@ -187,7 +187,7 @@ Signals an error and raises an exception.
|
||||
:param exc: Exception to throw.
|
||||
|
||||
:param code: Error code. Normally, it is a negative value. The list of pre-defined error codes can be found in ``cxerror.h`` .
|
||||
|
||||
|
||||
:param msg: Text of the error message.
|
||||
|
||||
:param args: ``printf`` -like formatted error message in parentheses.
|
||||
@@ -268,7 +268,7 @@ The function deallocates the buffer allocated with :ocv:func:`fastMalloc` . If N
|
||||
|
||||
|
||||
format
|
||||
----------
|
||||
------
|
||||
Returns a text string formatted using the ``printf`` -like expression.
|
||||
|
||||
.. ocv:function:: string format( const char* fmt, ... )
|
||||
@@ -289,8 +289,8 @@ Returns the number of threads used by OpenCV.
|
||||
The function returns the number of threads that is used by OpenCV.
|
||||
|
||||
.. seealso::
|
||||
:ocv:func:`setNumThreads`,
|
||||
:ocv:func:`getThreadNum`
|
||||
:ocv:func:`setNumThreads`,
|
||||
:ocv:func:`getThreadNum`
|
||||
|
||||
|
||||
|
||||
@@ -303,8 +303,8 @@ Returns the index of the currently executed thread.
|
||||
The function returns a 0-based index of the currently executed thread. The function is only valid inside a parallel OpenMP region. When OpenCV is built without OpenMP support, the function always returns 0.
|
||||
|
||||
.. seealso::
|
||||
:ocv:func:`setNumThreads`,
|
||||
:ocv:func:`getNumThreads` .
|
||||
:ocv:func:`setNumThreads`,
|
||||
:ocv:func:`getNumThreads` .
|
||||
|
||||
|
||||
|
||||
@@ -388,8 +388,8 @@ Sets the number of threads used by OpenCV.
|
||||
The function sets the number of threads used by OpenCV in parallel OpenMP regions. If ``nthreads=0`` , the function uses the default number of threads that is usually equal to the number of the processing cores.
|
||||
|
||||
.. seealso::
|
||||
:ocv:func:`getNumThreads`,
|
||||
:ocv:func:`getThreadNum`
|
||||
:ocv:func:`getNumThreads`,
|
||||
:ocv:func:`getThreadNum`
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user