Fixed more documentation & source discrepancies
authorAndrey Kamaev <no@email>
Mon, 28 May 2012 11:22:43 +0000 (11:22 +0000)
committerAndrey Kamaev <no@email>
Mon, 28 May 2012 11:22:43 +0000 (11:22 +0000)
20 files changed:
doc/check_docs2.py
modules/core/doc/basic_structures.rst
modules/core/doc/clustering.rst
modules/core/doc/drawing_functions.rst
modules/core/doc/dynamic_structures.rst
modules/core/doc/old_basic_structures.rst
modules/core/doc/old_xml_yaml_persistence.rst
modules/core/doc/operations_on_arrays.rst
modules/core/doc/utility_and_system_functions_and_macros.rst
modules/core/doc/xml_yaml_persistence.rst
modules/core/include/opencv2/core/core.hpp
modules/gpu/doc/feature_detection_and_description.rst
modules/gpu/doc/image_filtering.rst
modules/gpu/doc/image_processing.rst
modules/gpu/doc/operations_on_matrices.rst
modules/gpu/doc/per_element_operations.rst
modules/gpu/doc/video.rst
modules/gpu/include/opencv2/gpu/gpu.hpp
modules/legacy/doc/expectation_maximization.rst
modules/python/src2/hdr_parser.py

index 9541039..f1ddf7e 100644 (file)
@@ -63,32 +63,42 @@ def compareSignatures(f, s):
     if ftype and ftype != stype:
         return False, "return type mismatch"
     if ("\C" in f[2]) ^ ("\C" in s[2]):
-        return False, "const qulifier mismatch"
+        return False, "const qualifier mismatch"
+    if ("\S" in f[2]) ^ ("\S" in s[2]):
+        return False, "static qualifier mismatch"
+    if ("\V" in f[2]) ^ ("\V" in s[2]):
+        return False, "virtual qualifier mismatch"
+    if ("\A" in f[2]) ^ ("\A" in s[2]):
+        return False, "abstract qualifier mismatch"
     if len(f[3]) != len(s[3]):
         return False, "different number of arguments"
     for idx, arg in enumerate(zip(f[3], s[3])):
         farg = arg[0]
         sarg = arg[1]
-        ftype = re.sub(r"\bcv::", "", (farg[0] or ""))
-        stype = re.sub(r"\bcv::", "", (sarg[0] or ""))
+        ftype = re.sub(r"\b(cv|std)::", "", (farg[0] or ""))
+        stype = re.sub(r"\b(cv|std)::", "", (sarg[0] or ""))
         if ftype != stype:
             return False, "type of argument #" + str(idx+1) + " mismatch"
         fname = farg[1] or "arg" + str(idx)
         sname = sarg[1] or "arg" + str(idx)
         if fname != sname:
             return False, "name of argument #" + str(idx+1) + " mismatch"
-        fdef = re.sub(r"\bcv::", "", (farg[2] or ""))
-        sdef = re.sub(r"\bcv::", "", (sarg[2] or ""))
+        fdef = re.sub(r"\b(cv|std)::", "", (farg[2] or ""))
+        sdef = re.sub(r"\b(cv|std)::", "", (sarg[2] or ""))
         if fdef != sdef:
             return False, "default value of argument #" + str(idx+1) + " mismatch"
     return True, "match"
 
 def formatSignature(s):
     _str = ""
+    if "/V" in s[2]:
+        _str += "virtual "
+    if "/S" in s[2]:
+        _str += "static "
     if s[1]:
         _str += s[1] + " "
     else:
-        if not bool(re.match(r"(cv\.)?(?P<cls>\w+)\.(?P=cls)", s[0])):
+        if not bool(re.match(r"(\w+\.)*(?P<cls>\w+)\.(?P=cls)", s[0])):
             _str += "void "
     if s[0].startswith("cv."):
         _str += s[0][3:].replace(".", "::")
@@ -111,6 +121,8 @@ def formatSignature(s):
         _str += " )"
     if "/C" in s[2]:
         _str += " const"
+    if "/A" in s[2]:
+        _str += " = 0"
     return _str
 
 
@@ -358,6 +370,10 @@ def process_module(module, path):
             continue
         for signature in decls:
             if signature[0] == "C" or signature[0] == "C++":
+                if "template" in (signature[2][1] or ""):
+                    # TODO find a way to validate templates
+                    signature.append(DOCUMENTED_MARKER)
+                    continue
                 fd = flookup.get(signature[2][0])
                 if not fd:
                     if signature[2][0].startswith("cv."):
index d25bbce..a56e281 100644 (file)
@@ -115,7 +115,7 @@ Rect\_
 
 Template class for 2D rectangles, described by the following parameters:
 
-* Coordinates of the top-left corner. This is a default interpretation of ``Rect_::x`` and ``Rect_::y`` in OpenCV. Though, in your algorithms you may count ``x`` and ``y`` from the bottom-left corner. 
+* Coordinates of the top-left corner. This is a default interpretation of ``Rect_::x`` and ``Rect_::y`` in OpenCV. Though, in your algorithms you may count ``x`` and ``y`` from the bottom-left corner.
 * Rectangle width and height.
 
 OpenCV typically assumes that the top and left boundary of the rectangle are inclusive, while the right and bottom boundaries are not. For example, the method ``Rect_::contains`` returns ``true`` if
@@ -182,7 +182,7 @@ The class represents rotated (i.e. not up-right) rectangles on a plane. Each rec
         :param angle: The rotation angle in a clockwise direction. When the angle is 0, 90, 180, 270 etc., the rectangle becomes an up-right rectangle.
         :param box: The rotated rectangle parameters as the obsolete CvBox2D structure.
 
-    .. ocv:function:: void RotatedRect::points(Point2f* pts) const
+    .. ocv:function:: void RotatedRect::points( Point2f pts[] ) const
     .. ocv:function:: Rect RotatedRect::boundingRect() const
     .. ocv:function:: RotatedRect::operator CvBox2D() const
 
@@ -228,7 +228,7 @@ Matx
 Template class for small matrices whose type and size are known at compilation time: ::
 
     template<typename _Tp, int m, int n> class Matx {...};
-    
+
     typedef Matx<float, 1, 2> Matx12f;
     typedef Matx<double, 1, 2> Matx12d;
     ...
@@ -246,7 +246,7 @@ Template class for small matrices whose type and size are known at compilation t
     ...
     typedef Matx<float, 6, 6> Matx66f;
     typedef Matx<double, 6, 6> Matx66d;
-    
+
 If you need a more flexible type, use :ocv:class:`Mat` . The elements of the matrix ``M`` are accessible using the ``M(i,j)`` notation. Most of the common matrix operations (see also
 :ref:`MatrixExpressions` ) are available. To do an operation on ``Matx`` that is not implemented, you can easily convert the matrix to
 ``Mat`` and backwards. ::
@@ -256,7 +256,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
@@ -264,7 +264,7 @@ Vec
 Template class for short numerical vectors, a partial case of :ocv:class:`Matx`: ::
 
     template<typename _Tp, int n> class Vec : public Matx<_Tp, n, 1> {...};
-    
+
     typedef Vec<uchar, 2> Vec2b;
     typedef Vec<uchar, 3> Vec3b;
     typedef Vec<uchar, 4> Vec4b;
@@ -286,8 +286,8 @@ Template class for short numerical vectors, a partial case of :ocv:class:`Matx`:
     typedef Vec<double, 3> Vec3d;
     typedef Vec<double, 4> Vec4d;
     typedef Vec<double, 6> Vec6d;
-    
-It is possible to convert ``Vec<T,2>`` to/from ``Point_``, ``Vec<T,3>`` to/from ``Point3_`` , and ``Vec<T,4>`` to :ocv:struct:`CvScalar` or :ocv:class:`Scalar_`. Use ``operator[]`` to access the elements of ``Vec``. 
+
+It is possible to convert ``Vec<T,2>`` to/from ``Point_``, ``Vec<T,3>`` to/from ``Point3_`` , and ``Vec<T,4>`` to :ocv:struct:`CvScalar` or :ocv:class:`Scalar_`. Use ``operator[]`` to access the elements of ``Vec``.
 
 All the expected vector operations are also implemented:
 
@@ -309,7 +309,7 @@ Scalar\_
 Template class for a 4-element vector derived from Vec. ::
 
     template<typename _Tp> class Scalar_ : public Vec<_Tp, 4> { ... };
-    
+
     typedef Scalar_<double> Scalar;
 
 Being derived from ``Vec<_Tp, 4>`` , ``Scalar_`` and ``Scalar`` can be used just as typical 4-element vectors. In addition, they can be converted to/from ``CvScalar`` . The type ``Scalar`` is widely used in OpenCV to pass pixel values.
@@ -344,7 +344,7 @@ The static method ``Range::all()`` returns a special variable that means "the wh
     }
 
 
-.. _Ptr: 
+.. _Ptr:
 
 Ptr
 ---
@@ -491,7 +491,7 @@ So, the data layout in ``Mat`` is fully compatible with ``CvMat``, ``IplImage``,
 There are many different ways to create a ``Mat`` object. The most popular options are listed below:
 
 *
-    
+
     Use the ``create(nrows, ncols, type)``   method or the similar ``Mat(nrows, ncols, type[, fillValue])``     constructor. A new array of the specified size and type is allocated. ``type``     has the same meaning as in the ``cvCreateMat``     method.
     For example, ``CV_8UC1``     means a 8-bit single-channel array, ``CV_32FC2``     means a 2-channel (complex) floating-point array, and so on.
 
@@ -508,7 +508,7 @@ There are many different ways to create a ``Mat`` object. The most popular optio
     As noted in the introduction to this chapter, ``create()``      allocates only  a new array when the shape or type of the current array are different from the specified ones.
 
 *
-    
+
     Create a multi-dimensional array:
 
     ::
@@ -522,11 +522,11 @@ There are many different ways to create a ``Mat`` object. The most popular optio
     It passes the number of dimensions =1 to the ``Mat``     constructor but the created array will be 2-dimensional with the number of columns set to 1. So, ``Mat::dims``     is always >= 2 (can also be 0 when the array is empty).
 
 *
-    
+
     Use a copy constructor or assignment operator where there can be an array or expression on the right side (see below). As noted in the introduction, the array assignment is an O(1) operation because it only copies the header and increases the reference counter. The ``Mat::clone()``     method can be used to get a full (deep) copy of the array when you need it.
 
 *
-    
+
     Construct a header for a part of another array. It can be a single row, single column, several rows, several columns, rectangular region in the array (called a *minor* in algebra) or a diagonal. Such operations are also O(1) because the new header references the same data. You can actually modify a part of the array using this feature, for example:
 
     ::
@@ -568,7 +568,7 @@ There are many different ways to create a ``Mat`` object. The most popular optio
     As in case of whole matrices, if you need a deep copy, use the ``clone()``     method of the extracted sub-matrices.
 
 *
-    
+
     Make a header for user-allocated data. It can be useful to do the following:
 
     #.
@@ -610,7 +610,7 @@ There are many different ways to create a ``Mat`` object. The most popular optio
     ..
 
 *
-    
+
     Use MATLAB-style array initializers, ``zeros(), ones(), eye()``, for example:
 
     ::
@@ -621,7 +621,7 @@ There are many different ways to create a ``Mat`` object. The most popular optio
     ..
 
 *
-    
+
     Use a comma-separated initializer:
 
     ::
@@ -701,48 +701,48 @@ This is a list of implemented matrix operations that can be combined in arbitrar
 *
     Addition, subtraction, negation:
     ``A+B, A-B, A+s, A-s, s+A, s-A, -A``
-    
-*   
+
+*
     Scaling:
     ``A*alpha``
-    
+
 *
     Per-element multiplication and division:
     ``A.mul(B), A/B, alpha/A``
-    
+
 *
     Matrix multiplication:
     ``A*B``
-    
+
 *
     Transposition:
     ``A.t()`` (means ``A``\ :sup:`T`)
-    
+
 *
     Matrix inversion and pseudo-inversion, solving linear systems and least-squares problems:
 
     ``A.inv([method])`` (~ ``A``\ :sup:`-1`) ``,   A.inv([method])*B`` (~ ``X: AX=B``)
-    
+
 *
     Comparison:
     ``A cmpop B, A cmpop alpha, alpha cmpop A``, where ``cmpop`` is one of ``:  >, >=, ==, !=, <=, <``. The result of comparison is an 8-bit single channel mask whose elements are set to 255 (if the particular element or pair of elements satisfy the condition) or 0.
 
 *
     Bitwise logical operations: ``A logicop B, A logicop s, s logicop A, ~A``, where ``logicop`` is one of ``:  &, |, ^``.
-    
+
 *
     Element-wise minimum and maximum:
     ``min(A, B), min(A, alpha), max(A, B), max(A, alpha)``
-    
+
 *
     Element-wise absolute value:
     ``abs(A)``
-    
+
 *
     Cross-product, dot-product:
     ``A.cross(B)``
     ``A.dot(B)``
-    
+
 *
     Any function of matrix or matrices and scalars that returns a matrix or a scalar, such as ``norm``, ``mean``, ``sum``, ``countNonZero``, ``trace``, ``determinant``, ``repeat``, and others.
 
@@ -761,17 +761,17 @@ Here are examples of matrix expressions:
     // compute pseudo-inverse of A, equivalent to A.inv(DECOMP_SVD)
     SVD svd(A);
     Mat pinvA = svd.vt.t()*Mat::diag(1./svd.w)*svd.u.t();
-    
+
     // compute the new vector of parameters in the Levenberg-Marquardt algorithm
     x -= (A.t()*A + lambda*Mat::eye(A.cols,A.cols,A.type())).inv(DECOMP_CHOLESKY)*(A.t()*err);
-    
+
     // sharpen image using "unsharp mask" algorithm
     Mat blurred; double sigma = 1, threshold = 5, amount = 1;
     GaussianBlur(img, blurred, Size(), sigma, sigma);
     Mat lowConstrastMask = abs(img - blurred) < threshold;
     Mat sharpened = img*(1+amount) + blurred*(-amount);
     img.copyTo(sharpened, lowContrastMask);
-    
+
 ..
 
 
@@ -782,43 +782,41 @@ Mat::Mat
 Various Mat constructors
 
 .. ocv:function:: Mat::Mat()
-                  
+
 .. ocv:function:: Mat::Mat(int rows, int cols, int type)
-                  
+
 .. ocv:function:: Mat::Mat(Size size, int type)
-                  
+
 .. ocv:function:: Mat::Mat(int rows, int cols, int type, const Scalar& s)
-                  
+
 .. ocv:function:: Mat::Mat(Size size, int type, const Scalar& s)
-                  
+
 .. ocv:function:: Mat::Mat(const Mat& m)
-                  
+
 .. ocv:function:: Mat::Mat(int rows, int cols, int type, void* data, size_t step=AUTO_STEP)
-                  
+
 .. ocv:function:: Mat::Mat(Size size, int type, void* data, size_t step=AUTO_STEP)
-                  
-.. ocv:function:: Mat::Mat(const Mat& m, const Range& rowRange, const Range& colRange)
-                  
+
+.. ocv:function:: Mat::Mat( const Mat& m, const Range& rowRange, const Range& colRange=Range::all() )
+
 .. ocv:function:: Mat::Mat(const Mat& m, const Rect& roi)
 
 .. ocv:function:: Mat::Mat(const CvMat* m, bool copyData=false)
-                  
+
 .. ocv:function:: Mat::Mat(const IplImage* img, bool copyData=false)
-                  
+
 .. ocv:function:: template<typename T, int n> explicit Mat::Mat(const Vec<T, n>& vec, bool copyData=true)
 
 .. ocv:function:: template<typename T, int m, int n> explicit Mat::Mat(const Matx<T, m, n>& vec, bool copyData=true)
 
 .. ocv:function:: template<typename T> explicit Mat::Mat(const vector<T>& vec, bool copyData=false)
-                  
-.. ocv:function:: Mat::Mat(const MatExpr& expr)
-                  
+
 .. ocv:function:: Mat::Mat(int ndims, const int* sizes, int type)
-                  
+
 .. ocv:function:: Mat::Mat(int ndims, const int* sizes, int type, const Scalar& s)
-                  
+
 .. ocv:function:: Mat::Mat(int ndims, const int* sizes, int type, void* data, const size_t* steps=0)
-                  
+
 .. ocv:function:: Mat::Mat(const Mat& m, const Range* ranges)
 
     :param ndims: Array dimensionality.
@@ -879,7 +877,7 @@ Provides matrix assignment operators.
 
 .. ocv:function:: Mat& Mat::operator = (const Mat& m)
 
-.. ocv:function:: Mat& Mat::operator = (const MatExpr_Base& expr)
+.. ocv:function:: Mat& Mat::operator =( const MatExpr& expr )
 
 .. ocv:function:: Mat& Mat::operator = (const Scalar& s)
 
@@ -905,9 +903,9 @@ Mat::row
 ------------
 Creates a matrix header for the specified matrix row.
 
-.. ocv:function:: Mat Mat::row(int i) const
+.. ocv:function:: Mat Mat::row(int y) const
 
-    :param i: A 0-based row index.
+    :param y: A 0-based row index.
 
 The method makes a new header for the specified matrix row and returns it. This is an O(1) operation, regardless of the matrix size. The underlying data of the new matrix is shared with the original matrix. Here is the example of one of the classical basic matrix processing operations, ``axpy``, used by LU and many other algorithms: ::
 
@@ -940,9 +938,9 @@ Mat::col
 ------------
 Creates a matrix header for the specified matrix column.
 
-.. ocv:function:: Mat Mat::col(int j) const
+.. ocv:function:: Mat Mat::col(int x) const
 
-    :param j: A 0-based column index.
+    :param x: A 0-based column index.
 
 The method makes a new header for the specified matrix column and returns it. This is an O(1) operation, regardless of the matrix size. The underlying data of the new matrix is shared with the original matrix. See also the
 :ocv:func:`Mat::row` description.
@@ -988,9 +986,9 @@ Mat::diag
 -------------
 Extracts a diagonal from a matrix, or creates a diagonal matrix.
 
-.. ocv:function:: Mat Mat::diag(int d) const
+.. ocv:function:: Mat Mat::diag( int d=0 ) const
 
-.. ocv:function:: static Mat Mat::diag(const Mat& matD)
+.. ocv:function:: static Mat Mat::diag( const Mat& d )
 
     :param d: Index of the diagonal, with the following values:
 
@@ -1075,7 +1073,7 @@ Mat::setTo
 --------------
 Sets all or some of the array elements to the specified value.
 
-.. ocv:function:: Mat& Mat::setTo(const Scalar& s, InputArray mask=noArray())
+.. ocv:function:: Mat& Mat::setTo( InputArray value, InputArray mask=noArray() )
 
     :param s: Assigned scalar converted to the actual array type.
 
@@ -1189,7 +1187,7 @@ Returns a zero array of the specified size and type.
 
 .. ocv:function:: static MatExpr Mat::zeros(int rows, int cols, int type)
 .. ocv:function:: static MatExpr Mat::zeros(Size size, int type)
-.. ocv:function:: static MatExpr Mat::zeros(int ndims, const int* sizes, int type)
+.. ocv:function:: static MatExpr Mat::zeros( int ndims, const int* sz, int type )
 
     :param ndims: Array dimensionality.
 
@@ -1197,8 +1195,8 @@ Returns a zero array of the specified size and type.
 
     :param cols: Number of columns.
 
-    :param size: Alternative to the matrix size specification ``Size(cols, rows)``  .   
-    
+    :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.
@@ -1218,7 +1216,7 @@ Returns an array of all 1's of the specified size and type.
 
 .. ocv:function:: static MatExpr Mat::ones(int rows, int cols, int type)
 .. ocv:function:: static MatExpr Mat::ones(Size size, int type)
-.. ocv:function:: static MatExpr Mat::ones(int ndims, const int* sizes, int type)
+.. ocv:function:: static MatExpr Mat::ones( int ndims, const int* sz, int type )
 
     :param ndims: Array dimensionality.
 
@@ -1226,8 +1224,8 @@ Returns an array of all 1's of the specified size and type.
 
     :param cols: Number of columns.
 
-    :param size: Alternative to the matrix size specification  ``Size(cols, rows)``  .   
-    
+    :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.
@@ -1252,12 +1250,12 @@ Returns an identity matrix of the specified size and type.
 
     :param cols: Number of columns.
 
-    :param size: Alternative matrix size specification as  ``Size(cols, rows)`` .     
-    
+    :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
-:ocv:func:`Mat::zeros`. Similarly to 
+:ocv:func:`Mat::zeros`. Similarly to
 :ocv:func:`Mat::ones`, you can use a scale operation to create a scaled identity matrix efficiently: ::
 
     // make a 4x4 diagonal matrix with 0.1's on the diagonal.
@@ -1278,8 +1276,8 @@ Allocates new array data if needed.
 
     :param cols: New number of columns.
 
-    :param size: Alternative new matrix size specification:  ``Size(cols, rows)``     
-    
+    :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.
@@ -1288,8 +1286,8 @@ 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`. 
-    
+    :ocv:func:`Mat::release`.
+
 #.
     Initialize the new header.
 
@@ -1367,7 +1365,8 @@ Mat::push_back
 Adds elements to the bottom of the matrix.
 
 .. ocv:function:: template<typename T> void Mat::push_back(const T& elem)
-.. ocv:function:: void Mat::push_back(const Mat& elem)
+
+.. ocv:function:: void Mat::push_back( const Mat& m )
 
     :param elem: Added element(s).
 
@@ -1415,7 +1414,7 @@ Adjusts a submatrix size and position within the parent matrix.
 
     :param dright: Shift of the right submatrix boundary to the right.
 
-The method is complimentary to 
+The method is complimentary to
 :ocv:func:`Mat::locateROI` . The typical use of these functions is to determine the submatrix position within the parent matrix and then shift the position somehow. Typically, it can be required for filtering operations when pixels outside of the ROI should be taken into account. When all the method parameters are positive, the ROI needs to grow in all directions by the specified amount, for example: ::
 
     A.adjustROI(2, 2, 2, 2);
@@ -1428,7 +1427,7 @@ In this example, the matrix size is increased by 4 elements in each direction. T
 The function is used internally by the OpenCV filtering functions, like
 :ocv:func:`filter2D` , morphological operations, and so on.
 
-.. seealso:: :ocv:func:`copyMakeBorder` 
+.. seealso:: :ocv:func:`copyMakeBorder`
 
 
 Mat::operator()
@@ -1439,13 +1438,13 @@ Extracts a rectangular submatrix.
 
 .. ocv:function:: Mat Mat::operator()( const Rect& roi ) const
 
-.. ocv:function:: Mat Mat::operator()( const Ranges* ranges ) const
+.. ocv:function:: Mat Mat::operator()( const Range* ranges ) const
 
 
-    :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 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.
@@ -1626,7 +1625,7 @@ Mat::step1
 --------------
 Returns a normalized step.
 
-.. ocv:function:: size_t Mat::step1() const
+.. ocv:function:: size_t Mat::step1( int i=0 ) const
 
 The method returns a matrix step divided by
 :ocv:func:`Mat::elemSize1()` . It can be useful to quickly access an arbitrary matrix element.
@@ -1654,15 +1653,15 @@ Mat::ptr
 ------------
 Returns a pointer to the specified matrix row.
 
-.. ocv:function:: uchar* Mat::ptr(int i=0)
+.. ocv:function:: uchar* Mat::ptr(int i0=0)
 
-.. ocv:function:: const uchar* Mat::ptr(int i=0) const
+.. ocv:function:: const uchar* Mat::ptr(int i0=0) const
 
-.. ocv:function:: template<typename _Tp> _Tp* Mat::ptr(int i=0)
+.. ocv:function:: template<typename _Tp> _Tp* Mat::ptr(int i0=0)
 
-.. ocv:function:: template<typename _Tp> const _Tp* Mat::ptr(int i=0) const
+.. ocv:function:: template<typename _Tp> const _Tp* Mat::ptr(int i0=0) const
 
-    :param i: A 0-based row index.
+    :param i0: A 0-based row index.
 
 The methods return ``uchar*`` or typed pointer to the specified matrix row. See the sample in
 :ocv:func:`Mat::isContinuous` to know how to use these methods.
@@ -1696,7 +1695,7 @@ Returns a reference to the specified array element.
     :param j: Index along the dimension 1
     :param k: Index along the dimension 2
 
-    :param pt: Element position specified as  ``Point(j,i)`` .    
+    :param pt: Element position specified as  ``Point(j,i)`` .
 
     :param idx: Array of  ``Mat::dims``  indices.
 
@@ -1820,19 +1819,19 @@ InputArray
 This is the proxy class for passing read-only input arrays into OpenCV functions. It is defined as ::
 
     typedef const _InputArray& InputArray;
-    
+
 where ``_InputArray`` is a class that can be constructed from ``Mat``, ``Mat_<T>``, ``Matx<T, m, n>``, ``std::vector<T>``, ``std::vector<std::vector<T> >`` or ``std::vector<Mat>``. It can also be constructed from a matrix expression.
 
 Since this is mostly implementation-level class, and its interface may change in future versions, we do not describe it in details. There are a few key things, though, that should be kept in mind:
 
   * When you see in the reference manual or in OpenCV source code a function that takes ``InputArray``, it means that you can actually pass ``Mat``, ``Matx``, ``vector<T>`` etc. (see above the complete list).
-  
+
   * Optional input arguments: If some of the input arrays may be empty, pass ``cv::noArray()`` (or simply ``cv::Mat()`` as you probably did before).
 
   * The class is designed solely for passing parameters. That is, normally you *should not* declare class members, local and global variables of this type.
-  
+
   * If you want to design your own function or a class method that can operate of arrays of multiple types, you can use ``InputArray`` (or ``OutputArray``) for the respective parameters. Inside a function you should use ``_InputArray::getMat()`` method to construct a matrix header for the array (without copying data). ``_InputArray::kind()`` can be used to distinguish ``Mat`` from ``vector<>`` etc., but normally it is not needed.
-  
+
 Here is how you can use a function that takes ``InputArray`` ::
 
     std::vector<Point2f> vec;
@@ -1852,12 +1851,12 @@ Here is how such a function can be implemented (for simplicity, we implement a v
         // unless _src and/or _m are matrix expressions.
         Mat src = _src.getMat(), m = _m.getMat();
         CV_Assert( src.type() == CV_32FC2 && m.type() == CV_32F && m.size() == Size(3, 2) );
-        
+
         // [re]create the output array so that it has the proper size and type.
         // In case of Mat it calls Mat::create, in case of STL vector it calls vector::resize.
         _dst.create(src.size(), src.type());
         Mat dst = _dst.getMat();
-        
+
         for( int i = 0; i < src.rows; i++ )
             for( int j = 0; j < src.cols; j++ )
             {
@@ -1874,7 +1873,7 @@ Here is how such a function can be implemented (for simplicity, we implement a v
 There is another related type, ``InputArrayOfArrays``, which is currently defined as a synonym for ``InputArray``: ::
 
     typedef InputArray InputArrayOfArrays;
-    
+
 It denotes function arguments that are either vectors of vectors or vectors of matrices. A separate synonym is needed to generate Python/Java etc. wrappers properly. At the function implementation level their use is similar, but ``_InputArray::getMat(idx)`` should be used to get header for the idx-th component of the outer vector and ``_InputArray::size().area()`` should be used to find the number of components (vectors/matrices) of the outer vector.
 
 
@@ -2298,7 +2297,7 @@ Template sparse n-dimensional array class derived from
         SparseMatIterator_<_Tp> end();
         SparseMatConstIterator_<_Tp> end() const;
     };
-    
+
 ``SparseMat_`` is a thin wrapper on top of :ocv:class:`SparseMat`  created in the same way as ``Mat_`` .
 It simplifies notation of some operations. ::
 
@@ -2316,11 +2315,11 @@ This is a base class for all more or less complex algorithms in OpenCV, especial
 The class provides the following features for all derived classes:
 
     * so called "virtual constructor". That is, each Algorithm derivative is registered at program start and you can get the list of registered algorithms and create instance of a particular algorithm by its name (see ``Algorithm::create``). If you plan to add your own algorithms, it is good practice to add a unique prefix to your algorithms to distinguish them from other algorithms.
-    
+
     * setting/retrieving algorithm parameters by name. If you used video capturing functionality from OpenCV highgui module, you are probably familar with ``cvSetCaptureProperty()``, ``cvGetCaptureProperty()``, ``VideoCapture::set()`` and ``VideoCapture::get()``. ``Algorithm`` provides similar method where instead of integer id's you specify the parameter names as text strings. See ``Algorithm::set`` and ``Algorithm::get`` for details.
 
     * reading and writing parameters from/to XML or YAML files. Every Algorithm derivative can store all its parameters and then read them back. There is no need to re-implement it each time.
-    
+
 Here is example of SIFT use in your application via Algorithm interface: ::
 
     #include "opencv2/opencv.hpp"
@@ -2329,9 +2328,9 @@ Here is example of SIFT use in your application via Algorithm interface: ::
     ...
 
     initModule_nonfree(); // to load SURF/SIFT etc.
-    
+
     Ptr<Feature2D> sift = Algorithm::create<Feature2D>("Feature2D.SIFT");
-    
+
     FileStorage fs("sift_params.xml", FileStorage::READ);
     if( fs.isOpened() ) // if we have file with parameters, read them
     {
@@ -2341,17 +2340,17 @@ Here is example of SIFT use in your application via Algorithm interface: ::
     else // else modify the parameters and store them; user can later edit the file to use different parameters
     {
         sift->set("contrastThreshold", 0.01f); // lower the contrast threshold, compared to the default value
-        
+
         {
         WriteStructContext ws(fs, "sift_params", CV_NODE_MAP);
         sift->write(fs);
         }
     }
-    
+
     Mat image = imread("myimage.png", 0), descriptors;
     vector<KeyPoint> keypoints;
     (*sift)(image, noArray(), keypoints, descriptors);
-    
+
 
 Algorithm::get
 --------------
@@ -2399,15 +2398,15 @@ Stores algorithm parameters in a file storage
 .. ocv:function:: void Algorithm::write(FileStorage& fs) const
 
     :param fs: File storage.
-    
+
 The method stores all the algorithm parameters (in alphabetic order) to the file storage. The method is virtual. If you define your own Algorithm derivative, your can override the method and store some extra information. However, it's rarely needed. Here are some examples:
 
  * SIFT feature detector (from nonfree module). The class only stores algorithm parameters and no keypoints or their descriptors. Therefore, it's enough to store the algorithm parameters, which is what ``Algorithm::write()`` does. Therefore, there is no dedicated ``SIFT::write()``.
+
  * Background subtractor (from video module). It has the algorithm parameters and also it has the current background model. However, the background model is not stored. First, it's rather big. Then, if you have stored the background model, it would likely become irrelevant on the next run (because of shifted camera, changed background, different lighting etc.). Therefore, ``BackgroundSubtractorMOG`` and ``BackgroundSubtractorMOG2`` also rely on the standard ``Algorithm::write()`` to store just the algorithm parameters.
+
  * Expectation Maximization (from ml module). The algorithm finds mixture of gaussians that approximates user data best of all. In this case the model may be re-used on the next run to test new data against the trained statistical model. So EM needs to store the model. However, since the model is described by a few parameters that are available as read-only algorithm parameters (i.e. they are available via ``EM::get()``), EM also relies on ``Algorithm::write()`` to store both EM parameters and the model (represented by read-only algorithm parameters).
+
 
 Algorithm::read
 ---------------
@@ -2416,7 +2415,7 @@ Reads algorithm parameters from a file storage
 .. ocv:function:: void Algorithm::read(const FileNode& fn)
 
     :param fn: File node of the file storage.
-    
+
 The method reads all the algorithm parameters from the specified node of a file storage. Similarly to ``Algorithm::write()``, if you implement an algorithm that needs to read some extra data and/or re-compute some internal data, you may override the method.
 
 Algorithm::getList
@@ -2426,7 +2425,7 @@ Returns the list of registered algorithms
 .. ocv:function:: void Algorithm::getList(vector<string>& algorithms)
 
     :param algorithms: The output vector of algorithm names.
-    
+
 This static method returns the list of registered algorithms in alphabetical order. Here is how to use it ::
 
     vector<string> algorithms;
@@ -2443,13 +2442,13 @@ Creates algorithm instance by name
 .. ocv:function:: template<typename _Tp> Ptr<_Tp> Algorithm::create(const string& name)
 
     :param name: The algorithm name, one of the names returned by ``Algorithm::getList()``.
-    
+
 This static method creates a new instance of the specified algorithm. If there is no such algorithm, the method will silently return null pointer (that can be checked by ``Ptr::empty()`` method). Also, you should specify the particular ``Algorithm`` subclass as ``_Tp`` (or simply ``Algorithm`` if you do not know it at that point). ::
 
     Ptr<BackgroundSubtractor> bgfg = Algorithm::create<BackgroundSubtractor>("BackgroundSubtractor.MOG2");
-    
+
 .. note:: This is important note about seemingly mysterious behavior of ``Algorithm::create()`` when it returns NULL while it should not. The reason is simple - ``Algorithm::create()`` resides in OpenCV`s core module and the algorithms are implemented in other modules. If you create algorithms dynamically, C++ linker may decide to throw away the modules where the actual algorithms are implemented, since you do not call any functions from the modules. To avoid this problem, you need to call ``initModule_<modulename>();`` somewhere in the beginning of the program before ``Algorithm::create()``. For example, call ``initModule_nonfree()`` in order to use SURF/SIFT, call ``initModule_ml()`` to use expectation maximization etc.
-    
+
 Creating Own Algorithms
 -----------------------
 
@@ -2460,4 +2459,4 @@ The above methods are usually enough for users. If you want to make your own alg
  * Add public virtual method ``AlgorithmInfo* info() const;`` to your class.
  * Add constructor function, ``AlgorithmInfo`` instance and implement the ``info()`` method. The simplest way is to take  http://code.opencv.org/svn/opencv/trunk/opencv/modules/ml/src/ml_init.cpp as the reference and modify it according to the list of your parameters.
  * Add some public function (e.g. ``initModule_<mymodule>()``) that calls info() of your algorithm and put it into the same source file as ``info()`` implementation. This is to force C++ linker to include this object file into the target application. See ``Algorithm::create()`` for details.
+
index c4422a1..d0d17fd 100644 (file)
@@ -7,11 +7,11 @@ kmeans
 ------
 Finds centers of clusters and groups input samples around the clusters.
 
-.. ocv:function:: double kmeans( InputArray samples, int clusterCount, InputOutputArray labels, TermCriteria criteria, int attempts, int flags, OutputArray centers=noArray() )
+.. ocv:function:: double kmeans( InputArray data, int K, InputOutputArray bestLabels, TermCriteria criteria, int attempts, int flags, OutputArray centers=noArray() )
 
 .. ocv:pyfunction:: cv2.kmeans(data, K, criteria, attempts, flags[, bestLabels[, centers]]) -> retval, bestLabels, centers
 
-.. ocv:cfunction:: int cvKMeans2(const CvArr* samples, int clusterCount, CvArr* labels, CvTermCriteria criteria, int attempts=1, CvRNG* rng=0, int flags=0, CvArr* centers=0, double* compactness=0)
+.. ocv:cfunction:: int cvKMeans2( const CvArr* samples, int cluster_count, CvArr* labels, CvTermCriteria termcrit, int attempts=1, CvRNG* rng=0, int flags=0, CvArr* _centers=0, double* compactness=0 )
 
 .. ocv:pyoldfunction:: cv.KMeans2(samples, nclusters, labels, termcrit, attempts=1, flags=0, centers=None) -> float
 
index 7bdafbf..22d01da 100644 (file)
@@ -30,11 +30,12 @@ circle
 ----------
 Draws a circle.
 
-.. ocv:function:: void circle(Mat& img, Point center, int radius,            const Scalar& color, int thickness=1,            int lineType=8, int shift=0)
+.. ocv:function:: void circle(Mat& img, Point center, int radius, const Scalar& color, int thickness=1, int lineType=8, int shift=0)
 
 .. 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:cfunction:: void cvCircle( CvArr* img, CvPoint center, int radius, CvScalar color, int thickness=1, int line_type=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 +64,8 @@ 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:cfunction:: int cvClipLine( CvSize img_size, CvPoint* pt1, CvPoint* pt2 )
+
 .. ocv:pyoldfunction:: cv.ClipLine(imgSize, pt1, pt2) -> (point1, point2)
 
     :param imgSize: Image size. The image rectangle is  ``Rect(0, 0, imgSize.width, imgSize.height)`` .
@@ -88,10 +90,12 @@ 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:cfunction:: void cvEllipse( CvArr* img, CvPoint center, CvSize axes, double angle, double start_angle, double end_angle, CvScalar color, int thickness=1, int line_type=8, int shift=0 )
+
 .. ocv:pyoldfunction:: cv.Ellipse(img, center, axes, angle, start_angle, end_angle, 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:cfunction:: void cvEllipseBox( CvArr* img, CvBox2D box, CvScalar color, int thickness=1, int line_type=8, int shift=0 )
+
 .. ocv:pyoldfunction:: cv.EllipseBox(img, box, color, thickness=1, lineType=8, shift=0)-> None
 
     :param img: Image.
@@ -130,7 +134,7 @@ ellipse2Poly
 ----------------
 Approximates an elliptic arc with a polyline.
 
-.. ocv:function:: void ellipse2Poly( Point center, Size axes, int angle,                   int startAngle, int endAngle, int delta,                   vector<Point>& pts )
+.. ocv:function:: void ellipse2Poly( Point center, Size axes, int angle, int arcStart, int arcEnd, int delta, vector<Point>& pts )
 
 .. ocv:pyfunction:: cv2.ellipse2Poly(center, axes, angle, arcStart, arcEnd, delta) -> pts
 
@@ -157,11 +161,12 @@ fillConvexPoly
 ------------------
 Fills a convex polygon.
 
-.. ocv:function:: void fillConvexPoly(Mat& img, const Point* pts, int npts,                    const Scalar& color, int lineType=8,                    int shift=0)
+.. ocv:function:: void fillConvexPoly(Mat& img, const Point* pts, int npts, const Scalar& color, int lineType=8, int shift=0)
 
 .. 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:cfunction:: void cvFillConvexPoly( CvArr* img, const CvPoint* pts, int npts, CvScalar color, int line_type=8, int shift=0 )
+
 .. ocv:pyoldfunction:: cv.FillConvexPoly(img, pn, color, lineType=8, shift=0)-> None
 
     :param img: Image.
@@ -190,7 +195,8 @@ 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 ncontours, CvScalar color, int lineType=8, int shift=0 )
+.. ocv:cfunction:: void cvFillPoly( CvArr* img, CvPoint** pts, const int* npts, int contours, CvScalar color, int line_type=8, int shift=0 )
+
 .. ocv:pyoldfunction:: cv.FillPoly(img, polys, color, lineType=8, shift=0)-> None
 
     :param img: Image.
@@ -218,11 +224,12 @@ getTextSize
 ---------------
 Calculates the width and height of a text string.
 
-.. ocv:function:: Size getTextSize(const string& text, int fontFace,                 double fontScale, int thickness,                 int* baseLine)
+.. ocv:function:: Size getTextSize(const string& text, int fontFace, double fontScale, int thickness, int* baseLine)
 
 .. 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:cfunction:: void cvGetTextSize( const char* text_string, const CvFont* font, CvSize* text_size, int* baseline )
+
 .. ocv:pyoldfunction:: cv.GetTextSize(textString, font)-> (textSize, baseline)
 
     :param text: Input text string.
@@ -273,7 +280,7 @@ InitFont
 --------
 Initializes font structure (OpenCV 1.x API).
 
-.. ocv:cfunction:: void cvInitFont(  CvFont* font, int fontFace, double hscale, double vscale, double shear=0, int thickness=1, int lineType=8 )
+.. ocv:cfunction:: void cvInitFont( CvFont* font, int font_face, double hscale, double vscale, double shear=0, int thickness=1, int line_type=8 )
 
     :param font: Pointer to the font structure initialized by the function
 
@@ -327,7 +334,8 @@ 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:cfunction:: void cvLine( CvArr* img, CvPoint pt1, CvPoint pt2, CvScalar color, int thickness=1, int line_type=8, int shift=0 )
+
 .. ocv:pyoldfunction:: cv.Line(img, pt1, pt2, color, thickness=1, lineType=8, shift=0)-> None
 
     :param img: Image.
@@ -402,13 +410,14 @@ rectangle
 -------------
 Draws a simple, thick, or filled up-right rectangle.
 
-.. ocv:function:: void rectangle(Mat& img, Point pt1, Point pt2, const Scalar& color, int thickness=1,               int lineType=8, int shift=0)
+.. ocv:function:: void rectangle(Mat& img, Point pt1, Point pt2, const Scalar& color, int thickness=1, int lineType=8, int shift=0)
 
-.. ocv:function:: void rectangle(Mat& img, Rect r, const Scalar& color, int thickness=1,               int lineType=8, int shift=0)
+.. ocv:function:: void rectangle( Mat& img, Rect rec, const Scalar& color, int thickness=1, int lineType=8, int shift=0 )
 
 .. 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:cfunction:: void cvRectangle( CvArr* img, CvPoint pt1, CvPoint pt2, CvScalar color, int thickness=1, int line_type=8, int shift=0 )
+
 .. ocv:pyoldfunction:: cv.Rectangle(img, pt1, pt2, color, thickness=1, lineType=8, shift=0)-> None
 
     :param img: Image.
@@ -439,7 +448,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:cfunction:: void cvPolyLine( CvArr* img, CvPoint** pts, const int* npts, int contours, int is_closed, CvScalar color, int thickness=1, int line_type=8, int shift=0 )
 
 .. ocv:pyoldfunction:: cv.PolyLine(img, polys, is_closed, color, thickness=1, lineType=8, shift=0) -> None
 
index 909212d..59a8865 100644 (file)
@@ -228,7 +228,7 @@ ClearSet
 --------
 Clears a set.
 
-.. ocv:cfunction:: void cvClearSet( CvSet* setHeader )
+.. ocv:cfunction:: void cvClearSet( CvSet* set_header )
 
     :param setHeader: Cleared set
 
@@ -362,7 +362,8 @@ CreateMemStorage
 ----------------
 Creates memory storage.
 
-.. ocv:cfunction:: CvMemStorage* cvCreateMemStorage( int blockSize=0 )
+.. ocv:cfunction:: CvMemStorage* cvCreateMemStorage( int block_size=0 )
+
 .. ocv:pyoldfunction:: cv.CreateMemStorage(blockSize=0) -> memstorage
 
 
@@ -376,7 +377,7 @@ CreateSeq
 ---------
 Creates a sequence.
 
-.. ocv:cfunction:: CvSeq* cvCreateSeq(  int seqFlags, int headerSize, int elemSize, CvMemStorage* storage)
+.. ocv:cfunction:: CvSeq* cvCreateSeq( int seq_flags, size_t header_size, size_t elem_size, CvMemStorage* storage )
 
 
     :param seqFlags: Flags of the created sequence. If the sequence is not passed to any function working with a specific type of sequences, the sequence value may be set to 0, otherwise the appropriate type must be selected from the list of predefined sequence types.
@@ -480,7 +481,7 @@ FindGraphEdgeByPtr
 ------------------
 Finds an edge in a graph by using its pointer.
 
-.. ocv:cfunction:: CvGraphEdge* cvFindGraphEdgeByPtr(  const CvGraph* graph, const CvGraphVtx* startVtx, const CvGraphVtx* endVtx )
+.. ocv:cfunction:: CvGraphEdge* cvFindGraphEdgeByPtr( const CvGraph* graph, const CvGraphVtx* start_vtx, const CvGraphVtx* end_vtx )
 
     :param graph: Graph
 
@@ -529,7 +530,7 @@ GetSeqElem
 ----------
 Returns a pointer to a sequence element according to its index.
 
-.. ocv:cfunction:: char* cvGetSeqElem( const CvSeq* seq, int index )
+.. ocv:cfunction:: schar* cvGetSeqElem( const CvSeq* seq, int index )
 
     :param seq: Sequence
 
@@ -587,7 +588,7 @@ GetSetElem
 ----------
 Finds a set element by its index.
 
-.. ocv:cfunction:: CvSetElem* cvGetSetElem(  const CvSet* setHeader, int index )
+.. ocv:cfunction:: CvSetElem* cvGetSetElem( const CvSet* set_header, int index )
 
     :param setHeader: Set
 
@@ -723,7 +724,7 @@ GraphVtxDegree
 --------------
 Counts the number of edges incident to the vertex.
 
-.. ocv:cfunction:: int cvGraphVtxDegree( const CvGraph* graph, int vtxIdx )
+.. ocv:cfunction:: int cvGraphVtxDegree( const CvGraph* graph, int vtx_idx )
 
     :param graph: Graph
 
@@ -1021,7 +1022,7 @@ SeqInsert
 ---------
 Inserts an element in the middle of a sequence.
 
-.. ocv:cfunction:: char* cvSeqInsert(  CvSeq* seq, int beforeIndex, void* element=NULL )
+.. ocv:cfunction:: schar* cvSeqInsert( CvSeq* seq, int before_index, const void* element=NULL )
 
     :param seq: Sequence
 
@@ -1037,7 +1038,7 @@ SeqInsertSlice
 --------------
 Inserts an array in the middle of a sequence.
 
-.. ocv:cfunction:: void cvSeqInsertSlice(  CvSeq* seq, int beforeIndex, const CvArr* fromArr )
+.. ocv:cfunction:: void cvSeqInsertSlice( CvSeq* seq, int before_index, const CvArr* from_arr )
 
     :param seq: Sequence
 
@@ -1109,7 +1110,7 @@ SeqPush
 -------
 Adds an element to the end of a sequence.
 
-.. ocv:cfunction:: char* cvSeqPush(  CvSeq* seq, void* element=NULL )
+.. ocv:cfunction:: schar* cvSeqPush( CvSeq* seq, const void* element=NULL )
 
     :param seq: Sequence
 
@@ -1149,7 +1150,7 @@ SeqPushFront
 ------------
 Adds an element to the beginning of a sequence.
 
-.. ocv:cfunction:: char* cvSeqPushFront( CvSeq* seq, void* element=NULL )
+.. ocv:cfunction:: schar* cvSeqPushFront( CvSeq* seq, const void* element=NULL )
 
     :param seq: Sequence
 
@@ -1163,7 +1164,7 @@ SeqPushMulti
 ------------
 Pushes several elements to either end of a sequence.
 
-.. ocv:cfunction:: void cvSeqPushMulti(  CvSeq* seq, void* elements, int count, int in_front=0 )
+.. ocv:cfunction:: void cvSeqPushMulti( CvSeq* seq, const void* elements, int count, int in_front=0 )
 
     :param seq: Sequence
 
@@ -1216,7 +1217,7 @@ SeqSearch
 ---------
 Searches for an element in a sequence.
 
-.. ocv:cfunction:: char* cvSeqSearch( CvSeq* seq, const void* elem, CvCmpFunc func,                    int is_sorted, int* elem_idx, void* userdata=NULL )
+.. ocv:cfunction:: schar* cvSeqSearch( CvSeq* seq, const void* elem, CvCmpFunc func, int is_sorted, int* elem_idx, void* userdata=NULL )
 
     :param seq: The sequence
 
@@ -1325,7 +1326,7 @@ SetAdd
 ------
 Occupies a node in the set.
 
-.. ocv:cfunction:: int cvSetAdd(  CvSet* setHeader, CvSetElem* elem=NULL, CvSetElem** inserted_elem=NULL )
+.. ocv:cfunction:: int cvSetAdd( CvSet* set_header, CvSetElem* elem=NULL, CvSetElem** inserted_elem=NULL )
 
     :param setHeader: Set
 
@@ -1346,7 +1347,7 @@ SetNew
 ------
 Adds an element to a set (fast variant).
 
-.. ocv:cfunction:: CvSetElem* cvSetNew( CvSet* setHeader )
+.. ocv:cfunction:: CvSetElem* cvSetNew( CvSet* set_header )
 
     :param setHeader: Set
 
@@ -1358,7 +1359,7 @@ SetRemove
 ---------
 Removes an element from a set.
 
-.. ocv:cfunction:: void cvSetRemove(  CvSet* setHeader, int index )
+.. ocv:cfunction:: void cvSetRemove( CvSet* set_header, int index )
 
     :param setHeader: Set
 
@@ -1375,7 +1376,7 @@ SetRemoveByPtr
 --------------
 Removes a set element based on its pointer.
 
-.. ocv:cfunction:: void cvSetRemoveByPtr(  CvSet* setHeader, void* elem )
+.. ocv:cfunction:: void cvSetRemoveByPtr( CvSet* set_header, void* elem )
 
     :param setHeader: Set
 
@@ -1389,7 +1390,7 @@ SetSeqBlockSize
 ---------------
 Sets up sequence block size.
 
-.. ocv:cfunction:: void cvSetSeqBlockSize(  CvSeq* seq, int deltaElems )
+.. ocv:cfunction:: void cvSetSeqBlockSize( CvSeq* seq, int delta_elems )
 
     :param seq: Sequence
 
index 710e0e3..c2db139 100644 (file)
@@ -24,7 +24,7 @@ CvPoint
 
     constructs ``CvPoint`` structure.
 
-.. ocv:cfunction:: CvPoint cvPointFrom32f( CvPoint32f pt )
+.. ocv:cfunction:: CvPoint cvPointFrom32f( CvPoint2D32f point )
 
     converts ``CvPoint2D32f`` to ``CvPoint``.
 
@@ -45,11 +45,11 @@ CvPoint2D32f
 
         y-coordinate
 
-.. ocv:cfunction:: CvPoint2D32f cvPoint2D32f( float x, float y )
+.. ocv:cfunction:: CvPoint2D32f cvPoint2D32f( double x, double y )
 
     constructs ``CvPoint2D32f`` structure.
 
-.. ocv:cfunction:: CvPoint2D32f cvPointTo32f( CvPoint pt )
+.. ocv:cfunction:: CvPoint2D32f cvPointTo32f( CvPoint point )
 
     converts ``CvPoint`` to ``CvPoint2D32f``.
 
@@ -74,7 +74,7 @@ CvPoint3D32f
 
         z-coordinate
 
-.. ocv:cfunction:: CvPoint3D32f cvPoint3D32f( float x, float y, float z )
+.. ocv:cfunction:: CvPoint3D32f cvPoint3D32f( double x, double y, double z )
 
     constructs ``CvPoint3D32f`` structure.
 
@@ -511,7 +511,8 @@ ClearND
 -------
 Clears a specific array element.
 
-.. ocv:cfunction:: void cvClearND(CvArr* arr, int* idx)
+.. ocv:cfunction:: void cvClearND( CvArr* arr, const int* idx )
+
 .. ocv:pyoldfunction:: cv.ClearND(arr, idx)-> None
 
     :param arr: Input array
@@ -799,7 +800,7 @@ Get?D
 .. ocv:cfunction:: CvScalar cvGet1D(const CvArr* arr, int idx0)
 .. ocv:cfunction:: CvScalar cvGet2D(const CvArr* arr, int idx0, int idx1)
 .. ocv:cfunction:: CvScalar cvGet3D(const CvArr* arr, int idx0, int idx1, int idx2)
-.. ocv:cfunction:: CvScalar cvGetND(const CvArr* arr, int* idx)
+.. ocv:cfunction:: CvScalar cvGetND( const CvArr* arr, const int* idx )
 
 .. ocv:pyoldfunction:: cv.Get1D(arr, idx) -> scalar
 .. ocv:pyoldfunction:: cv.Get2D(arr, idx0, idx1) -> scalar
@@ -825,9 +826,11 @@ GetCol(s)
 Returns one of more array columns.
 
 .. ocv:cfunction:: CvMat* cvGetCol(const CvArr* arr, CvMat* submat, int col)
-.. ocv:cfunction:: CvMat* cvGetCols(const CvArr* arr, CvMat* submat, int startCol, int endCol)
+
+.. ocv:cfunction:: CvMat* cvGetCols( const CvArr* arr, CvMat* submat, int start_col, int end_col )
 
 .. ocv:pyoldfunction:: cv.GetCol(arr, col)-> submat
+
 .. ocv:pyoldfunction:: cv.GetCols(arr, startCol, endCol)-> submat
 
     :param arr: Input array
@@ -907,7 +910,8 @@ GetImage
 --------
 Returns image header for arbitrary array.
 
-.. ocv:cfunction:: IplImage* cvGetImage(const CvArr* arr, IplImage* imageHeader)
+.. ocv:cfunction:: IplImage* cvGetImage( const CvArr* arr, IplImage* image_header )
+
 .. ocv:pyoldfunction:: cv.GetImage(arr) -> iplimage
 
     :param arr: Input array
@@ -966,7 +970,7 @@ GetNextSparseNode
 -----------------
 Returns the next sparse matrix element
 
-.. ocv:cfunction:: CvSparseNode* cvGetNextSparseNode(CvSparseMatIterator* matIterator)
+.. ocv:cfunction:: CvSparseNode* cvGetNextSparseNode( CvSparseMatIterator* mat_iterator )
 
     :param matIterator: Sparse array iterator
 
@@ -999,7 +1003,7 @@ GetRawData
 ----------
 Retrieves low-level information about the array.
 
-.. ocv:cfunction:: void cvGetRawData(const CvArr* arr, uchar** data, int* step=NULL, CvSize* roiSize=NULL)
+.. ocv:cfunction:: void cvGetRawData( const CvArr* arr, uchar** data, int* step=NULL, CvSize* roi_size=NULL )
 
     :param arr: Array header
 
@@ -1031,7 +1035,7 @@ Return a specific element of single-channel 1D, 2D, 3D or nD array.
 .. ocv:cfunction:: double cvGetReal1D(const CvArr* arr, int idx0)
 .. ocv:cfunction:: double cvGetReal2D(const CvArr* arr, int idx0, int idx1)
 .. ocv:cfunction:: double cvGetReal3D(const CvArr* arr, int idx0, int idx1, int idx2)
-.. ocv:cfunction:: double cvGetRealND(const CvArr* arr, int* idx)
+.. ocv:cfunction:: double cvGetRealND( const CvArr* arr, const int* idx )
 
 .. ocv:pyoldfunction:: cv.GetReal1D(arr, idx0)->float
 .. ocv:pyoldfunction:: cv.GetReal2D(arr, idx0, idx1)->float
@@ -1059,7 +1063,7 @@ Returns array row or row span.
 
 .. ocv:cfunction:: CvMat* cvGetRow(const CvArr* arr, CvMat* submat, int row)
 
-.. ocv:cfunction:: CvMat* cvGetRows(const CvArr* arr, CvMat* submat, int startRow, int endRow, int deltaRow=1)
+.. ocv:cfunction:: CvMat* cvGetRows( const CvArr* arr, CvMat* submat, int start_row, int end_row, int delta_row=1 )
 
 .. ocv:pyoldfunction:: cv.GetRow(arr, row)-> submat
 .. ocv:pyoldfunction:: cv.GetRows(arr, startRow, endRow, deltaRow=1)-> submat
@@ -1209,7 +1213,7 @@ InitSparseMatIterator
 ---------------------
 Initializes sparse array elements iterator.
 
-.. ocv:cfunction:: CvSparseNode* cvInitSparseMatIterator(const CvSparseMat* mat,                                        CvSparseMatIterator* matIterator)
+.. ocv:cfunction:: CvSparseNode* cvInitSparseMatIterator( const CvSparseMat* mat, CvSparseMatIterator* mat_iterator )
 
     :param mat: Input array
 
@@ -1250,7 +1254,7 @@ Return pointer to a particular array element.
 
 .. ocv:cfunction:: uchar* cvPtr3D(const CvArr* arr, int idx0, int idx1, int idx2, int* type=NULL)
 
-.. ocv:cfunction:: uchar* cvPtrND(const CvArr* arr, int* idx, int* type=NULL, int createNode=1, unsigned* precalcHashval=NULL)
+.. ocv:cfunction:: uchar* cvPtrND( const CvArr* arr, const int* idx, int* type=NULL, int create_node=1, unsigned* precalc_hashval=NULL )
 
     :param arr: Input array
 
@@ -1403,7 +1407,8 @@ Reshape
 -------
 Changes shape of matrix/image without copying data.
 
-.. ocv:cfunction:: CvMat* cvReshape(const CvArr* arr, CvMat* header, int newCn, int newRows=0)
+.. ocv:cfunction:: CvMat* cvReshape( const CvArr* arr, CvMat* header, int new_cn, int new_rows=0 )
+
 .. ocv:pyoldfunction:: cv.Reshape(arr, newCn, newRows=0) -> mat
 
     :param arr: Input array
@@ -1440,7 +1445,8 @@ ReshapeMatND
 ------------
 Changes the shape of a multi-dimensional array without copying the data.
 
-.. ocv:cfunction:: CvArr* cvReshapeMatND(const CvArr* arr, int sizeofHeader, CvArr* header,                        int newCn, int newDims, int* newSizes)
+.. ocv:cfunction:: CvArr* cvReshapeMatND( const CvArr* arr, int sizeof_header, CvArr* header, int new_cn, int new_dims, int* new_sizes )
+
 .. ocv:pyoldfunction:: cv.ReshapeMatND(arr, newCn, newDims) -> mat
 
     :param arr: Input array
@@ -1508,7 +1514,7 @@ Change the particular array element.
 
 .. ocv:cfunction:: void cvSet3D(CvArr* arr, int idx0, int idx1, int idx2, CvScalar value)
 
-.. ocv:cfunction:: void cvSetND(CvArr* arr, int* idx, CvScalar value)
+.. ocv:cfunction:: void cvSetND( CvArr* arr, const int* idx, CvScalar value )
 
 .. ocv:pyoldfunction:: cv.Set1D(arr, idx, value) -> None
 .. ocv:pyoldfunction:: cv.Set2D(arr, idx0, idx1, value) -> None
@@ -1589,7 +1595,7 @@ Change a specific array element.
 
 .. ocv:cfunction:: void cvSetReal3D(CvArr* arr, int idx0, int idx1, int idx2, double value)
 
-.. ocv:cfunction:: void cvSetRealND(CvArr* arr, int* idx, double value)
+.. ocv:cfunction:: void cvSetRealND( CvArr* arr, const int* idx, double value )
 
 .. ocv:pyoldfunction:: cv.SetReal1D(arr, idx, value) -> None
 .. ocv:pyoldfunction:: cv.SetReal2D(arr, idx0, idx1, value) -> None
@@ -1687,7 +1693,8 @@ RandArr
 -------
 Fills an array with random numbers and updates the RNG state.
 
-.. ocv:cfunction:: void cvRandArr( CvRNG* rng, CvArr* arr, int distType, CvScalar param1, CvScalar param2)
+.. ocv:cfunction:: void cvRandArr( CvRNG* rng, CvArr* arr, int dist_type, CvScalar param1, CvScalar param2 )
+
 .. ocv:pyoldfunction:: cv.RandArr(rng, arr, distType, param1, param2)-> None
 
     :param rng: CvRNG state initialized by :ocv:cfunc:`RNG`
index f79ed54..e644062 100644 (file)
@@ -51,9 +51,9 @@ CvFileNode
 File storage node. When XML/YAML file is read, it is first parsed and stored in the memory as a hierarchical collection of nodes. Each node can be a "leaf", that is, contain a single number or a string, or be a collection of other nodes. Collections are also referenced to as "structures" in the data writing functions. There can be named collections (mappings), where each element has a name and is accessed by a name, and ordered collections (sequences), where elements do not have names, but rather accessed by index.
 
     .. ocv:member:: int tag
-    
+
         type of the file node:
-        
+
             * CV_NODE_NONE - empty node
             * CV_NODE_INT - an integer
             * CV_NODE_REAL - a floating-point number
@@ -64,13 +64,13 @@ File storage node. When XML/YAML file is read, it is first parsed and stored in
         type of the node can be retrieved using ``CV_NODE_TYPE(node->tag)`` macro.
 
     .. ocv:member:: CvTypeInfo* info
-    
+
         optional pointer to the user type information. If you look at the matrix representation in XML and YAML, shown above, you may notice ``type_id="opencv-matrix"`` or ``!!opencv-matrix`` strings. They are used to specify that the certain element of a file is a representation of a data structure of certain type  ("opencv-matrix" corresponds to :ocv:struct:`CvMat`). When a file is parsed, such type identifiers are passed to :ocv:cfunc:`FindType` to find type information and the pointer to it is stored in the file node. See :ocv:struct:`CvTypeInfo` for more details.
-        
+
     .. ocv:member:: union data
-    
+
         the node data, declared as: ::
-        
+
             union
             {
                 double f; /* scalar floating-point number */
@@ -81,7 +81,7 @@ File storage node. When XML/YAML file is read, it is first parsed and stored in
             } data;
 
         ..
-        
+
         Primitive nodes are read using :ocv:cfunc:`ReadInt`, :ocv:cfunc:`ReadReal` and :ocv:cfunc:`ReadString`. Sequences are read by iterating through ``node->data.seq`` (see "Dynamic Data Structures" section). Mappings are read using :ocv:cfunc:`GetFileNodeByName`. Nodes with the specified type (so that ``node->info != NULL``) can be read using :ocv:cfunc:`Read`.
 
 CvAttrList
@@ -97,16 +97,16 @@ List of attributes. ::
         struct CvAttrList* next; /* pointer to next chunk of the attributes list */
     }
     CvAttrList;
-    
+
     /* initializes CvAttrList structure */
     inline CvAttrList cvAttrList( const char** attr=NULL, CvAttrList* next=NULL );
-    
+
     /* returns attribute value or 0 (NULL) if there is no such attribute */
     const char* cvAttrValue( const CvAttrList* attr, const char* attr_name );
 
 ..
 
-In the current implementation, attributes are used to pass extra parameters when writing user objects (see 
+In the current implementation, attributes are used to pass extra parameters when writing user objects (see
 :ocv:cfunc:`Write`). XML attributes inside tags are not supported, aside from the object type specification (``type_id`` attribute).
 
 CvTypeInfo
@@ -124,7 +124,7 @@ Type information. ::
                                           const void* structPtr,
                                           CvAttrList attributes );
     typedef void* (CV_CDECL *CvCloneFunc)( const void* structPtr );
-    
+
     typedef struct CvTypeInfo
     {
         int flags; /* not used */
@@ -132,7 +132,7 @@ Type information. ::
         struct CvTypeInfo* prev; /* previous registered type in the list */
         struct CvTypeInfo* next; /* next registered type in the list */
         const char* type_name; /* type name, written to file storage */
-    
+
         /* methods */
         CvIsInstanceFunc is_instance; /* checks if the passed object belongs to the type */
         CvReleaseFunc release; /* releases object (memory etc.) */
@@ -151,9 +151,9 @@ Clone
 -----
 Makes a clone of an object.
 
-.. ocv:cfunction:: void* cvClone( const void* structPtr )
-    
-    :param structPtr: The object to clone 
+.. ocv:cfunction:: void* cvClone( const void* struct_ptr )
+
+    :param structPtr: The object to clone
 
 The function finds the type of a given object and calls ``clone`` with the passed object. Of course, if you know the object type, for example, ``structPtr`` is ``CvMat*``, it is faster to call the specific function, like :ocv:cfunc:`CloneMat`.
 
@@ -163,7 +163,7 @@ Finishes writing to a file node collection.
 
 .. ocv:cfunction:: void  cvEndWriteStruct(CvFileStorage* fs)
 
-    :param fs: File storage 
+    :param fs: File storage
 
 .. seealso:: :ocv:cfunc:`StartWriteStruct`.
 
@@ -171,9 +171,9 @@ FindType
 --------
 Finds a type by its name.
 
-.. ocv:cfunction:: CvTypeInfo* cvFindType(const char* typeName)
-    
-    :param typeName: Type name 
+.. ocv:cfunction:: CvTypeInfo* cvFindType( const char* type_name )
+
+    :param typeName: Type name
 
 The function finds a registered type by its name. It returns NULL if there is no type with the specified name.
 
@@ -189,15 +189,15 @@ GetFileNode
 -----------
 Finds a node in a map or file storage.
 
-.. ocv:cfunction:: CvFileNode* cvGetFileNode( CvFileStorage* fs, CvFileNode* map, const CvStringHashNode* key, int createMissing=0 )
-    
-    :param fs: File storage 
+.. ocv:cfunction:: CvFileNode* cvGetFileNode( CvFileStorage* fs, CvFileNode* map, const CvStringHashNode* key, int create_missing=0 )
+
+    :param fs: File storage
 
-    :param map: The parent map. If it is NULL, the function searches a top-level node. If both  ``map``  and  ``key``  are NULLs, the function returns the root file node - a map that contains top-level nodes. 
+    :param map: The parent map. If it is NULL, the function searches a top-level node. If both  ``map``  and  ``key``  are NULLs, the function returns the root file node - a map that contains top-level nodes.
 
-    :param key: Unique pointer to the node name, retrieved with  :ocv:cfunc:`GetHashedKey` 
+    :param key: Unique pointer to the node name, retrieved with  :ocv:cfunc:`GetHashedKey`
 
-    :param createMissing: Flag that specifies whether an absent node should be added to the map 
+    :param createMissing: Flag that specifies whether an absent node should be added to the map
 
 The function finds a file node. It is a faster version of  :ocv:cfunc:`GetFileNodeByName`
 (see :ocv:cfunc:`GetHashedKey` discussion). Also, the function can insert a new node, if it is not in the map yet.
@@ -207,12 +207,12 @@ GetFileNodeByName
 Finds a node in a map or file storage.
 
 .. ocv:cfunction:: CvFileNode* cvGetFileNodeByName( const CvFileStorage* fs, const CvFileNode* map, const char* name)
-    
-    :param fs: File storage 
 
-    :param map: The parent map. If it is NULL, the function searches in all the top-level nodes (streams), starting with the first one. 
+    :param fs: File storage
 
-    :param name: The file node name 
+    :param map: The parent map. If it is NULL, the function searches in all the top-level nodes (streams), starting with the first one.
+
+    :param name: The file node name
 
 The function finds a file node by ``name``. The node is searched either in ``map`` or, if the pointer is NULL, among the top-level file storage nodes. Using this function for maps and  :ocv:cfunc:`GetSeqElem`
 (or sequence reader) for sequences, it is possible to navigate through the file storage. To speed up multiple queries for a certain key (e.g., in the case of an array of structures) one may use a combination of  :ocv:cfunc:`GetHashedKey` and :ocv:cfunc:`GetFileNode`.
@@ -223,7 +223,7 @@ Returns the name of a file node.
 
 .. ocv:cfunction:: const char* cvGetFileNodeName( const CvFileNode* node )
 
-    :param node: File node 
+    :param node: File node
 
 The function returns the name of a file node or NULL, if the file node does not have a name or if  ``node`` is  ``NULL``.
 
@@ -231,21 +231,21 @@ GetHashedKey
 ------------
 Returns a unique pointer for a given name.
 
-.. ocv:cfunction:: CvStringHashNode* cvGetHashedKey( CvFileStorage* fs, const char* name, int len=-1, int createMissing=0 )
+.. ocv:cfunction:: CvStringHashNode* cvGetHashedKey( CvFileStorage* fs, const char* name, int len=-1, int create_missing=0 )
 
-    :param fs: File storage 
+    :param fs: File storage
 
-    :param name: Literal node name 
+    :param name: Literal node name
 
-    :param len: Length of the name (if it is known apriori), or -1 if it needs to be calculated 
+    :param len: Length of the name (if it is known apriori), or -1 if it needs to be calculated
 
-    :param createMissing: Flag that specifies, whether an absent key should be added into the hash table 
+    :param createMissing: Flag that specifies, whether an absent key should be added into the hash table
 
 The function returns a unique pointer for each particular file node name. This pointer can be then passed to the :ocv:cfunc:`GetFileNode` function that is faster than  :ocv:cfunc:`GetFileNodeByName`
 because it compares text strings by comparing pointers rather than the strings' content.
 
 Consider the following example where an array of points is encoded as a sequence of 2-entry maps: ::
-    
+
     points:
       - { x: 10, y: 10 }
       - { x: 20, y: 20 }
@@ -257,14 +257,14 @@ Consider the following example where an array of points is encoded as a sequence
 Then, it is possible to get hashed "x" and "y" pointers to speed up decoding of the points. ::
 
     #include "cxcore.h"
-    
+
     int main( int argc, char** argv )
     {
         CvFileStorage* fs = cvOpenFileStorage( "points.yml", 0, CV_STORAGE_READ );
         CvStringHashNode* x_key = cvGetHashedNode( fs, "x", -1, 1 );
         CvStringHashNode* y_key = cvGetHashedNode( fs, "y", -1, 1 );
         CvFileNode* points = cvGetFileNodeByName( fs, 0, "points" );
-    
+
         if( CV_NODE_IS_SEQ(points->tag) )
         {
             CvSeq* seq = points->data.seq;
@@ -312,10 +312,10 @@ GetRootFileNode
 Retrieves one of the top-level nodes of the file storage.
 
 .. ocv:cfunction:: CvFileNode* cvGetRootFileNode( const CvFileStorage* fs, int stream_index=0 )
-    
-    :param fs: File storage 
 
-    :param stream_index: Zero-based index of the stream. See  :ocv:cfunc:`StartNextStream` . In most cases, there is only one stream in the file; however, there can be several. 
+    :param fs: File storage
+
+    :param stream_index: Zero-based index of the stream. See  :ocv:cfunc:`StartNextStream` . In most cases, there is only one stream in the file; however, there can be several.
 
 The function returns one of the top-level file nodes. The top-level nodes do not have a name, they correspond to the streams that are stored one after another in the file storage. If the index is out of range, the function returns a NULL pointer, so all the top-level nodes can be iterated by subsequent calls to the function with ``stream_index=0,1,...``, until the NULL pointer is returned. This function
 can be used as a base for recursive traversal of the file storage.
@@ -325,16 +325,17 @@ Load
 ----
 Loads an object from a file.
 
-.. ocv:cfunction:: void* cvLoad( const char* filename, CvMemStorage* storage=NULL, const char* name=NULL, const char** realName=NULL )
+.. ocv:cfunction:: void* cvLoad( const char* filename, CvMemStorage* memstorage=NULL, const char* name=NULL, const char** real_name=NULL )
+
 .. ocv:pyoldfunction:: cv.Load(filename, storage=None, name=None)-> generic
-    
-    :param filename: File name 
 
-    :param storage: Memory storage for dynamic structures, such as  :ocv:struct:`CvSeq`  or  :ocv:struct:`CvGraph`  . It is not used for matrices or images. 
+    :param filename: File name
+
+    :param storage: Memory storage for dynamic structures, such as  :ocv:struct:`CvSeq`  or  :ocv:struct:`CvGraph`  . It is not used for matrices or images.
 
-    :param name: Optional object name. If it is NULL, the first top-level object in the storage will be loaded. 
+    :param name: Optional object name. If it is NULL, the first top-level object in the storage will be loaded.
 
-    :param realName: Optional output parameter that will contain the name of the loaded object (useful if  ``name=NULL`` ) 
+    :param realName: Optional output parameter that will contain the name of the loaded object (useful if  ``name=NULL`` )
 
 The function loads an object from a file. It basically reads the specified file, find the first top-level node and calls :ocv:cfunc:`Read` for that node. If the file node does not have type information or the type information can not be found by the type name, the function returns NULL. After the object is loaded, the file storage is closed and all the temporary buffers are deleted. Thus, to load a dynamic structure, such as a sequence, contour, or graph, one should pass a valid memory storage destination to the function.
 
@@ -342,19 +343,19 @@ OpenFileStorage
 ---------------
 Opens file storage for reading or writing data.
 
-.. ocv:cfunction:: CvFileStorage* cvOpenFileStorage( const char* filename, CvMemStorage* memstorage, int flags)
+.. ocv:cfunction:: CvFileStorage* cvOpenFileStorage( const char* filename, CvMemStorage* memstorage, int flags, const char* encoding=NULL )
 
-    :param filename: Name of the file associated with the storage 
+    :param filename: Name of the file associated with the storage
 
     :param memstorage: Memory storage used for temporary data and for
         storing dynamic structures, such as  :ocv:struct:`CvSeq`  or  :ocv:struct:`CvGraph` .
-        If it is NULL, a temporary memory storage is created and used. 
+        If it is NULL, a temporary memory storage is created and used.
 
     :param flags: Can be one of the following:
 
-            * **CV_STORAGE_READ** the storage is open for reading 
+            * **CV_STORAGE_READ** the storage is open for reading
 
-            * **CV_STORAGE_WRITE** the storage is open for writing 
+            * **CV_STORAGE_WRITE** the storage is open for writing
 
 The function opens file storage for reading or writing data. In the latter case, a new file is created or an existing file is rewritten. The type of the read or written file is determined by the filename extension:  ``.xml`` for  ``XML`` and  ``.yml`` or  ``.yaml`` for  ``YAML``. The function returns a pointer to the :ocv:struct:`CvFileStorage` structure. If the file cannot be opened then the function returns ``NULL``.
 
@@ -363,12 +364,12 @@ Read
 Decodes an object and returns a pointer to it.
 
 .. ocv:cfunction:: void* cvRead( CvFileStorage* fs, CvFileNode* node, CvAttrList* attributes=NULL )
-    
-    :param fs: File storage 
 
-    :param node: The root object node 
+    :param fs: File storage
 
-    :param attributes: Unused parameter 
+    :param node: The root object node
+
+    :param attributes: Unused parameter
 
 The function decodes a user object (creates an object in a native representation from the file storage subtree) and returns it. The object to be decoded must be an instance of a registered type that supports the ``read`` method (see :ocv:struct:`CvTypeInfo`). The type of the object is determined by the type name that is encoded in the file. If the object is a dynamic structure, it is created either in memory storage and passed to :ocv:cfunc:`OpenFileStorage` or, if a NULL pointer was passed, in temporary
 memory storage, which is released when :ocv:cfunc:`ReleaseFileStorage` is called. Otherwise, if the object is not a dynamic structure, it is created in a heap and should be released with a specialized function or by using the generic :ocv:cfunc:`Release`.
@@ -378,14 +379,14 @@ ReadByName
 Finds an object by name and decodes it.
 
 .. ocv:cfunction:: void* cvReadByName( CvFileStorage* fs, const CvFileNode* map, const char* name, CvAttrList* attributes=NULL )
-    
-    :param fs: File storage 
 
-    :param map: The parent map. If it is NULL, the function searches a top-level node. 
+    :param fs: File storage
+
+    :param map: The parent map. If it is NULL, the function searches a top-level node.
 
-    :param name: The node name 
+    :param name: The node name
 
-    :param attributes: Unused parameter 
+    :param attributes: Unused parameter
 
 The function is a simple superposition of :ocv:cfunc:`GetFileNodeByName` and  :ocv:cfunc:`Read`.
 
@@ -393,13 +394,13 @@ ReadInt
 -------
 Retrieves an integer value from a file node.
 
-.. ocv:cfunction:: int cvReadInt( const CvFileNode* node, int defaultValue=0 )
+.. ocv:cfunction:: int cvReadInt( const CvFileNode* node, int default_value=0 )
 
-    :param node: File node 
+    :param node: File node
 
-    :param defaultValue: The value that is returned if  ``node``  is NULL 
+    :param defaultValue: The value that is returned if  ``node``  is NULL
 
-The function returns an integer that is represented by the file node. If the file node is NULL, the 
+The function returns an integer that is represented by the file node. If the file node is NULL, the
 ``defaultValue`` is returned (thus, it is convenient to call the function right after :ocv:cfunc:`GetFileNode` without checking for a NULL pointer). If the file node has type  ``CV_NODE_INT``, then  ``node->data.i`` is returned. If the file node has type  ``CV_NODE_REAL``, then  ``node->data.f``
 is converted to an integer and returned. Otherwise the error is reported.
 
@@ -407,15 +408,15 @@ ReadIntByName
 -------------
 Finds a file node and returns its value.
 
-.. ocv:cfunction:: int cvReadIntByName( const CvFileStorage* fs, const CvFileNode* map, const char* name, int defaultValue=0 )
+.. ocv:cfunction:: int cvReadIntByName( const CvFileStorage* fs, const CvFileNode* map, const char* name, int default_value=0 )
 
-    :param fs: File storage 
+    :param fs: File storage
 
-    :param map: The parent map. If it is NULL, the function searches a top-level node. 
+    :param map: The parent map. If it is NULL, the function searches a top-level node.
 
-    :param name: The node name 
+    :param name: The node name
 
-    :param defaultValue: The value that is returned if the file node is not found 
+    :param defaultValue: The value that is returned if the file node is not found
 
 The function is a simple superposition of  :ocv:cfunc:`GetFileNodeByName` and  :ocv:cfunc:`ReadInt`.
 
@@ -425,13 +426,13 @@ Reads multiple numbers.
 
 .. ocv:cfunction:: void cvReadRawData( const CvFileStorage* fs, const CvFileNode* src, void* dst, const char* dt)
 
-    :param fs: File storage 
+    :param fs: File storage
 
-    :param src: The file node (a sequence) to read numbers from 
+    :param src: The file node (a sequence) to read numbers from
 
-    :param dst: Pointer to the destination array 
+    :param dst: Pointer to the destination array
 
-    :param dt: Specification of each array element. It has the same format as in  :ocv:cfunc:`WriteRawData` . 
+    :param dt: Specification of each array element. It has the same format as in  :ocv:cfunc:`WriteRawData` .
 
 The function reads elements from a file node that represents a sequence of scalars.
 
@@ -441,16 +442,16 @@ ReadRawDataSlice
 Initializes file node sequence reader.
 
 .. ocv:cfunction:: void cvReadRawDataSlice( const CvFileStorage* fs, CvSeqReader* reader, int count, void* dst, const char* dt )
-    
-    :param fs: File storage 
 
-    :param reader: The sequence reader. Initialize it with  :ocv:cfunc:`StartReadRawData` . 
+    :param fs: File storage
+
+    :param reader: The sequence reader. Initialize it with  :ocv:cfunc:`StartReadRawData` .
 
-    :param count: The number of elements to read 
+    :param count: The number of elements to read
 
-    :param dst: Pointer to the destination array 
+    :param dst: Pointer to the destination array
 
-    :param dt: Specification of each array element. It has the same format as in  :ocv:cfunc:`WriteRawData` . 
+    :param dt: Specification of each array element. It has the same format as in  :ocv:cfunc:`WriteRawData` .
 
 The function reads one or more elements from the file node, representing a sequence, to a user-specified array. The total number of read sequence elements is a product of ``total``
 and the number of components in each array element. For example, if ``dt=2if``, the function will read ``total*3`` sequence elements. As with any sequence, some parts of the file node sequence can be skipped or read repeatedly by repositioning the reader using :ocv:cfunc:`SetSeqReaderPos`.
@@ -459,27 +460,27 @@ ReadReal
 --------
 Retrieves a floating-point value from a file node.
 
-.. ocv:cfunction:: double cvReadReal( const CvFileNode* node, double defaultValue=0. )
-    
-    :param node: File node 
+.. ocv:cfunction:: double cvReadReal( const CvFileNode* node, double default_value=0. )
 
-    :param defaultValue: The value that is returned if  ``node``  is NULL 
+    :param node: File node
+
+    :param defaultValue: The value that is returned if  ``node``  is NULL
 
 The function returns a floating-point value
 that is represented by the file node. If the file node is NULL, the
 ``defaultValue``
 is returned (thus, it is convenient to call
-the function right after 
+the function right after
 :ocv:cfunc:`GetFileNode`
 without checking for a NULL
-pointer). If the file node has type 
+pointer). If the file node has type
 ``CV_NODE_REAL``
 ,
-then 
+then
 ``node->data.f``
 is returned. If the file node has type
 ``CV_NODE_INT``
-, then 
+, then
 ``node-:math:`>`data.f``
 is converted to floating-point
 and returned. Otherwise the result is not determined.
@@ -489,19 +490,19 @@ ReadRealByName
 --------------
 Finds a file node and returns its value.
 
-.. ocv:cfunction:: double  cvReadRealByName( const CvFileStorage* fs, const CvFileNode* map, const char* name, double defaultValue=0.)
-    
-    :param fs: File storage 
+.. ocv:cfunction:: double cvReadRealByName( const CvFileStorage* fs, const CvFileNode* map, const char* name, double default_value=0. )
+
+    :param fs: File storage
 
-    :param map: The parent map. If it is NULL, the function searches a top-level node. 
+    :param map: The parent map. If it is NULL, the function searches a top-level node.
 
-    :param name: The node name 
+    :param name: The node name
 
-    :param defaultValue: The value that is returned if the file node is not found 
+    :param defaultValue: The value that is returned if the file node is not found
 
-The function is a simple superposition of 
+The function is a simple superposition of
 :ocv:cfunc:`GetFileNodeByName`
-and 
+and
 :ocv:cfunc:`ReadReal`
 .
 
@@ -510,21 +511,21 @@ ReadString
 ----------
 Retrieves a text string from a file node.
 
-.. ocv:cfunction:: const char* cvReadString( const CvFileNode* node, const char* defaultValue=NULL )
-    
-    :param node: File node 
+.. ocv:cfunction:: const char* cvReadString( const CvFileNode* node, const char* default_value=NULL )
+
+    :param node: File node
 
-    :param defaultValue: The value that is returned if  ``node``  is NULL 
+    :param defaultValue: The value that is returned if  ``node``  is NULL
 
 The function returns a text string that is represented
-by the file node. If the file node is NULL, the 
+by the file node. If the file node is NULL, the
 ``defaultValue``
 is returned (thus, it is convenient to call the function right after
 :ocv:cfunc:`GetFileNode`
 without checking for a NULL pointer). If
-the file node has type 
+the file node has type
 ``CV_NODE_STR``
-, then 
+, then
 ``node-:math:`>`data.str.ptr``
 is returned. Otherwise the result is not determined.
 
@@ -533,19 +534,19 @@ ReadStringByName
 ----------------
 Finds a file node by its name and returns its value.
 
-.. ocv:cfunction:: const char* cvReadStringByName( const CvFileStorage* fs, const CvFileNode* map, const char* name, const char* defaultValue=NULL )
-    
-    :param fs: File storage 
+.. ocv:cfunction:: const char* cvReadStringByName( const CvFileStorage* fs, const CvFileNode* map, const char* name, const char* default_value=NULL )
 
-    :param map: The parent map. If it is NULL, the function searches a top-level node. 
+    :param fs: File storage
 
-    :param name: The node name 
+    :param map: The parent map. If it is NULL, the function searches a top-level node.
 
-    :param defaultValue: The value that is returned if the file node is not found 
+    :param name: The node name
 
-The function is a simple superposition of 
+    :param defaultValue: The value that is returned if the file node is not found
+
+The function is a simple superposition of
 :ocv:cfunc:`GetFileNodeByName`
-and 
+and
 :ocv:cfunc:`ReadString`
 .
 
@@ -556,10 +557,10 @@ Registers a new type.
 
 .. ocv:cfunction:: void cvRegisterType(const CvTypeInfo* info)
 
-    :param info: Type info structure 
+    :param info: Type info structure
 
 The function registers a new type, which is
-described by 
+described by
 ``info``
 . The function creates a copy of the structure,
 so the user should delete it after calling the function.
@@ -569,11 +570,11 @@ Release
 -------
 Releases an object.
 
-.. ocv:cfunction:: void cvRelease( void** structPtr )
+.. ocv:cfunction:: void cvRelease( void** struct_ptr )
 
-    :param structPtr: Double pointer to the object 
+    :param structPtr: Double pointer to the object
 
-The function finds the type of a given object and calls 
+The function finds the type of a given object and calls
 ``release``
 with the double pointer.
 
@@ -583,8 +584,8 @@ ReleaseFileStorage
 Releases file storage.
 
 .. ocv:cfunction:: void  cvReleaseFileStorage(CvFileStorage** fs)
-    
-    :param fs: Double pointer to the released file storage 
+
+    :param fs: Double pointer to the released file storage
 
 The function closes the file associated with the storage and releases all the temporary structures. It must be called after all I/O operations with the storage are finished.
 
@@ -593,20 +594,21 @@ Save
 ----
 Saves an object to a file.
 
-.. ocv:cfunction:: void cvSave( const char* filename, const void* structPtr, const char* name=NULL, const char* comment=NULL, CvAttrList attributes=cvAttrList())
+.. ocv:cfunction:: void cvSave( const char* filename, const void* struct_ptr, const char* name=NULL, const char* comment=NULL, CvAttrList attributes=cvAttrList() )
+
 .. ocv:pyoldfunction:: cv.Save(filename, structPtr, name=None, comment=None)-> None
-    
-    :param filename: File name 
 
-    :param structPtr: Object to save 
+    :param filename: File name
 
-    :param name: Optional object name. If it is NULL, the name will be formed from  ``filename`` . 
+    :param structPtr: Object to save
 
-    :param comment: Optional comment to put in the beginning of the file 
+    :param name: Optional object name. If it is NULL, the name will be formed from  ``filename`` .
 
-    :param attributes: Optional attributes passed to  :ocv:cfunc:`Write` 
+    :param comment: Optional comment to put in the beginning of the file
 
-The function saves an object to a file. It provides a simple interface to 
+    :param attributes: Optional attributes passed to  :ocv:cfunc:`Write`
+
+The function saves an object to a file. It provides a simple interface to
 :ocv:cfunc:`Write`
 .
 
@@ -617,7 +619,7 @@ Starts the next stream.
 
 .. ocv:cfunction:: void cvStartNextStream(CvFileStorage* fs)
 
-    :param fs: File storage 
+    :param fs: File storage
 
 The function finishes the currently written stream and starts the next stream. In the case of XML the file with multiple streams looks like this: ::
 
@@ -646,11 +648,11 @@ Initializes the file node sequence reader.
 
 .. ocv:cfunction:: void cvStartReadRawData( const CvFileStorage* fs, const CvFileNode* src, CvSeqReader* reader)
 
-    :param fs: File storage 
+    :param fs: File storage
 
-    :param src: The file node (a sequence) to read numbers from 
+    :param src: The file node (a sequence) to read numbers from
 
-    :param reader: Pointer to the sequence reader 
+    :param reader: Pointer to the sequence reader
 
 The function initializes the sequence reader to read data from a file node. The initialized reader can be then passed to :ocv:cfunc:`ReadRawDataSlice`.
 
@@ -659,31 +661,31 @@ StartWriteStruct
 ----------------
 Starts writing a new structure.
 
-.. ocv:cfunction:: void  cvStartWriteStruct( CvFileStorage* fs, const char* name, int struct_flags, const char* typeName=NULL, CvAttrList attributes=cvAttrList())
-    
-    :param fs: File storage 
+.. ocv:cfunction:: void cvStartWriteStruct( CvFileStorage* fs, const char* name, int struct_flags, const char* type_name=NULL, CvAttrList attributes=cvAttrList() )
+
+    :param fs: File storage
 
-    :param name: Name of the written structure. The structure can be accessed by this name when the storage is read. 
+    :param name: Name of the written structure. The structure can be accessed by this name when the storage is read.
 
-    :param struct_flags: A combination one of the following values: 
-         
-            * **CV_NODE_SEQ** the written structure is a sequence (see discussion of  :ocv:struct:`CvFileStorage` ), that is, its elements do not have a name. 
-            
-            * **CV_NODE_MAP** the written structure is a map (see discussion of  :ocv:struct:`CvFileStorage` ), that is, all its elements have names. 
+    :param struct_flags: A combination one of the following values:
 
-         One and only one of the two above flags must be specified 
+            * **CV_NODE_SEQ** the written structure is a sequence (see discussion of  :ocv:struct:`CvFileStorage` ), that is, its elements do not have a name.
 
-            * **CV_NODE_FLOW** the optional flag that makes sense only for YAML streams. It means that the structure is written as a flow (not as a block), which is more compact. It is recommended to use this flag for structures or arrays whose elements are all scalars. 
+            * **CV_NODE_MAP** the written structure is a map (see discussion of  :ocv:struct:`CvFileStorage` ), that is, all its elements have names.
+
+         One and only one of the two above flags must be specified
+
+            * **CV_NODE_FLOW** the optional flag that makes sense only for YAML streams. It means that the structure is written as a flow (not as a block), which is more compact. It is recommended to use this flag for structures or arrays whose elements are all scalars.
 
     :param typeName: Optional parameter - the object type name. In
         case of XML it is written as a  ``type_id``  attribute of the
         structure opening tag. In the case of YAML it is written after a colon
-        following the structure name (see the example in  :ocv:struct:`CvFileStorage` 
+        following the structure name (see the example in  :ocv:struct:`CvFileStorage`
         description). Mainly it is used with user objects. When the storage
         is read, the encoded type name is used to determine the object type
-        (see  :ocv:struct:`CvTypeInfo`  and  :ocv:cfunc:`FindType` ). 
+        (see  :ocv:struct:`CvTypeInfo`  and  :ocv:cfunc:`FindType` ).
 
-    :param attributes: This parameter is not used in the current implementation 
+    :param attributes: This parameter is not used in the current implementation
 
 The function starts writing a compound structure (collection) that can be a sequence or a map. After all the structure fields, which can be scalars or structures, are written, :ocv:cfunc:`EndWriteStruct` should be called. The function can be used to group some objects or to implement the ``write`` function for a some user object (see :ocv:struct:`CvTypeInfo`).
 
@@ -692,9 +694,9 @@ TypeOf
 ------
 Returns the type of an object.
 
-.. ocv:cfunction:: CvTypeInfo* cvTypeOf( const void* structPtr )
+.. ocv:cfunction:: CvTypeInfo* cvTypeOf( const void* struct_ptr )
 
-    :param structPtr: The object pointer 
+    :param structPtr: The object pointer
 
 The function finds the type of a given object. It iterates through the list of registered types and calls the  ``is_instance`` function/method for every type info structure with that object until one of them returns non-zero or until the whole list has been traversed. In the latter case, the function returns NULL.
 
@@ -703,9 +705,9 @@ UnregisterType
 --------------
 Unregisters the type.
 
-.. ocv:cfunction:: void cvUnregisterType( const char* typeName )
-    
-    :param typeName: Name of an unregistered type 
+.. ocv:cfunction:: void cvUnregisterType( const char* type_name )
+
+    :param typeName: Name of an unregistered type
 
 The function unregisters a type with a specified name. If the name is unknown, it is possible to locate the type info by an instance of the type using :ocv:cfunc:`TypeOf` or by iterating the type list, starting from  :ocv:cfunc:`FirstType`, and then calling ``cvUnregisterType(info->typeName)``.
 
@@ -715,12 +717,12 @@ Write
 Writes an object to file storage.
 
 .. ocv:cfunction:: void  cvWrite( CvFileStorage* fs, const char* name, const void* ptr, CvAttrList attributes=cvAttrList() )
-    
-    :param fs: File storage 
 
-    :param name: Name of the written object. Should be NULL if and only if the parent structure is a sequence. 
+    :param fs: File storage
 
-    :param ptr: Pointer to the object 
+    :param name: Name of the written object. Should be NULL if and only if the parent structure is a sequence.
+
+    :param ptr: Pointer to the object
 
     :param attributes: The attributes of the object. They are specific for each particular type (see the discussion below).
 
@@ -731,37 +733,37 @@ Attributes are used to customize the writing procedure. The standard types suppo
 #.
     CvSeq
 
-        * **header_dt** description of user fields of the sequence header that follow CvSeq, or CvChain (if the sequence is a Freeman chain) or CvContour (if the sequence is a contour or point sequence) 
+        * **header_dt** description of user fields of the sequence header that follow CvSeq, or CvChain (if the sequence is a Freeman chain) or CvContour (if the sequence is a contour or point sequence)
 
-        * **dt** description of the sequence elements. 
+        * **dt** description of the sequence elements.
 
         * **recursive** if the attribute is present and is not equal to "0" or "false", the whole tree of sequences (contours) is stored.
 
 #.
     CvGraph
 
-        * **header_dt** description of user fields of the graph header that follows CvGraph; 
+        * **header_dt** description of user fields of the graph header that follows CvGraph;
 
-        * **vertex_dt** description of user fields of graph vertices 
+        * **vertex_dt** description of user fields of graph vertices
 
         * **edge_dt** description of user fields of graph edges (note that the edge weight is always written, so there is no need to specify it explicitly)
 
-Below is the code that creates the YAML file shown in the 
+Below is the code that creates the YAML file shown in the
 ``CvFileStorage``
 description:
 
 ::
 
     #include "cxcore.h"
-    
+
     int main( int argc, char** argv )
     {
         CvMat* mat = cvCreateMat( 3, 3, CV_32F );
         CvFileStorage* fs = cvOpenFileStorage( "example.yml", 0, CV_STORAGE_WRITE );
-    
+
         cvSetIdentity( mat );
         cvWrite( fs, "A", mat, cvAttrList(0,0) );
-    
+
         cvReleaseFileStorage( &fs );
         cvReleaseMat( &mat );
         return 0;
@@ -774,13 +776,13 @@ WriteComment
 ------------
 Writes a comment.
 
-.. ocv:cfunction:: void  cvWriteComment( CvFileStorage* fs, const char* comment, int eolComment)
+.. ocv:cfunction:: void cvWriteComment( CvFileStorage* fs, const char* comment, int eol_comment )
 
-    :param fs: File storage 
+    :param fs: File storage
 
-    :param comment: The written comment, single-line or multi-line 
+    :param comment: The written comment, single-line or multi-line
 
-    :param eolComment: If non-zero, the function tries to put the comment at the end of current line. If the flag is zero, if the comment is multi-line, or if it does not fit at the end of the current line, the comment starts  a new line. 
+    :param eolComment: If non-zero, the function tries to put the comment at the end of current line. If the flag is zero, if the comment is multi-line, or if it does not fit at the end of the current line, the comment starts  a new line.
 
 The function writes a comment into file storage. The comments are skipped when the storage is read.
 
@@ -789,14 +791,14 @@ WriteFileNode
 Writes a file node to another file storage.
 
 .. ocv:cfunction:: void cvWriteFileNode( CvFileStorage* fs, const char* new_node_name, const CvFileNode* node, int embed )
-    
-    :param fs: Destination file storage 
 
-    :param new_node_name: New name of the file node in the destination file storage. To keep the existing name, use  :ocv:cfunc:`cvGetFileNodeName` 
+    :param fs: Destination file storage
+
+    :param new_node_name: New name of the file node in the destination file storage. To keep the existing name, use  :ocv:cfunc:`cvGetFileNodeName`
 
-    :param node: The written node 
+    :param node: The written node
 
-    :param embed: If the written node is a collection and this parameter is not zero, no extra level of hierarchy is created. Instead, all the elements of  ``node``  are written into the currently written structure. Of course, map elements can only be embedded into another map, and sequence elements can only be embedded into another sequence. 
+    :param embed: If the written node is a collection and this parameter is not zero, no extra level of hierarchy is created. Instead, all the elements of  ``node``  are written into the currently written structure. Of course, map elements can only be embedded into another map, and sequence elements can only be embedded into another sequence.
 
 The function writes a copy of a file node to file storage. Possible applications of the function are merging several file storages into one and conversion between XML and YAML formats.
 
@@ -806,11 +808,11 @@ Writes an integer value.
 
 .. ocv:cfunction:: void  cvWriteInt( CvFileStorage* fs, const char* name, int value)
 
-    :param fs: File storage 
+    :param fs: File storage
 
-    :param name: Name of the written value. Should be NULL if and only if the parent structure is a sequence. 
+    :param name: Name of the written value. Should be NULL if and only if the parent structure is a sequence.
 
-    :param value: The written value 
+    :param value: The written value
 
 The function writes a single integer value (with or without a name) to the file storage.
 
@@ -820,29 +822,29 @@ WriteRawData
 Writes multiple numbers.
 
 .. ocv:cfunction:: void  cvWriteRawData( CvFileStorage* fs, const void* src, int len, const char* dt )
-    
-    :param fs: File storage 
 
-    :param src: Pointer to the written array 
+    :param fs: File storage
 
-    :param len: Number of the array elements to write 
+    :param src: Pointer to the written array
 
-    :param dt: Specification of each array element that has the following format  ``([count]{'u'|'c'|'w'|'s'|'i'|'f'|'d'})...`` 
-        where the characters correspond to fundamental C types: 
+    :param len: Number of the array elements to write
 
-            * **u** 8-bit unsigned number 
+    :param dt: Specification of each array element that has the following format  ``([count]{'u'|'c'|'w'|'s'|'i'|'f'|'d'})...``
+        where the characters correspond to fundamental C types:
 
-            * **c** 8-bit signed number 
+            * **u** 8-bit unsigned number
 
-            * **w** 16-bit unsigned number 
+            * **c** 8-bit signed number
 
-            * **s** 16-bit signed number 
+            * **w** 16-bit unsigned number
 
-            * **i** 32-bit signed number 
+            * **s** 16-bit signed number
 
-            * **f** single precision floating-point number 
+            * **i** 32-bit signed number
 
-            * **d** double precision floating-point number 
+            * **f** single precision floating-point number
+
+            * **d** double precision floating-point number
 
             * **r** pointer, 32 lower bits of which are written as a signed integer. The type can be used to store structures with links between the elements. ``count``  is the optional counter of values of a given type. For
                 example,  ``2if``  means that each array element is a structure
@@ -854,9 +856,9 @@ Writes multiple numbers.
 
 The function writes an array, whose elements consist
 of single or multiple numbers. The function call can be replaced with
-a loop containing a few 
+a loop containing a few
 :ocv:cfunc:`WriteInt`
-and 
+and
 :ocv:cfunc:`WriteReal`
 calls, but
 a single call is more efficient. Note that because none of the elements
@@ -868,12 +870,12 @@ WriteReal
 Writes a floating-point value.
 
 .. ocv:cfunction:: void  cvWriteReal( CvFileStorage* fs, const char* name, double value )
-    
-    :param fs: File storage 
 
-    :param name: Name of the written value. Should be NULL if and only if the parent structure is a sequence. 
+    :param fs: File storage
+
+    :param name: Name of the written value. Should be NULL if and only if the parent structure is a sequence.
 
-    :param value: The written value 
+    :param value: The written value
 
 The function writes a single floating-point value (with or without a name) to file storage. Special values are encoded as follows: NaN (Not A Number) as .NaN, infinity as +.Inf or -.Inf.
 
@@ -900,12 +902,12 @@ Writes a text string.
 
 .. ocv:cfunction:: void  cvWriteString( CvFileStorage* fs, const char* name, const char* str, int quote=0 )
 
-    :param fs: File storage 
+    :param fs: File storage
 
-    :param name: Name of the written string . Should be NULL if and only if the parent structure is a sequence. 
+    :param name: Name of the written string . Should be NULL if and only if the parent structure is a sequence.
 
-    :param str: The written text string 
+    :param str: The written text string
 
-    :param quote: If non-zero, the written string is put in quotes, regardless of whether they are required. Otherwise, if the flag is zero, quotes are used only when they are required (e.g. when the string starts with a digit or contains spaces). 
+    :param quote: If non-zero, the written string is put in quotes, regardless of whether they are required. Otherwise, if the flag is zero, quotes are used only when they are required (e.g. when the string starts with a digit or contains spaces).
 
 The function writes a text string to file storage.
index 7e7979f..a5b39c9 100644 (file)
@@ -7,8 +7,8 @@ abs
 ---
 Computes an absolute value of each matrix element.
 
-.. ocv:function:: MatExpr abs(const Mat& src)
-.. ocv:function:: MatExpr abs(const MatExpr& src)
+.. ocv:function:: MatExpr abs( const Mat& m )
+.. ocv:function:: MatExpr abs( const MatExpr& e )
 
     :param src: Matrix or matrix expression.
 
@@ -373,7 +373,8 @@ Calculates the covariance matrix of a set of vectors.
 
 .. ocv:pyfunction:: cv2.calcCovarMatrix(samples, flags[, covar[, mean[, ctype]]]) -> covar, mean
 
-.. ocv:cfunction:: void cvCalcCovarMatrix( const CvArr** vects, int count, CvArr* covMat, CvArr* avg, int flags)
+.. ocv:cfunction:: void cvCalcCovarMatrix( const CvArr** vects, int count, CvArr* cov_mat, CvArr* avg, int flags )
+
 .. ocv:pyoldfunction:: cv.CalcCovarMatrix(vects, covMat, avg, flags)-> None
 
     :param samples: Samples stored either as separate matrices or as rows/columns of a single matrix.
@@ -428,7 +429,8 @@ Calculates the magnitude and angle of 2D vectors.
 
 .. ocv:pyfunction:: cv2.cartToPolar(x, y[, magnitude[, angle[, angleInDegrees]]]) -> magnitude, angle
 
-.. ocv:cfunction:: void cvCartToPolar( const CvArr* x, const CvArr* y, CvArr* magnitude, CvArr* angle=NULL, int angleInDegrees=0)
+.. ocv:cfunction:: void cvCartToPolar( const CvArr* x, const CvArr* y, CvArr* magnitude, CvArr* angle=NULL, int angle_in_degrees=0 )
+
 .. ocv:pyoldfunction:: cv.CartToPolar(x, y, magnitude, angle=None, angleInDegrees=0)-> None
 
     :param x: Array of x-coordinates. This must be a single-precision or double-precision floating-point array.
@@ -458,7 +460,7 @@ checkRange
 ----------
 Checks every element of an input array for invalid values.
 
-.. ocv:function:: bool checkRange(InputArray src, bool quiet=true, Point* pos=0, double minVal=-DBL_MAX, double maxVal=DBL_MAX)
+.. ocv:function:: bool checkRange( InputArray a, bool quiet=true, Point* pos=0, double minVal=-DBL_MAX, double maxVal=DBL_MAX )
 
 .. ocv:pyfunction:: cv2.checkRange(a[, quiet[, minVal[, maxVal]]]) -> retval, pos
 
@@ -487,11 +489,11 @@ Performs the per-element comparison of two arrays or an array and scalar value.
 
 .. ocv:pyfunction:: cv2.compare(src1, src2, cmpop[, dst]) -> dst
 
-.. ocv:cfunction:: void cvCmp(const CvArr* src1, const CvArr* src2, CvArr* dst, int cmpOp)
+.. ocv:cfunction:: void cvCmp( const CvArr* src1, const CvArr* src2, CvArr* dst, int cmp_op )
 
 .. ocv:pyoldfunction:: cv.Cmp(src1, src2, dst, cmpOp)-> None
 
-.. ocv:cfunction:: void cvCmpS(const CvArr* src1, double src2, CvArr* dst, int cmpOp)
+.. ocv:cfunction:: void cvCmpS( const CvArr* src, double value, CvArr* dst, int cmp_op )
 
 .. ocv:pyoldfunction:: cv.CmpS(src, value, dst, cmpOp)-> None
 
@@ -629,11 +631,12 @@ countNonZero
 ------------
 Counts non-zero array elements.
 
-.. ocv:function:: int countNonZero( InputArray mtx )
+.. ocv:function:: int countNonZero( InputArray src )
 
 .. ocv:pyfunction:: cv2.countNonZero(src) -> retval
 
 .. ocv:cfunction:: int cvCountNonZero(const CvArr* arr)
+
 .. ocv:pyoldfunction:: cv.CountNonZero(arr)-> int
 
     :param mtx: Single-channel array.
@@ -658,7 +661,7 @@ cvarrToMat
 ----------
 Converts ``CvMat``, ``IplImage`` , or ``CvMatND`` to ``Mat``.
 
-.. ocv:function:: Mat cvarrToMat(const CvArr* src, bool copyData=false, bool allowND=true, int coiMode=0)
+.. ocv:function:: Mat cvarrToMat( const CvArr* arr, bool copyData=false, bool allowND=true, int coiMode=0 )
 
     :param src: Source ``CvMat``, ``IplImage`` , or  ``CvMatND`` .
 
@@ -819,7 +822,8 @@ Performs a forward or inverse Discrete Fourier transform of a 1D or 2D floating-
 
 .. ocv:pyfunction:: cv2.dft(src[, dst[, flags[, nonzeroRows]]]) -> dst
 
-.. ocv:cfunction:: void cvDFT(const CvArr* src, CvArr* dst, int flags, int nonzeroRows=0)
+.. ocv:cfunction:: void cvDFT( const CvArr* src, CvArr* dst, int flags, int nonzero_rows=0 )
+
 .. ocv:pyoldfunction:: cv.DFT(src, dst, flags, nonzeroRows=0)-> None
 
     :param src: Source array that could be real or complex.
@@ -1021,7 +1025,8 @@ Returns the determinant of a square floating-point matrix.
 
 .. ocv:pyfunction:: cv2.determinant(mtx) -> retval
 
-.. ocv:cfunction:: double cvDet(const CvArr* mtx)
+.. ocv:cfunction:: double cvDet( const CvArr* mat )
+
 .. ocv:pyoldfunction:: cv.Det(mat) -> float
 
     :param mtx: Input matrix that must have  ``CV_32FC1``  or  ``CV_64FC1``  type and square size.
@@ -1051,7 +1056,7 @@ Computes eigenvalues and eigenvectors of a symmetric matrix.
 
 .. ocv:pyfunction:: cv2.eigen(src, computeEigenvectors[, eigenvalues[, eigenvectors]]) -> retval, eigenvalues, eigenvectors
 
-.. ocv:cfunction:: void cvEigenVV( CvArr* src, CvArr* eigenvectors, CvArr* eigenvalues, double eps=0, int lowindex=-1, int highindex=-1)
+.. ocv:cfunction:: void cvEigenVV( CvArr* mat, CvArr* evects, CvArr* evals, double eps=0, int lowindex=-1, int highindex=-1 )
 
 .. ocv:pyoldfunction:: cv.EigenVV(mat, evects, evals, eps, lowindex=-1, highindex=-1)-> None
 
@@ -1106,7 +1111,7 @@ extractImageCOI
 ---------------
 Extracts the selected image channel.
 
-.. ocv:function:: void extractImageCOI(const CvArr* src, OutputArray dst, int coi=-1)
+.. ocv:function:: void extractImageCOI( const CvArr* arr, OutputArray coiimg, int coi=-1 )
 
     :param src: Source array. It should be a pointer to  ``CvMat``  or  ``IplImage`` .
 
@@ -1127,7 +1132,7 @@ insertImageCOI
 ---------------
 Copies the selected image channel from a new-style C++ matrix to the old-style C array.
 
-.. ocv:function:: void insertImageCOI(InputArray src, CvArr* dst, int coi=-1)
+.. ocv:function:: void insertImageCOI( InputArray coiimg, CvArr* arr, int coi=-1 )
 
     :param src: Source array with a single channel and the same size and depth as ``dst``.
 
@@ -1163,7 +1168,8 @@ Flips a 2D array around vertical, horizontal, or both axes.
 
 .. ocv:pyfunction:: cv2.flip(src, flipCode[, dst]) -> dst
 
-.. ocv:cfunction:: void cvFlip(const CvArr* src, CvArr* dst=NULL, int flipMode=0)
+.. ocv:cfunction:: void cvFlip( const CvArr* src, CvArr* dst=NULL, int flip_mode=0 )
+
 .. ocv:pyoldfunction:: cv.Flip(src, dst=None, flipMode=0)-> None
 
     :param src: Source array.
@@ -1207,7 +1213,7 @@ gemm
 ----
 Performs generalized matrix multiplication.
 
-.. ocv:function:: void gemm(InputArray src1, InputArray src2, double alpha, InputArray src3, double beta, OutputArray dst, int flags=0)
+.. ocv:function:: void gemm( InputArray src1, InputArray src2, double alpha, InputArray src3, double gamma, OutputArray dst, int flags=0 )
 
 .. ocv:pyfunction:: cv2.gemm(src1, src2, alpha, src3, gamma[, dst[, flags]]) -> dst
 
@@ -1414,7 +1420,7 @@ Finds the inverse or pseudo-inverse of a matrix.
 
 .. ocv:pyfunction:: cv2.invert(src[, dst[, flags]]) -> retval, dst
 
-.. ocv:cfunction:: double cvInvert(const CvArr* src, CvArr* dst, int flags=CV_LU)
+.. ocv:cfunction:: double cvInvert( const CvArr* src, CvArr* dst, int method=CV_LU )
 
 .. ocv:pyoldfunction:: cv.Invert(src, dst, method=CV_LU) -> float
 
@@ -1486,7 +1492,7 @@ LUT
 ---
 Performs a look-up table transform of an array.
 
-.. ocv:function:: void LUT(InputArray src, InputArray lut, OutputArray dst)
+.. ocv:function:: void LUT( InputArray src, InputArray lut, OutputArray dst, int interpolation=0 )
 
 .. ocv:pyfunction:: cv2.LUT(src, lut[, dst[, interpolation]]) -> dst
 
@@ -1551,11 +1557,11 @@ Mahalanobis
 -----------
 Calculates the Mahalanobis distance between two vectors.
 
-.. ocv:function:: double Mahalanobis(InputArray vec1, InputArray vec2, InputArray icovar)
+.. ocv:function:: double Mahalanobis( InputArray v1, InputArray v2, InputArray icovar )
 
 .. ocv:pyfunction:: cv2.Mahalanobis(v1, v2, icovar) -> retval
 
-.. ocv:cfunction:: double cvMahalanobis( const CvArr* vec1, const CvArr* vec2, CvArr* icovar)
+.. ocv:cfunction:: double cvMahalanobis( const CvArr* vec1, const CvArr* vec2, const CvArr* mat )
 
 .. ocv:pyoldfunction:: cv.Mahalonobis(vec1, vec2, mat) -> None
 
@@ -1581,17 +1587,17 @@ max
 ---
 Calculates per-element maximum of two arrays or an array and a scalar.
 
-.. ocv:function:: MatExpr max(const Mat& src1, const Mat& src2)
+.. ocv:function:: MatExpr max( const Mat& a, const Mat& b )
 
-.. ocv:function:: MatExpr max(const Mat& src1, double value)
+.. ocv:function:: MatExpr max( const Mat& a, double s )
 
-.. ocv:function:: MatExpr max(double value, const Mat& src1)
+.. ocv:function:: MatExpr max( double s, const Mat& a )
 
 .. ocv:function:: void max(InputArray src1, InputArray src2, OutputArray dst)
 
 .. ocv:function:: void max(const Mat& src1, const Mat& src2, Mat& dst)
 
-.. ocv:function:: void max(const Mat& src1, double value, Mat& dst)
+.. ocv:function:: void max( const Mat& src1, double src2, Mat& dst )
 
 .. ocv:pyfunction:: cv2.max(src1, src2[, dst]) -> dst
 
@@ -1642,7 +1648,8 @@ Calculates an average (mean) of array elements.
 
 .. ocv:pyfunction:: cv2.mean(src[, mask]) -> retval
 
-.. ocv:cfunction:: CvScalar cvAvg(const CvArr* src, const CvArr* mask=NULL)
+.. ocv:cfunction:: CvScalar cvAvg( const CvArr* arr, const CvArr* mask=NULL )
+
 .. ocv:pyoldfunction:: cv.Avg(arr, mask=None) -> scalar
 
     :param src: Source array that should have from 1 to 4 channels so that the result can be stored in  :ocv:class:`Scalar_` .
@@ -1674,7 +1681,8 @@ Calculates a mean and standard deviation of array elements.
 
 .. ocv:pyfunction:: cv2.meanStdDev(src[, mean[, stddev[, mask]]]) -> mean, stddev
 
-.. ocv:cfunction:: void cvAvgSdv(const CvArr* src, CvScalar* mean, CvScalar* stdDev, const CvArr* mask=NULL)
+.. ocv:cfunction:: void cvAvgSdv( const CvArr* arr, CvScalar* mean, CvScalar* std_dev, const CvArr* mask=NULL )
+
 .. ocv:pyoldfunction:: cv.AvgSdv(arr, mask=None) -> (mean, stdDev)
 
     :param src: Source array that should have from 1 to 4 channels so that the results can be stored in  :ocv:class:`Scalar_` 's.
@@ -1711,7 +1719,7 @@ Composes a multi-channel array from several single-channel arrays.
 
 .. ocv:function:: void merge(const Mat* mv, size_t count, OutputArray dst)
 
-.. ocv:function:: void merge(const vector<Mat>& mv, OutputArray dst)
+.. ocv:function:: void merge( InputArrayOfArrays mv, OutputArray dst )
 
 .. ocv:pyfunction:: cv2.merge(mv[, dst]) -> dst
 
@@ -1742,17 +1750,17 @@ min
 ---
 Calculates per-element minimum of two arrays or array and a scalar.
 
-.. ocv:function:: MatExpr min(const Mat& src1, const Mat& src2)
+.. ocv:function:: MatExpr min( const Mat& a, const Mat& b )
 
-.. ocv:function:: MatExpr min(const Mat& src1, double value)
+.. ocv:function:: MatExpr min( const Mat& a, double s )
 
-.. ocv:function:: MatExpr min(double value, const Mat& src1)
+.. ocv:function:: MatExpr min( double s, const Mat& a )
 
 .. ocv:function:: void min(InputArray src1, InputArray src2, OutputArray dst)
 
 .. ocv:function:: void min(const Mat& src1, const Mat& src2, Mat& dst)
 
-.. ocv:function:: void min(const Mat& src1, double value, Mat& dst)
+.. ocv:function:: void min( const Mat& src1, double src2, Mat& dst )
 
 .. ocv:pyfunction:: cv2.min(src1, src2[, dst]) -> dst
 
@@ -1833,11 +1841,12 @@ Finds the global minimum and maximum in an array.
 
 .. ocv:function:: void minMaxLoc(InputArray src, double* minVal, double* maxVal=0, Point* minLoc=0, Point* maxLoc=0, InputArray mask=noArray())
 
-.. ocv:function:: void minMaxLoc(const SparseMat& src, double* minVal, double* maxVal, int* minIdx=0, int* maxIdx=0)
+.. ocv:function:: void minMaxLoc( const SparseMat& a, double* minVal, double* maxVal, int* minIdx=0, int* maxIdx=0 )
 
 .. ocv:pyfunction:: cv2.minMaxLoc(src[, mask]) -> minVal, maxVal, minLoc, maxLoc
 
-.. ocv:cfunction:: void cvMinMaxLoc(const CvArr* arr, double* minVal, double* maxVal, CvPoint* minLoc=NULL, CvPoint* maxLoc=NULL, const CvArr* mask=NULL)
+.. ocv:cfunction:: void cvMinMaxLoc( const CvArr* arr, double* min_val, double* max_val, CvPoint* min_loc=NULL, CvPoint* max_loc=NULL, const CvArr* mask=NULL )
+
 .. ocv:pyoldfunction:: cv.MinMaxLoc(arr, mask=None)-> (minVal, maxVal, minLoc, maxLoc)
 
     :param src: Source single-channel array.
@@ -1878,13 +1887,14 @@ mixChannels
 -----------
 Copies specified channels from input arrays to the specified channels of output arrays.
 
-.. ocv:function:: void mixChannels(const Mat* src, int nsrc, Mat* dst, int ndst, const int* fromTo, size_t npairs)
+.. ocv:function:: void mixChannels( const Mat* src, size_t nsrcs, Mat* dst, size_t ndsts, const int* fromTo, size_t npairs )
 
-.. ocv:function:: void mixChannels(const vector<Mat>& src, vector<Mat>& dst, const int* fromTo, int npairs)
+.. ocv:function:: void mixChannels( const vector<Mat>& src, vector<Mat>& dst, const int* fromTo, size_t npairs )
 
 .. ocv:pyfunction:: cv2.mixChannels(src, dst, fromTo) -> None
 
-.. ocv:cfunction:: void cvMixChannels(const CvArr** src, int srcCount, CvArr** dst, int dstCount, const int* fromTo, int pairCount)
+.. ocv:cfunction:: void cvMixChannels( const CvArr** src, int src_count, CvArr** dst, int dst_count, const int* from_to, int pair_count )
+
 .. ocv:pyoldfunction:: cv.MixChannels(src, dst, fromTo) -> None
 
     :param src: Input array or vector of matrices. All the matrices must have the same size and the same depth.
@@ -1934,7 +1944,7 @@ mulSpectrums
 ------------
 Performs the per-element multiplication of two Fourier spectrums.
 
-.. ocv:function:: void mulSpectrums(InputArray src1, InputArray src2, OutputArray dst, int flags, bool conj=false)
+.. ocv:function:: void mulSpectrums( InputArray a, InputArray b, OutputArray c, int flags, bool conjB=false )
 
 .. ocv:pyfunction:: cv2.mulSpectrums(a, b, flags[, c[, conjB]]) -> c
 
@@ -1964,7 +1974,7 @@ multiply
 --------
 Calculates the per-element scaled product of two arrays.
 
-.. ocv:function:: void multiply(InputArray src1, InputArray src2, OutputArray dst, double scale=1)
+.. ocv:function:: void multiply( InputArray src1, InputArray src2, OutputArray dst, double scale=1, int dtype=-1 )
 
 .. ocv:pyfunction:: cv2.multiply(src1, src2[, dst[, scale[, dtype]]]) -> dst
 
@@ -2013,11 +2023,12 @@ mulTransposed
 -------------
 Calculates the product of a matrix and its transposition.
 
-.. ocv:function:: void mulTransposed(InputArray src, OutputArray dst, bool aTa, InputArray delta=noArray(), double scale=1, int rtype=-1)
+.. ocv:function:: void mulTransposed( InputArray src, OutputArray dst, bool aTa, InputArray delta=noArray(), double scale=1, int dtype=-1 )
 
 .. ocv:pyfunction:: cv2.mulTransposed(src, aTa[, dst[, delta[, scale[, dtype]]]]) -> dst
 
-.. ocv:cfunction:: void cvMulTransposed(const CvArr* src, CvArr* dst, int order, const CvArr* delta=NULL, double scale=1.0)
+.. ocv:cfunction:: void cvMulTransposed( const CvArr* src, CvArr* dst, int order, const CvArr* delta=NULL, double scale=1. )
+
 .. ocv:pyoldfunction:: cv.MulTransposed(src, dst, order, delta=None, scale=1.0) -> None
 
     :param src: Source single-channel matrix. Note that unlike :ocv:func:`gemm`, the function can multiply not only floating-point matrices.
@@ -2061,14 +2072,15 @@ Calculates an absolute array norm, an absolute difference norm, or a relative di
 
 .. ocv:function:: double norm(InputArray src1, int normType=NORM_L2, InputArray mask=noArray())
 
-.. ocv:function:: double norm(InputArray src1, InputArray src2, int normType, InputArray mask=noArray())
+.. ocv:function:: double norm( InputArray src1, InputArray src2, int normType=NORM_L2, InputArray mask=noArray() )
 
 .. ocv:function:: double norm( const SparseMat& src, int normType )
 
 .. ocv:pyfunction:: cv2.norm(src1[, normType[, mask]]) -> retval
 .. ocv:pyfunction:: cv2.norm(src1, src2[, normType[, mask]]) -> retval
 
-.. ocv:cfunction:: double cvNorm(const CvArr* arr1, const CvArr* arr2=NULL, int normType=CV_L2, const CvArr* mask=NULL)
+.. ocv:cfunction:: double cvNorm( const CvArr* arr1, const CvArr* arr2=NULL, int norm_type=CV_L2, const CvArr* mask=NULL )
+
 .. ocv:pyoldfunction:: cv.Norm(arr1, arr2, normType=CV_L2, mask=None) -> float
 
     :param src1: First source array.
@@ -2115,7 +2127,7 @@ normalize
 ---------
 Normalizes the norm or value range of an array.
 
-.. ocv:function:: void normalize(const InputArray src, OutputArray dst, double alpha=1, double beta=0, int normType=NORM_L2, int rtype=-1, InputArray mask=noArray())
+.. ocv:function:: void normalize( InputArray src, OutputArray dst, double alpha=1, double beta=0, int norm_type=NORM_L2, int dtype=-1, InputArray mask=noArray() )
 
 .. ocv:function:: void normalize(const SparseMat& src, SparseMat& dst, double alpha, int normType)
 
@@ -2311,7 +2323,7 @@ perspectiveTransform
 --------------------
 Performs the perspective matrix transformation of vectors.
 
-.. ocv:function:: void perspectiveTransform(InputArray src, OutputArray dst, InputArray mtx)
+.. ocv:function:: void perspectiveTransform( InputArray src, OutputArray dst, InputArray m )
 
 .. ocv:pyfunction:: cv2.perspectiveTransform(src, m[, dst]) -> dst
 
@@ -2388,7 +2400,8 @@ Computes x and y coordinates of 2D vectors from their magnitude and angle.
 
 .. ocv:pyfunction:: cv2.polarToCart(magnitude, angle[, x[, y[, angleInDegrees]]]) -> x, y
 
-.. ocv:cfunction:: void cvPolarToCart( const CvArr* magnitude, const CvArr* angle, CvArr* x, CvArr* y, int angleInDegrees=0)
+.. ocv:cfunction:: void cvPolarToCart( const CvArr* magnitude, const CvArr* angle, CvArr* x, CvArr* y, int angle_in_degrees=0 )
+
 .. ocv:pyoldfunction:: cv.PolarToCart(magnitude, angle, x, y, angleInDegrees=0)-> None
 
     :param magnitude: Source floating-point array of magnitudes of 2D vectors. It can be an empty matrix ( ``=Mat()`` ). In this case, the function assumes that all the magnitudes are =1. If it is not empty, it must have the same size and type as  ``angle`` .
@@ -2425,7 +2438,7 @@ pow
 ---
 Raises every array element to a power.
 
-.. ocv:function:: void pow(InputArray src, double p, OutputArray dst)
+.. ocv:function:: void pow( InputArray src, double power, OutputArray dst )
 
 .. ocv:pyfunction:: cv2.pow(src, power[, dst]) -> dst
 
@@ -2616,7 +2629,7 @@ Generates a single uniformly-distributed random number or an array of random num
 
 .. ocv:function:: template<typename _Tp> _Tp randu()
 
-.. ocv:function:: void randu(InputOutputArray mtx, InputArray low, InputArray high)
+.. ocv:function:: void randu( InputOutputArray dst, InputArray low, InputArray high )
 
 .. ocv:pyfunction:: cv2.randu(dst, low, high) -> None
 
@@ -2647,7 +2660,7 @@ randn
 -----
 Fills the array with normally distributed random numbers.
 
-.. ocv:function:: void randn(InputOutputArray mtx, InputArray mean, InputArray stddev)
+.. ocv:function:: void randn( InputOutputArray dst, InputArray mean, InputArray stddev )
 
 .. ocv:pyfunction:: cv2.randn(dst, mean, stddev) -> None
 
@@ -2670,7 +2683,7 @@ randShuffle
 -----------
 Shuffles the array elements randomly.
 
-.. ocv:function:: void randShuffle(InputOutputArray mtx, double iterFactor=1., RNG* rng=0)
+.. ocv:function:: void randShuffle( InputOutputArray dst, double iterFactor=1., RNG* rng=0 )
 
 .. ocv:pyfunction:: cv2.randShuffle(dst[, iterFactor]) -> None
 
@@ -2693,7 +2706,7 @@ reduce
 ------
 Reduces a matrix to a vector.
 
-.. ocv:function:: void reduce(InputArray mtx, OutputArray vec, int dim, int reduceOp, int dtype=-1)
+.. ocv:function:: void reduce( InputArray src, OutputArray dst, int dim, int rtype, int dtype=-1 )
 
 .. ocv:pyfunction:: cv2.reduce(src, dim, rtype[, dst[, dtype]]) -> dst
 
@@ -2730,11 +2743,12 @@ Fills the destination array with repeated copies of the source array.
 
 .. ocv:function:: void repeat(InputArray src, int ny, int nx, OutputArray dst)
 
-.. ocv:function:: Mat repeat(InputArray src, int ny, int nx)
+.. ocv:function:: Mat repeat( const Mat& src, int ny, int nx )
 
 .. ocv:pyfunction:: cv2.repeat(src, ny, nx[, dst]) -> dst
 
 .. ocv:cfunction:: void cvRepeat(const CvArr* src, CvArr* dst)
+
 .. ocv:pyoldfunction:: cv.Repeat(src, dst)-> None
 
     :param src: Source array to replicate.
@@ -2766,7 +2780,7 @@ scaleAdd
 --------
 Calculates the sum of a scaled array and another array.
 
-.. ocv:function:: void scaleAdd(InputArray src1, double scale, InputArray src2, OutputArray dst)
+.. ocv:function:: void scaleAdd( InputArray src1, double alpha, InputArray src2, OutputArray dst )
 
 .. ocv:pyfunction:: cv2.scaleAdd(src1, alpha, src2[, dst]) -> dst
 
@@ -2809,11 +2823,12 @@ setIdentity
 -----------
 Initializes a scaled identity matrix.
 
-.. ocv:function:: void setIdentity(InputOutputArray dst, const Scalar& value=Scalar(1))
+.. ocv:function:: void setIdentity( InputOutputArray mtx, const Scalar& s=Scalar(1) )
 
 .. ocv:pyfunction:: cv2.setIdentity(mtx[, s]) -> None
 
 .. ocv:cfunction:: void cvSetIdentity(CvArr* mat, CvScalar value=cvRealScalar(1))
+
 .. ocv:pyoldfunction:: cv.SetIdentity(mat, value=1)-> None
 
     :param dst: Matrix to initialize (not necessarily square).
@@ -2897,11 +2912,12 @@ solveCubic
 --------------
 Finds the real roots of a cubic equation.
 
-.. ocv:function:: void solveCubic(InputArray coeffs, OutputArray roots)
+.. ocv:function:: int solveCubic( InputArray coeffs, OutputArray roots )
 
 .. ocv:pyfunction:: cv2.solveCubic(coeffs[, roots]) -> retval, roots
 
-.. ocv:cfunction:: void cvSolveCubic(const CvArr* coeffs, CvArr* roots)
+.. ocv:cfunction:: int cvSolveCubic( const CvMat* coeffs, CvMat* roots )
+
 .. ocv:pyoldfunction:: cv.SolveCubic(coeffs, roots)-> None
 
     :param coeffs: Equation coefficients, an array of 3 or 4 elements.
@@ -2930,7 +2946,7 @@ solvePoly
 ---------
 Finds the real or complex roots of a polynomial equation.
 
-.. ocv:function:: void solvePoly(InputArray coeffs, OutputArray roots, int maxIters=300)
+.. ocv:function:: double solvePoly( InputArray coeffs, OutputArray roots, int maxIters=300 )
 
 .. ocv:pyfunction:: cv2.solvePoly(coeffs[, roots[, maxIters]]) -> retval, roots
 
@@ -3021,13 +3037,14 @@ split
 -----
 Divides a multi-channel array into several single-channel arrays.
 
-.. ocv:function:: void split(const Mat& mtx, Mat* mv)
+.. ocv:function:: void split( const Mat& src, Mat* mvbegin )
 
-.. ocv:function:: void split(const Mat& mtx, vector<Mat>& mv)
+.. ocv:function:: void split( InputArray m, OutputArrayOfArrays mv )
 
 .. ocv:pyfunction:: cv2.split(m[, mv]) -> mv
 
 .. ocv:cfunction:: void cvSplit(const CvArr* src, CvArr* dst0, CvArr* dst1, CvArr* dst2, CvArr* dst3)
+
 .. ocv:pyoldfunction:: cv.Split(src, dst0, dst1, dst2, dst3)-> None
 
     :param mtx: Source multi-channel array.
@@ -3084,8 +3101,8 @@ Calculates the per-element difference between two arrays or array and a scalar.
 .. ocv:pyfunction:: cv2.subtract(src1, src2[, dst[, mask[, dtype]]]) -> dst
 
 .. ocv:cfunction:: void cvSub(const CvArr* src1, const CvArr* src2, CvArr* dst, const CvArr* mask=NULL)
-.. ocv:cfunction:: void cvSubRS(const CvArr* src1, CvScalar src2, CvArr* dst, const CvArr* mask=NULL)
-.. ocv:cfunction:: void cvSubS(const CvArr* src1, CvScalar src2, CvArr* dst, const CvArr* mask=NULL)
+.. ocv:cfunction:: void cvSubRS( const CvArr* src, CvScalar value, CvArr* dst, const CvArr* mask=NULL )
+.. ocv:cfunction:: void cvSubS( const CvArr* src, CvScalar value, CvArr* dst, const CvArr* mask=NULL )
 
 .. ocv:pyoldfunction:: cv.Sub(src1, src2, dst, mask=None) -> None
 .. ocv:pyoldfunction:: cv.SubRS(src, value, dst, mask=None) -> None
@@ -3175,9 +3192,9 @@ The constructors.
 
 .. ocv:function:: SVD::SVD()
 
-.. ocv:function:: SVD::SVD( InputArray A, int flags=0 )
+.. ocv:function:: SVD::SVD( InputArray src, int flags=0 )
 
-    :param A: Decomposed matrix.
+    :param src: Decomposed matrix.
 
     :param flags: Operation flags.
 
@@ -3221,7 +3238,7 @@ Performs SVD of a matrix
 
 .. ocv:pyfunction:: cv2.SVDecomp(src[, w[, u[, vt[, flags]]]]) -> w, u, vt
 
-.. ocv:cfunction:: void cvSVD( CvArr* src, CvArr* w, CvArr* u=NULL, CvArr* v=NULL, int flags=0)
+.. ocv:cfunction:: void cvSVD( CvArr* A, CvArr* W, CvArr* U=NULL, CvArr* V=NULL, int flags=0 )
 
 .. ocv:pyoldfunction:: cv.SVD(A, W, U=None, V=None, flags=0) -> None
 
@@ -3271,7 +3288,7 @@ Performs a singular value back substitution.
 
 .. ocv:pyfunction:: cv2.SVBackSubst(w, u, vt, rhs[, dst]) -> dst
 
-.. ocv:cfunction:: void cvSVBkSb( const CvArr* w, const CvArr* u, const CvArr* v, const CvArr* rhs, CvArr* dst, int flags)
+.. ocv:cfunction:: void cvSVBkSb( const CvArr* W, const CvArr* U, const CvArr* V, const CvArr* B, CvArr* X, int flags )
 
 .. ocv:pyoldfunction:: cv.SVBkSb(W, U, V, B, X, flags) -> None
 
@@ -3303,11 +3320,12 @@ sum
 ---
 Calculates the sum of array elements.
 
-.. ocv:function:: Scalar sum(InputArray arr)
+.. ocv:function:: Scalar sum( InputArray src )
 
 .. ocv:pyfunction:: cv2.sumElems(src) -> retval
 
 .. ocv:cfunction:: CvScalar cvSum(const CvArr* arr)
+
 .. ocv:pyoldfunction:: cv.Sum(arr) -> scalar
 
     :param arr: Source array that must have from 1 to 4 channels.
@@ -3347,11 +3365,12 @@ trace
 -----
 Returns the trace of a matrix.
 
-.. ocv:function:: Scalar trace(InputArray mat)
+.. ocv:function:: Scalar trace( InputArray mtx )
 
 .. ocv:pyfunction:: cv2.trace(mtx) -> retval
 
 .. ocv:cfunction:: CvScalar cvTrace(const CvArr* mat)
+
 .. ocv:pyoldfunction:: cv.Trace(mat) -> scalar
 
     :param mat: Source matrix.
@@ -3368,11 +3387,12 @@ transform
 ---------
 Performs the matrix transformation of every array element.
 
-.. ocv:function:: void transform(InputArray src, OutputArray dst, InputArray mtx )
+.. ocv:function:: void transform( InputArray src, OutputArray dst, InputArray m )
 
 .. ocv:pyfunction:: cv2.transform(src, m[, dst]) -> dst
 
-.. ocv:cfunction:: void cvTransform(const CvArr* src, CvArr* dst, const CvMat* mtx, const CvMat* shiftvec=NULL)
+.. ocv:cfunction:: void cvTransform( const CvArr* src, CvArr* dst, const CvMat* transmat, const CvMat* shiftvec=NULL )
+
 .. ocv:pyoldfunction:: cv.Transform(src, dst, transmat, shiftvec=None)-> None
 
     :param src: Source array that must have as many channels (1 to 4) as  ``mtx.cols``  or  ``mtx.cols-1``.
index 0835f24..fe6195f 100644 (file)
@@ -93,7 +93,7 @@ Computes the cube root of an argument.
 
 .. ocv:pyfunction:: cv2.cubeRoot(val) -> retval
 
-.. ocv:cfunction:: float cvCbrt(float val)
+.. ocv:cfunction:: float cvCbrt( float value )
 
 .. ocv:pyoldfunction:: cv.Cbrt(value)-> float
 
@@ -182,7 +182,7 @@ Signals an error and raises an exception.
 
 .. ocv:function:: void error( const Exception& exc )
 
-.. ocv:cfunction:: int cvError( int status, const char* funcName, const char* err_msg, const char* filename, int line )
+.. ocv:cfunction:: void cvError( int status, const char* func_name, const char* err_msg, const char* file_name, int line )
 
     :param exc: Exception to throw.
 
@@ -244,7 +244,8 @@ fastMalloc
 --------------
 Allocates an aligned memory buffer.
 
-.. ocv:function:: void* fastMalloc(size_t size)
+.. ocv:function:: void* fastMalloc( size_t bufSize )
+
 .. ocv:cfunction:: void* cvAlloc( size_t size )
 
     :param size: Allocated buffer size.
@@ -419,11 +420,11 @@ setUseOptimized
 -----------------
 Enables or disables the optimized code.
 
-.. ocv:function:: void setUseOptimized(bool onoff)
+.. ocv:function:: int cvUseOptimized( int on_off )
 
 .. ocv:pyfunction:: cv2.setUseOptimized(onoff) -> None
 
-.. ocv:cfunction:: int cvUseOptimized( int onoff )
+.. ocv:cfunction:: int cvUseOptimized( int on_off )
 
     :param onoff: The boolean flag specifying whether the optimized code should be used (``onoff=true``) or not (``onoff=false``).
 
index f16b4ed..b3170d9 100644 (file)
@@ -18,9 +18,9 @@ Here is an example: ::
 
     #include "opencv2/opencv.hpp"
     #include <time.h>
-    
+
     using namespace cv;
-    
+
     int main(int, char** argv)
     {
         FileStorage fs("test.yml", FileStorage::WRITE);
@@ -76,18 +76,18 @@ As an exercise, you can replace ".yml" with ".xml" in the sample above and see,
 Several things can be noted by looking at the sample code and the output:
  *
    The produced YAML (and XML) consists of heterogeneous collections that can be nested. There are 2 types of collections: named collections (mappings) and unnamed collections (sequences). In mappings each element has a name and is accessed by name. This is similar to structures and ``std::map`` in C/C++ and dictionaries in Python. In sequences elements do not have names, they are accessed by indices. This is similar to arrays and ``std::vector`` in C/C++ and lists, tuples in Python. "Heterogeneous" means that elements of each single collection can have different types.
+
    Top-level collection in YAML/XML is a mapping. Each matrix is stored as a mapping, and the matrix elements are stored as a sequence. Then, there is a sequence of features, where each feature is represented a mapping, and lbp value in a nested sequence.
-   
+
  *
    When you write to a mapping (a structure), you write element name followed by its value. When you write to a sequence, you simply write the elements one by one. OpenCV data structures (such as cv::Mat) are written in absolutely the same way as simple C data structures - using **``<<``** operator.
-   
+
  *
    To write a mapping, you first write the special string **"{"** to the storage, then write the elements as pairs (``fs << <element_name> << <element_value>``) and then write the closing **"}"**.
-   
+
  *
    To write a sequence, you first write the special string **"["**, then write the elements, then write the closing **"]"**.
+
  *
    In YAML (but not XML), mappings and sequences can be written in a compact Python-like inline form. In the sample above matrix elements, as well as each feature, including its lbp value, is stored in such inline form. To store a mapping/sequence in a compact form, put ":" after the opening character, e.g. use **"{:"** instead of **"{"** and **"[:"** instead of **"["**. When the data is written to XML, those extra ":" are ignored.
 
@@ -99,38 +99,38 @@ To read the previously written XML or YAML file, do the following:
 
  #.
    Open the file storage using :ocv:func:`FileStorage::FileStorage` constructor or :ocv:func:`FileStorage::open` method. In the current implementation the whole file is parsed and the whole representation of file storage is built in memory as a hierarchy of file nodes (see :ocv:class:`FileNode`)
-   
+
  #.
    Read the data you are interested in. Use :ocv:func:`FileStorage::operator []`, :ocv:func:`FileNode::operator []` and/or :ocv:class:`FileNodeIterator`.
-   
+
  #.
-   Close the storage using :ocv:func:`FileStorage::release`.  
-     
+   Close the storage using :ocv:func:`FileStorage::release`.
+
 Here is how to read the file created by the code sample above: ::
 
     FileStorage fs2("test.yml", FileStorage::READ);
-    
+
     // first method: use (type) operator on FileNode.
     int frameCount = (int)fs2["frameCount"];
-    
+
     std::string date;
     // second method: use FileNode::operator >>
     fs2["calibrationDate"] >> date;
-    
+
     Mat cameraMatrix2, distCoeffs2;
     fs2["cameraMatrix"] >> cameraMatrix2;
     fs2["distCoeffs"] >> distCoeffs2;
-    
+
     cout << "frameCount: " << frameCount << endl
          << "calibration date: " << date << endl
          << "camera matrix: " << cameraMatrix2 << endl
          << "distortion coeffs: " << distCoeffs2 << endl;
-    
+
     FileNode features = fs2["features"];
     FileNodeIterator it = features.begin(), it_end = features.end();
     int idx = 0;
     std::vector<uchar> lbpval;
-    
+
     // iterate through a sequence using FileNodeIterator
     for( ; it != it_end; ++it, idx++ )
     {
@@ -189,7 +189,7 @@ Checks whether the file is opened.
 .. ocv:function:: bool FileStorage::isOpened() const
 
     :returns: ``true`` if the object is associated with the current file and ``false`` otherwise.
-   
+
 It is a good practice to call this method after you tried to open a file.
 
 
@@ -254,22 +254,22 @@ Writes multiple numbers.
 
      :param fmt: Specification of each array element that has the following format  ``([count]{'u'|'c'|'w'|'s'|'i'|'f'|'d'})...`` where the characters correspond to fundamental C++ types:
 
-            * **u** 8-bit unsigned number 
+            * **u** 8-bit unsigned number
+
+            * **c** 8-bit signed number
 
-            * **c** 8-bit signed number 
+            * **w** 16-bit unsigned number
 
-            * **w** 16-bit unsigned number 
+            * **s** 16-bit signed number
 
-            * **s** 16-bit signed number 
+            * **i** 32-bit signed number
 
-            * **i** 32-bit signed number 
+            * **f** single precision floating-point number
 
-            * **f** single precision floating-point number 
+            * **d** double precision floating-point number
 
-            * **d** double precision floating-point number 
+            * **r** pointer, 32 lower bits of which are written as a signed integer. The type can be used to store structures with links between the elements.
 
-            * **r** pointer, 32 lower bits of which are written as a signed integer. The type can be used to store structures with links between the elements. 
-            
             ``count``  is the optional counter of values of a given type. For example,  ``2if``  means that each array element is a structure of 2 integers, followed by a single-precision floating-point number. The equivalent notations of the above specification are ' ``iif`` ', ' ``2i1f`` ' and so forth. Other examples:  ``u``  means that the array consists of bytes, and  ``2d``  means the array consists of pairs  of doubles.
 
      :param vec: Pointer to the written array.
@@ -431,7 +431,7 @@ Checks whether the node is empty.
 
 FileNode::isNone
 ----------------
-Checks whether the node is a "none" object 
+Checks whether the node is a "none" object
 
 .. ocv:function:: bool FileNode::isNone() const
 
@@ -459,7 +459,7 @@ Checks whether the node is a mapping.
 FileNode::isInt
 ---------------
 Checks whether the node is an integer.
-    
+
 .. ocv:function:: bool FileNode::isInt() const
 
     :returns: ``true`` if the node is an integer.
@@ -544,7 +544,7 @@ Returns the node content as text string.
 .. ocv:function:: FileNode::operator string() const
 
     :returns: The node content as a text string.
-        
+
 
 FileNode::operator*
 -------------------
@@ -663,7 +663,7 @@ FileNodeIterator::operator +=
 -----------------------------
 Moves iterator forward by the specified offset.
 
-.. ocv:function:: FileNodeIterator& FileNodeIterator::operator += (int ofs)
+.. ocv:function:: FileNodeIterator& FileNodeIterator::operator +=( int param )
 
     :param ofs: Offset (possibly negative) to move the iterator.
 
@@ -672,7 +672,7 @@ FileNodeIterator::operator -=
 -----------------------------
 Moves iterator backward by the specified offset (possibly negative).
 
-.. ocv:function:: FileNodeIterator& FileNodeIterator::operator -= (int ofs)
+.. ocv:function:: FileNodeIterator& FileNodeIterator::operator -=( int param )
 
     :param ofs: Offset (possibly negative) to move the iterator.
 
index de786da..f6ed16a 100644 (file)
@@ -66,7 +66,7 @@
 
 /*! \namespace cv
     Namespace where all the C++ OpenCV functionality resides
-*/ 
+*/
 namespace cv {
 
 #undef abs
@@ -77,13 +77,13 @@ namespace cv {
 using std::vector;
 using std::string;
 using std::ptrdiff_t;
-    
+
 template<typename _Tp> class CV_EXPORTS Size_;
 template<typename _Tp> class CV_EXPORTS Point_;
 template<typename _Tp> class CV_EXPORTS Rect_;
 template<typename _Tp, int cn> class CV_EXPORTS Vec;
 template<typename _Tp, int m, int n> class CV_EXPORTS Matx;
-    
+
 typedef std::string String;
 typedef std::basic_string<wchar_t> WString;
 
@@ -109,13 +109,13 @@ template<typename _Tp> class CV_EXPORTS Mat_;
 template<typename _Tp> class CV_EXPORTS MatIterator_;
 template<typename _Tp> class CV_EXPORTS MatConstIterator_;
 template<typename _Tp> class CV_EXPORTS MatCommaInitializer_;
-    
+
 CV_EXPORTS string fromUtf16(const WString& str);
 CV_EXPORTS WString toUtf16(const string& str);
 
 CV_EXPORTS string format( const char* fmt, ... );
 CV_EXPORTS string tempfile( const char* suffix CV_DEFAULT(0));
-    
+
 // matrix decomposition types
 enum { DECOMP_LU=0, DECOMP_SVD=1, DECOMP_EIG=2, DECOMP_CHOLESKY=3, DECOMP_QR=4, DECOMP_NORMAL=16 };
 enum { NORM_INF=1, NORM_L1=2, NORM_L2=4, NORM_L2SQR=5, NORM_HAMMING=6, NORM_HAMMING2=7, NORM_TYPE_MASK=7, NORM_RELATIVE=8, NORM_MINMAX=32 };
@@ -124,7 +124,7 @@ enum { GEMM_1_T=1, GEMM_2_T=2, GEMM_3_T=4 };
 enum { DFT_INVERSE=1, DFT_SCALE=2, DFT_ROWS=4, DFT_COMPLEX_OUTPUT=16, DFT_REAL_OUTPUT=32,
     DCT_INVERSE = DFT_INVERSE, DCT_ROWS=DFT_ROWS };
 
-    
+
 /*!
  The standard OpenCV exception class.
  Instances of the class are thrown by various functions and methods in the case of critical errors.
@@ -145,27 +145,27 @@ public:
 
     /*!
      \return the error description and the context as a text string.
-    */ 
+    */
     virtual const char *what() const throw();
     void formatMessage();
-    
+
     string msg; ///< the formatted error message
 
     int code; ///< error code @see CVStatus
     string err; ///< error description
     string func; ///< function name. Available only when the compiler supports __func__ macro
     string file; ///< source file name where the error has occured
-    int line; ///< line number in the source file where the error has occured 
+    int line; ///< line number in the source file where the error has occured
 };
 
 
 //! Signals an error and raises the exception.
+
 /*!
   By default the function prints information about the error to stderr,
   then it either stops if setBreakOnError() had been called before or raises the exception.
   It is possible to alternate error processing by using redirectError().
+
   \param exc the exception raisen.
  */
 CV_EXPORTS void error( const Exception& exc );
@@ -175,11 +175,11 @@ CV_EXPORTS void error( const Exception& exc );
 /*!
   When the break-on-error mode is set, the default error handler
   issues a hardware exception, which can make debugging more convenient.
+
   \return the previous state
  */
 CV_EXPORTS bool setBreakOnError(bool flag);
-    
+
 typedef int (CV_CDECL *ErrorCallback)( int status, const char* func_name,
                                        const char* err_msg, const char* file_name,
                                        int line, void* userdata );
@@ -188,16 +188,16 @@ typedef int (CV_CDECL *ErrorCallback)( int status, const char* func_name,
 
 /*!
   The function sets the new error handler, called from cv::error().
-  
+
   \param errCallback the new error handler. If NULL, the default error handler is used.
   \param userdata the optional user data pointer, passed to the callback.
   \param prevUserdata the optional output parameter where the previous user data pointer is stored
-  
+
   \return the previous error handler
-*/  
+*/
 CV_EXPORTS ErrorCallback redirectError( ErrorCallback errCallback,
                                         void* userdata=0, void** prevUserdata=0);
-    
+
 #ifdef __GNUC__
 #define CV_Error( code, msg ) cv::error( cv::Exception(code, msg, __func__, __FILE__, __LINE__) )
 #define CV_Error_( code, args ) cv::error( cv::Exception(code, cv::format args, __func__, __FILE__, __LINE__) )
@@ -207,7 +207,7 @@ CV_EXPORTS ErrorCallback redirectError( ErrorCallback errCallback,
 #define CV_Error_( code, args ) cv::error( cv::Exception(code, cv::format args, "", __FILE__, __LINE__) )
 #define CV_Assert( expr ) if((expr)) ; else cv::error( cv::Exception(CV_StsAssert, #expr, "", __FILE__, __LINE__) )
 #endif
-    
+
 #ifdef _DEBUG
 #define CV_DbgAssert(expr) CV_Assert(expr)
 #else
@@ -235,7 +235,7 @@ CV_EXPORTS_W int64 getTickCount();
 
   The function returns the number of ticks (as returned by cv::getTickCount()) per second.
   The following code computes the execution time in milliseconds:
-  
+
   \code
   double exec_time = (double)getTickCount();
   // do something ...
@@ -256,7 +256,7 @@ CV_EXPORTS_W int64 getCPUTickCount();
 
 /*!
   Returns SSE etc. support status
-  
+
   The function returns true if certain hardware features are available.
   Currently, the following features are recognized:
   - CV_CPU_MMX - MMX
@@ -268,7 +268,7 @@ CV_EXPORTS_W int64 getCPUTickCount();
   - CV_CPU_SSE4_2 - SSE 4.2
   - CV_CPU_POPCNT - POPCOUNT
   - CV_CPU_AVX - AVX
-  
+
   \note {Note that the function output is not static. Once you called cv::useOptimized(false),
   most of the hardware acceleration is disabled and thus the function will returns false,
   until you call cv::useOptimized(true)}
@@ -277,22 +277,22 @@ CV_EXPORTS_W bool checkHardwareSupport(int feature);
 
 //! returns the number of CPUs (including hyper-threading)
 CV_EXPORTS_W int getNumberOfCPUs();
-    
+
 /*!
   Allocates memory buffer
-  
+
   This is specialized OpenCV memory allocation function that returns properly aligned memory buffers.
   The usage is identical to malloc(). The allocated buffers must be freed with cv::fastFree().
   If there is not enough memory, the function calls cv::error(), which raises an exception.
-  
+
   \param bufSize buffer size in bytes
   \return the allocated memory buffer.
-*/ 
+*/
 CV_EXPORTS void* fastMalloc(size_t bufSize);
 
 /*!
   Frees the memory allocated with cv::fastMalloc
-  
+
   This is the corresponding deallocation function for cv::fastMalloc().
   When ptr==NULL, the function has no effect.
 */
@@ -310,10 +310,10 @@ template<typename _Tp> static inline void deallocate(_Tp* ptr, size_t)
 
 /*!
   Aligns pointer by the certain number of bytes
-  
+
   This small inline function aligns the pointer by the certian number of bytes by shifting
   it forward by 0 or a positive offset.
-*/  
+*/
 template<typename _Tp> static inline _Tp* alignPtr(_Tp* ptr, int n=(int)sizeof(_Tp))
 {
     return (_Tp*)(((size_t)ptr + n-1) & -n);
@@ -321,7 +321,7 @@ template<typename _Tp> static inline _Tp* alignPtr(_Tp* ptr, int n=(int)sizeof(_
 
 /*!
   Aligns buffer size by the certain number of bytes
-  
+
   This small inline function aligns a buffer size by the certian number of bytes by enlarging it.
 */
 static inline size_t alignSize(size_t sz, int n)
@@ -331,20 +331,20 @@ static inline size_t alignSize(size_t sz, int n)
 
 /*!
   Turns on/off available optimization
-  
+
   The function turns on or off the optimized code in OpenCV. Some optimization can not be enabled
   or disabled, but, for example, most of SSE code in OpenCV can be temporarily turned on or off this way.
-  
+
   \note{Since optimization may imply using special data structures, it may be unsafe
   to call this function anywhere in the code. Instead, call it somewhere at the top level.}
-*/  
+*/
 CV_EXPORTS_W void setUseOptimized(bool onoff);
 
 /*!
   Returns the current optimization status
-  
+
   The function returns the current optimization status, which is controlled by cv::setUseOptimized().
-*/  
+*/
 CV_EXPORTS_W bool useOptimized();
 
 /*!
@@ -352,7 +352,7 @@ CV_EXPORTS_W bool useOptimized();
 */
 template<typename _Tp> class CV_EXPORTS Allocator
 {
-public: 
+public:
     typedef _Tp value_type;
     typedef value_type* pointer;
     typedef const value_type* const_pointer;
@@ -384,14 +384,14 @@ public:
     void destroy(pointer p) { p->~_Tp(); }
 };
 
-/////////////////////// Vec (used as element of multi-channel images ///////////////////// 
+/////////////////////// Vec (used as element of multi-channel images /////////////////////
 
 /*!
   A helper class for cv::DataType
-  
+
   The class is specialized for each fundamental numerical data type supported by OpenCV.
   It provides DataDepth<T>::value constant.
-*/  
+*/
 template<typename _Tp> class CV_EXPORTS DataDepth {};
 
 template<> class DataDepth<bool> { public: enum { value = CV_8U, fmt=(int)'u' }; };
@@ -409,30 +409,30 @@ template<typename _Tp> class DataDepth<_Tp*> { public: enum { value = CV_USRTYPE
 
 
 ////////////////////////////// Small Matrix ///////////////////////////
-    
+
 /*!
  A short numerical vector.
+
  This template class represents short numerical vectors (of 1, 2, 3, 4 ... elements)
  on which you can perform basic arithmetical operations, access individual elements using [] operator etc.
  The vectors are allocated on stack, as opposite to std::valarray, std::vector, cv::Mat etc.,
  which elements are dynamically allocated in the heap.
+
  The template takes 2 parameters:
  -# _Tp element type
  -# cn the number of elements
+
  In addition to the universal notation like Vec<float, 3>, you can use shorter aliases
- for the most popular specialized variants of Vec, e.g. Vec3f ~ Vec<float, 3>. 
+ for the most popular specialized variants of Vec, e.g. Vec3f ~ Vec<float, 3>.
  */
-    
+
 struct CV_EXPORTS Matx_AddOp {};
 struct CV_EXPORTS Matx_SubOp {};
 struct CV_EXPORTS Matx_ScaleOp {};
 struct CV_EXPORTS Matx_MulOp {};
 struct CV_EXPORTS Matx_MatMulOp {};
 struct CV_EXPORTS Matx_TOp {};
-    
+
 template<typename _Tp, int m, int n> class CV_EXPORTS Matx
 {
 public:
@@ -441,10 +441,10 @@ public:
     typedef Matx<_Tp, m, n> mat_type;
     enum { depth = DataDepth<_Tp>::value, rows = m, cols = n, channels = rows*cols,
            type = CV_MAKETYPE(depth, channels) };
-    
+
     //! default constructor
     Matx();
-    
+
     Matx(_Tp v0); //!< 1x1 matrix
     Matx(_Tp v0, _Tp v1); //!< 1x2 or 2x1 matrix
     Matx(_Tp v0, _Tp v1, _Tp v2); //!< 1x3 or 3x1 matrix
@@ -463,7 +463,7 @@ public:
          _Tp v8, _Tp v9, _Tp v10, _Tp v11,
          _Tp v12, _Tp v13, _Tp v14, _Tp v15); //!< 1x16, 4x4 or 16x1 matrix
     explicit Matx(const _Tp* vals); //!< initialize from a plain array
-    
+
     static Matx all(_Tp alpha);
     static Matx zeros();
     static Matx ones();
@@ -471,52 +471,52 @@ public:
     static Matx diag(const diag_type& d);
     static Matx randu(_Tp a, _Tp b);
     static Matx randn(_Tp a, _Tp b);
-    
+
     //! dot product computed with the default precision
     _Tp dot(const Matx<_Tp, m, n>& v) const;
-    
+
     //! dot product computed in double-precision arithmetics
     double ddot(const Matx<_Tp, m, n>& v) const;
 
     //! convertion to another data type
     template<typename T2> operator Matx<T2, m, n>() const;
-    
+
     //! change the matrix shape
     template<int m1, int n1> Matx<_Tp, m1, n1> reshape() const;
-    
+
     //! extract part of the matrix
     template<int m1, int n1> Matx<_Tp, m1, n1> get_minor(int i, int j) const;
-    
+
     //! extract the matrix row
     Matx<_Tp, 1, n> row(int i) const;
-    
+
     //! extract the matrix column
     Matx<_Tp, m, 1> col(int i) const;
-    
+
     //! extract the matrix diagonal
     diag_type diag() const;
-    
+
     //! transpose the matrix
     Matx<_Tp, n, m> t() const;
-    
+
     //! invert matrix the matrix
     Matx<_Tp, n, m> inv(int method=DECOMP_LU) const;
-    
+
     //! solve linear system
     template<int l> Matx<_Tp, n, l> solve(const Matx<_Tp, m, l>& rhs, int flags=DECOMP_LU) const;
     Vec<_Tp, n> solve(const Vec<_Tp, m>& rhs, int method) const;
-    
+
     //! multiply two matrices element-wise
     Matx<_Tp, m, n> mul(const Matx<_Tp, m, n>& a) const;
-    
+
     //! element access
     const _Tp& operator ()(int i, int j) const;
     _Tp& operator ()(int i, int j);
-    
+
     //! 1D element access
     const _Tp& operator ()(int i) const;
     _Tp& operator ()(int i);
-    
+
     Matx(const Matx<_Tp, m, n>& a, const Matx<_Tp, m, n>& b, Matx_AddOp);
     Matx(const Matx<_Tp, m, n>& a, const Matx<_Tp, m, n>& b, Matx_SubOp);
     template<typename _T2> Matx(const Matx<_Tp, m, n>& a, _T2 alpha, Matx_ScaleOp);
@@ -527,7 +527,7 @@ public:
     _Tp val[m*n]; //< matrix elements
 };
 
-    
+
 typedef Matx<float, 1, 2> Matx12f;
 typedef Matx<double, 1, 2> Matx12d;
 typedef Matx<float, 1, 3> Matx13f;
@@ -536,7 +536,7 @@ typedef Matx<float, 1, 4> Matx14f;
 typedef Matx<double, 1, 4> Matx14d;
 typedef Matx<float, 1, 6> Matx16f;
 typedef Matx<double, 1, 6> Matx16d;
-    
+
 typedef Matx<float, 2, 1> Matx21f;
 typedef Matx<double, 2, 1> Matx21d;
 typedef Matx<float, 3, 1> Matx31f;
@@ -552,42 +552,42 @@ typedef Matx<float, 2, 3> Matx23f;
 typedef Matx<double, 2, 3> Matx23d;
 typedef Matx<float, 3, 2> Matx32f;
 typedef Matx<double, 3, 2> Matx32d;
-    
+
 typedef Matx<float, 3, 3> Matx33f;
 typedef Matx<double, 3, 3> Matx33d;
-    
+
 typedef Matx<float, 3, 4> Matx34f;
 typedef Matx<double, 3, 4> Matx34d;
 typedef Matx<float, 4, 3> Matx43f;
 typedef Matx<double, 4, 3> Matx43d;
-    
+
 typedef Matx<float, 4, 4> Matx44f;
 typedef Matx<double, 4, 4> Matx44d;
 typedef Matx<float, 6, 6> Matx66f;
-typedef Matx<double, 6, 6> Matx66d;    
+typedef Matx<double, 6, 6> Matx66d;
 
 
 /*!
   A short numerical vector.
-  
+
   This template class represents short numerical vectors (of 1, 2, 3, 4 ... elements)
   on which you can perform basic arithmetical operations, access individual elements using [] operator etc.
   The vectors are allocated on stack, as opposite to std::valarray, std::vector, cv::Mat etc.,
   which elements are dynamically allocated in the heap.
-  
+
   The template takes 2 parameters:
   -# _Tp element type
   -# cn the number of elements
-  
+
   In addition to the universal notation like Vec<float, 3>, you can use shorter aliases
-  for the most popular specialized variants of Vec, e.g. Vec3f ~ Vec<float, 3>. 
-*/ 
+  for the most popular specialized variants of Vec, e.g. Vec3f ~ Vec<float, 3>.
+*/
 template<typename _Tp, int cn> class CV_EXPORTS Vec : public Matx<_Tp, cn, 1>
 {
 public:
     typedef _Tp value_type;
     enum { depth = DataDepth<_Tp>::value, channels = cn, type = CV_MAKETYPE(depth, channels) };
-    
+
     //! default constructor
     Vec();
 
@@ -604,18 +604,18 @@ public:
     explicit Vec(const _Tp* values);
 
     Vec(const Vec<_Tp, cn>& v);
-    
+
     static Vec all(_Tp alpha);
 
     //! per-element multiplication
     Vec mul(const Vec<_Tp, cn>& v) const;
-    
+
     //! conjugation (makes sense for complex numbers and quaternions)
     Vec conj() const;
-    
+
     /*!
       cross product of the two 3D vectors.
-    
+
       For other dimensionalities the exception is raised
     */
     Vec cross(const Vec& v) const;
@@ -623,13 +623,13 @@ public:
     template<typename T2> operator Vec<T2, cn>() const;
     //! conversion to 4-element CvScalar.
     operator CvScalar() const;
-    
+
     /*! element access */
     const _Tp& operator [](int i) const;
     _Tp& operator[](int i);
     const _Tp& operator ()(int i) const;
     _Tp& operator ()(int i);
-    
+
     Vec(const Matx<_Tp, cn, 1>& a, const Matx<_Tp, cn, 1>& b, Matx_AddOp);
     Vec(const Matx<_Tp, cn, 1>& a, const Matx<_Tp, cn, 1>& b, Matx_SubOp);
     template<typename _T2> Vec(const Matx<_Tp, cn, 1>& a, _T2 alpha, Matx_ScaleOp);
@@ -650,8 +650,8 @@ typedef Vec<short, 4> Vec4s;
 
 typedef Vec<ushort, 2> Vec2w;
 typedef Vec<ushort, 3> Vec3w;
-typedef Vec<ushort, 4> Vec4w;    
-    
+typedef Vec<ushort, 4> Vec4w;
+
 typedef Vec<int, 2> Vec2i;
 typedef Vec<int, 3> Vec3i;
 typedef Vec<int, 4> Vec4i;
@@ -673,7 +673,7 @@ typedef Vec<double, 6> Vec6d;
 
 /*!
   A complex number class.
-  
+
   The template class is similar and compatible with std::complex, however it provides slightly
   more convenient access to the real and imaginary parts using through the simple field access, as opposite
   to std::complex::real() and std::complex::imag().
@@ -709,16 +709,16 @@ typedef Complex<double> Complexd;
 
 /*!
   template 2D point class.
-  
+
   The class defines a point in 2D space. Data type of the point coordinates is specified
-  as a template parameter. There are a few shorter aliases available for user convenience. 
+  as a template parameter. There are a few shorter aliases available for user convenience.
   See cv::Point, cv::Point2i, cv::Point2f and cv::Point2d.
-*/  
+*/
 template<typename _Tp> class CV_EXPORTS Point_
 {
 public:
     typedef _Tp value_type;
-    
+
     // various constructors
     Point_();
     Point_(_Tp _x, _Tp _y);
@@ -745,23 +745,23 @@ public:
     double cross(const Point_& pt) const;
     //! checks whether the point is inside the specified rectangle
     bool inside(const Rect_<_Tp>& r) const;
-    
+
     _Tp x, y; //< the point coordinates
 };
 
 /*!
   template 3D point class.
-  
+
   The class defines a point in 3D space. Data type of the point coordinates is specified
   as a template parameter.
-  
+
   \see cv::Point3i, cv::Point3f and cv::Point3d
 */
 template<typename _Tp> class CV_EXPORTS Point3_
 {
 public:
     typedef _Tp value_type;
-    
+
     // various constructors
     Point3_();
     Point3_(_Tp _x, _Tp _y, _Tp _z);
@@ -784,7 +784,7 @@ public:
     double ddot(const Point3_& pt) const;
     //! cross product of the 2 3D points
     Point3_ cross(const Point3_& pt) const;
-    
+
     _Tp x, y, z; //< the point coordinates
 };
 
@@ -792,7 +792,7 @@ public:
 
 /*!
   The 2D size class
-  
+
   The class represents the size of a 2D rectangle, image size, matrix size etc.
   Normally, cv::Size ~ cv::Size_<int> is used.
 */
@@ -800,7 +800,7 @@ template<typename _Tp> class CV_EXPORTS Size_
 {
 public:
     typedef _Tp value_type;
-    
+
     //! various constructors
     Size_();
     Size_(_Tp _width, _Tp _height);
@@ -815,7 +815,7 @@ public:
 
     //! conversion of another data type.
     template<typename _Tp2> operator Size_<_Tp2>() const;
-    
+
     //! conversion to the old-style OpenCV types
     operator CvSize() const;
     operator CvSize2D32f() const;
@@ -827,7 +827,7 @@ public:
 
 /*!
   The 2D up-right rectangle class
-  
+
   The class represents a 2D rectangle with coordinates of the specified data type.
   Normally, cv::Rect ~ cv::Rect_<int> is used.
 */
@@ -835,7 +835,7 @@ template<typename _Tp> class CV_EXPORTS Rect_
 {
 public:
     typedef _Tp value_type;
-    
+
     //! various constructors
     Rect_();
     Rect_(_Tp _x, _Tp _y, _Tp _width, _Tp _height);
@@ -849,7 +849,7 @@ public:
     Point_<_Tp> tl() const;
     //! the bottom-right corner
     Point_<_Tp> br() const;
-    
+
     //! size (width, height) of the rectangle
     Size_<_Tp> size() const;
     //! area (width*height) of the rectangle
@@ -869,7 +869,7 @@ public:
 
 /*!
   \typedef
-  
+
   shorter aliases for the most popular cv::Point_<>, cv::Size_<> and cv::Rect_<> specializations
 */
 typedef Point_<int> Point2i;
@@ -887,17 +887,17 @@ typedef Point3_<double> Point3d;
 
 /*!
   The rotated 2D rectangle.
-  
+
   The class represents rotated (i.e. not up-right) rectangles on a plane.
   Each rectangle is described by the center point (mass center), length of each side
   (represented by cv::Size2f structure) and the rotation angle in degrees.
-*/  
+*/
 class CV_EXPORTS RotatedRect
 {
 public:
     //! various constructors
     RotatedRect();
-    RotatedRect(const Point2f& _center, const Size2f& _size, float _angle);
+    RotatedRect(const Point2f& center, const Size2f& size, float angle);
     RotatedRect(const CvBox2D& box);
 
     //! returns 4 vertices of the rectangle
@@ -906,19 +906,19 @@ public:
     Rect boundingRect() const;
     //! conversion to the old-style CvBox2D structure
     operator CvBox2D() const;
-    
+
     Point2f center; //< the rectangle mass center
     Size2f size;    //< width and height of the rectangle
-    float angle;    //< the rotation angle. When the angle is 0, 90, 180, 270 etc., the rectangle becomes an up-right rectangle. 
+    float angle;    //< the rotation angle. When the angle is 0, 90, 180, 270 etc., the rectangle becomes an up-right rectangle.
 };
 
 //////////////////////////////// Scalar_ ///////////////////////////////
 
 /*!
    The template scalar class.
-   
+
    This is partially specialized cv::Vec class with the number of elements = 4, i.e. a short vector of four elements.
-   Normally, cv::Scalar ~ cv::Scalar_<double> is used. 
+   Normally, cv::Scalar ~ cv::Scalar_<double> is used.
 */
 template<typename _Tp> class CV_EXPORTS Scalar_ : public Vec<_Tp, 4>
 {
@@ -939,10 +939,10 @@ public:
 
     //! per-element product
     Scalar_<_Tp> mul(const Scalar_<_Tp>& t, double scale=1 ) const;
-    
+
     // returns (v0, -v1, -v2, -v3)
     Scalar_<_Tp> conj() const;
-    
+
     // returns true iff v1 == v2 == v3 == 0
     bool isReal() const;
 };
@@ -955,7 +955,7 @@ CV_EXPORTS void scalarToRawData(const Scalar& s, void* buf, int type, int unroll
 
 /*!
    The 2D range class
-   
+
    This is the class used to specify a continuous subsequence, i.e. part of a contour, or a column span in a matrix.
 */
 class CV_EXPORTS Range
@@ -976,7 +976,7 @@ public:
 
 /*!
    Informative template class for OpenCV "scalars".
-   
+
    The class is specialized for each primitive numerical type supported by OpenCV (such as unsigned char or float),
    as well as for more complex types, like cv::Complex<>, std::complex<>, cv::Vec<> etc.
    The common property of all such types (called "scalars", do not confuse it with cv::Scalar_)
@@ -1211,27 +1211,27 @@ public:
            type = CV_MAKETYPE(depth, channels) };
     typedef Vec<channel_type, channels> vec_type;
 };
-    
+
 //////////////////// generic_type ref-counting pointer class for C/C++ objects ////////////////////////
 
 /*!
   Smart pointer to dynamically allocated objects.
-  
+
   This is template pointer-wrapping class that stores the associated reference counter along with the
   object pointer. The class is similar to std::smart_ptr<> from the recent addons to the C++ standard,
   but is shorter to write :) and self-contained (i.e. does add any dependency on the compiler or an external library).
-  
+
   Basically, you can use "Ptr<MyObjectType> ptr" (or faster "const Ptr<MyObjectType>& ptr" for read-only access)
   everywhere instead of "MyObjectType* ptr", where MyObjectType is some C structure or a C++ class.
   To make it all work, you need to specialize Ptr<>::delete_obj(), like:
-  
+
   \code
   template<> void Ptr<MyObjectType>::delete_obj() { call_destructor_func(obj); }
   \endcode
-  
+
   \note{if MyObjectType is a C++ class with a destructor, you do not need to specialize delete_obj(),
   since the default implementation calls "delete obj;"}
-  
+
   \note{Another good property of the class is that the operations on the reference counter are atomic,
   i.e. it is safe to use the class in multi-threaded applications}
 */
@@ -1260,42 +1260,42 @@ public:
     //! cast pointer to another type
     template<typename _Tp2> Ptr<_Tp2> ptr();
     template<typename _Tp2> const Ptr<_Tp2> ptr() const;
-    
+
     //! helper operators making "Ptr<T> ptr" use very similar to "T* ptr".
     _Tp* operator -> ();
     const _Tp* operator -> () const;
 
     operator _Tp* ();
     operator const _Tp*() const;
-    
+
     _Tp* obj; //< the object pointer.
     int* refcount; //< the associated reference counter
 };
 
-    
+
 //////////////////////// Input/Output Array Arguments /////////////////////////////////
-    
+
 /*!
- Proxy datatype for passing Mat's and vector<>'s as input parameters 
+ Proxy datatype for passing Mat's and vector<>'s as input parameters
  */
 class CV_EXPORTS _InputArray
 {
 public:
-    enum { 
+    enum {
         KIND_SHIFT = 16,
         FIXED_TYPE = 0x8000 << KIND_SHIFT,
         FIXED_SIZE = 0x4000 << KIND_SHIFT,
         KIND_MASK = ~(FIXED_TYPE|FIXED_SIZE) - (1 << KIND_SHIFT) + 1,
 
-        NONE              = 0 << KIND_SHIFT, 
+        NONE              = 0 << KIND_SHIFT,
         MAT               = 1 << KIND_SHIFT,
-        MATX              = 2 << KIND_SHIFT, 
+        MATX              = 2 << KIND_SHIFT,
         STD_VECTOR        = 3 << KIND_SHIFT,
         STD_VECTOR_VECTOR = 4 << KIND_SHIFT,
-        STD_VECTOR_MAT    = 5 << KIND_SHIFT, 
-        EXPR              = 6 << KIND_SHIFT, 
-        OPENGL_BUFFER     = 7 << KIND_SHIFT, 
-        OPENGL_TEXTURE    = 8 << KIND_SHIFT, 
+        STD_VECTOR_MAT    = 5 << KIND_SHIFT,
+        EXPR              = 6 << KIND_SHIFT,
+        OPENGL_BUFFER     = 7 << KIND_SHIFT,
+        OPENGL_TEXTURE    = 8 << KIND_SHIFT,
         GPU_MAT           = 9 << KIND_SHIFT
     };
     _InputArray();
@@ -1350,7 +1350,7 @@ enum
 
 
 /*!
- Proxy datatype for passing Mat's and vector<>'s as input parameters 
+ Proxy datatype for passing Mat's and vector<>'s as input parameters
  */
 class CV_EXPORTS _OutputArray : public _InputArray
 {
@@ -1403,7 +1403,7 @@ static inline size_t getElemSize(int type) { return CV_ELEM_SIZE(type); }
 
 /*!
    Custom array allocator
+
 */
 class CV_EXPORTS MatAllocator
 {
@@ -1414,10 +1414,10 @@ public:
                           uchar*& datastart, uchar*& data, size_t* step) = 0;
     virtual void deallocate(int* refcount, uchar* datastart, uchar* data) = 0;
 };
-    
+
 /*!
    The n-dimensional matrix class.
-   
+
    The class represents an n-dimensional dense numerical array that can act as
    a matrix, image, optical flow map, 3-focal tensor etc.
    It is very similar to CvMat and CvMatND types from earlier versions of OpenCV,
@@ -1506,13 +1506,13 @@ public:
          \endcode
 
       <li> for quick initialization of small matrices and/or super-fast element access
-      
+
          \code
          double m[3][3] = {{a, b, c}, {d, e, f}, {g, h, i}};
          cv::Mat M = cv::Mat(3, 3, CV_64F, m).inv();
          \endcode
-      </ol>   
-   
+      </ol>
+
        partial yet very common cases of this "user-allocated data" case are conversions
        from CvMat and IplImage to cv::Mat. For this purpose there are special constructors
        taking pointers to CvMat or IplImage and the optional
@@ -1522,7 +1522,7 @@ public:
        cv::Mat::operator CvMat() an cv::Mat::operator IplImage().
        The operators do not copy the data.
 
-    
+
        \code
        IplImage* img = cvLoadImage("greatwave.jpg", 1);
        Mat mtx(img); // convert IplImage* -> cv::Mat
@@ -1539,7 +1539,7 @@ public:
    \endcode
 
    <li> by using comma-separated initializer:
+
    \code
    // create 3x3 double-precision identity matrix
    Mat M = (Mat_<double>(3,3) << 1, 0, 0, 0, 1, 0, 0, 0, 1);
@@ -1563,7 +1563,7 @@ public:
    cv::Mat::rows contains the number of matrix rows and cv::Mat::cols - the number of matrix columns. There is yet another member,
    cv::Mat::step that is used to actually compute address of a matrix element. cv::Mat::step is needed because the matrix can be
    a part of another matrix or because there can some padding space in the end of each row for a proper alignment.
+
    \image html roi.png
 
    Given these parameters, address of the matrix element M_{ij} is computed as following:
@@ -1634,23 +1634,23 @@ public:
     Mat();
     //! constructs 2D matrix of the specified size and type
     // (_type is CV_8UC1, CV_64FC3, CV_32SC(12) etc.)
-    Mat(int _rows, int _cols, int _type);
-    Mat(Size _size, int _type);
+    Mat(int rows, int cols, int type);
+    Mat(Size size, int type);
     //! constucts 2D matrix and fills it with the specified value _s.
-    Mat(int _rows, int _cols, int _type, const Scalar& _s);
-    Mat(Size _size, int _type, const Scalar& _s);
-    
+    Mat(int rows, int cols, int type, const Scalar& s);
+    Mat(Size size, int type, const Scalar& s);
+
     //! constructs n-dimensional matrix
-    Mat(int _ndims, const int* _sizes, int _type);
-    Mat(int _ndims, const int* _sizes, int _type, const Scalar& _s);
-    
+    Mat(int ndims, const int* sizes, int type);
+    Mat(int ndims, const int* sizes, int type, const Scalar& s);
+
     //! copy constructor
     Mat(const Mat& m);
     //! constructor for matrix headers pointing to user-allocated data
-    Mat(int _rows, int _cols, int _type, void* _data, size_t _step=AUTO_STEP);
-    Mat(Size _size, int _type, void* _data, size_t _step=AUTO_STEP);
-    Mat(int _ndims, const int* _sizes, int _type, void* _data, const size_t* _steps=0);
-    
+    Mat(int rows, int cols, int type, void* data, size_t step=AUTO_STEP);
+    Mat(Size size, int type, void* data, size_t step=AUTO_STEP);
+    Mat(int ndims, const int* sizes, int type, void* data, const size_t* steps=0);
+
     //! creates a matrix header for a part of the bigger matrix
     Mat(const Mat& m, const Range& rowRange, const Range& colRange=Range::all());
     Mat(const Mat& m, const Rect& roi);
@@ -1664,11 +1664,9 @@ public:
     //! builds matrix from std::vector with or without copying the data
     template<typename _Tp> explicit Mat(const vector<_Tp>& vec, bool copyData=false);
     //! builds matrix from cv::Vec; the data is copied by default
-    template<typename _Tp, int n> explicit Mat(const Vec<_Tp, n>& vec,
-                                               bool copyData=true);
+    template<typename _Tp, int n> explicit Mat(const Vec<_Tp, n>& vec, bool copyData=true);
     //! builds matrix from cv::Matx; the data is copied by default
-    template<typename _Tp, int m, int n> explicit Mat(const Matx<_Tp, m, n>& mtx,
-                                                      bool copyData=true);
+    template<typename _Tp, int m, int n> explicit Mat(const Matx<_Tp, m, n>& mtx, bool copyData=true);
     //! builds matrix from a 2D point
     template<typename _Tp> explicit Mat(const Point_<_Tp>& pt, bool copyData=true);
     //! builds matrix from a 3D point
@@ -1721,8 +1719,8 @@ public:
     Mat& setTo(InputArray value, InputArray mask=noArray());
     //! creates alternative matrix header for the same data, with different
     // number of channels and/or different number of rows. see cvReshape.
-    Mat reshape(int _cn, int _rows=0) const;
-    Mat reshape(int _cn, int _newndims, const int* _newsz) const;
+    Mat reshape(int cn, int rows=0) const;
+    Mat reshape(int cn, int newndims, const int* newsz) const;
 
     //! matrix transposition by means of matrix expressions
     MatExpr t() const;
@@ -1730,7 +1728,7 @@ public:
     MatExpr inv(int method=DECOMP_LU) const;
     //! per-element matrix multiplication by means of matrix expressions
     MatExpr mul(InputArray m, double scale=1) const;
-    
+
     //! computes cross-product of 2 3D vectors
     Mat cross(InputArray m) const;
     //! computes dot-product
@@ -1748,21 +1746,21 @@ public:
 
     //! allocates new matrix data unless the matrix already has specified size and type.
     // previous data is unreferenced if needed.
-    void create(int _rows, int _cols, int _type);
-    void create(Size _size, int _type);
-    void create(int _ndims, const int* _sizes, int _type);
-    
+    void create(int rows, int cols, int type);
+    void create(Size size, int type);
+    void create(int ndims, const int* sizes, int type);
+
     //! increases the reference counter; use with care to avoid memleaks
     void addref();
     //! decreases reference counter;
     // deallocates the data when reference counter reaches 0.
     void release();
-    
+
     //! deallocates the matrix data
     void deallocate();
     //! internal use function; properly re-allocates _size, _step arrays
     void copySize(const Mat& m);
-    
+
     //! reserves enough space to fit sz hyper-planes
     void reserve(size_t sz);
     //! resizes matrix to the specified number of hyper-planes
@@ -1777,7 +1775,7 @@ public:
     void push_back(const Mat& m);
     //! removes several hyper-planes from bottom of the matrix
     void pop_back(size_t nelems=1);
-    
+
     //! locates matrix header within a parent matrix. See below
     void locateROI( Size& wholeSize, Point& ofs ) const;
     //! moves/resizes the current matrix ROI inside the parent matrix.
@@ -1794,19 +1792,19 @@ public:
     operator CvMatND() const;
     //! converts header to IplImage; no data is copied
     operator IplImage() const;
-    
+
     template<typename _Tp> operator vector<_Tp>() const;
     template<typename _Tp, int n> operator Vec<_Tp, n>() const;
     template<typename _Tp, int m, int n> operator Matx<_Tp, m, n>() const;
-    
+
     //! returns true iff the matrix data is continuous
     // (i.e. when there are no gaps between successive rows).
     // similar to CV_IS_MAT_CONT(cvmat->type)
     bool isContinuous() const;
-    
+
     //! returns true if the matrix is a submatrix of another matrix
     bool isSubmatrix() const;
-    
+
     //! returns element size in bytes,
     // similar to CV_ELEM_SIZE(cvmat->type)
     size_t elemSize() const;
@@ -1824,66 +1822,66 @@ public:
     bool empty() const;
     //! returns the total number of matrix elements
     size_t total() const;
-    
+
     //! returns N if the matrix is 1-channel (N x ptdim) or ptdim-channel (1 x N) or (N x 1); negative number otherwise
     int checkVector(int elemChannels, int depth=-1, bool requireContinuous=true) const;
 
     //! returns pointer to i0-th submatrix along the dimension #0
     uchar* ptr(int i0=0);
     const uchar* ptr(int i0=0) const;
-    
+
     //! returns pointer to (i0,i1) submatrix along the dimensions #0 and #1
     uchar* ptr(int i0, int i1);
     const uchar* ptr(int i0, int i1) const;
-    
+
     //! returns pointer to (i0,i1,i3) submatrix along the dimensions #0, #1, #2
     uchar* ptr(int i0, int i1, int i2);
     const uchar* ptr(int i0, int i1, int i2) const;
-    
+
     //! returns pointer to the matrix element
     uchar* ptr(const int* idx);
     //! returns read-only pointer to the matrix element
     const uchar* ptr(const int* idx) const;
-    
+
     template<int n> uchar* ptr(const Vec<int, n>& idx);
     template<int n> const uchar* ptr(const Vec<int, n>& idx) const;
 
     //! template version of the above method
     template<typename _Tp> _Tp* ptr(int i0=0);
     template<typename _Tp> const _Tp* ptr(int i0=0) const;
-    
+
     template<typename _Tp> _Tp* ptr(int i0, int i1);
     template<typename _Tp> const _Tp* ptr(int i0, int i1) const;
-    
+
     template<typename _Tp> _Tp* ptr(int i0, int i1, int i2);
     template<typename _Tp> const _Tp* ptr(int i0, int i1, int i2) const;
-    
+
     template<typename _Tp> _Tp* ptr(const int* idx);
     template<typename _Tp> const _Tp* ptr(const int* idx) const;
-    
+
     template<typename _Tp, int n> _Tp* ptr(const Vec<int, n>& idx);
     template<typename _Tp, int n> const _Tp* ptr(const Vec<int, n>& idx) const;
-    
+
     //! the same as above, with the pointer dereferencing
     template<typename _Tp> _Tp& at(int i0=0);
     template<typename _Tp> const _Tp& at(int i0=0) const;
-    
+
     template<typename _Tp> _Tp& at(int i0, int i1);
     template<typename _Tp> const _Tp& at(int i0, int i1) const;
-    
+
     template<typename _Tp> _Tp& at(int i0, int i1, int i2);
     template<typename _Tp> const _Tp& at(int i0, int i1, int i2) const;
-    
+
     template<typename _Tp> _Tp& at(const int* idx);
     template<typename _Tp> const _Tp& at(const int* idx) const;
-    
+
     template<typename _Tp, int n> _Tp& at(const Vec<int, n>& idx);
     template<typename _Tp, int n> const _Tp& at(const Vec<int, n>& idx) const;
-    
+
     //! special versions for 2D arrays (especially convenient for referencing image pixels)
     template<typename _Tp> _Tp& at(Point pt);
     template<typename _Tp> const _Tp& at(Point pt) const;
-    
+
     //! template methods for iteration over matrix elements.
     // the iterators take care of skipping gaps in the end of rows (if any)
     template<typename _Tp> MatIterator_<_Tp> begin();
@@ -1910,15 +1908,15 @@ public:
     //! pointer to the reference counter;
     // when matrix points to user-allocated data, the pointer is NULL
     int* refcount;
-    
+
     //! helper fields used in locateROI and adjustROI
     uchar* datastart;
     uchar* dataend;
     uchar* datalimit;
-    
+
     //! custom allocator
     MatAllocator* allocator;
-    
+
     struct CV_EXPORTS MSize
     {
         MSize(int* _p);
@@ -1928,10 +1926,10 @@ public:
         operator const int*() const;
         bool operator == (const MSize& sz) const;
         bool operator != (const MSize& sz) const;
-        
+
         int* p;
     };
-    
+
     struct CV_EXPORTS MStep
     {
         MStep();
@@ -1940,16 +1938,16 @@ public:
         size_t& operator[](int i);
         operator size_t() const;
         MStep& operator = (size_t s);
-        
+
         size_t* p;
         size_t buf[2];
     protected:
         MStep& operator = (const MStep&);
     };
-    
+
     MSize size;
     MStep step;
-    
+
 protected:
     void initEmpty();
 };
@@ -1957,7 +1955,7 @@ protected:
 
 /*!
    Random Number Generator
+
    The class implements RNG using Multiply-with-Carry algorithm
 */
 class CV_EXPORTS RNG
@@ -1966,7 +1964,7 @@ public:
     enum { UNIFORM=0, NORMAL=1 };
 
     RNG();
-    RNG(uint64 _state);
+    RNG(uint64 state);
     //! updates the state and returns the next 32-bit unsigned integer random number
     unsigned next();
 
@@ -1976,7 +1974,7 @@ public:
     operator short();
     operator unsigned();
     //! returns a random integer sampled uniformly from [0, N).
-    unsigned operator()(unsigned N);
+    unsigned operator ()(unsigned N);
     unsigned operator ()();
     operator int();
     operator float();
@@ -2016,13 +2014,13 @@ public:
     TermCriteria(const CvTermCriteria& criteria);
     //! conversion from CvTermCriteria
     operator CvTermCriteria() const;
-    
+
     int type; //!< the type of termination criteria: COUNT, EPS or COUNT + EPS
     int maxCount; // the maximum number of iterations/elements
     double epsilon; // the desired accuracy
 };
 
-    
+
 typedef void (*BinaryFunc)(const uchar* src1, size_t step1,
                            const uchar* src2, size_t step2,
                            uchar* dst, size_t step, Size sz,
@@ -2030,41 +2028,41 @@ typedef void (*BinaryFunc)(const uchar* src1, size_t step1,
 
 CV_EXPORTS BinaryFunc getConvertFunc(int sdepth, int ddepth);
 CV_EXPORTS BinaryFunc getConvertScaleFunc(int sdepth, int ddepth);
-CV_EXPORTS BinaryFunc getCopyMaskFunc(size_t esz);    
-    
+CV_EXPORTS BinaryFunc getCopyMaskFunc(size_t esz);
+
 //! swaps two matrices
 CV_EXPORTS void swap(Mat& a, Mat& b);
-    
+
 //! converts array (CvMat or IplImage) to cv::Mat
 CV_EXPORTS Mat cvarrToMat(const CvArr* arr, bool copyData=false,
                           bool allowND=true, int coiMode=0);
 //! extracts Channel of Interest from CvMat or IplImage and makes cv::Mat out of it.
 CV_EXPORTS void extractImageCOI(const CvArr* arr, OutputArray coiimg, int coi=-1);
 //! inserts single-channel cv::Mat into a multi-channel CvMat or IplImage
-CV_EXPORTS void insertImageCOI(InputArray coiimg, CvArr* arr, int coi=-1);  
+CV_EXPORTS void insertImageCOI(InputArray coiimg, CvArr* arr, int coi=-1);
 
 //! adds one matrix to another (dst = src1 + src2)
 CV_EXPORTS_W void add(InputArray src1, InputArray src2, OutputArray dst,
                       InputArray mask=noArray(), int dtype=-1);
-//! subtracts one matrix from another (dst = src1 - src2) 
+//! subtracts one matrix from another (dst = src1 - src2)
 CV_EXPORTS_W void subtract(InputArray src1, InputArray src2, OutputArray dst,
                            InputArray mask=noArray(), int dtype=-1);
 
 //! computes element-wise weighted product of the two arrays (dst = scale*src1*src2)
 CV_EXPORTS_W void multiply(InputArray src1, InputArray src2,
                            OutputArray dst, double scale=1, int dtype=-1);
-    
+
 //! computes element-wise weighted quotient of the two arrays (dst = scale*src1/src2)
 CV_EXPORTS_W void divide(InputArray src1, InputArray src2, OutputArray dst,
                          double scale=1, int dtype=-1);
-    
+
 //! computes element-wise weighted reciprocal of an array (dst = scale/src2)
 CV_EXPORTS_W void divide(double scale, InputArray src2,
                          OutputArray dst, int dtype=-1);
 
 //! adds scaled array to another one (dst = alpha*src1 + src2)
 CV_EXPORTS_W void scaleAdd(InputArray src1, double alpha, InputArray src2, OutputArray dst);
-    
+
 //! computes weighted sum of two arrays (dst = alpha*src1 + beta*src2 + gamma)
 CV_EXPORTS_W void addWeighted(InputArray src1, double alpha, InputArray src2,
                               double beta, double gamma, OutputArray dst, int dtype=-1);
@@ -2077,7 +2075,7 @@ CV_EXPORTS_W void LUT(InputArray src, InputArray lut, OutputArray dst,
                       int interpolation=0);
 
 //! computes sum of array elements
-CV_EXPORTS_AS(sumElems) Scalar sum(InputArray src); 
+CV_EXPORTS_AS(sumElems) Scalar sum(InputArray src);
 //! computes the number of nonzero array elements
 CV_EXPORTS_W int countNonZero( InputArray src );
 //! computes mean value of selected array elements
@@ -2098,7 +2096,7 @@ CV_EXPORTS_W void batchDistance(InputArray src1, InputArray src2,
                                 InputArray mask=noArray(), int update=0,
                                 bool crosscheck=false);
 
-//! scales and shifts array elements so that either the specified norm (alpha) or the minimum (alpha) and maximum (beta) array values get the specified values 
+//! scales and shifts array elements so that either the specified norm (alpha) or the minimum (alpha) and maximum (beta) array values get the specified values
 CV_EXPORTS_W void normalize( InputArray src, OutputArray dst, double alpha=1, double beta=0,
                              int norm_type=NORM_L2, int dtype=-1, InputArray mask=noArray());
 
@@ -2108,7 +2106,7 @@ CV_EXPORTS_W void minMaxLoc(InputArray src, CV_OUT double* minVal,
                            CV_OUT Point* maxLoc=0, InputArray mask=noArray());
 CV_EXPORTS void minMaxIdx(InputArray src, double* minVal, double* maxVal,
                           int* minIdx=0, int* maxIdx=0, InputArray mask=noArray());
-    
+
 //! transforms 2D matrix to 1D row or column vector by taking sum, minimum, maximum or mean value over all the rows
 CV_EXPORTS_W void reduce(InputArray src, OutputArray dst, int dim, int rtype, int dtype=-1);
 
@@ -2116,12 +2114,12 @@ CV_EXPORTS_W void reduce(InputArray src, OutputArray dst, int dim, int rtype, in
 CV_EXPORTS void merge(const Mat* mv, size_t count, OutputArray dst);
 //! makes multi-channel array out of several single-channel arrays
 CV_EXPORTS_W void merge(InputArrayOfArrays mv, OutputArray dst);
-    
+
 //! copies each plane of a multi-channel array to a dedicated array
 CV_EXPORTS void split(const Mat& src, Mat* mvbegin);
 //! copies each plane of a multi-channel array to a dedicated array
 CV_EXPORTS_W void split(InputArray m, OutputArrayOfArrays mv);
-    
+
 //! copies selected channels from the input arrays to the selected channels of the output arrays
 CV_EXPORTS void mixChannels(const Mat* src, size_t nsrcs, Mat* dst, size_t ndsts,
                             const int* fromTo, size_t npairs);
@@ -2135,14 +2133,14 @@ CV_EXPORTS_W void extractChannel(InputArray src, OutputArray dst, int coi);
 
 //! inserts a single channel to dst (coi is 0-based index)
 CV_EXPORTS_W void insertChannel(InputArray src, InputOutputArray dst, int coi);
-    
+
 //! reverses the order of the rows, columns or both in a matrix
 CV_EXPORTS_W void flip(InputArray src, OutputArray dst, int flipCode);
 
 //! replicates the input matrix the specified number of times in the horizontal and/or vertical direction
 CV_EXPORTS_W void repeat(InputArray src, int ny, int nx, OutputArray dst);
 CV_EXPORTS Mat repeat(const Mat& src, int ny, int nx);
-        
+
 CV_EXPORTS void hconcat(const Mat* src, size_t nsrc, OutputArray dst);
 CV_EXPORTS void hconcat(InputArray src1, InputArray src2, OutputArray dst);
 CV_EXPORTS_W void hconcat(InputArrayOfArrays src, OutputArray dst);
@@ -2150,7 +2148,7 @@ CV_EXPORTS_W void hconcat(InputArrayOfArrays src, OutputArray dst);
 CV_EXPORTS void vconcat(const Mat* src, size_t nsrc, OutputArray dst);
 CV_EXPORTS void vconcat(InputArray src1, InputArray src2, OutputArray dst);
 CV_EXPORTS_W void vconcat(InputArrayOfArrays src, OutputArray dst);
-    
+
 //! computes bitwise conjunction of the two arrays (dst = src1 & src2)
 CV_EXPORTS_W void bitwise_and(InputArray src1, InputArray src2,
                               OutputArray dst, InputArray mask=noArray());
@@ -2165,9 +2163,9 @@ CV_EXPORTS_W void bitwise_not(InputArray src, OutputArray dst,
                               InputArray mask=noArray());
 //! computes element-wise absolute difference of two arrays (dst = abs(src1 - src2))
 CV_EXPORTS_W void absdiff(InputArray src1, InputArray src2, OutputArray dst);
-//! set mask elements for those array elements which are within the element-specific bounding box (dst = lowerb <= src && src < upperb)    
+//! set mask elements for those array elements which are within the element-specific bounding box (dst = lowerb <= src && src < upperb)
 CV_EXPORTS_W void inRange(InputArray src, InputArray lowerb,
-                          InputArray upperb, OutputArray dst);    
+                          InputArray upperb, OutputArray dst);
 //! compares elements of two arrays (dst = src1 <cmpop> src2)
 CV_EXPORTS_W void compare(InputArray src1, InputArray src2, OutputArray dst, int cmpop);
 //! computes per-element minimum of two arrays (dst = min(src1, src2))
@@ -2182,11 +2180,11 @@ CV_EXPORTS void min(const Mat& src1, double src2, Mat& dst);
 //! computes per-element maximum of two arrays (dst = max(src1, src2))
 CV_EXPORTS void max(const Mat& src1, const Mat& src2, Mat& dst);
 //! computes per-element maximum of array and scalar (dst = max(src1, src2))
-CV_EXPORTS void max(const Mat& src1, double src2, Mat& dst);    
-    
+CV_EXPORTS void max(const Mat& src1, double src2, Mat& dst);
+
 //! computes square root of each matrix element (dst = src**0.5)
 CV_EXPORTS_W void sqrt(InputArray src, OutputArray dst);
-//! raises the input matrix elements to the specified power (b = a**power) 
+//! raises the input matrix elements to the specified power (b = a**power)
 CV_EXPORTS_W void pow(InputArray src, double power, OutputArray dst);
 //! computes exponent of each matrix element (dst = e**src)
 CV_EXPORTS_W void exp(InputArray src, OutputArray dst);
@@ -2200,8 +2198,8 @@ CV_EXPORTS_W float fastAtan2(float y, float x);
 CV_EXPORTS void exp(const float* src, float* dst, int n);
 CV_EXPORTS void log(const float* src, float* dst, int n);
 CV_EXPORTS void fastAtan2(const float* y, const float* x, float* dst, int n, bool angleInDegrees);
-CV_EXPORTS void magnitude(const float* x, const float* y, float* dst, int n);    
-    
+CV_EXPORTS void magnitude(const float* x, const float* y, float* dst, int n);
+
 //! converts polar coordinates to Cartesian
 CV_EXPORTS_W void polarToCart(InputArray magnitude, InputArray angle,
                               OutputArray x, OutputArray y, bool angleInDegrees=false);
@@ -2219,7 +2217,7 @@ CV_EXPORTS_W bool checkRange(InputArray a, bool quiet=true, CV_OUT Point* pos=0,
                             double minVal=-DBL_MAX, double maxVal=DBL_MAX);
 //! converts NaN's to the given number
 CV_EXPORTS_W void patchNaNs(InputOutputArray a, double val=0);
-    
+
 //! implements generalized matrix product algorithm GEMM from BLAS
 CV_EXPORTS_W void gemm(InputArray src1, InputArray src2, double alpha,
                        InputArray src3, double gamma, OutputArray dst, int flags=0);
@@ -2234,7 +2232,7 @@ CV_EXPORTS_W void transform(InputArray src, OutputArray dst, InputArray m );
 //! performs perspective transformation of each element of multi-channel input matrix
 CV_EXPORTS_W void perspectiveTransform(InputArray src, OutputArray dst, InputArray m );
 
-//! extends the symmetrical matrix from the lower half or from the upper half 
+//! extends the symmetrical matrix from the lower half or from the upper half
 CV_EXPORTS_W void completeSymm(InputOutputArray mtx, bool lowerToUpper=false);
 //! initializes scaled identity matrix
 CV_EXPORTS_W void setIdentity(InputOutputArray mtx, const Scalar& s=Scalar(1));
@@ -2293,7 +2291,7 @@ CV_EXPORTS_W void calcCovarMatrix( InputArray samples, OutputArray covar,
 
 /*!
     Principal Component Analysis
+
     The class PCA is used to compute the special basis for a set of vectors.
     The basis will consist of eigenvectors of the covariance matrix computed
     from the input set of vectors. After PCA is performed, vectors can be transformed from
@@ -2301,12 +2299,12 @@ CV_EXPORTS_W void calcCovarMatrix( InputArray samples, OutputArray covar,
     prominent eigenvectors (called the principal components),
     corresponding to the largest eigenvalues of the covariation matrix.
     Thus the dimensionality of the vector and the correlation between the coordinates is reduced.
+
     The following sample is the function that takes two matrices. The first one stores the set
     of vectors (a row per vector) that is used to compute PCA, the second one stores another
     "test" set of vectors (a row per vector) that are first compressed with PCA,
     then reconstructed back and then the reconstruction error norm is computed and printed for each vector.
+
     \code
     using namespace cv;
 
@@ -2326,9 +2324,9 @@ CV_EXPORTS_W void calcCovarMatrix( InputArray samples, OutputArray covar,
         if( !testset.data )
             return pca;
         CV_Assert( testset.cols == pcaset.cols );
+
         compressed.create(testset.rows, maxComponents, testset.type());
-     
+
         Mat reconstructed;
         for( int i = 0; i < testset.rows; i++ )
         {
@@ -2370,7 +2368,7 @@ public:
 
 CV_EXPORTS_W void PCACompute(InputArray data, CV_OUT InputOutputArray mean,
                              OutputArray eigenvectors, int maxComponents=0);
-    
+
 CV_EXPORTS_W void PCAProject(InputArray data, InputArray mean,
                              InputArray eigenvectors, OutputArray result);
 
@@ -2380,11 +2378,11 @@ CV_EXPORTS_W void PCABackProject(InputArray data, InputArray mean,
 
 /*!
     Singular Value Decomposition class
+
     The class is used to compute Singular Value Decomposition of a floating-point matrix and then
     use it to solve least-square problems, under-determined linear systems, invert matrices,
     compute condition numbers etc.
-    
+
     For a bit faster operation you can pass flags=SVD::MODIFY_A|... to modify the decomposed matrix
     when it is not necessarily to preserve it. If you want to compute condition number of a matrix
     or absolute value of its determinant - you do not need SVD::u or SVD::vt,
@@ -2411,17 +2409,17 @@ public:
     static void backSubst( InputArray w, InputArray u,
                            InputArray vt, InputArray rhs,
                            OutputArray dst );
-    
+
     template<typename _Tp, int m, int n, int nm> static void compute( const Matx<_Tp, m, n>& a,
         Matx<_Tp, nm, 1>& w, Matx<_Tp, m, nm>& u, Matx<_Tp, n, nm>& vt );
     template<typename _Tp, int m, int n, int nm> static void compute( const Matx<_Tp, m, n>& a,
         Matx<_Tp, nm, 1>& w );
     template<typename _Tp, int m, int n, int nm, int nb> static void backSubst( const Matx<_Tp, nm, 1>& w,
         const Matx<_Tp, m, nm>& u, const Matx<_Tp, n, nm>& vt, const Matx<_Tp, m, nb>& rhs, Matx<_Tp, n, nb>& dst );
-    
+
     //! finds dst = arg min_{|dst|=1} |m*dst|
     static void solveZ( InputArray src, OutputArray dst );
-    //! performs back substitution, so that dst is the solution or pseudo-solution of m*dst = rhs, where m is the decomposed matrix 
+    //! performs back substitution, so that dst is the solution or pseudo-solution of m*dst = rhs, where m is the decomposed matrix
     void backSubst( InputArray rhs, OutputArray dst ) const;
 
     Mat u, w, vt;
@@ -2476,7 +2474,7 @@ template<typename _Tp> static inline _Tp randu() { return (_Tp)theRNG(); }
 
 //! fills array with uniformly-distributed random numbers from the range [low, high)
 CV_EXPORTS_W void randu(InputOutputArray dst, InputArray low, InputArray high);
-    
+
 //! fills array with normally-distributed random numbers with the specified mean and the standard deviation
 CV_EXPORTS_W void randn(InputOutputArray dst, InputArray mean, InputArray stddev);
 
@@ -2492,8 +2490,8 @@ CV_EXPORTS_W void line(Mat& img, Point pt1, Point pt2, const Scalar& color,
 CV_EXPORTS_W void rectangle(Mat& img, Point pt1, Point pt2,
                           const Scalar& color, int thickness=1,
                           int lineType=8, int shift=0);
-    
-//! draws the rectangle outline or a solid rectangle covering rec in the image 
+
+//! draws the rectangle outline or a solid rectangle covering rec in the image
 CV_EXPORTS void rectangle(Mat& img, Rect rec,
                           const Scalar& color, int thickness=1,
                           int lineType=8, int shift=0);
@@ -2548,7 +2546,7 @@ CV_EXPORTS_W bool clipLine(Rect imgRect, CV_OUT CV_IN_OUT Point& pt1, CV_OUT CV_
 
 /*!
    Line iterator class
+
    The class is used to iterate over all the pixels on the raster line
    segment connecting two specified points.
 */
@@ -2608,11 +2606,11 @@ CV_EXPORTS_W Size getTextSize(const string& text, int fontFace,
 
 /*!
  Template matrix class derived from Mat
+
  The class Mat_ is a "thin" template wrapper on top of cv::Mat. It does not have any extra data fields,
  nor it or cv::Mat have any virtual methods and thus references or pointers to these two classes
  can be safely converted one to another. But do it with care, for example:
+
  \code
  // create 100x100 8-bit matrix
  Mat M(100,100,CV_8U);
@@ -2621,12 +2619,12 @@ CV_EXPORTS_W Size getTextSize(const string& text, int fontFace,
  // the program will likely crash at the statement below
  M1(99,99) = 1.f;
  \endcode
+
  While cv::Mat is sufficient in most cases, cv::Mat_ can be more convenient if you use a lot of element
  access operations and if you know matrix type at compile time.
  Note that cv::Mat::at<_Tp>(int y, int x) and cv::Mat_<_Tp>::operator ()(int y, int x) do absolutely the
  same thing and run at the same speed, but the latter is certainly shorter:
+
  \code
  Mat_<double> M(20,20);
  for(int i = 0; i < M.rows; i++)
@@ -2636,9 +2634,9 @@ CV_EXPORTS_W Size getTextSize(const string& text, int fontFace,
  eigen(M,E,V);
  cout << E.at<double>(0,0)/E.at<double>(M.rows-1,0);
  \endcode
+
  It is easy to use Mat_ for multi-channel images/matrices - just pass cv::Vec as cv::Mat_ template parameter:
+
  \code
  // allocate 320x240 color image and fill it with green (in RGB space)
  Mat_<Vec3b> img(240, 320, Vec3b(0,255,0));
@@ -2658,7 +2656,7 @@ public:
     typedef typename DataType<_Tp>::channel_type channel_type;
     typedef MatIterator_<_Tp> iterator;
     typedef MatConstIterator_<_Tp> const_iterator;
-    
+
     //! default constructor
     Mat_();
     //! equivalent to Mat(_rows, _cols, DataType<_Tp>::type)
@@ -2667,7 +2665,7 @@ public:
     Mat_(int _rows, int _cols, const _Tp& value);
     //! equivalent to Mat(_size, DataType<_Tp>::type)
     explicit Mat_(Size _size);
-    //! constructor that sets each matrix element to specified value 
+    //! constructor that sets each matrix element to specified value
     Mat_(Size _size, const _Tp& value);
     //! n-dim array constructor
     Mat_(int _ndims, const int* _sizes);
@@ -2752,7 +2750,7 @@ public:
     Mat_ operator()( const Rect& roi ) const;
     Mat_ operator()( const Range* ranges ) const;
 
-    //! more convenient forms of row and element access operators 
+    //! more convenient forms of row and element access operators
     _Tp* operator [](int y);
     const _Tp* operator [](int y) const;
 
@@ -2760,12 +2758,12 @@ public:
     _Tp& operator ()(const int* idx);
     //! returns read-only reference to the specified element
     const _Tp& operator ()(const int* idx) const;
-    
+
     //! returns reference to the specified element
     template<int n> _Tp& operator ()(const Vec<int, n>& idx);
     //! returns read-only reference to the specified element
     template<int n> const _Tp& operator ()(const Vec<int, n>& idx) const;
-    
+
     //! returns reference to the specified element (1D case)
     _Tp& operator ()(int idx0);
     //! returns read-only reference to the specified element (1D case)
@@ -2778,7 +2776,7 @@ public:
     _Tp& operator ()(int idx0, int idx1, int idx2);
     //! returns read-only reference to the specified element (3D case)
     const _Tp& operator ()(int idx0, int idx1, int idx2) const;
-    
+
     _Tp& operator ()(Point pt);
     const _Tp& operator ()(Point pt) const;
 
@@ -2830,10 +2828,10 @@ public:
     typedef const uchar** pointer;
     typedef uchar* reference;
     typedef std::random_access_iterator_tag iterator_category;
-    
+
     //! default constructor
     MatConstIterator();
-    //! constructor that sets the iterator to the beginning of the matrix 
+    //! constructor that sets the iterator to the beginning of the matrix
     MatConstIterator(const Mat* _m);
     //! constructor that sets the iterator to the specified element of the matrix
     MatConstIterator(const Mat* _m, int _row, int _col=0);
@@ -2843,14 +2841,14 @@ public:
     MatConstIterator(const Mat* _m, const int* _idx);
     //! copy constructor
     MatConstIterator(const MatConstIterator& it);
-    
+
     //! copy operator
     MatConstIterator& operator = (const MatConstIterator& it);
     //! returns the current matrix element
     uchar* operator *() const;
     //! returns the i-th matrix element, relative to the current
     uchar* operator [](ptrdiff_t i) const;
-    
+
     //! shifts the iterator forward by the specified number of elements
     MatConstIterator& operator += (ptrdiff_t ofs);
     //! shifts the iterator backward by the specified number of elements
@@ -2870,18 +2868,18 @@ public:
     ptrdiff_t lpos() const;
     void seek(ptrdiff_t ofs, bool relative=false);
     void seek(const int* _idx, bool relative=false);
-    
+
     const Mat* m;
     size_t elemSize;
     uchar* ptr;
     uchar* sliceStart;
     uchar* sliceEnd;
 };
-    
+
 /*!
  Matrix read-only iterator
- */    
+
+ */
 template<typename _Tp>
 class CV_EXPORTS MatConstIterator_ : public MatConstIterator
 {
@@ -2894,7 +2892,7 @@ public:
 
     //! default constructor
     MatConstIterator_();
-    //! constructor that sets the iterator to the beginning of the matrix 
+    //! constructor that sets the iterator to the beginning of the matrix
     MatConstIterator_(const Mat_<_Tp>* _m);
     //! constructor that sets the iterator to the specified element of the matrix
     MatConstIterator_(const Mat_<_Tp>* _m, int _row, int _col=0);
@@ -2911,7 +2909,7 @@ public:
     _Tp operator *() const;
     //! returns the i-th matrix element, relative to the current
     _Tp operator [](ptrdiff_t i) const;
-    
+
     //! shifts the iterator forward by the specified number of elements
     MatConstIterator_& operator += (ptrdiff_t ofs);
     //! shifts the iterator backward by the specified number of elements
@@ -2931,7 +2929,7 @@ public:
 
 /*!
  Matrix read-write iterator
+
 */
 template<typename _Tp>
 class CV_EXPORTS MatIterator_ : public MatConstIterator_<_Tp>
@@ -2943,7 +2941,7 @@ public:
 
     //! the default constructor
     MatIterator_();
-    //! constructor that sets the iterator to the beginning of the matrix 
+    //! constructor that sets the iterator to the beginning of the matrix
     MatIterator_(Mat_<_Tp>* _m);
     //! constructor that sets the iterator to the specified element of the matrix
     MatIterator_(Mat_<_Tp>* _m, int _row, int _col=0);
@@ -2979,17 +2977,17 @@ template<typename _Tp> class CV_EXPORTS MatOp_Iter_;
 
 /*!
  Comma-separated Matrix Initializer
+
  The class instances are usually not created explicitly.
  Instead, they are created on "matrix << firstValue" operator.
+
  The sample below initializes 2x2 rotation matrix:
+
  \code
  double angle = 30, a = cos(angle*CV_PI/180), b = sin(angle*CV_PI/180);
  Mat R = (Mat_<double>(2,2) << a, -b, b, a);
  \endcode
-*/ 
+*/
 template<typename _Tp> class CV_EXPORTS MatCommaInitializer_
 {
 public:
@@ -3023,10 +3021,10 @@ public:
     template<typename T2> VecCommaInitializer<_Tp, m>& operator , (T2 val);
     Vec<_Tp, m> operator *() const;
 };
-        
+
 /*!
  Automatically Allocated Buffer Class
+
  The class is used for temporary buffers in functions and methods.
  If a temporary buffer is usually small (a few K's of memory),
  but its size depends on the parameters, it makes sense to create a small
@@ -3035,15 +3033,15 @@ public:
  and released after the processing. Therefore, in typical cases, when the buffer size is small,
  there is no overhead associated with malloc()/free().
  At the same time, there is no limit on the size of processed data.
+
  This is what AutoBuffer does. The template takes 2 parameters - type of the buffer elements and
  the number of stack-allocated elements. Here is how the class is used:
+
  \code
  void my_func(const cv::Mat& m)
  {
     cv::AutoBuffer<float, 1000> buf; // create automatic buffer containing 1000 floats
+
     buf.allocate(m.rows); // if m.rows <= 1000, the pre-allocated buffer is used,
                           // otherwise the buffer of "m.rows" floats will be allocated
                           // dynamically and deallocated in cv::AutoBuffer destructor
@@ -3061,10 +3059,10 @@ public:
     AutoBuffer();
     //! constructor taking the real buffer size
     AutoBuffer(size_t _size);
-    //! destructor. calls deallocate() 
+    //! destructor. calls deallocate()
     ~AutoBuffer();
 
-    //! allocates the new buffer of size _size. if the _size is small enough, stack-allocated buffer is used 
+    //! allocates the new buffer of size _size. if the _size is small enough, stack-allocated buffer is used
     void allocate(size_t _size);
     //! deallocates the buffer if it was dynamically allocated
     void deallocate();
@@ -3086,18 +3084,18 @@ protected:
 
 /*!
  n-Dimensional Dense Matrix Iterator Class.
+
  The class cv::NAryMatIterator is used for iterating over one or more n-dimensional dense arrays (cv::Mat's).
+
  The iterator is completely different from cv::Mat_ and cv::SparseMat_ iterators.
  It iterates through the slices (or planes), not the elements, where "slice" is a continuous part of the arrays.
+
  Here is the example on how the iterator can be used to normalize 3D histogram:
+
  \code
  void normalizeColorHist(Mat& hist)
  {
- #if 1    
+ #if 1
      // intialize iterator (the style is different from STL).
      // after initialization the iterator will contain
      // the number of slices or planes
@@ -3127,7 +3125,7 @@ protected:
  #endif
  }
  \endcode
+
  You can iterate through several matrices simultaneously as long as they have the same geometry
  (dimensionality and all the dimension sizes are the same), which is useful for binary
  and n-ary operations on such matrices. Just pass those matrices to cv::MatNDIterator.
@@ -3146,7 +3144,7 @@ public:
     //! the separate iterator initialization method
     void init(const Mat** arrays, Mat* planes, uchar** ptrs, int narrays=-1);
 
-    //! proceeds to the next plane of every iterated matrix 
+    //! proceeds to the next plane of every iterated matrix
     NAryMatIterator& operator ++();
     //! proceeds to the next plane of every iterated matrix (postfix increment operator)
     NAryMatIterator operator ++(int);
@@ -3167,7 +3165,7 @@ protected:
     int iterdepth;
     size_t idx;
 };
-    
+
 //typedef NAryMatIterator NAryMatNDIterator;
 
 typedef void (*ConvertData)(const void* from, void* to, int cn);
@@ -3178,7 +3176,7 @@ CV_EXPORTS ConvertData getConvertElem(int fromType, int toType);
 //! returns the function for converting pixels from one data type to another with the optional scaling
 CV_EXPORTS ConvertScaleData getConvertScaleElem(int fromType, int toType);
 
-    
+
 /////////////////////////// multi-dimensional sparse matrix //////////////////////////
 
 class SparseMatIterator;
@@ -3188,14 +3186,14 @@ template<typename _Tp> class SparseMatConstIterator_;
 
 /*!
  Sparse matrix class.
+
  The class represents multi-dimensional sparse numerical arrays. Such a sparse array can store elements
  of any type that cv::Mat is able to store. "Sparse" means that only non-zero elements
  are stored (though, as a result of some operations on a sparse matrix, some of its stored elements
  can actually become 0. It's user responsibility to detect such elements and delete them using cv::SparseMat::erase().
  The non-zero elements are stored in a hash table that grows when it's filled enough,
  so that the search time remains O(1) in average. Elements can be accessed using the following methods:
+
  <ol>
  <li>Query operations: cv::SparseMat::ptr() and the higher-level cv::SparseMat::ref(),
       cv::SparseMat::value() and cv::SparseMat::find, for example:
@@ -3211,7 +3209,7 @@ template<typename _Tp> class SparseMatConstIterator_;
      sparse_mat.ref<float>(idx) += 1.f;
  }
  \endcode
+
  <li>Sparse matrix iterators. Like cv::Mat iterators and unlike cv::Mat iterators, the sparse matrix iterators are STL-style,
  that is, the iteration is done as following:
  \code
@@ -3228,7 +3226,7 @@ template<typename _Tp> class SparseMatConstIterator_;
      printf("(")
      for(int i = 0; i < dims; i++)
         printf("%3d%c", n->idx[i], i < dims-1 ? ',' : ')');
-     printf(": %f\n", *it);    
+     printf(": %f\n", *it);
      s += *it;
  }
  printf("Element sum is %g\n", s);
@@ -3236,11 +3234,11 @@ template<typename _Tp> class SparseMatConstIterator_;
  If you run this loop, you will notice that elements are enumerated
  in no any logical order (lexicographical etc.),
  they come in the same order as they stored in the hash table, i.e. semi-randomly.
+
  You may collect pointers to the nodes and sort them to get the proper ordering.
  Note, however, that pointers to the nodes may become invalid when you add more
  elements to the matrix; this is because of possible buffer reallocation.
+
  <li>A combination of the above 2 methods when you need to process 2 or more sparse
  matrices simultaneously, e.g. this is how you can compute unnormalized
  cross-correlation of the 2 floating-point sparse matrices:
@@ -3315,13 +3313,13 @@ public:
      \param m the input matrix
      \param try1d if true and m is a single-column matrix (Nx1),
             then the sparse matrix will be 1-dimensional.
-    */ 
+    */
     explicit SparseMat(const Mat& m);
     //! converts old-style sparse matrix to the new-style. All the data is copied
     SparseMat(const CvSparseMat* m);
     //! the destructor
     ~SparseMat();
-    
+
     //! assignment operator. This is O(1) operation, i.e. no data is copied
     SparseMat& operator = (const SparseMat& m);
     //! equivalent to the corresponding constructor
@@ -3329,7 +3327,7 @@ public:
 
     //! creates full copy of the matrix
     SparseMat clone() const;
-    
+
     //! copies all the data to the destination matrix. All the previous content of m is erased
     void copyTo( SparseMat& m ) const;
     //! converts sparse matrix to dense matrix.
@@ -3349,10 +3347,10 @@ public:
 
     //! reallocates sparse matrix.
     /*!
-        If the matrix already had the proper size and type, 
+        If the matrix already had the proper size and type,
         it is simply cleared with clear(), otherwise,
         the old matrix is released (using release()) and the new one is allocated.
-    */ 
+    */
     void create(int dims, const int* _sizes, int _type);
     //! sets all the sparse matrix elements to 0, which means clearing the hash table.
     void clear();
@@ -3367,14 +3365,14 @@ public:
     size_t elemSize() const;
     //! returns elemSize()/channels()
     size_t elemSize1() const;
-    
+
     //! returns type of sparse matrix elements
     int type() const;
     //! returns the depth of sparse matrix elements
     int depth() const;
     //! returns the number of channels
     int channels() const;
-    
+
     //! returns the array of sizes, or NULL if the matrix is not allocated
     const int* size() const;
     //! returns the size of i-th matrix dimension (or 0)
@@ -3383,7 +3381,7 @@ public:
     int dims() const;
     //! returns the number of non-zero elements (=the number of hash table nodes)
     size_t nzcount() const;
-    
+
     //! computes the element hash value (1D case)
     size_t hash(int i0) const;
     //! computes the element hash value (2D case)
@@ -3392,11 +3390,11 @@ public:
     size_t hash(int i0, int i1, int i2) const;
     //! computes the element hash value (nD case)
     size_t hash(const int* idx) const;
-    
+
     //@{
     /*!
      specialized variants for 1D, 2D, 3D cases and the generic_type one for n-D case.
-    
+
      return pointer to the matrix element.
      <ul>
       <li>if the element is there (it's non-zero), the pointer to it is returned
@@ -3420,27 +3418,27 @@ public:
     //@{
     /*!
      return read-write reference to the specified sparse matrix element.
-     
+
      ref<_Tp>(i0,...[,hashval]) is equivalent to *(_Tp*)ptr(i0,...,true[,hashval]).
      The methods always return a valid reference.
-     If the element did not exist, it is created and initialiazed with 0. 
+     If the element did not exist, it is created and initialiazed with 0.
     */
     //! returns reference to the specified element (1D case)
-    template<typename _Tp> _Tp& ref(int i0, size_t* hashval=0);   
+    template<typename _Tp> _Tp& ref(int i0, size_t* hashval=0);
     //! returns reference to the specified element (2D case)
-    template<typename _Tp> _Tp& ref(int i0, int i1, size_t* hashval=0);   
+    template<typename _Tp> _Tp& ref(int i0, int i1, size_t* hashval=0);
     //! returns reference to the specified element (3D case)
     template<typename _Tp> _Tp& ref(int i0, int i1, int i2, size_t* hashval=0);
     //! returns reference to the specified element (nD case)
     template<typename _Tp> _Tp& ref(const int* idx, size_t* hashval=0);
     //@}
-    
+
     //@{
     /*!
      return value of the specified sparse matrix element.
-     
+
      value<_Tp>(i0,...[,hashval]) is equivalent
-     
+
      \code
      { const _Tp* p = find<_Tp>(i0,...[,hashval]); return p ? *p : _Tp(); }
      \endcode
@@ -3456,13 +3454,13 @@ public:
     //! returns value of the specified element (nD case)
     template<typename _Tp> _Tp value(const int* idx, size_t* hashval=0) const;
     //@}
-    
+
     //@{
     /*!
      Return pointer to the specified sparse matrix element if it exists
-     
+
      find<_Tp>(i0,...[,hashval]) is equivalent to (_const Tp*)ptr(i0,...false[,hashval]).
-     
+
      If the specified element does not exist, the methods return NULL.
     */
     //! returns pointer to the specified element (1D case)
@@ -3484,7 +3482,7 @@ public:
     //@{
     /*!
        return the sparse matrix iterator pointing to the first sparse matrix element
-    */ 
+    */
     //! returns the sparse matrix iterator at the matrix beginning
     SparseMatIterator begin();
     //! returns the sparse matrix iterator at the matrix beginning
@@ -3496,7 +3494,7 @@ public:
     //@}
     /*!
        return the sparse matrix iterator pointing to the element following the last sparse matrix element
-    */ 
+    */
     //! returns the sparse matrix iterator at the matrix end
     SparseMatIterator end();
     //! returns the read-only sparse matrix iterator at the matrix end
@@ -3510,7 +3508,7 @@ public:
     template<typename _Tp> _Tp& value(Node* n);
     //! returns the value stored in the sparse martix node
     template<typename _Tp> const _Tp& value(const Node* n) const;
-    
+
     ////////////// some internal-use methods ///////////////
     Node* node(size_t nidx);
     const Node* node(size_t nidx) const;
@@ -3530,13 +3528,13 @@ CV_EXPORTS void minMaxLoc(const SparseMat& a, double* minVal,
                           double* maxVal, int* minIdx=0, int* maxIdx=0);
 //! computes norm of a sparse matrix
 CV_EXPORTS double norm( const SparseMat& src, int normType );
-//! scales and shifts array elements so that either the specified norm (alpha) or the minimum (alpha) and maximum (beta) array values get the specified values 
+//! scales and shifts array elements so that either the specified norm (alpha) or the minimum (alpha) and maximum (beta) array values get the specified values
 CV_EXPORTS void normalize( const SparseMat& src, SparseMat& dst, double alpha, int normType );
 
 /*!
  Read-Only Sparse Matrix Iterator.
  Here is how to use the iterator to compute the sum of floating-point sparse matrix elements:
+
  \code
  SparseMatConstIterator it = m.begin(), it_end = m.end();
  double s = 0;
@@ -3562,7 +3560,7 @@ public:
     template<typename _Tp> const _Tp& value() const;
     //! returns the current node of the sparse matrix. it.node->idx is the current element index
     const SparseMat::Node* node() const;
-    
+
     //! moves iterator to the previous element
     SparseMatConstIterator& operator --();
     //! moves iterator to the previous element
@@ -3571,7 +3569,7 @@ public:
     SparseMatConstIterator& operator ++();
     //! moves iterator to the next element
     SparseMatConstIterator operator ++(int);
-    
+
     //! moves iterator to the element after the last element
     void seekEnd();
 
@@ -3582,7 +3580,7 @@ public:
 
 /*!
  Read-write Sparse Matrix Iterator
+
  The class is similar to cv::SparseMatConstIterator,
  but can be used for in-place modification of the matrix elements.
 */
@@ -3604,7 +3602,7 @@ public:
     template<typename _Tp> _Tp& value() const;
     //! returns pointer to the current sparse matrix node. it.node->idx is the index of the current element (do not modify it!)
     SparseMat::Node* node() const;
-    
+
     //! moves iterator to the next element
     SparseMatIterator& operator ++();
     //! moves iterator to the next element
@@ -3613,9 +3611,9 @@ public:
 
 /*!
  The Template Sparse Matrix class derived from cv::SparseMat
+
  The class provides slightly more convenient operations for accessing elements.
+
  \code
  SparseMat m;
  ...
@@ -3623,7 +3621,7 @@ public:
  m_.ref(1)++; // equivalent to m.ref<int>(1)++;
  m_.ref(2) += m_(3); // equivalent to m.ref<int>(2) += m.value<int>(3);
  \endcode
-*/ 
+*/
 template<typename _Tp> class CV_EXPORTS SparseMat_ : public SparseMat
 {
 public:
@@ -3644,7 +3642,7 @@ public:
     SparseMat_(const CvSparseMat* m);
     //! the assignment operator. If DataType<_Tp>.type != m.type(), the m elements are converted
     SparseMat_& operator = (const SparseMat& m);
-    //! the assignment operator. This is O(1) operation - no data is copied 
+    //! the assignment operator. This is O(1) operation - no data is copied
     SparseMat_& operator = (const SparseMat_& m);
     //! converts dense matrix to the sparse form
     SparseMat_& operator = (const Mat& m);
@@ -3662,7 +3660,7 @@ public:
     int depth() const;
     //! returns the number of channels in each matrix element
     int channels() const;
-    
+
     //! equivalent to SparseMat::ref<_Tp>(i0, hashval)
     _Tp& ref(int i0, size_t* hashval=0);
     //! equivalent to SparseMat::ref<_Tp>(i0, i1, hashval)
@@ -3671,7 +3669,7 @@ public:
     _Tp& ref(int i0, int i1, int i2, size_t* hashval=0);
     //! equivalent to SparseMat::ref<_Tp>(idx, hashval)
     _Tp& ref(const int* idx, size_t* hashval=0);
-    
+
     //! equivalent to SparseMat::value<_Tp>(i0, hashval)
     _Tp operator()(int i0, size_t* hashval=0) const;
     //! equivalent to SparseMat::value<_Tp>(i0, i1, hashval)
@@ -3694,7 +3692,7 @@ public:
 
 /*!
  Template Read-Only Sparse Matrix Iterator Class.
+
  This is the derived from SparseMatConstIterator class that
  introduces more convenient operator *() for accessing the current element.
 */
@@ -3702,7 +3700,7 @@ template<typename _Tp> class CV_EXPORTS SparseMatConstIterator_ : public SparseM
 {
 public:
     typedef std::forward_iterator_tag iterator_category;
-    
+
     //! the default constructor
     SparseMatConstIterator_();
     //! the full constructor setting the iterator to the first sparse matrix element
@@ -3714,7 +3712,7 @@ public:
     SparseMatConstIterator_& operator = (const SparseMatConstIterator_& it);
     //! the element access operator
     const _Tp& operator *() const;
-    
+
     //! moves iterator to the next element
     SparseMatConstIterator_& operator ++();
     //! moves iterator to the next element
@@ -3723,7 +3721,7 @@ public:
 
 /*!
  Template Read-Write Sparse Matrix Iterator Class.
+
  This is the derived from cv::SparseMatConstIterator_ class that
  introduces more convenient operator *() for accessing the current element.
 */
@@ -3731,7 +3729,7 @@ template<typename _Tp> class CV_EXPORTS SparseMatIterator_ : public SparseMatCon
 {
 public:
     typedef std::forward_iterator_tag iterator_category;
-    
+
     //! the default constructor
     SparseMatIterator_();
     //! the full constructor setting the iterator to the first sparse matrix element
@@ -3739,11 +3737,11 @@ public:
     //! the copy constructor
     SparseMatIterator_(const SparseMatIterator_& it);
 
-    //! the assignment operator 
+    //! the assignment operator
     SparseMatIterator_& operator = (const SparseMatIterator_& it);
     //! returns the reference to the current element
     _Tp& operator *() const;
-    
+
     //! moves the iterator to the next element
     SparseMatIterator_& operator ++();
     //! moves the iterator to the next element
@@ -3754,19 +3752,19 @@ public:
 
 /*!
  Fast Nearest Neighbor Search Class.
+
  The class implements D. Lowe BBF (Best-Bin-First) algorithm for the last
  approximate (or accurate) nearest neighbor search in multi-dimensional spaces.
+
  First, a set of vectors is passed to KDTree::KDTree() constructor
  or KDTree::build() method, where it is reordered.
+
  Then arbitrary vectors can be passed to KDTree::findNearest() methods, which
  find the K nearest neighbors among the vectors from the initial set.
  The user can balance between the speed and accuracy of the search by varying Emax
  parameter, which is the number of leaves that the algorithm checks.
  The larger parameter values yield more accurate results at the expense of lower processing speed.
+
  \code
  KDTree T(points, false);
  const int K = 3, Emax = INT_MAX;
@@ -3775,13 +3773,13 @@ public:
  T.findNearest(query_vec, K, Emax, idx, 0, dist);
  CV_Assert(dist[0] <= dist[1] && dist[1] <= dist[2]);
  \endcode
-*/ 
+*/
 class CV_EXPORTS_W KDTree
 {
 public:
     /*!
         The node of the search tree.
-    */  
+    */
     struct Node
     {
         Node() : idx(-1), left(-1), right(-1), boundary(0.f) {}
@@ -3813,7 +3811,7 @@ public:
                             OutputArray neighbors=noArray(),
                             OutputArray dist=noArray(),
                             OutputArray labels=noArray()) const;
-    //! finds all the points from the initial set that belong to the specified box 
+    //! finds all the points from the initial set that belong to the specified box
     CV_WRAP void findOrthoRange(InputArray minBounds,
                                 InputArray maxBounds,
                                 OutputArray neighborsIdx,
@@ -3840,34 +3838,34 @@ class CV_EXPORTS FileNode;
 
 /*!
  XML/YAML File Storage Class.
+
  The class describes an object associated with XML or YAML file.
  It can be used to store data to such a file or read and decode the data.
+
  The storage is organized as a tree of nested sequences (or lists) and mappings.
  Sequence is a heterogenious array, which elements are accessed by indices or sequentially using an iterator.
  Mapping is analogue of std::map or C structure, which elements are accessed by names.
  The most top level structure is a mapping.
- Leaves of the file storage tree are integers, floating-point numbers and text strings. 
+ Leaves of the file storage tree are integers, floating-point numbers and text strings.
+
  For example, the following code:
+
  \code
  // open file storage for writing. Type of the file is determined from the extension
  FileStorage fs("test.yml", FileStorage::WRITE);
  fs << "test_int" << 5 << "test_real" << 3.1 << "test_string" << "ABCDEFGH";
  fs << "test_mat" << Mat::eye(3,3,CV_32F);
+
  fs << "test_list" << "[" << 0.0000000000001 << 2 << CV_PI << -3435345 << "2-502 2-029 3egegeg" <<
  "{:" << "month" << 12 << "day" << 31 << "year" << 1969 << "}" << "]";
  fs << "test_map" << "{" << "x" << 1 << "y" << 2 << "width" << 100 << "height" << 200 << "lbp" << "[:";
+
  const uchar arr[] = {0, 1, 1, 0, 1, 1, 0, 1};
  fs.writeRaw("u", arr, (int)(sizeof(arr)/sizeof(arr[0])));
+
  fs << "]" << "}";
  \endcode
+
  will produce the following file:
 
  \verbatim
@@ -3894,9 +3892,9 @@ class CV_EXPORTS FileNode;
      height: 200
      lbp: [ 0, 1, 1, 0, 1, 1, 0, 1 ]
  \endverbatim
+
  and to read the file above, the following code can be used:
+
  \code
  // open file storage for reading.
  // Type of the file is determined from the content, not the extension
@@ -3904,10 +3902,10 @@ class CV_EXPORTS FileNode;
  int test_int = (int)fs["test_int"];
  double test_real = (double)fs["test_real"];
  string test_string = (string)fs["test_string"];
+
  Mat M;
  fs["test_mat"] >> M;
+
  FileNode tl = fs["test_list"];
  CV_Assert(tl.type() == FileNode::SEQ && tl.size() == 6);
  double tl0 = (double)tl[0];
@@ -3916,18 +3914,18 @@ class CV_EXPORTS FileNode;
  int tl3 = (int)tl[3];
  string tl4 = (string)tl[4];
  CV_Assert(tl[5].type() == FileNode::MAP && tl[5].size() == 3);
+
  int month = (int)tl[5]["month"];
  int day = (int)tl[5]["day"];
  int year = (int)tl[5]["year"];
+
  FileNode tm = fs["test_map"];
+
  int x = (int)tm["x"];
  int y = (int)tm["y"];
  int width = (int)tm["width"];
  int height = (int)tm["height"];
-  
+
  int lbp_val = 0;
  FileNodeIterator it = tm["lbp"].begin();
 
@@ -3947,7 +3945,7 @@ public:
     };
     enum
     {
-        UNDEFINED=0, 
+        UNDEFINED=0,
         VALUE_EXPECTED=1,
         NAME_EXPECTED=2,
         INSIDE_MAP=4
@@ -3956,7 +3954,7 @@ public:
     CV_WRAP FileStorage();
     //! the full constructor that opens file storage for reading or writing
     CV_WRAP FileStorage(const string& filename, int flags, const string& encoding=string());
-    //! the constructor that takes pointer to the C FileStorage structure 
+    //! the constructor that takes pointer to the C FileStorage structure
     FileStorage(CvFileStorage* fs);
     //! the destructor. calls release()
     virtual ~FileStorage();
@@ -3999,11 +3997,11 @@ class CV_EXPORTS FileNodeIterator;
 
 /*!
  File Storage Node class
+
  The node is used to store each and every element of the file storage opened for reading -
  from the primitive objects, such as numbers and text strings, to the complex nodes:
  sequences, mappings and the registered objects.
+
  Note that file nodes are only used for navigating file storages opened for reading.
  When a file storage is opened for writing, no data is stored in memory after it is written.
 */
@@ -4019,7 +4017,7 @@ public:
         FLOAT=REAL, //!< synonym or REAL
         STR=3, //!< text string in UTF-8 encoding
         STRING=STR, //!< synonym for STR
-        REF=4, //!< integer of size size_t. Typically used for storing complex dynamic structures where some elements reference the others 
+        REF=4, //!< integer of size size_t. Typically used for storing complex dynamic structures where some elements reference the others
         SEQ=5, //!< sequence
         MAP=6, //!< mapping
         TYPE_MASK=7,
@@ -4043,9 +4041,9 @@ public:
     //! returns type of the node
     CV_WRAP int type() const;
 
-    //! returns true if the node is empty 
+    //! returns true if the node is empty
     CV_WRAP bool empty() const;
-    //! returns true if the node is a "none" object 
+    //! returns true if the node is a "none" object
     CV_WRAP bool isNone() const;
     //! returns true if the node is a sequence
     CV_WRAP bool isSeq() const;
@@ -4071,7 +4069,7 @@ public:
     operator double() const;
     //! returns the node content as text string
     operator string() const;
-    
+
     //! returns pointer to the underlying file node
     CvFileNode* operator *();
     //! returns pointer to the underlying file node
@@ -4095,7 +4093,7 @@ public:
 
 /*!
  File Node Iterator
+
  The class is used for iterating sequences (usually) and mappings.
  */
 class CV_EXPORTS FileNodeIterator
@@ -4128,7 +4126,7 @@ public:
     //! reads the next maxCount elements (or less, if the sequence/mapping last element occurs earlier) to the buffer with the specified format
     FileNodeIterator& readRaw( const string& fmt, uchar* vec,
                                size_t maxCount=(size_t)INT_MAX );
-    
+
     const CvFileStorage* fs;
     const CvFileNode* container;
     CvSeqReader reader;
@@ -4146,7 +4144,7 @@ typedef Ptr<CvMemStorage> MemStorage;
 
  The class provides more convenient access to sequence elements,
  STL-style operations and iterators.
+
  \note The class is targeted for simple data types,
     i.e. no constructors or destructors
     are called for the sequence elements.
@@ -4156,7 +4154,7 @@ template<typename _Tp> class CV_EXPORTS Seq
 public:
     typedef SeqIterator<_Tp> iterator;
     typedef SeqIterator<_Tp> const_iterator;
-    
+
     //! the default constructor
     Seq();
     //! the constructor for wrapping CvSeq structure. The real element type in CvSeq should match _Tp.
@@ -4199,7 +4197,7 @@ public:
     void remove(int idx);
     //! removes the specified subsequence
     void remove(const Range& r);
-    
+
     //! returns reference to the first sequence element
     _Tp& front();
     //! returns read-only reference to the first sequence element
@@ -4226,11 +4224,11 @@ public:
     void copyTo(vector<_Tp>& vec, const Range& range=Range::all()) const;
     //! returns the vector containing all the sequence elements
     operator vector<_Tp>() const;
-    
+
     CvSeq* seq;
 };
 
-    
+
 /*!
  STL-style Sequence Iterator inherited from the CvSeqReader structure
 */
@@ -4272,22 +4270,22 @@ public:
 class CV_EXPORTS Algorithm;
 class CV_EXPORTS AlgorithmInfo;
 struct CV_EXPORTS AlgorithmInfoData;
-    
+
 template<typename _Tp> struct ParamType {};
-    
+
 /*!
   Base class for high-level OpenCV algorithms
-*/    
+*/
 class CV_EXPORTS_W Algorithm
 {
 public:
     Algorithm();
     virtual ~Algorithm();
     string name() const;
-    
+
     template<typename _Tp> typename ParamType<_Tp>::member_type get(const string& name) const;
     template<typename _Tp> typename ParamType<_Tp>::member_type get(const char* name) const;
-    
+
     CV_WRAP int getInt(const string& name) const;
     CV_WRAP double getDouble(const string& name) const;
     CV_WRAP bool getBool(const string& name) const;
@@ -4295,7 +4293,7 @@ public:
     CV_WRAP Mat getMat(const string& name) const;
     CV_WRAP vector<Mat> getMatVector(const string& name) const;
     CV_WRAP Ptr<Algorithm> getAlgorithm(const string& name) const;
-    
+
     CV_WRAP_AS(setInt) void set(const string& name, int value);
     CV_WRAP_AS(setDouble) void set(const string& name, double value);
     CV_WRAP_AS(setBool) void set(const string& name, bool value);
@@ -4303,7 +4301,7 @@ public:
     CV_WRAP_AS(setMat) void set(const string& name, const Mat& value);
     CV_WRAP_AS(setMatVector) void set(const string& name, const vector<Mat>& value);
     CV_WRAP_AS(setAlgorithm) void set(const string& name, const Ptr<Algorithm>& value);
-    
+
     void set(const char* name, int value);
     void set(const char* name, double value);
     void set(const char* name, bool value);
@@ -4311,28 +4309,28 @@ public:
     void set(const char* name, const Mat& value);
     void set(const char* name, const vector<Mat>& value);
     void set(const char* name, const Ptr<Algorithm>& value);
-    
+
     CV_WRAP string paramHelp(const string& name) const;
     int paramType(const char* name) const;
     CV_WRAP int paramType(const string& name) const;
     CV_WRAP void getParams(CV_OUT vector<string>& names) const;
-    
-    
+
+
     virtual void write(FileStorage& fs) const;
     virtual void read(const FileNode& fn);
-    
+
     typedef Algorithm* (*Constructor)(void);
     typedef int (Algorithm::*Getter)() const;
     typedef void (Algorithm::*Setter)(int);
-    
+
     CV_WRAP static void getList(CV_OUT vector<string>& algorithms);
     CV_WRAP static Ptr<Algorithm> _create(const string& name);
     template<typename _Tp> static Ptr<_Tp> create(const string& name);
-    
+
     virtual AlgorithmInfo* info() const /* TODO: make it = 0;*/ { return 0; }
 };
 
-    
+
 class CV_EXPORTS AlgorithmInfo
 {
 public:
@@ -4341,49 +4339,49 @@ public:
     ~AlgorithmInfo();
     void get(const Algorithm* algo, const char* name, int argType, void* value) const;
     void addParam_(Algorithm& algo, const char* name, int argType,
-                   void* value, bool readOnly, 
+                   void* value, bool readOnly,
                    Algorithm::Getter getter, Algorithm::Setter setter,
                    const string& help=string());
     string paramHelp(const char* name) const;
     int paramType(const char* name) const;
     void getParams(vector<string>& names) const;
-    
+
     void write(const Algorithm* algo, FileStorage& fs) const;
     void read(Algorithm* algo, const FileNode& fn) const;
     string name() const;
-    
+
     void addParam(Algorithm& algo, const char* name,
-                  int& value, bool readOnly=false, 
+                  int& value, bool readOnly=false,
                   int (Algorithm::*getter)()=0,
                   void (Algorithm::*setter)(int)=0,
                   const string& help=string());
     void addParam(Algorithm& algo, const char* name,
-                  bool& value, bool readOnly=false, 
+                  bool& value, bool readOnly=false,
                   int (Algorithm::*getter)()=0,
                   void (Algorithm::*setter)(int)=0,
                   const string& help=string());
     void addParam(Algorithm& algo, const char* name,
-                  double& value, bool readOnly=false, 
+                  double& value, bool readOnly=false,
                   double (Algorithm::*getter)()=0,
                   void (Algorithm::*setter)(double)=0,
                   const string& help=string());
     void addParam(Algorithm& algo, const char* name,
-                  string& value, bool readOnly=false, 
+                  string& value, bool readOnly=false,
                   string (Algorithm::*getter)()=0,
                   void (Algorithm::*setter)(const string&)=0,
                   const string& help=string());
     void addParam(Algorithm& algo, const char* name,
-                  Mat& value, bool readOnly=false, 
+                  Mat& value, bool readOnly=false,
                   Mat (Algorithm::*getter)()=0,
                   void (Algorithm::*setter)(const Mat&)=0,
                   const string& help=string());
     void addParam(Algorithm& algo, const char* name,
-                  vector<Mat>& value, bool readOnly=false, 
+                  vector<Mat>& value, bool readOnly=false,
                   vector<Mat> (Algorithm::*getter)()=0,
                   void (Algorithm::*setter)(const vector<Mat>&)=0,
                   const string& help=string());
     void addParam(Algorithm& algo, const char* name,
-                  Ptr<Algorithm>& value, bool readOnly=false, 
+                  Ptr<Algorithm>& value, bool readOnly=false,
                   Ptr<Algorithm> (Algorithm::*getter)()=0,
                   void (Algorithm::*setter)(const Ptr<Algorithm>&)=0,
                   const string& help=string());
@@ -4397,7 +4395,7 @@ protected:
 struct CV_EXPORTS Param
 {
     enum { INT=0, BOOLEAN=1, REAL=2, STRING=3, MAT=4, MAT_VECTOR=5, ALGORITHM=6 };
-    
+
     Param();
     Param(int _type, bool _readonly, int _offset,
           Algorithm::Getter _getter=0,
@@ -4415,15 +4413,15 @@ template<> struct ParamType<bool>
 {
     typedef bool const_param_type;
     typedef bool member_type;
-    
+
     enum { type = Param::BOOLEAN };
-};    
-    
+};
+
 template<> struct ParamType<int>
 {
     typedef int const_param_type;
     typedef int member_type;
-    
+
     enum { type = Param::INT };
 };
 
@@ -4431,7 +4429,7 @@ template<> struct ParamType<double>
 {
     typedef double const_param_type;
     typedef double member_type;
-    
+
     enum { type = Param::REAL };
 };
 
@@ -4439,7 +4437,7 @@ template<> struct ParamType<string>
 {
     typedef const string& const_param_type;
     typedef string member_type;
-    
+
     enum { type = Param::STRING };
 };
 
@@ -4447,7 +4445,7 @@ template<> struct ParamType<Mat>
 {
     typedef const Mat& const_param_type;
     typedef Mat member_type;
-    
+
     enum { type = Param::MAT };
 };
 
@@ -4455,7 +4453,7 @@ template<> struct ParamType<vector<Mat> >
 {
     typedef const vector<Mat>& const_param_type;
     typedef vector<Mat> member_type;
-    
+
     enum { type = Param::MAT_VECTOR };
 };
 
@@ -4463,11 +4461,11 @@ template<> struct ParamType<Algorithm>
 {
     typedef const Ptr<Algorithm>& const_param_type;
     typedef Ptr<Algorithm> member_type;
-    
+
     enum { type = Param::ALGORITHM };
 };
-    
-    
+
+
 /*!
 "\nThe CommandLineParser class is designed for command line arguments parsing\n"
            "Keys map: \n"
index 7af4fb0..f6e526e 100644 (file)
@@ -494,7 +494,7 @@ Finds the best match for each descriptor from a query set with train descriptors
 
 .. ocv:function:: void gpu::BFMatcher_GPU::match(const GpuMat& query, std::vector<DMatch>& matches, const std::vector<GpuMat>& masks = std::vector<GpuMat>())
 
-.. ocv:function:: void gpu::BFMatcher_GPU::matchCollection(const GpuMat& query, const GpuMat& trainCollection, GpuMat& trainIdx, GpuMat& imgIdx, GpuMat& distance, const GpuMat& masks, Stream& stream = Stream::Null())
+.. ocv:function:: void gpu::BFMatcher_GPU::matchCollection( const GpuMat& query, const GpuMat& trainCollection, GpuMat& trainIdx, GpuMat& imgIdx, GpuMat& distance, const GpuMat& masks=GpuMat(), Stream& stream=Stream::Null() )
 
 .. seealso:: :ocv:func:`DescriptorMatcher::match`
 
@@ -512,9 +512,9 @@ gpu::BFMatcher_GPU::matchDownload
 ---------------------------------------------
 Downloads matrices obtained via :ocv:func:`gpu::BFMatcher_GPU::matchSingle` or :ocv:func:`gpu::BFMatcher_GPU::matchCollection` to vector with :ocv:class:`DMatch`.
 
-.. ocv:function:: void gpu::BFMatcher_GPU::matchDownload(const GpuMat& trainIdx, const GpuMat& distance, std::vector<DMatch>&matches)
+.. ocv:function:: static void gpu::BFMatcher_GPU::matchDownload(const GpuMat& trainIdx, const GpuMat& distance, std::vector<DMatch>&matches)
 
-.. ocv:function:: void gpu::BFMatcher_GPU::matchDownload(const GpuMat& trainIdx, GpuMat& imgIdx, const GpuMat& distance, std::vector<DMatch>&matches)
+.. ocv:function:: static void gpu::BFMatcher_GPU::matchDownload( const GpuMat& trainIdx, const GpuMat& imgIdx, const GpuMat& distance, std::vector<DMatch>& matches )
 
 
 
index f63e242..a32a6f7 100644 (file)
@@ -285,7 +285,9 @@ gpu::erode
 --------------
 Erodes an image by using a specific structuring element.
 
-.. ocv:function:: void gpu::erode(const GpuMat& src, GpuMat& dst, const Mat& kernel, Point anchor = Point(-1, -1), int iterations = 1, Stream& stream = Stream::Null())
+.. ocv:function:: void gpu::erode( const GpuMat& src, GpuMat& dst, const Mat& kernel, Point anchor=Point(-1, -1), int iterations=1 )
+
+.. ocv:function:: void gpu::erode( const GpuMat& src, GpuMat& dst, const Mat& kernel, GpuMat& buf, Point anchor=Point(-1, -1), int iterations=1, Stream& stream=Stream::Null() )
 
     :param src: Source image. Only  ``CV_8UC1``  and  ``CV_8UC4``  types are supported.
 
@@ -309,7 +311,9 @@ gpu::dilate
 ---------------
 Dilates an image by using a specific structuring element.
 
-.. ocv:function:: void gpu::dilate(const GpuMat& src, GpuMat& dst, const Mat& kernel, Point anchor = Point(-1, -1), int iterations = 1, Stream& stream = Stream::Null())
+.. ocv:function:: void gpu::dilate( const GpuMat& src, GpuMat& dst, const Mat& kernel, Point anchor=Point(-1, -1), int iterations=1 )
+
+.. ocv:function:: void gpu::dilate( const GpuMat& src, GpuMat& dst, const Mat& kernel, GpuMat& buf, Point anchor=Point(-1, -1), int iterations=1, Stream& stream=Stream::Null() )
 
     :param src: Source image. ``CV_8UC1`` and ``CV_8UC4`` source types are supported.
 
@@ -333,7 +337,9 @@ gpu::morphologyEx
 ---------------------
 Applies an advanced morphological operation to an image.
 
-.. ocv:function:: void gpu::morphologyEx(const GpuMat& src, GpuMat& dst, int op, const Mat& kernel, Point anchor = Point(-1, -1), int iterations = 1, Stream& stream = Stream::Null())
+.. ocv:function::  void gpu::morphologyEx( const GpuMat& src, GpuMat& dst, int op, const Mat& kernel, Point anchor=Point(-1, -1), int iterations=1 )
+
+.. ocv:function:: void gpu::morphologyEx( const GpuMat& src, GpuMat& dst, int op, const Mat& kernel, GpuMat& buf1, GpuMat& buf2, Point anchor=Point(-1, -1), int iterations=1, Stream& stream=Stream::Null() )
 
     :param src: Source image.  ``CV_8UC1``  and  ``CV_8UC4``  source types are supported.
 
@@ -371,8 +377,6 @@ Creates a non-separable linear filter.
 
 .. ocv:function:: Ptr<FilterEngine_GPU> gpu::createLinearFilter_GPU(int srcType, int dstType, const Mat& kernel, Point anchor = Point(-1,-1), int borderType = BORDER_DEFAULT)
 
-.. ocv:function:: Ptr<BaseFilter_GPU> gpu::getLinearFilter_GPU(int srcType, int dstType, const Mat& kernel, const Size& ksize, Point anchor = Point(-1, -1))
-
     :param srcType: Input image type. Supports  ``CV_8U``  ,  ``CV_16U``  and  ``CV_32F``  one and four channel image.
 
     :param dstType: Output image type. The same type as ``src`` is supported.
@@ -441,7 +445,7 @@ gpu::getLinearRowFilter_GPU
 -------------------------------
 Creates a primitive row filter with the specified kernel.
 
-.. ocv:function:: Ptr<BaseRowFilter_GPU> gpu::getLinearRowFilter_GPU(int srcType, int bufType, const Mat& rowKernel, int anchor = -1, int borderType = BORDER_CONSTANT)
+.. ocv:function:: Ptr<BaseRowFilter_GPU> gpu::getLinearRowFilter_GPU( int srcType, int bufType, const Mat& rowKernel, int anchor=-1, int borderType=BORDER_DEFAULT )
 
     :param srcType: Source array type. Only  ``CV_8UC1`` , ``CV_8UC4`` , ``CV_16SC1`` , ``CV_16SC2`` , ``CV_16SC3`` , ``CV_32SC1`` , ``CV_32FC1``  source types are supported.
 
@@ -467,7 +471,7 @@ gpu::getLinearColumnFilter_GPU
 ----------------------------------
 Creates a primitive column filter with the specified kernel.
 
-.. ocv:function:: Ptr<BaseColumnFilter_GPU> gpu::getLinearColumnFilter_GPU(int bufType, int dstType, const Mat& columnKernel, int anchor = -1, int borderType = BORDER_CONSTANT)
+.. ocv:function:: Ptr<BaseColumnFilter_GPU> gpu::getLinearColumnFilter_GPU( int bufType, int dstType, const Mat& columnKernel, int anchor=-1, int borderType=BORDER_DEFAULT )
 
     :param bufType: Intermediate buffer type with as many channels as  ``dstType`` .
 
@@ -517,7 +521,10 @@ gpu::sepFilter2D
 --------------------
 Applies a separable 2D linear filter to an image.
 
-.. ocv:function:: void gpu::sepFilter2D(const GpuMat& src, GpuMat& dst, int ddepth, const Mat& kernelX, const Mat& kernelY, Point anchor = Point(-1,-1), int rowBorderType = BORDER_DEFAULT, int columnBorderType = -1, Stream& stream = Stream::Null())
+.. ocv:function:: void gpu::sepFilter2D( const GpuMat& src, GpuMat& dst, int ddepth, const Mat& kernelX, const Mat& kernelY, Point anchor=Point(-1,-1), int rowBorderType=BORDER_DEFAULT, int columnBorderType=-1 )
+
+.. ocv:function:: void gpu::sepFilter2D( const GpuMat& src, GpuMat& dst, int ddepth, const Mat& kernelX, const Mat& kernelY, GpuMat& buf, Point anchor=Point(-1,-1), int rowBorderType=BORDER_DEFAULT, int columnBorderType=-1, Stream& stream=Stream::Null() )
+
 
     :param src: Source image.  ``CV_8UC1`` , ``CV_8UC4`` , ``CV_16SC1`` , ``CV_16SC2`` , ``CV_32SC1`` , ``CV_32FC1``  source types are supported.
 
@@ -569,7 +576,9 @@ gpu::Sobel
 --------------
 Applies the generalized Sobel operator to an image.
 
-.. ocv:function:: void gpu::Sobel(const GpuMat& src, GpuMat& dst, int ddepth, int dx, int dy, int ksize = 3, double scale = 1, int rowBorderType = BORDER_DEFAULT, int columnBorderType = -1, Stream& stream = Stream::Null())
+.. ocv:function:: void gpu::Sobel( const GpuMat& src, GpuMat& dst, int ddepth, int dx, int dy, int ksize=3, double scale=1, int rowBorderType=BORDER_DEFAULT, int columnBorderType=-1 )
+
+.. ocv:function:: void gpu::Sobel( const GpuMat& src, GpuMat& dst, int ddepth, int dx, int dy, GpuMat& buf, int ksize=3, double scale=1, int rowBorderType=BORDER_DEFAULT, int columnBorderType=-1, Stream& stream=Stream::Null() )
 
     :param src: Source image.  ``CV_8UC1`` , ``CV_8UC4`` , ``CV_16SC1`` , ``CV_16SC2`` , ``CV_16SC3`` , ``CV_32SC1`` , ``CV_32FC1``  source types are supported.
 
@@ -599,7 +608,9 @@ gpu::Scharr
 ---------------
 Calculates the first x- or y- image derivative using the Scharr operator.
 
-.. ocv:function:: void gpu::Scharr(const GpuMat& src, GpuMat& dst, int ddepth, int dx, int dy, double scale = 1, int rowBorderType = BORDER_DEFAULT, int columnBorderType = -1, Stream& stream = Stream::Null())
+.. ocv:function:: void gpu::Scharr( const GpuMat& src, GpuMat& dst, int ddepth, int dx, int dy, double scale=1, int rowBorderType=BORDER_DEFAULT, int columnBorderType=-1 )
+
+.. ocv:function:: void gpu::Scharr( const GpuMat& src, GpuMat& dst, int ddepth, int dx, int dy, GpuMat& buf, double scale=1, int rowBorderType=BORDER_DEFAULT, int columnBorderType=-1, Stream& stream=Stream::Null() )
 
     :param src: Source image.  ``CV_8UC1`` , ``CV_8UC4`` , ``CV_16SC1`` , ``CV_16SC2`` , ``CV_16SC3`` , ``CV_32SC1`` , ``CV_32FC1``  source types are supported.
 
@@ -627,7 +638,7 @@ gpu::createGaussianFilter_GPU
 ---------------------------------
 Creates a Gaussian filter engine.
 
-.. ocv:function:: Ptr<FilterEngine_GPU> gpu::createGaussianFilter_GPU(int type, Size ksize, double sigmaX, double sigmaY = 0, int rowBorderType = BORDER_DEFAULT, int columnBorderType = -1)
+.. ocv:function:: Ptr<FilterEngine_GPU> gpu::createGaussianFilter_GPU( int type, Size ksize, double sigma1, double sigma2=0, int rowBorderType=BORDER_DEFAULT, int columnBorderType=-1 )
 
     :param type: Source and destination image type.  ``CV_8UC1`` , ``CV_8UC4`` , ``CV_16SC1`` , ``CV_16SC2`` , ``CV_16SC3`` , ``CV_32SC1`` , ``CV_32FC1`` are supported.
 
@@ -649,7 +660,9 @@ gpu::GaussianBlur
 ---------------------
 Smooths an image using the Gaussian filter.
 
-.. ocv:function:: void gpu::GaussianBlur(const GpuMat& src, GpuMat& dst, Size ksize, double sigmaX, double sigmaY = 0, int rowBorderType = BORDER_DEFAULT, int columnBorderType = -1, Stream& stream = Stream::Null())
+.. ocv:function:: void gpu::GaussianBlur( const GpuMat& src, GpuMat& dst, Size ksize, double sigma1, double sigma2=0, int rowBorderType=BORDER_DEFAULT, int columnBorderType=-1 )
+
+.. ocv:function:: void gpu::GaussianBlur( const GpuMat& src, GpuMat& dst, Size ksize, GpuMat& buf, double sigma1, double sigma2=0, int rowBorderType=BORDER_DEFAULT, int columnBorderType=-1, Stream& stream=Stream::Null() )
 
     :param src: Source image.  ``CV_8UC1`` , ``CV_8UC4`` , ``CV_16SC1`` , ``CV_16SC2`` , ``CV_16SC3`` , ``CV_32SC1`` , ``CV_32FC1``  source types are supported.
 
index 401280d..765bd20 100644 (file)
@@ -9,7 +9,7 @@ gpu::meanShiftFiltering
 ---------------------------
 Performs mean-shift filtering for each point of the source image.
 
-.. ocv:function:: void gpu::meanShiftFiltering(const GpuMat& src, GpuMat& dst, int sp, int sr,TermCriteria criteria = TermCriteria(TermCriteria::MAX_ITER + TermCriteria::EPS, 5, 1))
+.. ocv:function:: void gpu::meanShiftFiltering( const GpuMat& src, GpuMat& dst, int sp, int sr, TermCriteria criteria=TermCriteria(TermCriteria::MAX_ITER + TermCriteria::EPS, 5, 1), Stream& stream=Stream::Null() )
 
     :param src: Source image. Only  ``CV_8UC4`` images are supported for now.
 
@@ -29,7 +29,7 @@ gpu::meanShiftProc
 ----------------------
 Performs a mean-shift procedure and stores information about processed points (their colors and positions) in two images.
 
-.. ocv:function:: void gpu::meanShiftProc(const GpuMat& src, GpuMat& dstr, GpuMat& dstsp, int sp, int sr, TermCriteria criteria = TermCriteria(TermCriteria::MAX_ITER + TermCriteria::EPS, 5, 1))
+.. ocv:function:: void gpu::meanShiftProc( const GpuMat& src, GpuMat& dstr, GpuMat& dstsp, int sp, int sr, TermCriteria criteria=TermCriteria(TermCriteria::MAX_ITER + TermCriteria::EPS, 5, 1), Stream& stream=Stream::Null() )
 
     :param src: Source image. Only  ``CV_8UC4`` images are supported for now.
 
@@ -159,7 +159,7 @@ gpu::mulSpectrums
 ---------------------
 Performs a per-element multiplication of two Fourier spectrums.
 
-.. ocv:function:: void gpu::mulSpectrums(const GpuMat& a, const GpuMat& b, GpuMat& c, int flags, bool conjB=false)
+.. ocv:function:: void gpu::mulSpectrums( const GpuMat& a, const GpuMat& b, GpuMat& c, int flags, bool conjB=false, Stream& stream=Stream::Null() )
 
     :param a: First spectrum.
 
@@ -181,7 +181,7 @@ gpu::mulAndScaleSpectrums
 -----------------------------
 Performs a per-element multiplication of two Fourier spectrums and scales the result.
 
-.. ocv:function:: void gpu::mulAndScaleSpectrums(const GpuMat& a, const GpuMat& b, GpuMat& c, int flags, float scale, bool conjB=false)
+.. ocv:function:: void gpu::mulAndScaleSpectrums( const GpuMat& a, const GpuMat& b, GpuMat& c, int flags, float scale, bool conjB=false, Stream& stream=Stream::Null() )
 
     :param a: First spectrum.
 
@@ -205,7 +205,7 @@ gpu::dft
 ------------
 Performs a forward or inverse discrete Fourier transform (1D or 2D) of the floating point matrix.
 
-.. ocv:function:: void gpu::dft(const GpuMat& src, GpuMat& dst, Size dft_size, int flags=0)
+.. ocv:function:: void gpu::dft( const GpuMat& src, GpuMat& dst, Size dft_size, int flags=0, Stream& stream=Stream::Null() )
 
     :param src: Source matrix (real or complex).
 
@@ -272,7 +272,7 @@ Computes a convolution (or cross-correlation) of two images.
 
 .. ocv:function:: void gpu::convolve(const GpuMat& image, const GpuMat& templ, GpuMat& result, bool ccorr=false)
 
-.. ocv:function:: void gpu::convolve(const GpuMat& image, const GpuMat& templ, GpuMat& result, bool ccorr, ConvolveBuf& buf, Stream &stream = Stream::Null())
+.. ocv:function:: void gpu::convolve( const GpuMat& image, const GpuMat& templ, GpuMat& result, bool ccorr, ConvolveBuf& buf, Stream& stream=Stream::Null() )
 
     :param image: Source image. Only  ``CV_32FC1`` images are supported for now.
 
@@ -346,7 +346,7 @@ gpu::remap
 --------------
 Applies a generic geometrical transformation to an image.
 
-.. ocv:function:: void gpu::remap(const GpuMat& src, GpuMat& dst, const GpuMat& xmap, const GpuMat& ymap, int interpolation, int borderMode = BORDER_CONSTANT, const Scalar& borderValue = Scalar(), Stream& stream = Stream::Null())
+.. ocv:function:: void gpu::remap( const GpuMat& src, GpuMat& dst, const GpuMat& xmap, const GpuMat& ymap, int interpolation, int borderMode=BORDER_CONSTANT, Scalar borderValue=Scalar(), Stream& stream=Stream::Null() )
 
     :param src: Source image.
 
@@ -477,7 +477,7 @@ gpu::warpAffine
 -------------------
 Applies an affine transformation to an image.
 
-.. ocv:function:: void gpu::warpAffine(const GpuMat& src, GpuMat& dst, const Mat& M, Size dsize, int flags = INTER_LINEAR, Stream& stream = Stream::Null())
+.. ocv:function:: void gpu::warpAffine( const GpuMat& src, GpuMat& dst, const Mat& M, Size dsize, int flags=INTER_LINEAR, int borderMode=BORDER_CONSTANT, Scalar borderValue=Scalar(), Stream& stream=Stream::Null() )
 
     :param src: Source image.  ``CV_8U`` , ``CV_16U`` , ``CV_32S`` , or  ``CV_32F`` depth and 1, 3, or 4 channels are supported.
 
@@ -521,7 +521,7 @@ gpu::warpPerspective
 ------------------------
 Applies a perspective transformation to an image.
 
-.. ocv:function:: void gpu::warpPerspective(const GpuMat& src, GpuMat& dst, const Mat& M, Size dsize, int flags = INTER_LINEAR, Stream& stream = Stream::Null())
+.. ocv:function:: void gpu::warpPerspective( const GpuMat& src, GpuMat& dst, const Mat& M, Size dsize, int flags=INTER_LINEAR, int borderMode=BORDER_CONSTANT, Scalar borderValue=Scalar(), Stream& stream=Stream::Null() )
 
     :param src: Source image. ``CV_8U`` , ``CV_16U`` , ``CV_32S`` , or  ``CV_32F`` depth and 1, 3, or 4 channels are supported.
 
@@ -657,9 +657,9 @@ Calculates a histogram with evenly distributed bins.
 
 .. ocv:function:: void gpu::histEven(const GpuMat& src, GpuMat& hist, GpuMat& buf, int histSize, int lowerLevel, int upperLevel, Stream& stream = Stream::Null())
 
-.. ocv:function:: void gpu::histEven(const GpuMat& src, GpuMat* hist, int* histSize, int* lowerLevel, int* upperLevel, Stream& stream = Stream::Null())
+.. ocv:function:: void gpu::histEven( const GpuMat& src, GpuMat hist[4], int histSize[4], int lowerLevel[4], int upperLevel[4], Stream& stream=Stream::Null() )
 
-.. ocv:function:: void gpu::histEven(const GpuMat& src, GpuMat* hist, GpuMat& buf, int* histSize, int* lowerLevel, int* upperLevel, Stream& stream = Stream::Null())
+.. ocv:function:: void gpu::histEven( const GpuMat& src, GpuMat hist[4], GpuMat& buf, int histSize[4], int lowerLevel[4], int upperLevel[4], Stream& stream=Stream::Null() )
 
     :param src: Source image. ``CV_8U``, ``CV_16U``, or ``CV_16S`` depth and 1 or 4 channels are supported. For a four-channel image, all channels are processed separately.
 
@@ -685,10 +685,6 @@ Calculates a histogram with bins determined by the ``levels`` array.
 
 .. ocv:function:: void gpu::histRange(const GpuMat& src, GpuMat& hist, const GpuMat& levels, GpuMat& buf, Stream& stream = Stream::Null())
 
-.. ocv:function:: void gpu::histRange(const GpuMat& src, GpuMat* hist, const GpuMat* levels, Stream& stream = Stream::Null())
-
-.. ocv:function:: void gpu::histRange(const GpuMat& src, GpuMat* hist, const GpuMat* levels, GpuMat& buf, Stream& stream = Stream::Null())
-
     :param src: Source image. ``CV_8U`` , ``CV_16U`` , or  ``CV_16S`` depth and 1 or 4 channels are supported. For a four-channel image, all channels are processed separately.
 
     :param hist: Destination histogram with one row, ``(levels.cols-1)`` columns, and the  ``CV_32SC1`` type.
@@ -747,7 +743,7 @@ gpu::buildWarpPlaneMaps
 -----------------------
 Builds plane warping maps.
 
-.. ocv:function:: void gpu::buildWarpPlaneMaps(Size src_size, Rect dst_roi, const Mat& R, double f, double s, double dist, GpuMat& map_x, GpuMat& map_y, Stream& stream = Stream::Null())
+.. ocv:function:: void gpu::buildWarpPlaneMaps( Size src_size, Rect dst_roi, const Mat & K, const Mat& R, const Mat & T, float scale, GpuMat& map_x, GpuMat& map_y, Stream& stream=Stream::Null() )
 
     :param stream: Stream for the asynchronous version.
 
@@ -757,7 +753,7 @@ gpu::buildWarpCylindricalMaps
 -----------------------------
 Builds cylindrical warping maps.
 
-.. ocv:function:: void gpu::buildWarpCylindricalMaps(Size src_size, Rect dst_roi, const Mat& R, double f, double s, GpuMat& map_x, GpuMat& map_y, Stream& stream = Stream::Null())
+.. ocv:function:: void gpu::buildWarpCylindricalMaps( Size src_size, Rect dst_roi, const Mat & K, const Mat& R, float scale, GpuMat& map_x, GpuMat& map_y, Stream& stream=Stream::Null() )
 
     :param stream: Stream for the asynchronous version.
 
@@ -767,7 +763,7 @@ gpu::buildWarpSphericalMaps
 ---------------------------
 Builds spherical warping maps.
 
-.. ocv:function:: void gpu::buildWarpSphericalMaps(Size src_size, Rect dst_roi, const Mat& R, double f, double s, GpuMat& map_x, GpuMat& map_y, Stream& stream = Stream::Null())
+.. ocv:function:: void gpu::buildWarpSphericalMaps( Size src_size, Rect dst_roi, const Mat & K, const Mat& R, float scale, GpuMat& map_x, GpuMat& map_y, Stream& stream=Stream::Null() )
 
     :param stream: Stream for the asynchronous version.
 
index b6543f8..b7d6431 100644 (file)
@@ -47,7 +47,7 @@ gpu::transpose
 ------------------
 Transposes a matrix.
 
-.. ocv:function:: void gpu::transpose(const GpuMat& src, GpuMat& dst, Stream& stream = Stream::Null())
+.. ocv:function:: void gpu::transpose( const GpuMat& src1, GpuMat& dst, Stream& stream=Stream::Null() )
 
     :param src: Source matrix. 1-, 4-, 8-byte element sizes are supported for now (CV_8UC1, CV_8UC4, CV_16UC2, CV_32FC1, etc).
 
@@ -63,7 +63,7 @@ gpu::flip
 -------------
 Flips a 2D matrix around vertical, horizontal, or both axes.
 
-.. ocv:function:: void gpu::flip(const GpuMat& src, GpuMat& dst, int flipCode, Stream& stream = Stream::Null())
+.. ocv:function:: void gpu::flip( const GpuMat& a, GpuMat& b, int flipCode, Stream& stream=Stream::Null() )
 
     :param src: Source matrix. Supports 1, 3 and 4 channels images with ``CV_8U``, ``CV_16U``, ``CV_32S`` or ``CV_32F`` depth.
 
@@ -143,7 +143,7 @@ gpu::magnitude
 ------------------
 Computes magnitudes of complex matrix elements.
 
-.. ocv:function:: void gpu::magnitude(const GpuMat& xy, GpuMat& magnitude, Stream& stream = Stream::Null())
+.. ocv:function:: void gpu::magnitude( const GpuMat& x, GpuMat& magnitude, Stream& stream=Stream::Null() )
 
 .. ocv:function:: void gpu::magnitude(const GpuMat& x, const GpuMat& y, GpuMat& magnitude, Stream& stream = Stream::Null())
 
@@ -165,7 +165,7 @@ gpu::magnitudeSqr
 ---------------------
 Computes squared magnitudes of complex matrix elements.
 
-.. ocv:function:: void gpu::magnitudeSqr(const GpuMat& xy, GpuMat& magnitude, Stream& stream = Stream::Null())
+.. ocv:function:: void gpu::magnitudeSqr( const GpuMat& x, GpuMat& magnitude, Stream& stream=Stream::Null() )
 
 .. ocv:function:: void gpu::magnitudeSqr(const GpuMat& x, const GpuMat& y, GpuMat& magnitude, Stream& stream = Stream::Null())
 
index 56e8438..29278b6 100644 (file)
@@ -9,9 +9,9 @@ gpu::add
 ------------
 Computes a matrix-matrix or matrix-scalar sum.
 
-.. ocv:function:: void gpu::add(const GpuMat& src1, const GpuMat& src2, GpuMat& dst, const GpuMat& mask = GpuMat(), int dtype = -1, Stream& stream = Stream::Null())
+.. ocv:function:: void gpu::add( const GpuMat& a, const GpuMat& b, GpuMat& c, const GpuMat& mask=GpuMat(), int dtype=-1, Stream& stream=Stream::Null() )
 
-.. ocv:function:: void gpu::add(const GpuMat& src1, const Scalar& src2, GpuMat& dst, const GpuMat& mask = GpuMat(), int dtype = -1, Stream& stream = Stream::Null())
+.. ocv:function:: void gpu::add( const GpuMat& a, const Scalar& sc, GpuMat& c, const GpuMat& mask=GpuMat(), int dtype=-1, Stream& stream=Stream::Null() )
 
     :param src1: First source matrix.
 
@@ -33,9 +33,9 @@ gpu::subtract
 -----------------
 Computes a matrix-matrix or matrix-scalar difference.
 
-.. ocv:function:: void gpu::subtract(const GpuMat& src1, const GpuMat& src2, GpuMat& dst, const GpuMat& mask = GpuMat(), int dtype = -1, Stream& stream = Stream::Null())
+.. ocv:function:: void gpu::subtract( const GpuMat& a, const GpuMat& b, GpuMat& c, const GpuMat& mask=GpuMat(), int dtype=-1, Stream& stream=Stream::Null() )
 
-.. ocv:function:: void gpu::subtract(const GpuMat& src1, const Scalar& src2, GpuMat& dst, const GpuMat& mask = GpuMat(), int dtype = -1, Stream& stream = Stream::Null())
+.. ocv:function:: void gpu::subtract( const GpuMat& a, const Scalar& sc, GpuMat& c, const GpuMat& mask=GpuMat(), int dtype=-1, Stream& stream=Stream::Null() )
 
     :param src1: First source matrix.
 
@@ -57,9 +57,9 @@ gpu::multiply
 -----------------
 Computes a matrix-matrix or matrix-scalar per-element product.
 
-.. ocv:function:: void gpu::multiply(const GpuMat& src1, const GpuMat& src2, GpuMat& dst, double scale = 1, int dtype = -1, Stream& stream = Stream::Null())
+.. ocv:function:: void gpu::multiply( const GpuMat& a, const GpuMat& b, GpuMat& c, double scale=1, int dtype=-1, Stream& stream=Stream::Null() )
 
-.. ocv:function:: void gpu::multiply(const GpuMat& src1, const Scalar& src2, GpuMat& dst, double scale = 1, int dtype = -1, Stream& stream = Stream::Null())
+.. ocv:function:: void gpu::multiply( const GpuMat& a, const Scalar& sc, GpuMat& c, double scale=1, int dtype=-1, Stream& stream=Stream::Null() )
 
     :param src1: First source matrix.
 
@@ -81,9 +81,9 @@ gpu::divide
 -----------
 Computes a matrix-matrix or matrix-scalar division.
 
-.. ocv:function:: void gpu::divide(const GpuMat& src1, const GpuMat& src2, GpuMat& dst, double scale = 1, int dtype = -1, Stream& stream = Stream::Null())
+.. ocv:function:: void gpu::divide( const GpuMat& a, const GpuMat& b, GpuMat& c, double scale=1, int dtype=-1, Stream& stream=Stream::Null() )
 
-.. ocv:function:: void gpu::divide(double src1, const GpuMat& src2, GpuMat& dst, int dtype = -1, Stream& stream = Stream::Null())
+.. ocv:function:: void gpu::divide( double scale, const GpuMat& src2, GpuMat& dst, int dtype=-1, Stream& stream=Stream::Null() )
 
     :param src1: First source matrix or a scalar.
 
@@ -186,7 +186,7 @@ gpu::exp
 ------------
 Computes an exponent of each matrix element.
 
-.. ocv:function:: void gpu::exp(const GpuMat& src, GpuMat& dst, Stream& stream = Stream::Null())
+.. ocv:function:: void gpu::exp( const GpuMat& a, GpuMat& b, Stream& stream=Stream::Null() )
 
     :param src: Source matrix. Supports ``CV_8U`` , ``CV_16U`` , ``CV_16S`` and ``CV_32F`` depth.
 
@@ -202,7 +202,7 @@ gpu::log
 ------------
 Computes a natural logarithm of absolute value of each matrix element.
 
-.. ocv:function:: void gpu::log(const GpuMat& src, GpuMat& dst, Stream& stream = Stream::Null())
+.. ocv:function:: void gpu::log( const GpuMat& a, GpuMat& b, Stream& stream=Stream::Null() )
 
     :param src: Source matrix. Supports ``CV_8U`` , ``CV_16U`` , ``CV_16S`` and ``CV_32F`` depth.
 
@@ -242,9 +242,9 @@ gpu::absdiff
 ----------------
 Computes per-element absolute difference of two matrices (or of a matrix and scalar).
 
-.. ocv:function:: void gpu::absdiff(const GpuMat& src1, const GpuMat& src2, GpuMat& dst, Stream& stream = Stream::Null())
+.. ocv:function:: void gpu::absdiff( const GpuMat& a, const GpuMat& b, GpuMat& c, Stream& stream=Stream::Null() )
 
-.. ocv:function:: void gpu::absdiff(const GpuMat& src1, const Scalar& src2, GpuMat& dst, Stream& stream = Stream::Null())
+.. ocv:function:: void gpu::absdiff( const GpuMat& a, const Scalar& s, GpuMat& c, Stream& stream=Stream::Null() )
 
     :param src1: First source matrix.
 
@@ -262,7 +262,7 @@ gpu::compare
 ----------------
 Compares elements of two matrices.
 
-.. ocv:function:: void gpu::compare(const GpuMat& src1, const GpuMat& src2, GpuMat& dst, int cmpop, Stream& stream = Stream::Null())
+.. ocv:function:: void gpu::compare( const GpuMat& a, const GpuMat& b, GpuMat& c, int cmpop, Stream& stream=Stream::Null() )
 
     :param src1: First source matrix.
 
@@ -362,7 +362,7 @@ gpu::rshift
 --------------------
 Performs pixel by pixel right shift of an image by a constant value.
 
-.. ocv:function:: void gpu::rshift(const GpuMat& src, const Scalar& sc, GpuMat& dst, Stream& stream = Stream::Null())
+.. ocv:function:: void gpu::rshift( const GpuMat& src, Scalar_<int> sc, GpuMat& dst, Stream& stream=Stream::Null() )
 
     :param src: Source matrix. Supports 1, 3 and 4 channels images with integers elements.
 
@@ -378,7 +378,7 @@ gpu::lshift
 --------------------
 Performs pixel by pixel right left of an image by a constant value.
 
-.. ocv:function:: void gpu::lshift(const GpuMat& src, const Scalar& sc, GpuMat& dst, Stream& stream = Stream::Null())
+.. ocv:function:: void gpu::lshift( const GpuMat& src, Scalar_<int> sc, GpuMat& dst, Stream& stream=Stream::Null() )
 
     :param src: Source matrix. Supports 1, 3 and 4 channels images with ``CV_8U`` , ``CV_16U`` or ``CV_32S`` depth.
 
index b5919dc..3827f71 100644 (file)
@@ -417,7 +417,7 @@ gpu::VideoWriter_GPU::EncoderParams::EncoderParams
 Constructors.\r
 \r
 .. ocv:function:: gpu::VideoWriter_GPU::EncoderParams::EncoderParams();\r
-.. ocv:function:: gpu::VideoWriter_GPU::EncoderParams::EncoderParams(const std::string& configFile);\r
+.. ocv:function:: gpu::VideoWriter_GPU::EncoderParams::EncoderParams(const std::string& configFile)\r
 \r
     :param configFile: Config file name.\r
 \r
@@ -429,7 +429,7 @@ gpu::VideoWriter_GPU::EncoderParams::load
 -----------------------------------------\r
 Reads parameters from config file.\r
 \r
-.. ocv:function:: void gpu::VideoWriter_GPU::EncoderParams::load(const std::string& configFile);\r
+.. ocv:function:: void gpu::VideoWriter_GPU::EncoderParams::load(const std::string& configFile)\r
 \r
     :param configFile: Config file name.\r
 \r
@@ -439,7 +439,7 @@ gpu::VideoWriter_GPU::EncoderParams::save
 -----------------------------------------\r
 Saves parameters to config file.\r
 \r
-.. ocv:function:: void gpu::VideoWriter_GPU::EncoderParams::save(const std::string& configFile) const;\r
+.. ocv:function:: void gpu::VideoWriter_GPU::EncoderParams::save(const std::string& configFile) const\r
 \r
     :param configFile: Config file name.\r
 \r
@@ -475,7 +475,7 @@ gpu::VideoWriter_GPU::EncoderCallBack::acquireBitStream
 -------------------------------------------------------\r
 Callback function to signal the start of bitstream that is to be encoded.\r
 \r
-.. ocv:function:: virtual unsigned char* gpu::VideoWriter_GPU::EncoderCallBack::acquireBitStream(int* bufferSize) = 0;\r
+.. ocv:function:: virtual unsigned char* gpu::VideoWriter_GPU::EncoderCallBack::acquireBitStream(int* bufferSize) = 0\r
 \r
 Callback must allocate buffer for CUDA encoder and return pointer to it and it's size.\r
 \r
@@ -485,7 +485,7 @@ gpu::VideoWriter_GPU::EncoderCallBack::releaseBitStream
 -------------------------------------------------------\r
 Callback function to signal that the encoded bitstream is ready to be written to file.\r
 \r
-.. ocv:function:: virtual void gpu::VideoWriter_GPU::EncoderCallBack::releaseBitStream(unsigned char* data, int size) = 0;\r
+.. ocv:function:: virtual void gpu::VideoWriter_GPU::EncoderCallBack::releaseBitStream(unsigned char* data, int size) = 0\r
 \r
 \r
 \r
@@ -493,7 +493,7 @@ gpu::VideoWriter_GPU::EncoderCallBack::onBeginFrame
 ---------------------------------------------------\r
 Callback function to signal that the encoding operation on the frame has started.\r
 \r
-.. ocv:function:: virtual void gpu::VideoWriter_GPU::EncoderCallBack::onBeginFrame(int frameNumber, PicType picType) = 0;\r
+.. ocv:function:: virtual void gpu::VideoWriter_GPU::EncoderCallBack::onBeginFrame(int frameNumber, PicType picType) = 0\r
 \r
     :param picType: Specify frame type (I-Frame, P-Frame or B-Frame).\r
 \r
@@ -503,7 +503,7 @@ gpu::VideoWriter_GPU::EncoderCallBack::onEndFrame
 -------------------------------------------------\r
 Callback function signals that the encoding operation on the frame has finished.\r
 \r
-.. ocv:function:: virtual void gpu::VideoWriter_GPU::EncoderCallBack::onEndFrame(int frameNumber, PicType picType) = 0;\r
+.. ocv:function:: virtual void gpu::VideoWriter_GPU::EncoderCallBack::onEndFrame(int frameNumber, PicType picType) = 0\r
 \r
     :param picType: Specify frame type (I-Frame, P-Frame or B-Frame).\r
 \r
index b41002f..5996d6c 100644 (file)
@@ -1698,15 +1698,15 @@ public:
 class CV_EXPORTS GoodFeaturesToTrackDetector_GPU\r
 {\r
 public:\r
-    explicit GoodFeaturesToTrackDetector_GPU(int maxCorners_ = 1000, double qualityLevel_ = 0.01, double minDistance_ = 0.0,\r
-        int blockSize_ = 3, bool useHarrisDetector_ = false, double harrisK_ = 0.04)\r
+    explicit GoodFeaturesToTrackDetector_GPU(int maxCorners = 1000, double qualityLevel = 0.01, double minDistance = 0.0,\r
+        int blockSize = 3, bool useHarrisDetector = false, double harrisK = 0.04)\r
     {\r
-        maxCorners = maxCorners_;\r
-        qualityLevel = qualityLevel_;\r
-        minDistance = minDistance_;\r
-        blockSize = blockSize_;\r
-        useHarrisDetector = useHarrisDetector_;\r
-        harrisK = harrisK_;\r
+        this->maxCorners = maxCorners;\r
+        this->qualityLevel = qualityLevel;\r
+        this->minDistance = minDistance;\r
+        this->blockSize = blockSize;\r
+        this->useHarrisDetector = useHarrisDetector;\r
+        this->harrisK = harrisK;\r
     }\r
 \r
     //! return 1 rows matrix with CV_32FC2 type\r
index eb42fc1..38b4461 100644 (file)
@@ -8,7 +8,7 @@ This section describes obsolete ``C`` interface of EM algorithm. Details of the
 
 CvEMParams
 ----------
-.. ocv:class:: CvEMParams
+.. ocv:struct:: CvEMParams
 
 Parameters of the EM algorithm. All parameters are public. You can initialize them by a constructor and then override some of them directly if you want.
 
@@ -18,10 +18,10 @@ The constructors
 
 .. ocv:function:: CvEMParams::CvEMParams()
 
-.. ocv:function:: CvEMParams::CvEMParams( int nclusters, int cov_mat_type=CvEM::COV_MAT_DIAGONAL, int start_step=CvEM::START_AUTO_STEP, CvTermCriteria term_crit=cvTermCriteria(CV_TERMCRIT_ITER+CV_TERMCRIT_EPS, 100, FLT_EPSILON), const CvMat* probs=0, const CvMat* weights=0, const CvMat* means=0, const CvMat** covs=0 ) 
+.. ocv:function:: CvEMParams::CvEMParams( int nclusters, int cov_mat_type=EM::COV_MAT_DIAGONAL, int start_step=EM::START_AUTO_STEP, CvTermCriteria term_crit=cvTermCriteria(CV_TERMCRIT_ITER+CV_TERMCRIT_EPS, 100, FLT_EPSILON), const CvMat* probs=0, const CvMat* weights=0, const CvMat* means=0, const CvMat** covs=0 )
 
     :param nclusters: The number of mixture components in the Gaussian mixture model. Some of EM implementation could determine the optimal number of mixtures within a specified value range, but that is not the case in ML yet.
-    
+
     :param cov_mat_type: Constraint on covariance matrices which defines type of matrices. Possible values are:
 
         * **CvEM::COV_MAT_SPHERICAL** A scaled identity matrix :math:`\mu_k * I`. There is the only parameter :math:`\mu_k` to be estimated for each matrix. The option may be used in special cases, when the constraint is relevant, or as a first step in the optimization (for example in case when the data is preprocessed with PCA). The results of such preliminary estimation may be passed again to the optimization procedure, this time with ``cov_mat_type=CvEM::COV_MAT_DIAGONAL``.
@@ -30,7 +30,7 @@ The constructors
 
         * **CvEM::COV_MAT_GENERIC** A symmetric positively defined matrix. The number of free parameters in each matrix is about :math:`d^2/2`. It is not recommended to use this option, unless there is pretty accurate initial estimation of the parameters and/or a huge number of training samples.
 
-    :param start_step: The start step of the EM algorithm: 
+    :param start_step: The start step of the EM algorithm:
 
         * **CvEM::START_E_STEP** Start with Expectation step. You need to provide means :math:`a_k` of mixture components to use this option. Optionally you can pass weights :math:`\pi_k` and covariance matrices :math:`S_k` of mixture components.
         * **CvEM::START_M_STEP** Start with Maximization step. You need to provide initial probabilities :math:`p_{i,k}` to use this option.
@@ -40,7 +40,7 @@ The constructors
 
     :param probs: Initial probabilities :math:`p_{i,k}` of sample :math:`i` to belong to mixture component :math:`k`. It is a floating-point matrix of :math:`nsamples \times nclusters` size. It is used and must be not NULL only when ``start_step=CvEM::START_M_STEP``.
 
-    :param weights: Initial weights :math:`\pi_k` of mixture components. It is a floating-point vector with :math:`nclusters` elements. It is used (if not NULL) only when ``start_step=CvEM::START_E_STEP``. 
+    :param weights: Initial weights :math:`\pi_k` of mixture components. It is a floating-point vector with :math:`nclusters` elements. It is used (if not NULL) only when ``start_step=CvEM::START_E_STEP``.
 
     :param means: Initial means :math:`a_k` of mixture components. It is a floating-point matrix of :math:`nclusters \times dims` size. It is used used and must be not NULL only when ``start_step=CvEM::START_E_STEP``.
 
@@ -62,7 +62,7 @@ With another constructor it is possible to override a variety of parameters from
 
 CvEM
 ----
-.. ocv:class:: CvEM
+.. ocv:class:: CvEM : public CvStatModel
 
     The class implements the EM algorithm as described in the beginning of the section :ref:`ML_Expectation Maximization`.
 
@@ -71,7 +71,7 @@ CvEM::train
 -----------
 Estimates the Gaussian mixture parameters from a sample set.
 
-.. ocv:function:: void CvEM::train(  const Mat& samples,  const Mat&  sample_idx=Mat(),                    CvEMParams params=CvEMParams(),  Mat* labels=0 )
+.. ocv:function:: bool CvEM::train( const Mat& samples, const Mat& sampleIdx=Mat(), CvEMParams params=CvEMParams(), Mat* labels=0 )
 
 .. ocv:function:: bool CvEM::train( const CvMat* samples, const CvMat* sampleIdx=0, CvEMParams params=CvEMParams(), CvMat* labels=0 )
 
index e8f5170..b205ede 100755 (executable)
@@ -146,7 +146,7 @@ class CppHeaderParser(object):
                     arg_type += "_and_"
                 elif w == ">":
                     if angle_stack[0] == 0:
-                        print "Error at %d: template has no arguments" % (self.lineno,)
+                        print "Error at %s:%d: template has no arguments" % (self.hname, self.lineno)
                         sys.exit(-1)
                     if angle_stack[0] > 1:
                         arg_type += "_end_"
@@ -243,6 +243,19 @@ class CppHeaderParser(object):
         return classname, bases, modlist
 
     def parse_func_decl_no_wrap(self, decl_str, static_method = False):
+        decl_str = (decl_str or "").strip()
+        virtual_method = False
+        explicit_method = False
+        if decl_str.startswith("explicit"):
+            decl_str = decl_str[len("explicit"):].lstrip()
+            explicit_method = True
+        if decl_str.startswith("virtual"):
+            decl_str = decl_str[len("virtual"):].lstrip()
+            virtual_method = True
+        if decl_str.startswith("static"):
+            decl_str = decl_str[len("static"):].lstrip()
+            static_method = True
+
         fdecl = decl_str.replace("CV_OUT", "").replace("CV_IN_OUT", "")
         fdecl = fdecl.strip().replace("\t", " ")
         while "  " in fdecl:
@@ -327,8 +340,16 @@ class CppHeaderParser(object):
 
         if static_method:
             decl[2].append("/S")
-        if decl_str.endswith("const"):
+        if virtual_method:
+            decl[2].append("/V")
+        if explicit_method:
+            decl[2].append("/E")
+        if bool(re.match(r".*\)\s*(const)?\s*=\s*0", decl_str)):
+            decl[2].append("/A")
+        if bool(re.match(r".*\)\s*const(\s*=\s*0)?", decl_str)):
             decl[2].append("/C")
+        if "virtual" in decl_str:
+            print decl_str
         return decl
 
     def parse_func_decl(self, decl_str):
@@ -418,7 +439,7 @@ class CppHeaderParser(object):
                     return []
                 else:
                     #print rettype, funcname, modlist, argno
-                    print "Error at %d in %s. the function/method name is missing: '%s'" % (self.lineno, self.hname, decl_start)
+                    print "Error at %s:%d the function/method name is missing: '%s'" % (self.hname, self.lineno, decl_start)
                     sys.exit(-1)
 
         if self.wrap_mode and (("::" in funcname) or funcname.startswith("~")):