Fixed more documentation & source discrepancies

This commit is contained in:
Andrey Kamaev 2012-05-28 11:22:43 +00:00
parent a61b730238
commit 71625ad458
20 changed files with 1037 additions and 954 deletions

View File

@ -63,32 +63,42 @@ def compareSignatures(f, s):
if ftype and ftype != stype: if ftype and ftype != stype:
return False, "return type mismatch" return False, "return type mismatch"
if ("\C" in f[2]) ^ ("\C" in s[2]): 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]): if len(f[3]) != len(s[3]):
return False, "different number of arguments" return False, "different number of arguments"
for idx, arg in enumerate(zip(f[3], s[3])): for idx, arg in enumerate(zip(f[3], s[3])):
farg = arg[0] farg = arg[0]
sarg = arg[1] sarg = arg[1]
ftype = re.sub(r"\bcv::", "", (farg[0] or "")) ftype = re.sub(r"\b(cv|std)::", "", (farg[0] or ""))
stype = re.sub(r"\bcv::", "", (sarg[0] or "")) stype = re.sub(r"\b(cv|std)::", "", (sarg[0] or ""))
if ftype != stype: if ftype != stype:
return False, "type of argument #" + str(idx+1) + " mismatch" return False, "type of argument #" + str(idx+1) + " mismatch"
fname = farg[1] or "arg" + str(idx) fname = farg[1] or "arg" + str(idx)
sname = sarg[1] or "arg" + str(idx) sname = sarg[1] or "arg" + str(idx)
if fname != sname: if fname != sname:
return False, "name of argument #" + str(idx+1) + " mismatch" return False, "name of argument #" + str(idx+1) + " mismatch"
fdef = re.sub(r"\bcv::", "", (farg[2] or "")) fdef = re.sub(r"\b(cv|std)::", "", (farg[2] or ""))
sdef = re.sub(r"\bcv::", "", (sarg[2] or "")) sdef = re.sub(r"\b(cv|std)::", "", (sarg[2] or ""))
if fdef != sdef: if fdef != sdef:
return False, "default value of argument #" + str(idx+1) + " mismatch" return False, "default value of argument #" + str(idx+1) + " mismatch"
return True, "match" return True, "match"
def formatSignature(s): def formatSignature(s):
_str = "" _str = ""
if "/V" in s[2]:
_str += "virtual "
if "/S" in s[2]:
_str += "static "
if s[1]: if s[1]:
_str += s[1] + " " _str += s[1] + " "
else: 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 " _str += "void "
if s[0].startswith("cv."): if s[0].startswith("cv."):
_str += s[0][3:].replace(".", "::") _str += s[0][3:].replace(".", "::")
@ -111,6 +121,8 @@ def formatSignature(s):
_str += " )" _str += " )"
if "/C" in s[2]: if "/C" in s[2]:
_str += " const" _str += " const"
if "/A" in s[2]:
_str += " = 0"
return _str return _str
@ -358,6 +370,10 @@ def process_module(module, path):
continue continue
for signature in decls: for signature in decls:
if signature[0] == "C" or signature[0] == "C++": 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]) fd = flookup.get(signature[2][0])
if not fd: if not fd:
if signature[2][0].startswith("cv."): if signature[2][0].startswith("cv."):

View File

@ -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 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. :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:: Rect RotatedRect::boundingRect() const
.. ocv:function:: RotatedRect::operator CvBox2D() const .. ocv:function:: RotatedRect::operator CvBox2D() const
@ -797,7 +797,7 @@ Various Mat constructors
.. ocv:function:: Mat::Mat(Size size, 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 Mat& m, const Rect& roi)
@ -811,8 +811,6 @@ Various Mat constructors
.. ocv:function:: template<typename T> explicit Mat::Mat(const vector<T>& vec, bool copyData=false) .. 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)
.. 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, const Scalar& s)
@ -879,7 +877,7 @@ Provides matrix assignment operators.
.. ocv:function:: Mat& Mat::operator = (const Mat& m) .. 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) .. ocv:function:: Mat& Mat::operator = (const Scalar& s)
@ -905,9 +903,9 @@ Mat::row
------------ ------------
Creates a matrix header for the specified matrix 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: :: 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. 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 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. :ocv:func:`Mat::row` description.
@ -988,9 +986,9 @@ Mat::diag
------------- -------------
Extracts a diagonal from a matrix, or creates a diagonal matrix. 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: :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. 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. :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(int rows, int cols, int type)
.. ocv:function:: static MatExpr Mat::zeros(Size size, 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. :param ndims: Array dimensionality.
@ -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(int rows, int cols, int type)
.. ocv:function:: static MatExpr Mat::ones(Size size, 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. :param ndims: Array dimensionality.
@ -1367,7 +1365,8 @@ Mat::push_back
Adds elements to the bottom of the matrix. Adds elements to the bottom of the matrix.
.. ocv:function:: template<typename T> void Mat::push_back(const T& elem) .. 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). :param elem: Added element(s).
@ -1439,7 +1438,7 @@ Extracts a rectangular submatrix.
.. ocv:function:: Mat Mat::operator()( const Rect& roi ) const .. 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 rowRange: Start and end row of the extracted submatrix. The upper boundary is not included. To select all the rows, use ``Range::all()``.
@ -1626,7 +1625,7 @@ Mat::step1
-------------- --------------
Returns a normalized step. 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 The method returns a matrix step divided by
:ocv:func:`Mat::elemSize1()` . It can be useful to quickly access an arbitrary matrix element. :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. 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 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. :ocv:func:`Mat::isContinuous` to know how to use these methods.

View File

@ -7,11 +7,11 @@ kmeans
------ ------
Finds centers of clusters and groups input samples around the clusters. 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: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 .. ocv:pyoldfunction:: cv.KMeans2(samples, nclusters, labels, termcrit, attempts=1, flags=0, centers=None) -> float

View File

@ -30,11 +30,12 @@ circle
---------- ----------
Draws a 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: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 .. ocv:pyoldfunction:: cv.Circle(img, center, radius, color, thickness=1, lineType=8, shift=0)-> None
:param img: Image where the circle is drawn. :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: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) .. ocv:pyoldfunction:: cv.ClipLine(imgSize, pt1, pt2) -> (point1, point2)
:param imgSize: Image size. The image rectangle is ``Rect(0, 0, imgSize.width, imgSize.height)`` . :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, center, axes, angle, startAngle, endAngle, color[, thickness[, lineType[, shift]]]) -> None
.. ocv:pyfunction:: cv2.ellipse(img, box, color[, thickness[, lineType]]) -> 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: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 .. ocv:pyoldfunction:: cv.EllipseBox(img, box, color, thickness=1, lineType=8, shift=0)-> None
:param img: Image. :param img: Image.
@ -130,7 +134,7 @@ ellipse2Poly
---------------- ----------------
Approximates an elliptic arc with a polyline. 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 .. ocv:pyfunction:: cv2.ellipse2Poly(center, axes, angle, arcStart, arcEnd, delta) -> pts
@ -157,11 +161,12 @@ fillConvexPoly
------------------ ------------------
Fills a convex polygon. 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: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 .. ocv:pyoldfunction:: cv.FillConvexPoly(img, pn, color, lineType=8, shift=0)-> None
:param img: Image. :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: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 .. ocv:pyoldfunction:: cv.FillPoly(img, polys, color, lineType=8, shift=0)-> None
:param img: Image. :param img: Image.
@ -218,11 +224,12 @@ getTextSize
--------------- ---------------
Calculates the width and height of a text string. 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: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) .. ocv:pyoldfunction:: cv.GetTextSize(textString, font)-> (textSize, baseline)
:param text: Input text string. :param text: Input text string.
@ -273,7 +280,7 @@ InitFont
-------- --------
Initializes font structure (OpenCV 1.x API). 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 :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: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 .. ocv:pyoldfunction:: cv.Line(img, pt1, pt2, color, thickness=1, lineType=8, shift=0)-> None
:param img: Image. :param img: Image.
@ -402,13 +410,14 @@ rectangle
------------- -------------
Draws a simple, thick, or filled up-right 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: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 .. ocv:pyoldfunction:: cv.Rectangle(img, pt1, pt2, color, thickness=1, lineType=8, shift=0)-> None
:param img: Image. :param img: Image.
@ -439,7 +448,7 @@ Draws several polygonal curves.
.. ocv:pyfunction:: cv2.polylines(img, pts, isClosed, color[, thickness[, lineType[, shift]]]) -> None .. 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 .. ocv:pyoldfunction:: cv.PolyLine(img, polys, is_closed, color, thickness=1, lineType=8, shift=0) -> None

View File

@ -228,7 +228,7 @@ ClearSet
-------- --------
Clears a set. Clears a set.
.. ocv:cfunction:: void cvClearSet( CvSet* setHeader ) .. ocv:cfunction:: void cvClearSet( CvSet* set_header )
:param setHeader: Cleared set :param setHeader: Cleared set
@ -362,7 +362,8 @@ CreateMemStorage
---------------- ----------------
Creates memory storage. 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 .. ocv:pyoldfunction:: cv.CreateMemStorage(blockSize=0) -> memstorage
@ -376,7 +377,7 @@ CreateSeq
--------- ---------
Creates a sequence. 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. :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. 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 :param graph: Graph
@ -529,7 +530,7 @@ GetSeqElem
---------- ----------
Returns a pointer to a sequence element according to its index. 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 :param seq: Sequence
@ -587,7 +588,7 @@ GetSetElem
---------- ----------
Finds a set element by its index. 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 :param setHeader: Set
@ -723,7 +724,7 @@ GraphVtxDegree
-------------- --------------
Counts the number of edges incident to the vertex. 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 :param graph: Graph
@ -1021,7 +1022,7 @@ SeqInsert
--------- ---------
Inserts an element in the middle of a sequence. 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 :param seq: Sequence
@ -1037,7 +1038,7 @@ SeqInsertSlice
-------------- --------------
Inserts an array in the middle of a sequence. 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 :param seq: Sequence
@ -1109,7 +1110,7 @@ SeqPush
------- -------
Adds an element to the end of a sequence. 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 :param seq: Sequence
@ -1149,7 +1150,7 @@ SeqPushFront
------------ ------------
Adds an element to the beginning of a sequence. 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 :param seq: Sequence
@ -1163,7 +1164,7 @@ SeqPushMulti
------------ ------------
Pushes several elements to either end of a sequence. 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 :param seq: Sequence
@ -1216,7 +1217,7 @@ SeqSearch
--------- ---------
Searches for an element in a sequence. 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 :param seq: The sequence
@ -1325,7 +1326,7 @@ SetAdd
------ ------
Occupies a node in the set. 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 :param setHeader: Set
@ -1346,7 +1347,7 @@ SetNew
------ ------
Adds an element to a set (fast variant). Adds an element to a set (fast variant).
.. ocv:cfunction:: CvSetElem* cvSetNew( CvSet* setHeader ) .. ocv:cfunction:: CvSetElem* cvSetNew( CvSet* set_header )
:param setHeader: Set :param setHeader: Set
@ -1358,7 +1359,7 @@ SetRemove
--------- ---------
Removes an element from a set. 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 :param setHeader: Set
@ -1375,7 +1376,7 @@ SetRemoveByPtr
-------------- --------------
Removes a set element based on its pointer. 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 :param setHeader: Set
@ -1389,7 +1390,7 @@ SetSeqBlockSize
--------------- ---------------
Sets up sequence block size. 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 :param seq: Sequence

View File

@ -24,7 +24,7 @@ CvPoint
constructs ``CvPoint`` structure. constructs ``CvPoint`` structure.
.. ocv:cfunction:: CvPoint cvPointFrom32f( CvPoint32f pt ) .. ocv:cfunction:: CvPoint cvPointFrom32f( CvPoint2D32f point )
converts ``CvPoint2D32f`` to ``CvPoint``. converts ``CvPoint2D32f`` to ``CvPoint``.
@ -45,11 +45,11 @@ CvPoint2D32f
y-coordinate y-coordinate
.. ocv:cfunction:: CvPoint2D32f cvPoint2D32f( float x, float y ) .. ocv:cfunction:: CvPoint2D32f cvPoint2D32f( double x, double y )
constructs ``CvPoint2D32f`` structure. constructs ``CvPoint2D32f`` structure.
.. ocv:cfunction:: CvPoint2D32f cvPointTo32f( CvPoint pt ) .. ocv:cfunction:: CvPoint2D32f cvPointTo32f( CvPoint point )
converts ``CvPoint`` to ``CvPoint2D32f``. converts ``CvPoint`` to ``CvPoint2D32f``.
@ -74,7 +74,7 @@ CvPoint3D32f
z-coordinate 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. constructs ``CvPoint3D32f`` structure.
@ -511,7 +511,8 @@ ClearND
------- -------
Clears a specific array element. 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 .. ocv:pyoldfunction:: cv.ClearND(arr, idx)-> None
:param arr: Input array :param arr: Input array
@ -799,7 +800,7 @@ Get?D
.. ocv:cfunction:: CvScalar cvGet1D(const CvArr* arr, int idx0) .. ocv:cfunction:: CvScalar cvGet1D(const CvArr* arr, int idx0)
.. ocv:cfunction:: CvScalar cvGet2D(const CvArr* arr, int idx0, int idx1) .. 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 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.Get1D(arr, idx) -> scalar
.. ocv:pyoldfunction:: cv.Get2D(arr, idx0, idx1) -> scalar .. ocv:pyoldfunction:: cv.Get2D(arr, idx0, idx1) -> scalar
@ -825,9 +826,11 @@ GetCol(s)
Returns one of more array columns. Returns one of more array columns.
.. ocv:cfunction:: CvMat* cvGetCol(const CvArr* arr, CvMat* submat, int col) .. 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.GetCol(arr, col)-> submat
.. ocv:pyoldfunction:: cv.GetCols(arr, startCol, endCol)-> submat .. ocv:pyoldfunction:: cv.GetCols(arr, startCol, endCol)-> submat
:param arr: Input array :param arr: Input array
@ -907,7 +910,8 @@ GetImage
-------- --------
Returns image header for arbitrary array. 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 .. ocv:pyoldfunction:: cv.GetImage(arr) -> iplimage
:param arr: Input array :param arr: Input array
@ -966,7 +970,7 @@ GetNextSparseNode
----------------- -----------------
Returns the next sparse matrix element Returns the next sparse matrix element
.. ocv:cfunction:: CvSparseNode* cvGetNextSparseNode(CvSparseMatIterator* matIterator) .. ocv:cfunction:: CvSparseNode* cvGetNextSparseNode( CvSparseMatIterator* mat_iterator )
:param matIterator: Sparse array iterator :param matIterator: Sparse array iterator
@ -999,7 +1003,7 @@ GetRawData
---------- ----------
Retrieves low-level information about the array. 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 :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 cvGetReal1D(const CvArr* arr, int idx0)
.. ocv:cfunction:: double cvGetReal2D(const CvArr* arr, int idx0, int idx1) .. 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 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.GetReal1D(arr, idx0)->float
.. ocv:pyoldfunction:: cv.GetReal2D(arr, idx0, idx1)->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* 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.GetRow(arr, row)-> submat
.. ocv:pyoldfunction:: cv.GetRows(arr, startRow, endRow, deltaRow=1)-> submat .. ocv:pyoldfunction:: cv.GetRows(arr, startRow, endRow, deltaRow=1)-> submat
@ -1209,7 +1213,7 @@ InitSparseMatIterator
--------------------- ---------------------
Initializes sparse array elements iterator. 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 :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* 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 :param arr: Input array
@ -1403,7 +1407,8 @@ Reshape
------- -------
Changes shape of matrix/image without copying data. 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 .. ocv:pyoldfunction:: cv.Reshape(arr, newCn, newRows=0) -> mat
:param arr: Input array :param arr: Input array
@ -1440,7 +1445,8 @@ ReshapeMatND
------------ ------------
Changes the shape of a multi-dimensional array without copying the data. 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 .. ocv:pyoldfunction:: cv.ReshapeMatND(arr, newCn, newDims) -> mat
:param arr: Input array :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 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.Set1D(arr, idx, value) -> None
.. ocv:pyoldfunction:: cv.Set2D(arr, idx0, idx1, 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 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.SetReal1D(arr, idx, value) -> None
.. ocv:pyoldfunction:: cv.SetReal2D(arr, idx0, idx1, 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. 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 .. ocv:pyoldfunction:: cv.RandArr(rng, arr, distType, param1, param2)-> None
:param rng: CvRNG state initialized by :ocv:cfunc:`RNG` :param rng: CvRNG state initialized by :ocv:cfunc:`RNG`

View File

@ -151,7 +151,7 @@ Clone
----- -----
Makes a clone of an object. Makes a clone of an object.
.. ocv:cfunction:: void* cvClone( const void* structPtr ) .. ocv:cfunction:: void* cvClone( const void* struct_ptr )
:param structPtr: The object to clone :param structPtr: The object to clone
@ -171,7 +171,7 @@ FindType
-------- --------
Finds a type by its name. Finds a type by its name.
.. ocv:cfunction:: CvTypeInfo* cvFindType(const char* typeName) .. ocv:cfunction:: CvTypeInfo* cvFindType( const char* type_name )
:param typeName: Type name :param typeName: Type name
@ -189,7 +189,7 @@ GetFileNode
----------- -----------
Finds a node in a map or file storage. Finds a node in a map or file storage.
.. ocv:cfunction:: CvFileNode* cvGetFileNode( CvFileStorage* fs, CvFileNode* map, const CvStringHashNode* key, int createMissing=0 ) .. ocv:cfunction:: CvFileNode* cvGetFileNode( CvFileStorage* fs, CvFileNode* map, const CvStringHashNode* key, int create_missing=0 )
:param fs: File storage :param fs: File storage
@ -231,7 +231,7 @@ GetHashedKey
------------ ------------
Returns a unique pointer for a given name. 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
@ -325,7 +325,8 @@ Load
---- ----
Loads an object from a file. 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 .. ocv:pyoldfunction:: cv.Load(filename, storage=None, name=None)-> generic
:param filename: File name :param filename: File name
@ -342,7 +343,7 @@ OpenFileStorage
--------------- ---------------
Opens file storage for reading or writing data. 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
@ -393,7 +394,7 @@ ReadInt
------- -------
Retrieves an integer value from a file node. 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
@ -407,7 +408,7 @@ ReadIntByName
------------- -------------
Finds a file node and returns its value. 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
@ -459,7 +460,7 @@ ReadReal
-------- --------
Retrieves a floating-point value from a file node. Retrieves a floating-point value from a file node.
.. ocv:cfunction:: double cvReadReal( const CvFileNode* node, double defaultValue=0. ) .. ocv:cfunction:: double cvReadReal( const CvFileNode* node, double default_value=0. )
:param node: File node :param node: File node
@ -489,7 +490,7 @@ ReadRealByName
-------------- --------------
Finds a file node and returns its value. Finds a file node and returns its value.
.. ocv:cfunction:: double cvReadRealByName( const CvFileStorage* fs, const CvFileNode* map, const char* name, double defaultValue=0.) .. ocv:cfunction:: double cvReadRealByName( const CvFileStorage* fs, const CvFileNode* map, const char* name, double default_value=0. )
:param fs: File storage :param fs: File storage
@ -510,7 +511,7 @@ ReadString
---------- ----------
Retrieves a text string from a file node. Retrieves a text string from a file node.
.. ocv:cfunction:: const char* cvReadString( const CvFileNode* node, const char* defaultValue=NULL ) .. ocv:cfunction:: const char* cvReadString( const CvFileNode* node, const char* default_value=NULL )
:param node: File node :param node: File node
@ -533,7 +534,7 @@ ReadStringByName
---------------- ----------------
Finds a file node by its name and returns its value. 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 ) .. ocv:cfunction:: const char* cvReadStringByName( const CvFileStorage* fs, const CvFileNode* map, const char* name, const char* default_value=NULL )
:param fs: File storage :param fs: File storage
@ -569,7 +570,7 @@ Release
------- -------
Releases an object. 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
@ -593,7 +594,8 @@ Save
---- ----
Saves an object to a file. 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 .. ocv:pyoldfunction:: cv.Save(filename, structPtr, name=None, comment=None)-> None
:param filename: File name :param filename: File name
@ -659,7 +661,7 @@ StartWriteStruct
---------------- ----------------
Starts writing a new structure. Starts writing a new structure.
.. ocv:cfunction:: void cvStartWriteStruct( CvFileStorage* fs, const char* name, int struct_flags, const char* typeName=NULL, CvAttrList attributes=cvAttrList()) .. 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 fs: File storage
@ -692,7 +694,7 @@ TypeOf
------ ------
Returns the type of an object. 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
@ -703,7 +705,7 @@ UnregisterType
-------------- --------------
Unregisters the type. Unregisters the type.
.. ocv:cfunction:: void cvUnregisterType( const char* typeName ) .. ocv:cfunction:: void cvUnregisterType( const char* type_name )
:param typeName: Name of an unregistered type :param typeName: Name of an unregistered type
@ -774,7 +776,7 @@ WriteComment
------------ ------------
Writes a comment. 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

View File

@ -7,8 +7,8 @@ abs
--- ---
Computes an absolute value of each matrix element. Computes an absolute value of each matrix element.
.. ocv:function:: MatExpr abs(const Mat& src) .. ocv:function:: MatExpr abs( const Mat& m )
.. ocv:function:: MatExpr abs(const MatExpr& src) .. ocv:function:: MatExpr abs( const MatExpr& e )
:param src: Matrix or matrix expression. :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: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 .. 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. :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: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 .. 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. :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. 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 .. 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: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: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 .. ocv:pyoldfunction:: cv.CmpS(src, value, dst, cmpOp)-> None
@ -629,11 +631,12 @@ countNonZero
------------ ------------
Counts non-zero array elements. Counts non-zero array elements.
.. ocv:function:: int countNonZero( InputArray mtx ) .. ocv:function:: int countNonZero( InputArray src )
.. ocv:pyfunction:: cv2.countNonZero(src) -> retval .. ocv:pyfunction:: cv2.countNonZero(src) -> retval
.. ocv:cfunction:: int cvCountNonZero(const CvArr* arr) .. ocv:cfunction:: int cvCountNonZero(const CvArr* arr)
.. ocv:pyoldfunction:: cv.CountNonZero(arr)-> int .. ocv:pyoldfunction:: cv.CountNonZero(arr)-> int
:param mtx: Single-channel array. :param mtx: Single-channel array.
@ -658,7 +661,7 @@ cvarrToMat
---------- ----------
Converts ``CvMat``, ``IplImage`` , or ``CvMatND`` to ``Mat``. 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`` . :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: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 .. ocv:pyoldfunction:: cv.DFT(src, dst, flags, nonzeroRows=0)-> None
:param src: Source array that could be real or complex. :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: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 .. ocv:pyoldfunction:: cv.Det(mat) -> float
:param mtx: Input matrix that must have ``CV_32FC1`` or ``CV_64FC1`` type and square size. :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: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 .. ocv:pyoldfunction:: cv.EigenVV(mat, evects, evals, eps, lowindex=-1, highindex=-1)-> None
@ -1106,7 +1111,7 @@ extractImageCOI
--------------- ---------------
Extracts the selected image channel. 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`` . :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. 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``. :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: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 .. ocv:pyoldfunction:: cv.Flip(src, dst=None, flipMode=0)-> None
:param src: Source array. :param src: Source array.
@ -1207,7 +1213,7 @@ gemm
---- ----
Performs generalized matrix multiplication. 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 .. 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: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 .. ocv:pyoldfunction:: cv.Invert(src, dst, method=CV_LU) -> float
@ -1486,7 +1492,7 @@ LUT
--- ---
Performs a look-up table transform of an array. 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 .. ocv:pyfunction:: cv2.LUT(src, lut[, dst[, interpolation]]) -> dst
@ -1551,11 +1557,11 @@ Mahalanobis
----------- -----------
Calculates the Mahalanobis distance between two vectors. 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: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 .. 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. 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(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, 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 .. 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: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 .. 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_` . :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: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) .. 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. :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 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 .. ocv:pyfunction:: cv2.merge(mv[, dst]) -> dst
@ -1742,17 +1750,17 @@ min
--- ---
Calculates per-element minimum of two arrays or array and a scalar. 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(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, 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 .. 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(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: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) .. ocv:pyoldfunction:: cv.MinMaxLoc(arr, mask=None)-> (minVal, maxVal, minLoc, maxLoc)
:param src: Source single-channel array. :param src: Source single-channel array.
@ -1878,13 +1887,14 @@ mixChannels
----------- -----------
Copies specified channels from input arrays to the specified channels of output arrays. 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: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 .. 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. :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. 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 .. ocv:pyfunction:: cv2.mulSpectrums(a, b, flags[, c[, conjB]]) -> c
@ -1964,7 +1974,7 @@ multiply
-------- --------
Calculates the per-element scaled product of two arrays. 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 .. ocv:pyfunction:: cv2.multiply(src1, src2[, dst[, scale[, dtype]]]) -> dst
@ -2013,11 +2023,12 @@ mulTransposed
------------- -------------
Calculates the product of a matrix and its transposition. 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: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 .. 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. :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, 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:function:: double norm( const SparseMat& src, int normType )
.. ocv:pyfunction:: cv2.norm(src1[, normType[, mask]]) -> retval .. ocv:pyfunction:: cv2.norm(src1[, normType[, mask]]) -> retval
.. ocv:pyfunction:: cv2.norm(src1, src2[, 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 .. ocv:pyoldfunction:: cv.Norm(arr1, arr2, normType=CV_L2, mask=None) -> float
:param src1: First source array. :param src1: First source array.
@ -2115,7 +2127,7 @@ normalize
--------- ---------
Normalizes the norm or value range of an array. 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) .. 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. 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 .. 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: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 .. 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`` . :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. 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 .. 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:: 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 .. ocv:pyfunction:: cv2.randu(dst, low, high) -> None
@ -2647,7 +2660,7 @@ randn
----- -----
Fills the array with normally distributed random numbers. 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 .. ocv:pyfunction:: cv2.randn(dst, mean, stddev) -> None
@ -2670,7 +2683,7 @@ randShuffle
----------- -----------
Shuffles the array elements randomly. 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 .. ocv:pyfunction:: cv2.randShuffle(dst[, iterFactor]) -> None
@ -2693,7 +2706,7 @@ reduce
------ ------
Reduces a matrix to a vector. 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 .. 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:: 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:pyfunction:: cv2.repeat(src, ny, nx[, dst]) -> dst
.. ocv:cfunction:: void cvRepeat(const CvArr* src, CvArr* dst) .. ocv:cfunction:: void cvRepeat(const CvArr* src, CvArr* dst)
.. ocv:pyoldfunction:: cv.Repeat(src, dst)-> None .. ocv:pyoldfunction:: cv.Repeat(src, dst)-> None
:param src: Source array to replicate. :param src: Source array to replicate.
@ -2766,7 +2780,7 @@ scaleAdd
-------- --------
Calculates the sum of a scaled array and another array. 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 .. ocv:pyfunction:: cv2.scaleAdd(src1, alpha, src2[, dst]) -> dst
@ -2809,11 +2823,12 @@ setIdentity
----------- -----------
Initializes a scaled identity matrix. 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:pyfunction:: cv2.setIdentity(mtx[, s]) -> None
.. ocv:cfunction:: void cvSetIdentity(CvArr* mat, CvScalar value=cvRealScalar(1)) .. ocv:cfunction:: void cvSetIdentity(CvArr* mat, CvScalar value=cvRealScalar(1))
.. ocv:pyoldfunction:: cv.SetIdentity(mat, value=1)-> None .. ocv:pyoldfunction:: cv.SetIdentity(mat, value=1)-> None
:param dst: Matrix to initialize (not necessarily square). :param dst: Matrix to initialize (not necessarily square).
@ -2897,11 +2912,12 @@ solveCubic
-------------- --------------
Finds the real roots of a cubic equation. 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: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 .. ocv:pyoldfunction:: cv.SolveCubic(coeffs, roots)-> None
:param coeffs: Equation coefficients, an array of 3 or 4 elements. :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. 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 .. ocv:pyfunction:: cv2.solvePoly(coeffs[, roots[, maxIters]]) -> retval, roots
@ -3021,13 +3037,14 @@ split
----- -----
Divides a multi-channel array into several single-channel arrays. 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:pyfunction:: cv2.split(m[, mv]) -> mv
.. ocv:cfunction:: void cvSplit(const CvArr* src, CvArr* dst0, CvArr* dst1, CvArr* dst2, CvArr* dst3) .. 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 .. ocv:pyoldfunction:: cv.Split(src, dst0, dst1, dst2, dst3)-> None
:param mtx: Source multi-channel array. :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: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 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 cvSubRS( const CvArr* src, CvScalar value, CvArr* dst, const CvArr* mask=NULL )
.. ocv:cfunction:: void cvSubS(const CvArr* src1, CvScalar src2, 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.Sub(src1, src2, dst, mask=None) -> None
.. ocv:pyoldfunction:: cv.SubRS(src, value, 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()
.. 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. :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: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 .. 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: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 .. ocv:pyoldfunction:: cv.SVBkSb(W, U, V, B, X, flags) -> None
@ -3303,11 +3320,12 @@ sum
--- ---
Calculates the sum of array elements. 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:pyfunction:: cv2.sumElems(src) -> retval
.. ocv:cfunction:: CvScalar cvSum(const CvArr* arr) .. ocv:cfunction:: CvScalar cvSum(const CvArr* arr)
.. ocv:pyoldfunction:: cv.Sum(arr) -> scalar .. ocv:pyoldfunction:: cv.Sum(arr) -> scalar
:param arr: Source array that must have from 1 to 4 channels. :param arr: Source array that must have from 1 to 4 channels.
@ -3347,11 +3365,12 @@ trace
----- -----
Returns the trace of a matrix. 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:pyfunction:: cv2.trace(mtx) -> retval
.. ocv:cfunction:: CvScalar cvTrace(const CvArr* mat) .. ocv:cfunction:: CvScalar cvTrace(const CvArr* mat)
.. ocv:pyoldfunction:: cv.Trace(mat) -> scalar .. ocv:pyoldfunction:: cv.Trace(mat) -> scalar
:param mat: Source matrix. :param mat: Source matrix.
@ -3368,11 +3387,12 @@ transform
--------- ---------
Performs the matrix transformation of every array element. 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: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 .. 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``. :param src: Source array that must have as many channels (1 to 4) as ``mtx.cols`` or ``mtx.cols-1``.

View File

@ -93,7 +93,7 @@ Computes the cube root of an argument.
.. ocv:pyfunction:: cv2.cubeRoot(val) -> retval .. ocv:pyfunction:: cv2.cubeRoot(val) -> retval
.. ocv:cfunction:: float cvCbrt(float val) .. ocv:cfunction:: float cvCbrt( float value )
.. ocv:pyoldfunction:: cv.Cbrt(value)-> float .. 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: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. :param exc: Exception to throw.
@ -244,7 +244,8 @@ fastMalloc
-------------- --------------
Allocates an aligned memory buffer. 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 ) .. ocv:cfunction:: void* cvAlloc( size_t size )
:param size: Allocated buffer size. :param size: Allocated buffer size.
@ -419,11 +420,11 @@ setUseOptimized
----------------- -----------------
Enables or disables the optimized code. 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: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``). :param onoff: The boolean flag specifying whether the optimized code should be used (``onoff=true``) or not (``onoff=false``).

View File

@ -663,7 +663,7 @@ FileNodeIterator::operator +=
----------------------------- -----------------------------
Moves iterator forward by the specified offset. 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. :param ofs: Offset (possibly negative) to move the iterator.
@ -672,7 +672,7 @@ FileNodeIterator::operator -=
----------------------------- -----------------------------
Moves iterator backward by the specified offset (possibly negative). 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. :param ofs: Offset (possibly negative) to move the iterator.

View File

@ -897,7 +897,7 @@ class CV_EXPORTS RotatedRect
public: public:
//! various constructors //! various constructors
RotatedRect(); RotatedRect();
RotatedRect(const Point2f& _center, const Size2f& _size, float _angle); RotatedRect(const Point2f& center, const Size2f& size, float angle);
RotatedRect(const CvBox2D& box); RotatedRect(const CvBox2D& box);
//! returns 4 vertices of the rectangle //! returns 4 vertices of the rectangle
@ -1634,22 +1634,22 @@ public:
Mat(); Mat();
//! constructs 2D matrix of the specified size and type //! constructs 2D matrix of the specified size and type
// (_type is CV_8UC1, CV_64FC3, CV_32SC(12) etc.) // (_type is CV_8UC1, CV_64FC3, CV_32SC(12) etc.)
Mat(int _rows, int _cols, int _type); Mat(int rows, int cols, int type);
Mat(Size _size, int _type); Mat(Size size, int type);
//! constucts 2D matrix and fills it with the specified value _s. //! constucts 2D matrix and fills it with the specified value _s.
Mat(int _rows, int _cols, int _type, const Scalar& _s); Mat(int rows, int cols, int type, const Scalar& s);
Mat(Size _size, int _type, const Scalar& _s); Mat(Size size, int type, const Scalar& s);
//! constructs n-dimensional matrix //! constructs n-dimensional matrix
Mat(int _ndims, const int* _sizes, int _type); 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, const Scalar& s);
//! copy constructor //! copy constructor
Mat(const Mat& m); Mat(const Mat& m);
//! constructor for matrix headers pointing to user-allocated data //! constructor for matrix headers pointing to user-allocated data
Mat(int _rows, int _cols, int _type, void* _data, size_t _step=AUTO_STEP); 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(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 ndims, const int* sizes, int type, void* data, const size_t* steps=0);
//! creates a matrix header for a part of the bigger matrix //! 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 Range& rowRange, const Range& colRange=Range::all());
@ -1664,11 +1664,9 @@ public:
//! builds matrix from std::vector with or without copying the data //! builds matrix from std::vector with or without copying the data
template<typename _Tp> explicit Mat(const vector<_Tp>& vec, bool copyData=false); template<typename _Tp> explicit Mat(const vector<_Tp>& vec, bool copyData=false);
//! builds matrix from cv::Vec; the data is copied by default //! builds matrix from cv::Vec; the data is copied by default
template<typename _Tp, int n> explicit Mat(const Vec<_Tp, n>& vec, template<typename _Tp, int n> explicit Mat(const Vec<_Tp, n>& vec, bool copyData=true);
bool copyData=true);
//! builds matrix from cv::Matx; the data is copied by default //! 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, template<typename _Tp, int m, int n> explicit Mat(const Matx<_Tp, m, n>& mtx, bool copyData=true);
bool copyData=true);
//! builds matrix from a 2D point //! builds matrix from a 2D point
template<typename _Tp> explicit Mat(const Point_<_Tp>& pt, bool copyData=true); template<typename _Tp> explicit Mat(const Point_<_Tp>& pt, bool copyData=true);
//! builds matrix from a 3D point //! builds matrix from a 3D point
@ -1721,8 +1719,8 @@ public:
Mat& setTo(InputArray value, InputArray mask=noArray()); Mat& setTo(InputArray value, InputArray mask=noArray());
//! creates alternative matrix header for the same data, with different //! creates alternative matrix header for the same data, with different
// number of channels and/or different number of rows. see cvReshape. // number of channels and/or different number of rows. see cvReshape.
Mat reshape(int _cn, int _rows=0) const; Mat reshape(int cn, int rows=0) const;
Mat reshape(int _cn, int _newndims, const int* _newsz) const; Mat reshape(int cn, int newndims, const int* newsz) const;
//! matrix transposition by means of matrix expressions //! matrix transposition by means of matrix expressions
MatExpr t() const; MatExpr t() const;
@ -1748,9 +1746,9 @@ public:
//! allocates new matrix data unless the matrix already has specified size and type. //! allocates new matrix data unless the matrix already has specified size and type.
// previous data is unreferenced if needed. // previous data is unreferenced if needed.
void create(int _rows, int _cols, int _type); void create(int rows, int cols, int type);
void create(Size _size, int _type); void create(Size size, int type);
void create(int _ndims, const int* _sizes, int _type); void create(int ndims, const int* sizes, int type);
//! increases the reference counter; use with care to avoid memleaks //! increases the reference counter; use with care to avoid memleaks
void addref(); void addref();
@ -1966,7 +1964,7 @@ public:
enum { UNIFORM=0, NORMAL=1 }; enum { UNIFORM=0, NORMAL=1 };
RNG(); RNG();
RNG(uint64 _state); RNG(uint64 state);
//! updates the state and returns the next 32-bit unsigned integer random number //! updates the state and returns the next 32-bit unsigned integer random number
unsigned next(); unsigned next();
@ -1976,7 +1974,7 @@ public:
operator short(); operator short();
operator unsigned(); operator unsigned();
//! returns a random integer sampled uniformly from [0, N). //! returns a random integer sampled uniformly from [0, N).
unsigned operator()(unsigned N); unsigned operator ()(unsigned N);
unsigned operator ()(); unsigned operator ()();
operator int(); operator int();
operator float(); operator float();

View 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::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` .. 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`. 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 )

View File

@ -285,7 +285,9 @@ gpu::erode
-------------- --------------
Erodes an image by using a specific structuring element. 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. :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. 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. :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. 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. :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<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 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. :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. 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. :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. 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`` . :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. 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. :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. 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. :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. 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. :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. 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. :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. 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. :param src: Source image. ``CV_8UC1`` , ``CV_8UC4`` , ``CV_16SC1`` , ``CV_16SC2`` , ``CV_16SC3`` , ``CV_32SC1`` , ``CV_32FC1`` source types are supported.

View File

@ -9,7 +9,7 @@ gpu::meanShiftFiltering
--------------------------- ---------------------------
Performs mean-shift filtering for each point of the source image. 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. :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. 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. :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. 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. :param a: First spectrum.
@ -181,7 +181,7 @@ gpu::mulAndScaleSpectrums
----------------------------- -----------------------------
Performs a per-element multiplication of two Fourier spectrums and scales the result. 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. :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. 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). :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=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. :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. 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. :param src: Source image.
@ -477,7 +477,7 @@ gpu::warpAffine
------------------- -------------------
Applies an affine transformation to an image. 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. :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. 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. :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, 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. :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, 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 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. :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. 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. :param stream: Stream for the asynchronous version.
@ -757,7 +753,7 @@ gpu::buildWarpCylindricalMaps
----------------------------- -----------------------------
Builds cylindrical warping maps. 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. :param stream: Stream for the asynchronous version.
@ -767,7 +763,7 @@ gpu::buildWarpSphericalMaps
--------------------------- ---------------------------
Builds spherical warping maps. 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. :param stream: Stream for the asynchronous version.

View File

@ -47,7 +47,7 @@ gpu::transpose
------------------ ------------------
Transposes a matrix. 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). :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. 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. :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. 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()) .. 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. 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()) .. ocv:function:: void gpu::magnitudeSqr(const GpuMat& x, const GpuMat& y, GpuMat& magnitude, Stream& stream = Stream::Null())

View File

@ -9,9 +9,9 @@ gpu::add
------------ ------------
Computes a matrix-matrix or matrix-scalar sum. 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. :param src1: First source matrix.
@ -33,9 +33,9 @@ gpu::subtract
----------------- -----------------
Computes a matrix-matrix or matrix-scalar difference. 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. :param src1: First source matrix.
@ -57,9 +57,9 @@ gpu::multiply
----------------- -----------------
Computes a matrix-matrix or matrix-scalar per-element product. 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. :param src1: First source matrix.
@ -81,9 +81,9 @@ gpu::divide
----------- -----------
Computes a matrix-matrix or matrix-scalar division. 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. :param src1: First source matrix or a scalar.
@ -186,7 +186,7 @@ gpu::exp
------------ ------------
Computes an exponent of each matrix element. 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. :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. 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. :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). 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. :param src1: First source matrix.
@ -262,7 +262,7 @@ gpu::compare
---------------- ----------------
Compares elements of two matrices. 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. :param src1: First source matrix.
@ -362,7 +362,7 @@ gpu::rshift
-------------------- --------------------
Performs pixel by pixel right shift of an image by a constant value. 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. :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. 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. :param src: Source matrix. Supports 1, 3 and 4 channels images with ``CV_8U`` , ``CV_16U`` or ``CV_32S`` depth.

View File

@ -417,7 +417,7 @@ gpu::VideoWriter_GPU::EncoderParams::EncoderParams
Constructors. Constructors.
.. ocv:function:: gpu::VideoWriter_GPU::EncoderParams::EncoderParams(); .. ocv:function:: gpu::VideoWriter_GPU::EncoderParams::EncoderParams();
.. ocv:function:: gpu::VideoWriter_GPU::EncoderParams::EncoderParams(const std::string& configFile); .. ocv:function:: gpu::VideoWriter_GPU::EncoderParams::EncoderParams(const std::string& configFile)
:param configFile: Config file name. :param configFile: Config file name.
@ -429,7 +429,7 @@ gpu::VideoWriter_GPU::EncoderParams::load
----------------------------------------- -----------------------------------------
Reads parameters from config file. Reads parameters from config file.
.. ocv:function:: void gpu::VideoWriter_GPU::EncoderParams::load(const std::string& configFile); .. ocv:function:: void gpu::VideoWriter_GPU::EncoderParams::load(const std::string& configFile)
:param configFile: Config file name. :param configFile: Config file name.
@ -439,7 +439,7 @@ gpu::VideoWriter_GPU::EncoderParams::save
----------------------------------------- -----------------------------------------
Saves parameters to config file. Saves parameters to config file.
.. ocv:function:: void gpu::VideoWriter_GPU::EncoderParams::save(const std::string& configFile) const; .. ocv:function:: void gpu::VideoWriter_GPU::EncoderParams::save(const std::string& configFile) const
:param configFile: Config file name. :param configFile: Config file name.
@ -475,7 +475,7 @@ gpu::VideoWriter_GPU::EncoderCallBack::acquireBitStream
------------------------------------------------------- -------------------------------------------------------
Callback function to signal the start of bitstream that is to be encoded. Callback function to signal the start of bitstream that is to be encoded.
.. ocv:function:: virtual unsigned char* gpu::VideoWriter_GPU::EncoderCallBack::acquireBitStream(int* bufferSize) = 0; .. ocv:function:: virtual unsigned char* gpu::VideoWriter_GPU::EncoderCallBack::acquireBitStream(int* bufferSize) = 0
Callback must allocate buffer for CUDA encoder and return pointer to it and it's size. Callback must allocate buffer for CUDA encoder and return pointer to it and it's size.
@ -485,7 +485,7 @@ gpu::VideoWriter_GPU::EncoderCallBack::releaseBitStream
------------------------------------------------------- -------------------------------------------------------
Callback function to signal that the encoded bitstream is ready to be written to file. Callback function to signal that the encoded bitstream is ready to be written to file.
.. ocv:function:: virtual void gpu::VideoWriter_GPU::EncoderCallBack::releaseBitStream(unsigned char* data, int size) = 0; .. ocv:function:: virtual void gpu::VideoWriter_GPU::EncoderCallBack::releaseBitStream(unsigned char* data, int size) = 0
@ -493,7 +493,7 @@ gpu::VideoWriter_GPU::EncoderCallBack::onBeginFrame
--------------------------------------------------- ---------------------------------------------------
Callback function to signal that the encoding operation on the frame has started. Callback function to signal that the encoding operation on the frame has started.
.. ocv:function:: virtual void gpu::VideoWriter_GPU::EncoderCallBack::onBeginFrame(int frameNumber, PicType picType) = 0; .. ocv:function:: virtual void gpu::VideoWriter_GPU::EncoderCallBack::onBeginFrame(int frameNumber, PicType picType) = 0
:param picType: Specify frame type (I-Frame, P-Frame or B-Frame). :param picType: Specify frame type (I-Frame, P-Frame or B-Frame).
@ -503,7 +503,7 @@ gpu::VideoWriter_GPU::EncoderCallBack::onEndFrame
------------------------------------------------- -------------------------------------------------
Callback function signals that the encoding operation on the frame has finished. Callback function signals that the encoding operation on the frame has finished.
.. ocv:function:: virtual void gpu::VideoWriter_GPU::EncoderCallBack::onEndFrame(int frameNumber, PicType picType) = 0; .. ocv:function:: virtual void gpu::VideoWriter_GPU::EncoderCallBack::onEndFrame(int frameNumber, PicType picType) = 0
:param picType: Specify frame type (I-Frame, P-Frame or B-Frame). :param picType: Specify frame type (I-Frame, P-Frame or B-Frame).

View File

@ -1698,15 +1698,15 @@ public:
class CV_EXPORTS GoodFeaturesToTrackDetector_GPU class CV_EXPORTS GoodFeaturesToTrackDetector_GPU
{ {
public: public:
explicit GoodFeaturesToTrackDetector_GPU(int maxCorners_ = 1000, double qualityLevel_ = 0.01, double minDistance_ = 0.0, explicit GoodFeaturesToTrackDetector_GPU(int maxCorners = 1000, double qualityLevel = 0.01, double minDistance = 0.0,
int blockSize_ = 3, bool useHarrisDetector_ = false, double harrisK_ = 0.04) int blockSize = 3, bool useHarrisDetector = false, double harrisK = 0.04)
{ {
maxCorners = maxCorners_; this->maxCorners = maxCorners;
qualityLevel = qualityLevel_; this->qualityLevel = qualityLevel;
minDistance = minDistance_; this->minDistance = minDistance;
blockSize = blockSize_; this->blockSize = blockSize;
useHarrisDetector = useHarrisDetector_; this->useHarrisDetector = useHarrisDetector;
harrisK = harrisK_; this->harrisK = harrisK;
} }
//! return 1 rows matrix with CV_32FC2 type //! return 1 rows matrix with CV_32FC2 type

View File

@ -8,7 +8,7 @@ This section describes obsolete ``C`` interface of EM algorithm. Details of the
CvEMParams 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. 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,7 +18,7 @@ The constructors
.. ocv:function:: CvEMParams::CvEMParams() .. 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 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.
@ -62,7 +62,7 @@ With another constructor it is possible to override a variety of parameters from
CvEM 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`. 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. 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 ) .. ocv:function:: bool CvEM::train( const CvMat* samples, const CvMat* sampleIdx=0, CvEMParams params=CvEMParams(), CvMat* labels=0 )

View File

@ -146,7 +146,7 @@ class CppHeaderParser(object):
arg_type += "_and_" arg_type += "_and_"
elif w == ">": elif w == ">":
if angle_stack[0] == 0: 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) sys.exit(-1)
if angle_stack[0] > 1: if angle_stack[0] > 1:
arg_type += "_end_" arg_type += "_end_"
@ -243,6 +243,19 @@ class CppHeaderParser(object):
return classname, bases, modlist return classname, bases, modlist
def parse_func_decl_no_wrap(self, decl_str, static_method = False): 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 = decl_str.replace("CV_OUT", "").replace("CV_IN_OUT", "")
fdecl = fdecl.strip().replace("\t", " ") fdecl = fdecl.strip().replace("\t", " ")
while " " in fdecl: while " " in fdecl:
@ -327,8 +340,16 @@ class CppHeaderParser(object):
if static_method: if static_method:
decl[2].append("/S") 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") decl[2].append("/C")
if "virtual" in decl_str:
print decl_str
return decl return decl
def parse_func_decl(self, decl_str): def parse_func_decl(self, decl_str):
@ -418,7 +439,7 @@ class CppHeaderParser(object):
return [] return []
else: else:
#print rettype, funcname, modlist, argno #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) sys.exit(-1)
if self.wrap_mode and (("::" in funcname) or funcname.startswith("~")): if self.wrap_mode and (("::" in funcname) or funcname.startswith("~")):