Commit 8003831f authored by Vadim Pisarevsky's avatar Vadim Pisarevsky

inserted some C & old Python declarations into the reference manual

parent c10fea83
...@@ -254,6 +254,9 @@ computeCorrespondEpilines ...@@ -254,6 +254,9 @@ computeCorrespondEpilines
For points in an image of a stereo pair, computes the corresponding epilines in the other image. For points in an image of a stereo pair, computes the corresponding epilines in the other image.
.. ocv:cfunction:: void cvComputeCorrespondEpilines( const CvMat* points, int whichImage, const CvMat* F, CvMat* lines)
.. ocv:pyoldfunction:: ComputeCorrespondEpilines(points, whichImage, F, lines) -> None
:param points: Input points. :math:`N \times 1` or :math:`1 \times N` matrix of type ``CV_32FC2`` or ``vector<Point2f>`` . :param points: Input points. :math:`N \times 1` or :math:`1 \times N` matrix of type ``CV_32FC2`` or ``vector<Point2f>`` .
:param whichImage: Index of the image (1 or 2) that contains the ``points`` . :param whichImage: Index of the image (1 or 2) that contains the ``points`` .
...@@ -326,6 +329,9 @@ convertPointsHomogeneous ...@@ -326,6 +329,9 @@ convertPointsHomogeneous
Converts points to/from homogeneous coordinates. Converts points to/from homogeneous coordinates.
.. ocv:cfunction:: void cvConvertPointsHomogeneous( const CvMat* src, CvMat* dst )
.. ocv:pyoldfunction:: ConvertPointsHomogeneous( src, dst ) -> None
:param src: Input array or vector of 2D, 3D, or 4D points. :param src: Input array or vector of 2D, 3D, or 4D points.
:param dst: Output vector of 2D, 3D, or 4D points. :param dst: Output vector of 2D, 3D, or 4D points.
...@@ -344,6 +350,9 @@ decomposeProjectionMatrix ...@@ -344,6 +350,9 @@ decomposeProjectionMatrix
Decomposes a projection matrix into a rotation matrix and a camera matrix. Decomposes a projection matrix into a rotation matrix and a camera matrix.
.. ocv:cfunction:: void cvDecomposeProjectionMatrix( const CvMat *projMatrix, CvMat *cameraMatrix, CvMat *rotMatrix, CvMat *transVect, CvMat *rotMatrX=NULL, CvMat *rotMatrY=NULL, CvMat *rotMatrZ=NULL, CvPoint3D64f *eulerAngles=NULL)
.. ocv:pyoldfunction:: DecomposeProjectionMatrix(projMatrix, cameraMatrix, rotMatrix, transVect, rotMatrX=None, rotMatrY=None, rotMatrZ=None) -> eulerAngles
:param projMatrix: 3x4 input projection matrix P. :param projMatrix: 3x4 input projection matrix P.
:param cameraMatrix: Output 3x3 camera matrix K. :param cameraMatrix: Output 3x3 camera matrix K.
...@@ -375,6 +384,9 @@ drawChessboardCorners ...@@ -375,6 +384,9 @@ drawChessboardCorners
Renders the detected chessboard corners. Renders the detected chessboard corners.
.. ocv:cfunction:: void cvDrawChessboardCorners( CvArr* image, CvSize patternSize, CvPoint2D32f* corners, int count, int patternWasFound )
.. ocv:pyoldfunction:: DrawChessboardCorners(image, patternSize, corners, patternWasFound)-> None
:param image: Destination image. It must be an 8-bit color image. :param image: Destination image. It must be an 8-bit color image.
:param patternSize: Number of inner corners per a chessboard row and column ``(patternSize = cv::Size(points_per_row,points_per_column))``. :param patternSize: Number of inner corners per a chessboard row and column ``(patternSize = cv::Size(points_per_row,points_per_column))``.
...@@ -393,6 +405,9 @@ findChessboardCorners ...@@ -393,6 +405,9 @@ findChessboardCorners
Finds the positions of internal corners of the chessboard. Finds the positions of internal corners of the chessboard.
.. ocv:cfunction:: int cvFindChessboardCorners( const void* image, CvSize patternSize, CvPoint2D32f* corners, int* cornerCount=NULL, int flags=CV_CALIB_CB_ADAPTIVE_THRESH )
.. ocv:pyoldfunction:: FindChessboardCorners(image, patternSize, flags=CV_CALIB_CB_ADAPTIVE_THRESH) -> corners
:param image: Source chessboard view. It must be an 8-bit grayscale or color image. :param image: Source chessboard view. It must be an 8-bit grayscale or color image.
:param patternSize: Number of inner corners per a chessboard row and column ``( patternSize = cvSize(points_per_row,points_per_colum) = cvSize(columns,rows) )``. :param patternSize: Number of inner corners per a chessboard row and column ``( patternSize = cvSize(points_per_row,points_per_colum) = cvSize(columns,rows) )``.
...@@ -549,6 +564,9 @@ findFundamentalMat ...@@ -549,6 +564,9 @@ findFundamentalMat
Calculates a fundamental matrix from the corresponding points in two images. Calculates a fundamental matrix from the corresponding points in two images.
.. ocv:cfunction:: int cvFindFundamentalMat( const CvMat* points1, const CvMat* points2, CvMat* fundamentalMatrix, int method=CV_FM_RANSAC, double param1=1., double param2=0.99, CvMat* status=NULL)
.. ocv:pyoldfunction:: FindFundamentalMat(points1, points2, fundamentalMatrix, method=CV_FM_RANSAC, param1=1., param2=0.99, status=None) -> None
:param points1: Array of ``N`` points from the first image. The point coordinates should be floating-point (single or double precision). :param points1: Array of ``N`` points from the first image. The point coordinates should be floating-point (single or double precision).
:param points2: Array of the second image points of the same size and format as ``points1`` . :param points2: Array of the second image points of the same size and format as ``points1`` .
...@@ -609,6 +627,9 @@ findHomography ...@@ -609,6 +627,9 @@ findHomography
Finds a perspective transformation between two planes. Finds a perspective transformation between two planes.
.. ocv:cfunction:: void cvFindHomography( const CvMat* srcPoints, const CvMat* dstPoints, CvMat* H int method=0, double ransacReprojThreshold=3, CvMat* status=NULL)
.. ocv:pyoldfunction:: FindHomography(srcPoints, dstPoints, H, method, ransacReprojThreshold=3.0, status=None)-> None
:param srcPoints: Coordinates of the points in the original plane, a matrix of the type ``CV_32FC2`` or ``vector<Point2f>`` . :param srcPoints: Coordinates of the points in the original plane, a matrix of the type ``CV_32FC2`` or ``vector<Point2f>`` .
:param dstPoints: Coordinates of the points in the target plane, a matrix of the type ``CV_32FC2`` or a ``vector<Point2f>`` . :param dstPoints: Coordinates of the points in the target plane, a matrix of the type ``CV_32FC2`` or a ``vector<Point2f>`` .
...@@ -709,6 +730,9 @@ getOptimalNewCameraMatrix ...@@ -709,6 +730,9 @@ getOptimalNewCameraMatrix
Returns the new camera matrix based on the free scaling parameter. Returns the new camera matrix based on the free scaling parameter.
.. ocv:cfunction:: void cvGetOptimalNewCameraMatrix( const CvMat* cameraMatrix, const CvMat* distCoeffs, CvSize imageSize, double alpha, CvMat* newCameraMatrix, CvSize newImageSize=cvSize(0, 0), CvRect* validPixROI=0 )
.. ocv:pyoldfunction:: GetOptimalNewCameraMatrix(cameraMatrix, distCoeffs, imageSize, alpha, newCameraMatrix, newImageSize=(0, 0), validPixROI=0) -> None
:param cameraMatrix: Input camera matrix. :param cameraMatrix: Input camera matrix.
:param distCoeffs: Input vector of distortion coefficients :math:`(k_1, k_2, p_1, p_2[, k_3[, k_4, k_5, k_6]])` of 4, 5, or 8 elements. If the vector is NULL/empty, the zero distortion coefficients are assumed. :param distCoeffs: Input vector of distortion coefficients :math:`(k_1, k_2, p_1, p_2[, k_3[, k_4, k_5, k_6]])` of 4, 5, or 8 elements. If the vector is NULL/empty, the zero distortion coefficients are assumed.
...@@ -817,6 +841,9 @@ reprojectImageTo3D ...@@ -817,6 +841,9 @@ reprojectImageTo3D
Reprojects a disparity image to 3D space. Reprojects a disparity image to 3D space.
.. ocv:cfunction:: void cvReprojectImageTo3D( const CvArr* disparity, CvArr* _3dImage, const CvMat* Q, int handleMissingValues=0)
.. ocv:pyoldfunction:: ReprojectImageTo3D(disparity, _3dImage, Q, handleMissingValues=0) -> None
:param disparity: Input single-channel 16-bit signed or 32-bit floating-point disparity image. :param disparity: Input single-channel 16-bit signed or 32-bit floating-point disparity image.
:param _3dImage: Output 3-channel floating-point image of the same size as ``disparity`` . Each element of ``_3dImage(x,y)`` contains 3D coordinates of the point ``(x,y)`` computed from the disparity map. :param _3dImage: Output 3-channel floating-point image of the same size as ``disparity`` . Each element of ``_3dImage(x,y)`` contains 3D coordinates of the point ``(x,y)`` computed from the disparity map.
...@@ -847,6 +874,9 @@ RQDecomp3x3 ...@@ -847,6 +874,9 @@ RQDecomp3x3
Computes an RQ decomposition of 3x3 matrices. Computes an RQ decomposition of 3x3 matrices.
.. ocv:cfunction:: void cvRQDecomp3x3( const CvMat *M, CvMat *R, CvMat *Q, CvMat *Qx=NULL, CvMat *Qy=NULL, CvMat *Qz=NULL, CvPoint3D64f *eulerAngles=NULL)
.. ocv:pyoldfunction:: RQDecomp3x3(M, R, Q, Qx=None, Qy=None, Qz=None) -> eulerAngles
:param M: 3x3 input matrix. :param M: 3x3 input matrix.
:param R: Output 3x3 upper-triangular matrix. :param R: Output 3x3 upper-triangular matrix.
...@@ -1056,6 +1086,9 @@ stereoCalibrate ...@@ -1056,6 +1086,9 @@ stereoCalibrate
Calibrates the stereo camera. Calibrates the stereo camera.
.. ocv:cfunction:: double cvStereoCalibrate( const CvMat* objectPoints, const CvMat* imagePoints1, const CvMat* imagePoints2, const CvMat* pointCounts, CvMat* cameraMatrix1, CvMat* distCoeffs1, CvMat* cameraMatrix2, CvMat* distCoeffs2, CvSize imageSize, CvMat* R, CvMat* T, CvMat* E=0, CvMat* F=0, CvTermCriteria termCrit=cvTermCriteria( CV_TERMCRIT_ITER+CV_TERMCRIT_EPS, 30, 1e-6), int flags=CV_CALIB_FIX_INTRINSIC )
.. ocv:pyoldfunction:: StereoCalibrate( objectPoints, imagePoints1, imagePoints2, pointCounts, cameraMatrix1, distCoeffs1, cameraMatrix2, distCoeffs2, imageSize, R, T, E=None, F=None, termCrit=(CV_TERMCRIT_ITER+CV_TERMCRIT_EPS, 30, 1e-6), flags=CV_CALIB_FIX_INTRINSIC)-> None
:param objectPoints: Vector belonging to vectors of the calibration pattern points. :param objectPoints: Vector belonging to vectors of the calibration pattern points.
:param imagePoints1: Vector belonging to vectors of the projections of the calibration pattern points, observed by the first camera. :param imagePoints1: Vector belonging to vectors of the projections of the calibration pattern points, observed by the first camera.
...@@ -1143,6 +1176,9 @@ stereoRectify ...@@ -1143,6 +1176,9 @@ stereoRectify
Computes rectification transforms for each head of a calibrated stereo camera. Computes rectification transforms for each head of a calibrated stereo camera.
.. ocv:cfunction:: void cvStereoRectify( const CvMat* cameraMatrix1, const CvMat* cameraMatrix2, const CvMat* distCoeffs1, const CvMat* distCoeffs2, CvSize imageSize, const CvMat* R, const CvMat* T, CvMat* R1, CvMat* R2, CvMat* P1, CvMat* P2, CvMat* Q=0, int flags=CV_CALIB_ZERO_DISPARITY, double alpha=-1, CvSize newImageSize=cvSize(0, 0), CvRect* roi1=0, CvRect* roi2=0)
.. ocv:pyoldfunction:: StereoRectify( cameraMatrix1, cameraMatrix2, distCoeffs1, distCoeffs2, imageSize, R, T, R1, R2, P1, P2, Q=None, flags=CV_CALIB_ZERO_DISPARITY, alpha=-1, newImageSize=(0, 0))-> (roi1, roi2)
:param cameraMatrix1: First camera matrix. :param cameraMatrix1: First camera matrix.
:param cameraMatrix2: Second camera matrix. :param cameraMatrix2: Second camera matrix.
...@@ -1220,6 +1256,9 @@ stereoRectifyUncalibrated ...@@ -1220,6 +1256,9 @@ stereoRectifyUncalibrated
Computes a rectification transform for an uncalibrated stereo camera. Computes a rectification transform for an uncalibrated stereo camera.
.. ocv:cfunction:: void cvStereoRectifyUncalibrated( const CvMat* points1, const CvMat* points2, const CvMat* F, CvSize imageSize, CvMat* H1, CvMat* H2, double threshold=5 )
.. ocv:pyoldfunction:: StereoRectifyUncalibrated(points1, points2, F, imageSize, H1, H2, threshold=5)-> None
:param points1, points2: Two arrays of corresponding 2D points. The same formats as in :ref:`findFundamentalMat` are supported. :param points1, points2: Two arrays of corresponding 2D points. The same formats as in :ref:`findFundamentalMat` are supported.
:param F: Input fundamental matrix. It can be computed from the same set of point pairs using :ref:`findFundamentalMat` . :param F: Input fundamental matrix. It can be computed from the same set of point pairs using :ref:`findFundamentalMat` .
......
...@@ -32,6 +32,9 @@ Draws a circle. ...@@ -32,6 +32,9 @@ 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:cfunction:: void cvCircle( CvArr* img, CvPoint center, int radius, CvScalar color, int thickness=1, int lineType=8, int shift=0 )
.. ocv:pyoldfunction:: 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.
:param center: Center of the circle. :param center: Center of the circle.
...@@ -56,6 +59,9 @@ Clips the line against the image rectangle. ...@@ -56,6 +59,9 @@ Clips the line against the image rectangle.
.. ocv:function:: bool clipLine(Rect imgRect, Point& pt1, Point& pt2) .. ocv:function:: bool clipLine(Rect imgRect, Point& pt1, Point& pt2)
.. ocv:cfunction:: int cvClipLine( CvSize imgSize, CvPoint* pt1, CvPoint* pt2 )
.. ocv:pyoldfunction:: ClipLine(imgSize, pt1, pt2) -> (clippedPt1, clippedPt2)
: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)`` .
:param imgSize: Image rectangle.?? why do you list the same para twice?? :param imgSize: Image rectangle.?? why do you list the same para twice??
...@@ -75,6 +81,9 @@ Draws a simple or thick elliptic arc or fills an ellipse sector. ...@@ -75,6 +81,9 @@ Draws a simple or thick elliptic arc or fills an ellipse sector.
.. ocv:function:: void ellipse(Mat& img, const RotatedRect& box, const Scalar& color, int thickness=1, int lineType=8) .. ocv:function:: void ellipse(Mat& img, const RotatedRect& box, const Scalar& color, int thickness=1, int lineType=8)
.. 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:pyoldfunction:: Ellipse(img, center, axes, angle, startAngle, endAngle, color, thickness=1, lineType=8, shift=0)-> None
:param img: Image. :param img: Image.
:param center: Center of the ellipse. :param center: Center of the ellipse.
...@@ -138,6 +147,9 @@ Fills a convex polygon. ...@@ -138,6 +147,9 @@ 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:cfunction:: void cvFillConvexPoly( CvArr* img, CvPoint* pts, int npts, CvScalar color, int lineType=8, int shift=0 )
.. ocv:pyoldfunction:: FillConvexPoly(img, pn, color, lineType=8, shift=0)-> None
:param img: Image. :param img: Image.
:param pts: Polygon vertices. :param pts: Polygon vertices.
...@@ -162,6 +174,9 @@ Fills the area bounded by one or more polygons. ...@@ -162,6 +174,9 @@ Fills the area bounded by one or more polygons.
.. ocv:function:: void fillPoly(Mat& img, const Point** pts, const int* npts, int ncontours, const Scalar& color, int lineType=8, int shift=0, Point offset=Point() ) .. ocv:function:: void fillPoly(Mat& img, const Point** pts, const int* npts, int ncontours, const Scalar& color, int lineType=8, int shift=0, Point offset=Point() )
.. ocv:cfunction:: void cvFillPoly( CvArr* img, CvPoint** pts, int* npts, int contours, CvScalar color, int lineType=8, int shift=0 )
.. ocv:pyoldfunction:: FillPoly(img, polys, color, lineType=8, shift=0)-> None
:param img: Image. :param img: Image.
:param pts: Array of polygons where each polygon is represented as an array of points. :param pts: Array of polygons where each polygon is represented as an array of points.
...@@ -187,6 +202,9 @@ Calculates the width and height of a text string. ...@@ -187,6 +202,9 @@ 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:cfunction:: void cvGetTextSize( const char* textString, const CvFont* font, CvSize* textSize, int* baseline )
.. ocv:pyoldfunction:: GetTextSize(textString, font)-> (textSize, baseline)
:param text: Input text string. :param text: Input text string.
:param fontFace: Font to use. See the :ocv:func:`putText` for details. :param fontFace: Font to use. See the :ocv:func:`putText` for details.
...@@ -238,6 +256,9 @@ Draws a line segment connecting two points. ...@@ -238,6 +256,9 @@ Draws a line segment connecting two points.
.. ocv:function:: void line(Mat& img, Point pt1, Point pt2, const Scalar& color, int thickness=1, int lineType=8, int shift=0) .. ocv:function:: void line(Mat& img, Point pt1, Point pt2, const Scalar& 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 lineType=8, int shift=0 )
.. ocv:pyoldfunction:: Line(img, pt1, pt2, color, thickness=1, lineType=8, shift=0)-> None
:param img: Image. :param img: Image.
:param pt1: First point of the line segment. :param pt1: First point of the line segment.
...@@ -314,6 +335,9 @@ Draws a simple, thick, or filled up-right rectangle. ...@@ -314,6 +335,9 @@ Draws a simple, thick, or filled up-right rectangle.
.. 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 r, const Scalar& 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 lineType=8, int shift=0 )
.. ocv:pyoldfunction:: Rectangle(img, pt1, pt2, color, thickness=1, lineType=8, shift=0)-> None
:param img: Image. :param img: Image.
:param pt1: Vertex of the rectangle. :param pt1: Vertex of the rectangle.
...@@ -368,6 +392,9 @@ Draws a text string. ...@@ -368,6 +392,9 @@ Draws a text string.
.. ocv:function:: void putText( Mat& img, const string& text, Point org, int fontFace, double fontScale, Scalar color, int thickness=1, int lineType=8, bool bottomLeftOrigin=false ) .. ocv:function:: void putText( Mat& img, const string& text, Point org, int fontFace, double fontScale, Scalar color, int thickness=1, int lineType=8, bool bottomLeftOrigin=false )
.. ocv:cfunction:: void cvPutText( CvArr* img, const char* text, CvPoint org, const CvFont* font, CvScalar color )
.. ocv:pyoldfunction:: PutText(img, text, org, font, color)-> None
:param img: Image. :param img: Image.
:param text: Text string to be drawn. :param text: Text string to be drawn.
......
...@@ -30,17 +30,17 @@ absdiff ...@@ -30,17 +30,17 @@ absdiff
Computes the per-element absolute difference between two arrays or between an array and a scalar. Computes the per-element absolute difference between two arrays or between an array and a scalar.
.. ocv:function:: void absdiff(InputArray src1, InputArray src2, OutputArray dst) .. ocv:function:: void absdiff(InputArray src1, InputArray src2, OutputArray dst)
.. ocv:pyfunction:: cv2.absdiff(src1, src2, [dst=None]) -> dst .. ocv:pyfunction:: cv2.absdiff(src1, src2, [dst=None]) -> dst
.. ocv:pyoldfunction:: cv.AbsDiff(src1, src2, dst) -> None .. ocv:pyoldfunction:: cv.AbsDiff(src1, src2, dst) -> None
.. ocv:pyoldfunction:: cv.AbsDiffS(src1, src2, dst) -> None .. ocv:pyoldfunction:: cv.AbsDiffS(src1, src2, dst) -> None
.. ocv:cfunction:: void cvAbsDiff(const CvArr* src1, const CvArr* src2, CvArr* dst) .. ocv:cfunction:: void cvAbsDiff(const CvArr* src1, const CvArr* src2, CvArr* dst)
.. ocv:cfunction:: void cvAbsDiffS(const CvArr* src1, CvScalar src2, CvArr* dst) .. ocv:cfunction:: void cvAbsDiffS(const CvArr* src1, CvScalar src2, CvArr* dst)
.. ocv:cfunction:: void cvAbsDiff(const CvArr* src1, const CvArr* src2, CvArr* dst)
.. ocv:cfunction:: void cvAbsDiffS(const CvArr* src, CvArr* dst, CvScalar value)
.. ocv:pyoldfunction:: AbsDiff(src1, src2, dst)-> None
.. ocv:pyoldfunction:: AbsDiffS(src, dst, value)-> None
:param src1: First input array or a scalar. :param src1: First input array or a scalar.
:param src2: Second input array or a scalar. :param src2: Second input array or a scalar.
...@@ -84,6 +84,11 @@ Computes the per-element sum of two arrays or an array and a scalar. ...@@ -84,6 +84,11 @@ Computes the per-element sum of two arrays or an array and a scalar.
.. ocv:function:: void add(InputArray src1, InputArray src2, OutputArray dst, InputArray mask=noArray(), int dtype=-1) .. ocv:function:: void add(InputArray src1, InputArray src2, OutputArray dst, InputArray mask=noArray(), int dtype=-1)
.. ocv:pyfunction:: cv2.add(src1, src2 [, dst=None [, mask=None [, dtype=-1]]]) -> dst .. ocv:pyfunction:: cv2.add(src1, src2 [, dst=None [, mask=None [, dtype=-1]]]) -> dst
.. ocv:cfunction:: void cvAdd(const CvArr* src1, const CvArr* src2, CvArr* dst, const CvArr* mask=NULL)
.. ocv:cfunction:: void cvAddS(const CvArr* src, CvScalar value, CvArr* dst, const CvArr* mask=NULL)
.. ocv:pyoldfunction:: Add(src1, src2, dst, mask=None)-> None
.. ocv:pyoldfunction:: AddS(src, value, dst, mask=None)-> None
:param src1: First source array or a scalar. :param src1: First source array or a scalar.
:param src2: Second source array or a scalar. :param src2: Second source array or a scalar.
...@@ -142,6 +147,9 @@ Computes the weighted sum of two arrays. ...@@ -142,6 +147,9 @@ Computes the weighted sum of two arrays.
.. ocv:function:: void addWeighted(InputArray src1, double alpha, InputArray src2, double beta, double gamma, OutputArray dst, int dtype=-1) .. ocv:function:: void addWeighted(InputArray src1, double alpha, InputArray src2, double beta, double gamma, OutputArray dst, int dtype=-1)
.. ocv:cfunction:: void cvAddWeighted(const CvArr* src1, double alpha, const CvArr* src2, double beta, double gamma, CvArr* dst)
.. ocv:pyoldfunction:: AddWeighted(src1, alpha, src2, beta, gamma, dst)-> None
:param src1: First source array. :param src1: First source array.
:param alpha: Weight for the first array elements. :param alpha: Weight for the first array elements.
...@@ -185,6 +193,11 @@ Calculates the per-element bit-wise conjunction of two arrays or an array and a ...@@ -185,6 +193,11 @@ Calculates the per-element bit-wise conjunction of two arrays or an array and a
.. ocv:function:: void bitwise_and(InputArray src1, InputArray src2, OutputArray dst, InputArray mask=noArray()) .. ocv:function:: void bitwise_and(InputArray src1, InputArray src2, OutputArray dst, InputArray mask=noArray())
.. ocv:cfunction:: void cvAnd(const CvArr* src1, const CvArr* src2, CvArr* dst, const CvArr* mask=NULL)
.. ocv:cfunction:: void cvAndS(const CvArr* src, CvScalar value, CvArr* dst, const CvArr* mask=NULL)
.. ocv:pyoldfunction:: And(src1, src2, dst, mask=None)-> None
.. ocv:pyoldfunction:: AndS(src, value, dst, mask=None)-> None
:param src1: First source array or a scalar. :param src1: First source array or a scalar.
:param src2: Second source array or a scalar. :param src2: Second source array or a scalar.
...@@ -227,6 +240,9 @@ Inverts every bit of an array. ...@@ -227,6 +240,9 @@ Inverts every bit of an array.
.. ocv:function:: void bitwise_not(InputArray src, OutputArray dst, InputArray mask=noArray()) .. ocv:function:: void bitwise_not(InputArray src, OutputArray dst, InputArray mask=noArray())
.. ocv:cfunction:: void cvNot(const CvArr* src, CvArr* dst)
.. ocv:pyoldfunction:: Not(src, dst)-> None
:param src: Source array. :param src: Source array.
:param dst: Destination array that has the same size and type as the input array. :param dst: Destination array that has the same size and type as the input array.
...@@ -249,6 +265,11 @@ Calculates the per-element bit-wise disjunction of two arrays or an array and a ...@@ -249,6 +265,11 @@ Calculates the per-element bit-wise disjunction of two arrays or an array and a
.. ocv:function:: void bitwise_or(InputArray src1, InputArray src2, OutputArray dst, InputArray mask=noArray()) .. ocv:function:: void bitwise_or(InputArray src1, InputArray src2, OutputArray dst, InputArray mask=noArray())
.. ocv:cfunction:: void cvOr(const CvArr* src1, const CvArr* src2, CvArr* dst, const CvArr* mask=NULL)
.. ocv:cfunction:: void cvOrS(const CvArr* src, CvScalar value, CvArr* dst, const CvArr* mask=NULL)
.. ocv:pyoldfunction:: Or(src1, src2, dst, mask=None)-> None
.. ocv:pyoldfunction:: OrS(src, value, dst, mask=None)-> None
:param src1: First source array or a scalar. :param src1: First source array or a scalar.
:param src2: Second source array or a scalar. :param src2: Second source array or a scalar.
...@@ -290,6 +311,11 @@ Calculates the per-element bit-wise "exclusive or" operation on two arrays or an ...@@ -290,6 +311,11 @@ Calculates the per-element bit-wise "exclusive or" operation on two arrays or an
.. ocv:function:: void bitwise_xor(InputArray src1, InputArray src2, OutputArray dst, InputArray mask=noArray()) .. ocv:function:: void bitwise_xor(InputArray src1, InputArray src2, OutputArray dst, InputArray mask=noArray())
.. ocv:cfunction:: void cvXor(const CvArr* src1, const CvArr* src2, CvArr* dst, const CvArr* mask=NULL)
.. ocv:cfunction:: void cvXorS(const CvArr* src, CvScalar value, CvArr* dst, const CvArr* mask=NULL)
.. ocv:pyoldfunction:: Xor(src1, src2, dst, mask=None)-> None
.. ocv:pyoldfunction:: XorS(src, value, dst, mask=None)-> None
:param src1: First source array or a scalar. :param src1: First source array or a scalar.
:param src2: Second source array or a scalar. :param src2: Second source array or a scalar.
...@@ -333,6 +359,9 @@ Calculates the covariance matrix of a set of vectors. ...@@ -333,6 +359,9 @@ Calculates the covariance matrix of a set of vectors.
.. ocv:function:: void calcCovarMatrix( InputArray samples, OutputArray covar, OutputArray mean, int flags, int ctype=CV_64F) .. ocv:function:: void calcCovarMatrix( InputArray samples, OutputArray covar, OutputArray mean, int flags, int ctype=CV_64F)
.. ocv:cfunction:: void cvCalcCovarMatrix( const CvArr** vects, int count, CvArr* covMat, CvArr* avg, int flags)
.. ocv:pyoldfunction:: 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.
:param nsamples: Number of samples when they are stored separately. :param nsamples: Number of samples when they are stored separately.
...@@ -383,6 +412,9 @@ Calculates the magnitude and angle of 2D vectors. ...@@ -383,6 +412,9 @@ Calculates the magnitude and angle of 2D vectors.
.. ocv:function:: void cartToPolar(InputArray x, InputArray y, OutputArray magnitude, OutputArray angle, bool angleInDegrees=false) .. ocv:function:: void cartToPolar(InputArray x, InputArray y, OutputArray magnitude, OutputArray angle, bool angleInDegrees=false)
.. ocv:cfunction:: void cvCartToPolar( const CvArr* x, const CvArr* y, CvArr* magnitude, CvArr* angle=NULL, int angleInDegrees=0)
.. ocv:pyoldfunction:: 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.
:param y: Array of y-coordinates that must have the same size and same type as ``x`` . :param y: Array of y-coordinates that must have the same size and same type as ``x`` .
...@@ -523,6 +555,9 @@ Scales, computes absolute values, and converts the result to 8-bit. ...@@ -523,6 +555,9 @@ Scales, computes absolute values, and converts the result to 8-bit.
.. ocv:function:: void convertScaleAbs(InputArray src, OutputArray dst, double alpha=1, double beta=0) .. ocv:function:: void convertScaleAbs(InputArray src, OutputArray dst, double alpha=1, double beta=0)
.. ocv:cfunction:: void cvConvertScaleAbs(const CvArr* src, CvArr* dst, double scale=1, double shift=0)
.. ocv:pyoldfunction:: ConvertScaleAbs(src, dst, scale=1.0, shift=0.0)-> None
:param src: Source array. :param src: Source array.
:param dst: Destination array. :param dst: Destination array.
...@@ -561,6 +596,9 @@ Counts non-zero array elements. ...@@ -561,6 +596,9 @@ Counts non-zero array elements.
.. ocv:function:: int countNonZero( InputArray mtx ) .. ocv:function:: int countNonZero( InputArray mtx )
.. ocv:cfunction:: int cvCountNonZero(const CvArr* arr)
.. ocv:pyoldfunction:: CountNonZero(arr)-> int
:param mtx: Single-channel array. :param mtx: Single-channel array.
The function returns the number of non-zero elements in ``mtx`` : The function returns the number of non-zero elements in ``mtx`` :
...@@ -661,6 +699,9 @@ Performs a forward or inverse discrete Cosine transform of 1D or 2D array. ...@@ -661,6 +699,9 @@ Performs a forward or inverse discrete Cosine transform of 1D or 2D array.
.. ocv:function:: void dct(InputArray src, OutputArray dst, int flags=0) .. ocv:function:: void dct(InputArray src, OutputArray dst, int flags=0)
.. ocv:cfunction:: void cvDCT(const CvArr* src, CvArr* dst, int flags)
.. ocv:pyoldfunction:: DCT(src, dst, flags)-> None
:param src: Source floating-point array. :param src: Source floating-point array.
:param dst: Destination array of the same size and type as ``src`` . :param dst: Destination array of the same size and type as ``src`` .
...@@ -750,6 +791,9 @@ Performs a forward or inverse Discrete Fourier transform of a 1D or 2D floating- ...@@ -750,6 +791,9 @@ Performs a forward or inverse Discrete Fourier transform of a 1D or 2D floating-
.. ocv:function:: void dft(InputArray src, OutputArray dst, int flags=0, int nonzeroRows=0) .. ocv:function:: void dft(InputArray src, OutputArray dst, int flags=0, int nonzeroRows=0)
.. ocv:cfunction:: void cvDFT(const CvArr* src, CvArr* dst, int flags, int nonzeroRows=0)
.. ocv:pyoldfunction:: 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.
:param dst: Destination array whose size and type depends on the ``flags`` . :param dst: Destination array whose size and type depends on the ``flags`` .
...@@ -989,6 +1033,9 @@ Calculates the exponent of every array element. ...@@ -989,6 +1033,9 @@ Calculates the exponent of every array element.
.. ocv:function:: void exp(InputArray src, OutputArray dst) .. ocv:function:: void exp(InputArray src, OutputArray dst)
.. ocv:cfunction:: void cvExp(const CvArr* src, CvArr* dst)
.. ocv:pyoldfunction:: Exp(src, dst)-> None
:param src: Source array. :param src: Source array.
:param dst: Destination array of the same size and type as ``src``. :param dst: Destination array of the same size and type as ``src``.
...@@ -1047,6 +1094,9 @@ Flips a 2D array around vertical, horizontal, or both axes. ...@@ -1047,6 +1094,9 @@ Flips a 2D array around vertical, horizontal, or both axes.
.. ocv:function:: void flip(InputArray src, OutputArray dst, int flipCode) .. ocv:function:: void flip(InputArray src, OutputArray dst, int flipCode)
.. ocv:cfunction:: void cvFlip(const CvArr* src, CvArr* dst=NULL, int flipMode=0)
.. ocv:pyoldfunction:: Flip(src, dst=None, flipMode=0)-> None
:param src: Source array. :param src: Source array.
:param dst: Destination array of the same size and type as ``src`` . :param dst: Destination array of the same size and type as ``src`` .
...@@ -1085,6 +1135,9 @@ Performs generalized matrix multiplication. ...@@ -1085,6 +1135,9 @@ 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 beta, OutputArray dst, int flags=0)
.. ocv:cfunction:: void cvGEMM( const CvArr* src1, const CvArr* src2, double alpha, const CvArr* src3, double beta, CvArr* dst, int tABC=0)
.. ocv:pyoldfunction:: GEMM(src1, src2, alphs, src3, beta, dst, tABC=0)-> None
:param src1: First multiplied input matrix that should have ``CV_32FC1`` , ``CV_64FC1`` , ``CV_32FC2`` , or ``CV_64FC2`` type. :param src1: First multiplied input matrix that should have ``CV_32FC1`` , ``CV_64FC1`` , ``CV_32FC2`` , or ``CV_64FC2`` type.
:param src2: Second multiplied input matrix of the same type as ``src1`` . :param src2: Second multiplied input matrix of the same type as ``src1`` .
...@@ -1158,6 +1211,9 @@ Returns the optimal DFT size for a given vector size. ...@@ -1158,6 +1211,9 @@ Returns the optimal DFT size for a given vector size.
.. ocv:function:: int getOptimalDFTSize(int vecsize) .. ocv:function:: int getOptimalDFTSize(int vecsize)
.. ocv:cfunction:: int cvGetOptimalDFTSize(int size0)
.. ocv:pyoldfunction:: GetOptimalDFTSize(size0)-> int
:param vecsize: Vector size. :param vecsize: Vector size.
DFT performance is not a monotonic function of a vector size. Therefore, when you compute convolution of two arrays or perform the spectral analysis of an array, it usually makes sense to pad the input data with zeros to get a bit larger array that can be transformed much faster than the original one. DFT performance is not a monotonic function of a vector size. Therefore, when you compute convolution of two arrays or perform the spectral analysis of an array, it usually makes sense to pad the input data with zeros to get a bit larger array that can be transformed much faster than the original one.
...@@ -1232,6 +1288,11 @@ Checks if array elements lie between the elements of two other arrays. ...@@ -1232,6 +1288,11 @@ Checks if array elements lie between the elements of two other arrays.
.. ocv:function:: void inRange(InputArray src, InputArray lowerb, InputArray upperb, OutputArray dst) .. ocv:function:: void inRange(InputArray src, InputArray lowerb, InputArray upperb, OutputArray dst)
.. ocv:cfunction:: void cvInRange(const CvArr* src, const CvArr* lower, const CvArr* upper, CvArr* dst)
.. ocv:cfunction:: void cvInRangeS(const CvArr* src, CvScalar lower, CvScalar upper, CvArr* dst)
.. ocv:pyoldfunction:: InRange(src, lower, upper, dst)-> None
.. ocv:pyoldfunction:: InRangeS(src, lower, upper, dst)-> None
:param src: First source array. :param src: First source array.
:param lowerb: Inclusive lower boundary array or a scalar. :param lowerb: Inclusive lower boundary array or a scalar.
...@@ -1268,6 +1329,9 @@ Finds the inverse or pseudo-inverse of a matrix. ...@@ -1268,6 +1329,9 @@ Finds the inverse or pseudo-inverse of a matrix.
.. ocv:function:: double invert(InputArray src, OutputArray dst, int method=DECOMP_LU) .. ocv:function:: double invert(InputArray src, OutputArray dst, int method=DECOMP_LU)
.. ocv:cfunction:: double cvInvert(const CvArr* src, CvArr* dst, int method=CV_LU)
.. ocv:pyoldfunction:: Invert(src, dst, method=CV_LU)-> double
:param src: Source floating-point ``M x N`` matrix. :param src: Source floating-point ``M x N`` matrix.
:param dst: Destination matrix of ``N x M`` size and the same type as ``src`` . :param dst: Destination matrix of ``N x M`` size and the same type as ``src`` .
...@@ -1302,6 +1366,9 @@ Calculates the natural logarithm of every array element. ...@@ -1302,6 +1366,9 @@ Calculates the natural logarithm of every array element.
.. ocv:function:: void log(InputArray src, OutputArray dst) .. ocv:function:: void log(InputArray src, OutputArray dst)
.. ocv:cfunction:: void cvLog(const CvArr* src, CvArr* dst)
.. ocv:pyoldfunction:: Log(src, dst)-> None
:param src: Source array. :param src: Source array.
:param dst: Destination array of the same size and type as ``src`` . :param dst: Destination array of the same size and type as ``src`` .
...@@ -1333,6 +1400,9 @@ Performs a look-up table transform of an array. ...@@ -1333,6 +1400,9 @@ 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)
.. ocv:cfunction:: void cvLUT(const CvArr* src, CvArr* dst, const CvArr* lut)
.. ocv:pyoldfunction:: LUT(src, dst, lut)-> None
:param src: Source array of 8-bit elements. :param src: Source array of 8-bit elements.
:param lut: Look-up table of 256 elements. In case of multi-channel source array, the table should either have a single channel (in this case the same table is used for all channels) or the same number of channels as in the source array. :param lut: Look-up table of 256 elements. In case of multi-channel source array, the table should either have a single channel (in this case the same table is used for all channels) or the same number of channels as in the source array.
...@@ -1391,6 +1461,8 @@ Calculates the Mahalanobis distance between two vectors. ...@@ -1391,6 +1461,8 @@ Calculates the Mahalanobis distance between two vectors.
.. ocv:function:: double Mahalanobis(InputArray vec1, InputArray vec2, InputArray icovar) .. ocv:function:: double Mahalanobis(InputArray vec1, InputArray vec2, InputArray icovar)
.. ocv:cfunction:: double cvMahalanobis( const CvArr* vec1, const CvArr* vec2, CvArr* mat)
:param vec1: First 1D source vector. :param vec1: First 1D source vector.
:param vec2: Second 1D source vector. :param vec2: Second 1D source vector.
...@@ -1425,6 +1497,11 @@ Calculates per-element maximum of two arrays or an array and a scalar. ...@@ -1425,6 +1497,11 @@ Calculates per-element maximum of two arrays or an array and a scalar.
.. ocv:function:: void max(const Mat& src1, double value, Mat& dst) .. ocv:function:: void max(const Mat& src1, double value, Mat& dst)
.. ocv:cfunction:: void cvMax(const CvArr* src1, const CvArr* src2, CvArr* dst)
.. ocv:cfunction:: void cvMaxS(const CvArr* src, double value, CvArr* dst)
.. ocv:pyoldfunction:: Max(src1, src2, dst)-> None
.. ocv:pyoldfunction:: MaxS(src, value, dst)-> None
:param src1: First source array. :param src1: First source array.
:param src2: Second source array of the same size and type as ``src1`` . :param src2: Second source array of the same size and type as ``src1`` .
...@@ -1528,6 +1605,9 @@ Composes a multi-channel array from several single-channel arrays. ...@@ -1528,6 +1605,9 @@ Composes a multi-channel array from several single-channel arrays.
.. ocv:function:: void merge(const vector<Mat>& mv, OutputArray dst) .. ocv:function:: void merge(const vector<Mat>& mv, OutputArray dst)
.. ocv:cfunction:: void cvMerge(const CvArr* src0, const CvArr* src1, const CvArr* src2, const CvArr* src3, CvArr* dst)
.. ocv:pyoldfunction:: Merge(src0, src1, src2, src3, dst)-> None
:param mv: Source array or vector of matrices to be merged. All the matrices in ``mv`` must have the same size and the same depth. :param mv: Source array or vector of matrices to be merged. All the matrices in ``mv`` must have the same size and the same depth.
:param count: Number of source matrices when ``mv`` is a plain C array. It must be greater than zero. :param count: Number of source matrices when ``mv`` is a plain C array. It must be greater than zero.
...@@ -1564,6 +1644,11 @@ Calculates per-element minimum of two arrays or array and a scalar. ...@@ -1564,6 +1644,11 @@ Calculates per-element minimum of two arrays or array and a scalar.
.. ocv:function:: void min(const Mat& src1, double value, Mat& dst) .. ocv:function:: void min(const Mat& src1, double value, Mat& dst)
.. ocv:cfunction:: void cvMin(const CvArr* src1, const CvArr* src2, CvArr* dst)
.. ocv:cfunction:: void cvMinS(const CvArr* src, double value, CvArr* dst)
.. ocv:pyoldfunction:: Min(src1, src2, dst)-> None
.. ocv:pyoldfunction:: MinS(src, value, dst)-> None
:param src1: First source array. :param src1: First source array.
:param src2: Second source array of the same size and type as ``src1`` . :param src2: Second source array of the same size and type as ``src1`` .
...@@ -1607,6 +1692,9 @@ Finds the global minimum and maximum in a whole array or sub-array. ...@@ -1607,6 +1692,9 @@ Finds the global minimum and maximum in a whole array or sub-array.
.. ocv:function:: void minMaxLoc(const SparseMat& src, double* minVal, double* maxVal, int* minIdx=0, int* maxIdx=0) .. ocv:function:: void minMaxLoc(const SparseMat& src, double* minVal, double* maxVal, int* minIdx=0, int* maxIdx=0)
.. ocv:cfunction:: void cvMinMaxLoc(const CvArr* arr, double* minVal, double* maxVal, CvPoint* minLoc=NULL, CvPoint* maxLoc=NULL, const CvArr* mask=NULL)
.. ocv:pyoldfunction:: MinMaxLoc(arr, mask=None)-> (minVal, maxVal, minLoc, maxLoc)
:param src: Source single-channel array. :param src: Source single-channel array.
:param minVal: Pointer to the returned minimum value. ``NULL`` is used if not required. :param minVal: Pointer to the returned minimum value. ``NULL`` is used if not required.
...@@ -1655,6 +1743,9 @@ Copies specified channels from input arrays to the specified channels of output ...@@ -1655,6 +1743,9 @@ Copies specified channels from input arrays to the specified channels of output
.. ocv:function:: void mixChannels(const vector<Mat>& srcv, vector<Mat>& dstv, const int* fromTo, int npairs) .. ocv:function:: void mixChannels(const vector<Mat>& srcv, vector<Mat>& dstv, const int* fromTo, int npairs)
.. ocv:cfunction:: void cvMixChannels(const CvArr** src, int srcCount, CvArr** dst, int dstCount, const int* fromTo, int pairCount)
.. ocv:pyoldfunction:: MixChannels(src, dst, fromTo) -> None
:param srcv: Input array or vector of matrices. All the matrices must have the same size and the same depth. :param srcv: Input array or vector of matrices. All the matrices must have the same size and the same depth.
:param nsrc: Number of elements in ``srcv`` . :param nsrc: Number of elements in ``srcv`` .
...@@ -1702,6 +1793,9 @@ Performs the per-element multiplication of two Fourier spectrums. ...@@ -1702,6 +1793,9 @@ 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 src1, InputArray src2, OutputArray dst, int flags, bool conj=false)
.. ocv:cfunction:: void cvMulSpectrums( const CvArr* src1, const CvArr* src2, CvArr* dst, int flags)
.. ocv:pyoldfunction:: MulSpectrums(src1, src2, dst, flags)-> None
:param src1: First source array. :param src1: First source array.
:param src2: Second source array of the same size and type as ``src1`` . :param src2: Second source array of the same size and type as ``src1`` .
...@@ -1769,6 +1863,9 @@ Calculates the product of a matrix and its transposition. ...@@ -1769,6 +1863,9 @@ 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 rtype=-1)
.. ocv:cfunction:: void cvMulTransposed(const CvArr* src, CvArr* dst, int order, const CvArr* delta=NULL, double scale=1.0)
.. ocv:pyoldfunction:: MulTransposed(src, dst, order, delta=None, scale)-> 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.
:param dst: Destination square matrix. :param dst: Destination square matrix.
...@@ -1814,6 +1911,9 @@ Calculates an absolute array norm, an absolute difference norm, or a relative di ...@@ -1814,6 +1911,9 @@ Calculates an absolute array norm, an absolute difference norm, or a relative di
.. ocv:function:: double norm( const SparseMat& src, int normType ) .. ocv:function:: double norm( const SparseMat& src, int normType )
.. ocv:cfunction:: double cvNorm(const CvArr* arr1, const CvArr* arr2=NULL, int normType=CV_L2, const CvArr* mask=NULL)
.. ocv:pyoldfunction:: Norm(arr1, arr2, normType=CV_L2, mask=None)-> double
:param src1: First source array. :param src1: First source array.
:param src2: Second source array of the same size and the same type as ``src1`` . :param src2: Second source array of the same size and the same type as ``src1`` .
...@@ -2048,6 +2148,9 @@ Performs the perspective matrix transformation of vectors. ...@@ -2048,6 +2148,9 @@ 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 mtx)
.. ocv:cfunction:: void cvPerspectiveTransform(const CvArr* src, CvArr* dst, const CvMat* mat)
.. ocv:pyoldfunction:: PerspectiveTransform(src, dst, mat)-> None
:param src: Source two-channel or three-channel floating-point array. Each element is a 2D/3D vector to be transformed. :param src: Source two-channel or three-channel floating-point array. Each element is a 2D/3D vector to be transformed.
:param dst: Destination array of the same size and type as ``src`` . :param dst: Destination array of the same size and type as ``src`` .
...@@ -2114,6 +2217,9 @@ Computes x and y coordinates of 2D vectors from their magnitude and angle. ...@@ -2114,6 +2217,9 @@ Computes x and y coordinates of 2D vectors from their magnitude and angle.
.. ocv:function:: void polarToCart(InputArray magnitude, InputArray angle, OutputArray x, OutputArray y, bool angleInDegrees=false) .. ocv:function:: void polarToCart(InputArray magnitude, InputArray angle, OutputArray x, OutputArray y, bool angleInDegrees=false)
.. ocv:cfunction:: void cvPolarToCart( const CvArr* magnitude, const CvArr* angle, CvArr* x, CvArr* y, int angleInDegrees=0)
.. ocv:pyoldfunction:: 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`` .
:param angle: Source floating-point array of angles of 2D vectors. :param angle: Source floating-point array of angles of 2D vectors.
...@@ -2150,6 +2256,9 @@ Raises every array element to a power. ...@@ -2150,6 +2256,9 @@ Raises every array element to a power.
.. ocv:function:: void pow(InputArray src, double p, OutputArray dst) .. ocv:function:: void pow(InputArray src, double p, OutputArray dst)
.. ocv:cfunction:: void cvPow( const CvArr* src, CvArr* dst, double power)
.. ocv:pyoldfunction:: Pow(src, dst, power)-> None
:param src: Source array. :param src: Source array.
:param p: Exponent of power. :param p: Exponent of power.
...@@ -2403,6 +2512,9 @@ Reduces a matrix to a vector. ...@@ -2403,6 +2512,9 @@ 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 mtx, OutputArray vec, int dim, int reduceOp, int dtype=-1)
.. ocv:cfunction:: void cvReduce(const CvArr* src, CvArr* dst, int dim=-1, int op=CV_REDUCE_SUM)
.. ocv:pyoldfunction:: Reduce(src, dst, dim=-1, op=CV_REDUCE_SUM)-> None
:param mtx: Source 2D matrix. :param mtx: Source 2D matrix.
:param vec: Destination vector. Its size and type is defined by ``dim`` and ``dtype`` parameters. :param vec: Destination vector. Its size and type is defined by ``dim`` and ``dtype`` parameters.
...@@ -2435,6 +2547,9 @@ Fills the destination array with repeated copies of the source array. ...@@ -2435,6 +2547,9 @@ Fills the destination array with repeated copies of the source array.
.. ocv:function:: Mat repeat(InputArray src, int ny, int nx) .. ocv:function:: Mat repeat(InputArray src, int ny, int nx)
.. ocv:cfunction:: void cvRepeat(const CvArr* src, CvArr* dst)
.. ocv:pyoldfunction:: Repeat(src, dst)-> None
:param src: Source array to replicate. :param src: Source array to replicate.
:param dst: Destination array of the same type as ``src`` . :param dst: Destination array of the same type as ``src`` .
...@@ -2495,6 +2610,9 @@ Calculates the sum of a scaled array and another array. ...@@ -2495,6 +2610,9 @@ 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 scale, InputArray src2, OutputArray dst)
.. ocv:cfunction:: void cvScaleAdd(const CvArr* src1, CvScalar scale, const CvArr* src2, CvArr* dst)
.. ocv:pyoldfunction:: ScaleAdd(src1, scale, src2, dst)-> None
:param src1: First source array. :param src1: First source array.
:param scale: Scale factor for the first array. :param scale: Scale factor for the first array.
...@@ -2533,6 +2651,9 @@ Initializes a scaled identity matrix. ...@@ -2533,6 +2651,9 @@ Initializes a scaled identity matrix.
.. ocv:function:: void setIdentity(InputOutputArray dst, const Scalar& value=Scalar(1)) .. ocv:function:: void setIdentity(InputOutputArray dst, const Scalar& value=Scalar(1))
.. ocv:cfunction:: void cvSetIdentity(CvArr* mat, CvScalar value=cvRealScalar(1))
.. ocv:pyoldfunction:: SetIdentity(mat, value=1)-> None
:param dst: Matrix to initialize (not necessarily square). :param dst: Matrix to initialize (not necessarily square).
:param value: Value to assign to diagonal elements. :param value: Value to assign to diagonal elements.
...@@ -2566,6 +2687,9 @@ Solves one or more linear systems or least-squares problems. ...@@ -2566,6 +2687,9 @@ Solves one or more linear systems or least-squares problems.
.. ocv:function:: bool solve(InputArray src1, InputArray src2, OutputArray dst, int flags=DECOMP_LU) .. ocv:function:: bool solve(InputArray src1, InputArray src2, OutputArray dst, int flags=DECOMP_LU)
.. ocv:cfunction:: int cvSolve(const CvArr* src1, const CvArr* src2, CvArr* dst, int method=CV_LU)
.. ocv:pyoldfunction:: Solve(A, B, X, method=CV_LU)-> None
:param src1: Input matrix on the left-hand side of the system. :param src1: Input matrix on the left-hand side of the system.
:param src2: Input matrix on the right-hand side of the system. :param src2: Input matrix on the right-hand side of the system.
...@@ -2611,6 +2735,9 @@ Finds the real roots of a cubic equation. ...@@ -2611,6 +2735,9 @@ Finds the real roots of a cubic equation.
.. ocv:function:: void solveCubic(InputArray coeffs, OutputArray roots) .. ocv:function:: void solveCubic(InputArray coeffs, OutputArray roots)
.. ocv:cfunction:: void cvSolveCubic(const CvArr* coeffs, CvArr* roots)
.. ocv:pyoldfunction:: 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.
:param roots: Destination array of real roots that has 1 or 3 elements. :param roots: Destination array of real roots that has 1 or 3 elements.
...@@ -2726,6 +2853,9 @@ Divides a multi-channel array into several single-channel arrays. ...@@ -2726,6 +2853,9 @@ Divides a multi-channel array into several single-channel arrays.
.. ocv:function:: void split(const Mat& mtx, vector<Mat>& mv) .. ocv:function:: void split(const Mat& mtx, vector<Mat>& mv)
.. ocv:cfunction:: void cvSplit(const CvArr* src, CvArr* dst0, CvArr* dst1, CvArr* dst2, CvArr* dst3)
.. ocv:pyoldfunction:: Split(src, dst0, dst1, dst2, dst3)-> None
:param mtx: Source multi-channel array. :param mtx: Source multi-channel array.
:param mv: Destination array or vector of arrays. In the first variant of the function the number of arrays must match ``mtx.channels()`` . The arrays themselves are reallocated, if needed. :param mv: Destination array or vector of arrays. In the first variant of the function the number of arrays must match ``mtx.channels()`` . The arrays themselves are reallocated, if needed.
...@@ -2753,6 +2883,9 @@ Calculates a quare root of array elements. ...@@ -2753,6 +2883,9 @@ Calculates a quare root of array elements.
.. ocv:function:: void sqrt(InputArray src, OutputArray dst) .. ocv:function:: void sqrt(InputArray src, OutputArray dst)
.. ocv:cfunction:: float cvSqrt(float value)
.. ocv:pyoldfunction:: Sqrt(value)-> float
:param src: Source floating-point array. :param src: Source floating-point array.
:param dst: Destination array of the same size and type as ``src`` . :param dst: Destination array of the same size and type as ``src`` .
...@@ -2932,6 +3065,9 @@ Calculates the sum of array elements. ...@@ -2932,6 +3065,9 @@ Calculates the sum of array elements.
.. ocv:function:: Scalar sum(InputArray mtx) .. ocv:function:: Scalar sum(InputArray mtx)
.. ocv:cfunction:: CvScalar cvSum(const CvArr* arr)
.. ocv:pyoldfunction:: Sum(arr)-> CvScalar
:param mtx: Source array that must have from 1 to 4 channels. :param mtx: Source array that must have from 1 to 4 channels.
The functions ``sum`` calculate and return the sum of array elements, independently for each channel. The functions ``sum`` calculate and return the sum of array elements, independently for each channel.
...@@ -2971,6 +3107,9 @@ Returns the trace of a matrix. ...@@ -2971,6 +3107,9 @@ Returns the trace of a matrix.
.. ocv:function:: Scalar trace(InputArray mtx) .. ocv:function:: Scalar trace(InputArray mtx)
.. ocv:cfunction:: CvScalar cvTrace(const CvArr* mat)
.. ocv:pyoldfunction:: Trace(mat)-> CvScalar
:param mtx: Source matrix. :param mtx: Source matrix.
The function ``trace`` returns the sum of the diagonal elements of the matrix ``mtx`` . The function ``trace`` returns the sum of the diagonal elements of the matrix ``mtx`` .
...@@ -2987,6 +3126,9 @@ Performs the matrix transformation of every array element. ...@@ -2987,6 +3126,9 @@ 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 mtx )
.. ocv:cfunction:: void cvTransform(const CvArr* src, CvArr* dst, const CvMat* transmat, const CvMat* shiftvec=NULL)
.. ocv:pyoldfunction:: 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``.
:param dst: Destination array of the same size and depth as ``src`` . It has as many channels as ``mtx.rows`` . :param dst: Destination array of the same size and depth as ``src`` . It has as many channels as ``mtx.rows`` .
...@@ -3031,6 +3173,9 @@ Transposes a matrix. ...@@ -3031,6 +3173,9 @@ Transposes a matrix.
.. ocv:function:: void transpose(InputArray src, OutputArray dst) .. ocv:function:: void transpose(InputArray src, OutputArray dst)
.. ocv:cfunction:: void cvTranspose(const CvArr* src, CvArr* dst)
.. ocv:pyoldfunction:: Transpose(src, dst)-> None
:param src: Source array. :param src: Source array.
:param dst: Destination array of the same type as ``src`` . :param dst: Destination array of the same type as ``src`` .
......
...@@ -82,6 +82,8 @@ Signals an error and raises an exception. ...@@ -82,6 +82,8 @@ 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* errMsg, const char* filename, int line )
:param exc: Exception to throw. :param exc: Exception to throw.
:param code: Error code. Normally, it is a negative value. The list of pre-defined error codes can be found in ``cxerror.h`` . :param code: Error code. Normally, it is a negative value. The list of pre-defined error codes can be found in ``cxerror.h`` .
......
...@@ -63,6 +63,8 @@ Changes parameters of a window dynamically. ...@@ -63,6 +63,8 @@ Changes parameters of a window dynamically.
.. ocv:function:: void setWindowProperty(const string& name, int prop_id, double prop_value) .. ocv:function:: void setWindowProperty(const string& name, int prop_id, double prop_value)
.. ocv:cfunction:: void cvSetWindowProperty(const char* name, int propId, double propValue)
:param name: Name of the window. :param name: Name of the window.
:param prop_id: Window property to edit. The following operation flags are available: :param prop_id: Window property to edit. The following operation flags are available:
...@@ -95,6 +97,8 @@ Provides parameters of a window. ...@@ -95,6 +97,8 @@ Provides parameters of a window.
.. ocv:function:: void getWindowProperty(const string& name, int prop_id) .. ocv:function:: void getWindowProperty(const string& name, int prop_id)
.. ocv:cfunction:: void cvGetWindowProperty(const char* name, int propId)
:param name: Name of the window. :param name: Name of the window.
:param prop_id: Window property to retrive. The following operation flags are available: :param prop_id: Window property to retrive. The following operation flags are available:
...@@ -117,6 +121,8 @@ Creates the font to draw a text on an image. ...@@ -117,6 +121,8 @@ Creates the font to draw a text on an image.
.. ocv:function:: CvFont fontQt(const string& nameFont, int pointSize = -1, Scalar color = Scalar::all(0), int weight = CV_FONT_NORMAL, int style = CV_STYLE_NORMAL, int spacing = 0) .. ocv:function:: CvFont fontQt(const string& nameFont, int pointSize = -1, Scalar color = Scalar::all(0), int weight = CV_FONT_NORMAL, int style = CV_STYLE_NORMAL, int spacing = 0)
.. ocv:cfunction:: CvFont cvFontQt(const char* nameFont, int pointSize=-1, CvScalar color=cvScalarAll(0), int weight=CV_FONT_NORMAL, int style=CV_STYLE_NORMAL, int spacing=0)
:param nameFont: Name of the font. The name should match the name of a system font (such as *Times*). If the font is not found, a default one is used. :param nameFont: Name of the font. The name should match the name of a system font (such as *Times*). If the font is not found, a default one is used.
:param pointSize: Size of the font. If not specified, equal zero or negative, the point size of the font is set to a system-dependent default value. Generally, this is 12 points. :param pointSize: Size of the font. If not specified, equal zero or negative, the point size of the font is set to a system-dependent default value. Generally, this is 12 points.
...@@ -161,6 +167,8 @@ Creates the font to draw a text on an image. ...@@ -161,6 +167,8 @@ Creates the font to draw a text on an image.
.. ocv:function:: void addText(const Mat& img, const string& text, Point location, CvFont *font) .. ocv:function:: void addText(const Mat& img, const string& text, Point location, CvFont *font)
.. ocv:cfunction:: void cvAddText(const CvArr* img, const char* text, CvPoint location, CvFont *font)
:param img: 8-bit 3-channel image where the text should be drawn. :param img: 8-bit 3-channel image where the text should be drawn.
:param text: Text to write on an image. :param text: Text to write on an image.
...@@ -186,6 +194,8 @@ displayOverlay ...@@ -186,6 +194,8 @@ displayOverlay
Displays a text on a window image as an overlay for a specified duration. Displays a text on a window image as an overlay for a specified duration.
.. ocv:cfunction:: void cvDisplayOverlay(const char* name, const char* text, int delay)
:param name: Name of the window. :param name: Name of the window.
:param text: Overlay text to write on a window image. :param text: Overlay text to write on a window image.
...@@ -201,6 +211,8 @@ Displays a text on the window statusbar during the specified period of time. ...@@ -201,6 +211,8 @@ Displays a text on the window statusbar during the specified period of time.
.. ocv:function:: void displayStatusBar(const string& name, const string& text, int delay) .. ocv:function:: void displayStatusBar(const string& name, const string& text, int delay)
.. ocv:cfunction:: void cvDisplayStatusBar(const char* name, const char* text, int delayms)
:param name: Name of the window. :param name: Name of the window.
:param text: Text to write on the window statusbar. :param text: Text to write on the window statusbar.
...@@ -217,6 +229,8 @@ Creates a callback function called to draw OpenGL on top the the image display b ...@@ -217,6 +229,8 @@ Creates a callback function called to draw OpenGL on top the the image display b
.. ocv:function:: void createOpenGLCallback( const string& window_name, OpenGLCallback callbackOpenGL, void* userdata CV_DEFAULT(NULL), double angle CV_DEFAULT(-1), double zmin CV_DEFAULT(-1), double zmax CV_DEFAULT(-1) .. ocv:function:: void createOpenGLCallback( const string& window_name, OpenGLCallback callbackOpenGL, void* userdata CV_DEFAULT(NULL), double angle CV_DEFAULT(-1), double zmin CV_DEFAULT(-1), double zmax CV_DEFAULT(-1)
.. ocv:cfunction:: void cvCreateOpenGLCallback( const char* windowName, CvOpenGLCallback callbackOpenGL, void* userdata=NULL, double angle=-1, double zmin=-1, double zmax=-1
:param window_name: Name of the window. :param window_name: Name of the window.
:param callbackOpenGL: Pointer to the function to be called every frame. This function should be prototyped as ``void Foo(*void);`` . :param callbackOpenGL: Pointer to the function to be called every frame. This function should be prototyped as ``void Foo(*void);`` .
...@@ -267,6 +281,8 @@ Saves parameters of the specified window. ...@@ -267,6 +281,8 @@ Saves parameters of the specified window.
.. ocv:function:: void saveWindowParameters(const string& name) .. ocv:function:: void saveWindowParameters(const string& name)
.. ocv:cfunction:: void cvSaveWindowParameters(const char* name)
:param name: Name of the window. :param name: Name of the window.
The function ``saveWindowParameters`` saves size, location, flags, trackbars value, zoom and panning location of the window The function ``saveWindowParameters`` saves size, location, flags, trackbars value, zoom and panning location of the window
...@@ -278,6 +294,8 @@ Loads parameters of the specified window. ...@@ -278,6 +294,8 @@ Loads parameters of the specified window.
.. ocv:function:: void loadWindowParameters(const string& name) .. ocv:function:: void loadWindowParameters(const string& name)
.. ocv:cfunction:: void cvLoadWindowParameters(const char* name)
:param name: Name of the window. :param name: Name of the window.
The function ``loadWindowParameters`` loads size, location, flags, trackbars value, zoom and panning location of the window The function ``loadWindowParameters`` loads size, location, flags, trackbars value, zoom and panning location of the window
...@@ -289,6 +307,8 @@ Attaches a button to the control panel. ...@@ -289,6 +307,8 @@ Attaches a button to the control panel.
.. ocv:function:: createButton( const string& button_name CV_DEFAULT(NULL),ButtonCallback on_change CV_DEFAULT(NULL), void* userdata CV_DEFAULT(NULL), int button_type CV_DEFAULT(CV_PUSH_BUTTON), int initial_button_state CV_DEFAULT(0)) .. ocv:function:: createButton( const string& button_name CV_DEFAULT(NULL),ButtonCallback on_change CV_DEFAULT(NULL), void* userdata CV_DEFAULT(NULL), int button_type CV_DEFAULT(CV_PUSH_BUTTON), int initial_button_state CV_DEFAULT(0))
.. ocv:cfunction:: cvCreateButton( const char* buttonName=NULL, CvButtonCallback onChange=NULL, void* userdata=NULL, int buttonType=CV_PUSH_BUTTON, int initialButtonState=0
:param button_name: Name of the button. :param button_name: Name of the button.
:param on_change: Pointer to the function to be called every time the button changes its state. This function should be prototyped as ``void Foo(int state,*void);`` . *state* is the current state of the button. It could be -1 for a push button, 0 or 1 for a check/radio box button. :param on_change: Pointer to the function to be called every time the button changes its state. This function should be prototyped as ``void Foo(int state,*void);`` . *state* is the current state of the button. It could be -1 for a push button, 0 or 1 for a check/radio box button.
......
...@@ -9,6 +9,9 @@ Creates a trackbar and attaches it to the specified window. ...@@ -9,6 +9,9 @@ Creates a trackbar and attaches it to the specified window.
.. ocv:function:: int createTrackbar( const string& trackbarname, const string& winname, int* value, int count, TrackbarCallback onChange=0, void* userdata=0) .. ocv:function:: int createTrackbar( const string& trackbarname, const string& winname, int* value, int count, TrackbarCallback onChange=0, void* userdata=0)
.. ocv:cfunction:: int cvCreateTrackbar( const char* trackbarName, const char* windowName, int* value, int count, CvTrackbarCallback onChange )
.. ocv:pyoldfunction:: CreateTrackbar(trackbarName, windowName, value, count, onChange) -> None
:param trackbarname: Name of the created trackbar. :param trackbarname: Name of the created trackbar.
:param winname: Name of the window that will be used as a parent of the created trackbar. :param winname: Name of the window that will be used as a parent of the created trackbar.
...@@ -43,6 +46,9 @@ Returns the trackbar position. ...@@ -43,6 +46,9 @@ Returns the trackbar position.
.. ocv:function:: int getTrackbarPos( const string& trackbarname, const string& winname ) .. ocv:function:: int getTrackbarPos( const string& trackbarname, const string& winname )
.. ocv:cfunction:: int cvGetTrackbarPos( const char* trackbarName, const char* windowName )
.. ocv:pyoldfunction:: GetTrackbarPos(trackbarName, windowName)-> None
:param trackbarname: Name of the trackbar. :param trackbarname: Name of the trackbar.
:param winname: Name of the window that is the parent of the trackbar. :param winname: Name of the window that is the parent of the trackbar.
...@@ -83,6 +89,9 @@ Creates a window. ...@@ -83,6 +89,9 @@ Creates a window.
.. ocv:function:: void namedWindow( const string& winname, int flags ) .. ocv:function:: void namedWindow( const string& winname, int flags )
.. ocv:cfunction:: int cvNamedWindow( const char* name, int flags )
.. ocv:pyoldfunction:: NamedWindow(name, flags=CV_WINDOW_AUTOSIZE)-> None
:param name: Name of the window in the window caption that may be used as a window identifier. :param name: Name of the window in the window caption that may be used as a window identifier.
:param flags: Flags of the window. Currently the only supported flag is ``CV_WINDOW_AUTOSIZE`` . If this is set, the window size is automatically adjusted to fit the displayed image (see :ref:`imshow` ), and you cannot change the window size manually. :param flags: Flags of the window. Currently the only supported flag is ``CV_WINDOW_AUTOSIZE`` . If this is set, the window size is automatically adjusted to fit the displayed image (see :ref:`imshow` ), and you cannot change the window size manually.
...@@ -122,6 +131,9 @@ Destroys a window. ...@@ -122,6 +131,9 @@ Destroys a window.
.. ocv:function:: void destroyWindow( const string &winname ) .. ocv:function:: void destroyWindow( const string &winname )
.. ocv:cfunction:: void cvDestroyWindow( const char* name )
.. ocv:pyoldfunction:: DestroyWindow(name)-> None
:param winname: Name of the window to be destroyed. :param winname: Name of the window to be destroyed.
The function ``destroyWindow`` destroys the window with the given name. The function ``destroyWindow`` destroys the window with the given name.
...@@ -142,6 +154,9 @@ Sets the trackbar position. ...@@ -142,6 +154,9 @@ Sets the trackbar position.
.. ocv:function:: void setTrackbarPos( const string& trackbarname, const string& winname, int pos ) .. ocv:function:: void setTrackbarPos( const string& trackbarname, const string& winname, int pos )
.. ocv:cfunction:: void cvSetTrackbarPos( const char* trackbarName, const char* windowName, int pos )
.. ocv:pyoldfunction:: SetTrackbarPos(trackbarName, windowName, pos)-> None
:param trackbarname: Name of the trackbar. :param trackbarname: Name of the trackbar.
:param winname: Name of the window that is the parent of trackbar. :param winname: Name of the window that is the parent of trackbar.
...@@ -162,6 +177,9 @@ Waits for a pressed key. ...@@ -162,6 +177,9 @@ Waits for a pressed key.
.. ocv:function:: int waitKey(int delay=0) .. ocv:function:: int waitKey(int delay=0)
.. ocv:cfunction:: int cvWaitKey( int delay=0 )
.. ocv:pyoldfunction:: WaitKey(delay=0)-> int
:param delay: Delay in milliseconds. 0 is the special value that means "forever". :param delay: Delay in milliseconds. 0 is the special value that means "forever".
The function ``waitKey`` waits for a key event infinitely (when The function ``waitKey`` waits for a key event infinitely (when
......
...@@ -11,6 +11,9 @@ Finds edges in an image using the Canny algorithm. ...@@ -11,6 +11,9 @@ Finds edges in an image using the Canny algorithm.
.. ocv:function:: void Canny( InputArray image, OutputArray edges, double threshold1, double threshold2, int apertureSize=3, bool L2gradient=false ) .. ocv:function:: void Canny( InputArray image, OutputArray edges, double threshold1, double threshold2, int apertureSize=3, bool L2gradient=false )
.. ocv:cfunction:: void cvCanny( const CvArr* image, CvArr* edges, double threshold1, double threshold2, int apertureSize=3 )
.. ocv:pyoldfunction:: Canny(image, edges, threshold1, threshold2, apertureSize=3)-> None
:param image: Single-channel 8-bit input image. :param image: Single-channel 8-bit input image.
:param edges: Output edge map. It has the same size and type as ``image`` . :param edges: Output edge map. It has the same size and type as ``image`` .
...@@ -34,6 +37,9 @@ Calculates eigenvalues and eigenvectors of image blocks for corner detection. ...@@ -34,6 +37,9 @@ Calculates eigenvalues and eigenvectors of image blocks for corner detection.
.. ocv:function:: void cornerEigenValsAndVecs( InputArray src, OutputArray dst, int blockSize, int apertureSize, int borderType=BORDER_DEFAULT ) .. ocv:function:: void cornerEigenValsAndVecs( InputArray src, OutputArray dst, int blockSize, int apertureSize, int borderType=BORDER_DEFAULT )
.. ocv:cfunction:: void cvCornerEigenValsAndVecs( const CvArr* image, CvArr* eigenvv, int blockSize, int apertureSize=3 )
.. ocv:pyoldfunction:: CornerEigenValsAndVecs(image, eigenvv, blockSize, apertureSize=3)-> None
:param src: Input single-channel 8-bit or floating-point image. :param src: Input single-channel 8-bit or floating-point image.
:param dst: Image to store the results. It has the same size as ``src`` and the type ``CV_32FC(6)`` . :param dst: Image to store the results. It has the same size as ``src`` and the type ``CV_32FC(6)`` .
...@@ -80,6 +86,9 @@ Harris edge detector. ...@@ -80,6 +86,9 @@ Harris edge detector.
.. ocv:function:: void cornerHarris( InputArray src, OutputArray dst, int blockSize, int apertureSize, double k, int borderType=BORDER_DEFAULT ) .. ocv:function:: void cornerHarris( InputArray src, OutputArray dst, int blockSize, int apertureSize, double k, int borderType=BORDER_DEFAULT )
.. ocv:cfunction:: void cvCornerHarris( const CvArr* image, CvArr* harrisDst, int blockSize, int apertureSize=3, double k=0.04 )
.. ocv:pyoldfunction:: CornerHarris(image, harrisDst, blockSize, apertureSize=3, k=0.04)-> None
:param src: Input single-channel 8-bit or floating-point image. :param src: Input single-channel 8-bit or floating-point image.
:param dst: Image to store the Harris detector responses. It has the type ``CV_32FC1`` and the same size as ``src`` . :param dst: Image to store the Harris detector responses. It has the type ``CV_32FC1`` and the same size as ``src`` .
...@@ -114,6 +123,9 @@ Calculates the minimal eigenvalue of gradient matrices for corner detection. ...@@ -114,6 +123,9 @@ Calculates the minimal eigenvalue of gradient matrices for corner detection.
.. ocv:function:: void cornerMinEigenVal( InputArray src, OutputArray dst, int blockSize, int apertureSize=3, int borderType=BORDER_DEFAULT ) .. ocv:function:: void cornerMinEigenVal( InputArray src, OutputArray dst, int blockSize, int apertureSize=3, int borderType=BORDER_DEFAULT )
.. ocv:cfunction:: void cvCornerMinEigenVal( const CvArr* image, CvArr* eigenval, int blockSize, int apertureSize=3 )
.. ocv:pyoldfunction:: CornerMinEigenVal(image, eigenval, blockSize, apertureSize=3)-> None
:param src: Input single-channel 8-bit or floating-point image. :param src: Input single-channel 8-bit or floating-point image.
:param dst: Image to store the minimal eigenvalues. It has the type ``CV_32FC1`` and the same size as ``src`` . :param dst: Image to store the minimal eigenvalues. It has the type ``CV_32FC1`` and the same size as ``src`` .
...@@ -193,6 +205,9 @@ Determines strong corners on an image. ...@@ -193,6 +205,9 @@ Determines strong corners on an image.
.. ocv:function:: void goodFeaturesToTrack( InputArray image, OutputArray corners, int maxCorners, double qualityLevel, double minDistance, InputArray mask=noArray(), int blockSize=3, bool useHarrisDetector=false, double k=0.04 ) .. ocv:function:: void goodFeaturesToTrack( InputArray image, OutputArray corners, int maxCorners, double qualityLevel, double minDistance, InputArray mask=noArray(), int blockSize=3, bool useHarrisDetector=false, double k=0.04 )
.. ocv:cfunction:: void cvGoodFeaturesToTrack( const CvArr* image CvArr* eigImage, CvArr* tempImage CvPoint2D32f* corners int* cornerCount double qualityLevel double minDistance const CvArr* mask=NULL int blockSize=3 int useHarris=0 double k=0.04 )
.. ocv:pyoldfunction:: GoodFeaturesToTrack(image, eigImage, tempImage, cornerCount, qualityLevel, minDistance, mask=None, blockSize=3, useHarris=0, k=0.04)-> corners
:param image: Input 8-bit or floating-point 32-bit, single-channel image. :param image: Input 8-bit or floating-point 32-bit, single-channel image.
:param corners: Output vector of detected corners. :param corners: Output vector of detected corners.
...@@ -428,6 +443,9 @@ Calculates a feature map for corner detection. ...@@ -428,6 +443,9 @@ Calculates a feature map for corner detection.
.. ocv:function:: void preCornerDetect( InputArray src, OutputArray dst, int apertureSize, int borderType=BORDER_DEFAULT ) .. ocv:function:: void preCornerDetect( InputArray src, OutputArray dst, int apertureSize, int borderType=BORDER_DEFAULT )
.. ocv:cfunction:: void cvPreCornerDetect( const CvArr* image, CvArr* corners, int apertureSize=3 )
.. ocv:pyoldfunction:: PreCornerDetect(image, corners, apertureSize=3)-> None
:param src: Source single-channel 8-bit of floating-point image. :param src: Source single-channel 8-bit of floating-point image.
:param dst: Output image that has the type ``CV_32F`` and the same size as ``src`` . :param dst: Output image that has the type ``CV_32F`` and the same size as ``src`` .
......
...@@ -524,6 +524,9 @@ Forms a border around an image. ...@@ -524,6 +524,9 @@ Forms a border around an image.
.. ocv:function:: void copyMakeBorder( InputArray src, OutputArray dst, int top, int bottom, int left, int right, int borderType, const Scalar& value=Scalar() ) .. ocv:function:: void copyMakeBorder( InputArray src, OutputArray dst, int top, int bottom, int left, int right, int borderType, const Scalar& value=Scalar() )
.. ocv:cfunction:: void cvCopyMakeBorder( const CvArr* src, CvArr* dst, CvPoint offset, int bordertype, CvScalar value=cvScalarAll(0) )
.. ocv:pyoldfunction:: CopyMakeBorder(src, dst, offset, bordertype, value=(0, 0, 0, 0))-> None
:param src: Source image. :param src: Source image.
:param dst: Destination image of the same type as ``src`` and the size ``Size(src.cols+left+right, src.rows+top+bottom)`` . :param dst: Destination image of the same type as ``src`` and the size ``Size(src.cols+left+right, src.rows+top+bottom)`` .
...@@ -787,6 +790,9 @@ Dilates an image by using a specific structuring element. ...@@ -787,6 +790,9 @@ Dilates an image by using a specific structuring element.
.. ocv:function:: void dilate( InputArray src, OutputArray dst, InputArray element, Point anchor=Point(-1,-1), int iterations=1, int borderType=BORDER_CONSTANT, const Scalar& borderValue=morphologyDefaultBorderValue() ) .. ocv:function:: void dilate( InputArray src, OutputArray dst, InputArray element, Point anchor=Point(-1,-1), int iterations=1, int borderType=BORDER_CONSTANT, const Scalar& borderValue=morphologyDefaultBorderValue() )
.. ocv:cfunction:: void cvDilate( const CvArr* src, CvArr* dst, IplConvKernel* element=NULL, int iterations=1 )
.. ocv:pyoldfunction:: Dilate(src, dst, element=None, iterations=1)-> None
:param src: Source image. :param src: Source image.
:param dst: Destination image of the same size and type as ``src`` . :param dst: Destination image of the same size and type as ``src`` .
...@@ -821,6 +827,9 @@ Erodes an image by using a specific structuring element. ...@@ -821,6 +827,9 @@ Erodes an image by using a specific structuring element.
.. ocv:function:: void erode( InputArray src, OutputArray dst, InputArray element, Point anchor=Point(-1,-1), int iterations=1, int borderType=BORDER_CONSTANT, const Scalar& borderValue=morphologyDefaultBorderValue() ) .. ocv:function:: void erode( InputArray src, OutputArray dst, InputArray element, Point anchor=Point(-1,-1), int iterations=1, int borderType=BORDER_CONSTANT, const Scalar& borderValue=morphologyDefaultBorderValue() )
.. ocv:cfunction:: void cvErode( const CvArr* src, CvArr* dst, IplConvKernel* element=NULL, int iterations=1)
.. ocv:pyoldfunction:: Erode(src, dst, element=None, iterations=1)-> None
:param src: Source image. :param src: Source image.
:param dst: Destination image of the same size and type as ``src`` . :param dst: Destination image of the same size and type as ``src`` .
...@@ -856,6 +865,9 @@ Convolves an image with the kernel. ...@@ -856,6 +865,9 @@ Convolves an image with the kernel.
.. ocv:function:: void filter2D( InputArray src, OutputArray dst, int ddepth, InputArray kernel, Point anchor=Point(-1,-1), double delta=0, int borderType=BORDER_DEFAULT ) .. ocv:function:: void filter2D( InputArray src, OutputArray dst, int ddepth, InputArray kernel, Point anchor=Point(-1,-1), double delta=0, int borderType=BORDER_DEFAULT )
.. ocv:cfunction:: void cvFilter2D( const CvArr* src, CvArr* dst, const CvMat* kernel, CvPoint anchor=cvPoint(-1, -1))
.. ocv:pyoldfunction:: Filter2D(src, dst, kernel, anchor=(-1, -1))-> None
:param src: Source image. :param src: Source image.
:param dst: Destination image of the same size and the same number of channels as ``src`` . :param dst: Destination image of the same size and the same number of channels as ``src`` .
...@@ -1070,6 +1082,9 @@ Performs advanced morphological transformations. ...@@ -1070,6 +1082,9 @@ Performs advanced morphological transformations.
.. ocv:function:: void morphologyEx( InputArray src, OutputArray dst, int op, InputArray element, Point anchor=Point(-1,-1), int iterations=1, int borderType=BORDER_CONSTANT, const Scalar& borderValue=morphologyDefaultBorderValue() ) .. ocv:function:: void morphologyEx( InputArray src, OutputArray dst, int op, InputArray element, Point anchor=Point(-1,-1), int iterations=1, int borderType=BORDER_CONSTANT, const Scalar& borderValue=morphologyDefaultBorderValue() )
.. ocv:cfunction:: void cvMorphologyEx( const CvArr* src, CvArr* dst, CvArr* temp, IplConvKernel* element, int operation, int iterations=1 )
.. ocv:pyoldfunction:: MorphologyEx(src, dst, temp, element, operation, iterations=1)-> None
:param src: Source image. :param src: Source image.
:param dst: Destination image of the same size and type as ``src`` . :param dst: Destination image of the same size and type as ``src`` .
...@@ -1180,6 +1195,9 @@ Smoothes an image and downsamples it. ...@@ -1180,6 +1195,9 @@ Smoothes an image and downsamples it.
.. ocv:function:: void pyrDown( InputArray src, OutputArray dst, const Size& dstsize=Size()) .. ocv:function:: void pyrDown( InputArray src, OutputArray dst, const Size& dstsize=Size())
.. ocv:cfunction:: void cvPyrDown( const CvArr* src, CvArr* dst, int filter=CV_GAUSSIAN_5x5 )
.. ocv:pyoldfunction:: PyrDown(src, dst, filter=CV_GAUSSIAN_5X5)-> None
:param src: Source image. :param src: Source image.
:param dst: Destination image. It has the specified size and the same type as ``src`` . :param dst: Destination image. It has the specified size and the same type as ``src`` .
...@@ -1263,6 +1281,9 @@ Calculates the first, second, third, or mixed image derivatives using an extende ...@@ -1263,6 +1281,9 @@ Calculates the first, second, third, or mixed image derivatives using an extende
.. ocv:function:: void Sobel( InputArray src, OutputArray dst, int ddepth, int xorder, int yorder, int ksize=3, double scale=1, double delta=0, int borderType=BORDER_DEFAULT ) .. ocv:function:: void Sobel( InputArray src, OutputArray dst, int ddepth, int xorder, int yorder, int ksize=3, double scale=1, double delta=0, int borderType=BORDER_DEFAULT )
.. ocv:cfunction:: void cvSobel( const CvArr* src, CvArr* dst, int xorder, int yorder, int apertureSize=3 )
.. ocv:pyoldfunction:: Sobel(src, dst, xorder, yorder, apertureSize=3)-> None
:param src: Source image. :param src: Source image.
:param dst: Destination image of the same size and the same number of channels as ``src`` . :param dst: Destination image of the same size and the same number of channels as ``src`` .
......
...@@ -77,6 +77,9 @@ Calculates an affine transform from three pairs of the corresponding points. ...@@ -77,6 +77,9 @@ Calculates an affine transform from three pairs of the corresponding points.
.. ocv:function:: Mat getAffineTransform( const Point2f src[], const Point2f dst[] ) .. ocv:function:: Mat getAffineTransform( const Point2f src[], const Point2f dst[] )
.. ocv:cfunction:: CvMat* cvGetAffineTransform( const CvPoint2D32f* src, const CvPoint2D32f* dst, CvMat* mapMatrix )
.. ocv:pyoldfunction:: GetAffineTransform(src, dst, mapMatrix)-> None
:param src: Coordinates of triangle vertices in the source image. :param src: Coordinates of triangle vertices in the source image.
:param dst: Coordinates of the corresponding triangle vertices in the destination image. :param dst: Coordinates of the corresponding triangle vertices in the destination image.
...@@ -107,6 +110,9 @@ Calculates a perspective transform from four pairs of the corresponding points. ...@@ -107,6 +110,9 @@ Calculates a perspective transform from four pairs of the corresponding points.
.. ocv:function:: Mat getPerspectiveTransform( const Point2f src[], const Point2f dst[] ) .. ocv:function:: Mat getPerspectiveTransform( const Point2f src[], const Point2f dst[] )
.. ocv:cfunction:: CvMat* cvGetPerspectiveTransform( const CvPoint2D32f* src, const CvPoint2D32f* dst, CvMat* mapMatrix )
.. ocv:pyoldfunction:: GetPerspectiveTransform(src, dst, mapMatrix)-> None
:param src: Coordinates of quadrangle vertices in the source image. :param src: Coordinates of quadrangle vertices in the source image.
:param dst: Coordinates of the corresponding quadrangle vertices in the destination image. :param dst: Coordinates of the corresponding quadrangle vertices in the destination image.
...@@ -137,6 +143,9 @@ Retrieves a pixel rectangle from an image with sub-pixel accuracy. ...@@ -137,6 +143,9 @@ Retrieves a pixel rectangle from an image with sub-pixel accuracy.
.. ocv:function:: void getRectSubPix( InputArray image, Size patchSize, Point2f center, OutputArray dst, int patchType=-1 ) .. ocv:function:: void getRectSubPix( InputArray image, Size patchSize, Point2f center, OutputArray dst, int patchType=-1 )
.. ocv:cfunction:: void cvGetRectSubPix( const CvArr* src, CvArr* dst, CvPoint2D32f center )
.. ocv:pyoldfunction:: GetRectSubPix(src, dst, center)-> None
:param src: Source image. :param src: Source image.
:param patchSize: Size of the extracted patch. :param patchSize: Size of the extracted patch.
...@@ -172,6 +181,8 @@ Calculates an affine matrix of 2D rotation. ...@@ -172,6 +181,8 @@ Calculates an affine matrix of 2D rotation.
.. ocv:function:: Mat getRotationMatrix2D( Point2f center, double angle, double scale ) .. ocv:function:: Mat getRotationMatrix2D( Point2f center, double angle, double scale )
.. ocv:pyoldfunction:: GetRotationMatrix2D(center, angle, scale, mapMatrix)-> None
:param center: Center of the rotation in the source image. :param center: Center of the rotation in the source image.
:param angle: Rotation angle in degrees. Positive values mean counter-clockwise rotation (the coordinate origin is assumed to be the top-left corner). :param angle: Rotation angle in degrees. Positive values mean counter-clockwise rotation (the coordinate origin is assumed to be the top-left corner).
...@@ -231,6 +242,9 @@ Applies a generic geometrical transformation to an image. ...@@ -231,6 +242,9 @@ Applies a generic geometrical transformation to an image.
.. ocv:function:: void remap( InputArray src, OutputArray dst, InputArray map1, InputArray map2, int interpolation, int borderMode=BORDER_CONSTANT, const Scalar& borderValue=Scalar()) .. ocv:function:: void remap( InputArray src, OutputArray dst, InputArray map1, InputArray map2, int interpolation, int borderMode=BORDER_CONSTANT, const Scalar& borderValue=Scalar())
.. ocv:cfunction:: void cvRemap( const CvArr* src, CvArr* dst, const CvArr* mapx, const CvArr* mapy, int flags=CV_INTER_LINEAR+CV_WARP_FILL_OUTLIERS, CvScalar fillval=cvScalarAll(0) )
.. ocv:pyoldfunction:: Remap(src, dst, mapx, mapy, flags=CV_INNER_LINEAR+CV_WARP_FILL_OUTLIERS, fillval=(0, 0, 0, 0))-> None
:param src: Source image. :param src: Source image.
:param dst: Destination image. It has the same size as ``map1`` and the same type as ``src`` . :param dst: Destination image. It has the same size as ``map1`` and the same type as ``src`` .
...@@ -273,6 +287,9 @@ Resizes an image. ...@@ -273,6 +287,9 @@ Resizes an image.
.. ocv:function:: void resize( InputArray src, OutputArray dst, Size dsize, double fx=0, double fy=0, int interpolation=INTER_LINEAR ) .. ocv:function:: void resize( InputArray src, OutputArray dst, Size dsize, double fx=0, double fy=0, int interpolation=INTER_LINEAR )
.. ocv:cfunction:: void cvResize( const CvArr* src, CvArr* dst, int interpolation=CV_INTER_LINEAR )
.. ocv:pyoldfunction:: Resize(src, dst, interpolation=CV_INTER_LINEAR)-> None
:param src: Source image. :param src: Source image.
:param dst: Destination image. It has the size ``dsize`` (when it is non-zero) or the size computed from ``src.size()`` , ``fx`` , and ``fy`` . The type of ``dst`` is the same as of ``src`` . :param dst: Destination image. It has the size ``dsize`` (when it is non-zero) or the size computed from ``src.size()`` , ``fx`` , and ``fy`` . The type of ``dst`` is the same as of ``src`` .
...@@ -338,6 +355,9 @@ Applies an affine transformation to an image. ...@@ -338,6 +355,9 @@ Applies an affine transformation to an image.
.. ocv:function:: void warpAffine( InputArray src, OutputArray dst, InputArray M, Size dsize, int flags=INTER_LINEAR, int borderMode=BORDER_CONSTANT, const Scalar& borderValue=Scalar()) .. ocv:function:: void warpAffine( InputArray src, OutputArray dst, InputArray M, Size dsize, int flags=INTER_LINEAR, int borderMode=BORDER_CONSTANT, const Scalar& borderValue=Scalar())
.. ocv:cfunction:: void cvWarpAffine( const CvArr* src, CvArr* dst, const CvMat* mapMatrix, int flags=CV_INTER_LINEAR+CV_WARP_FILL_OUTLIERS, CvScalar fillval=cvScalarAll(0) )
.. ocv:pyoldfunction:: WarpAffine(src, dst, mapMatrix, flags=CV_INTER_LINEAR+CV_WARP_FILL_OUTLIERS, fillval=(0, 0, 0, 0))-> None
:param src: Source image. :param src: Source image.
:param dst: Destination image that has the size ``dsize`` and the same type as ``src`` . :param dst: Destination image that has the size ``dsize`` and the same type as ``src`` .
...@@ -377,6 +397,9 @@ Applies a perspective transformation to an image. ...@@ -377,6 +397,9 @@ Applies a perspective transformation to an image.
.. ocv:function:: void warpPerspective( InputArray src, OutputArray dst, InputArray M, Size dsize, int flags=INTER_LINEAR, int borderMode=BORDER_CONSTANT, const Scalar& borderValue=Scalar()) .. ocv:function:: void warpPerspective( InputArray src, OutputArray dst, InputArray M, Size dsize, int flags=INTER_LINEAR, int borderMode=BORDER_CONSTANT, const Scalar& borderValue=Scalar())
.. ocv:cfunction:: void cvWarpPerspective( const CvArr* src, CvArr* dst, const CvMat* mapMatrix, int flags=CV_INTER_LINEAR+CV_WARP_FILL_OUTLIERS, CvScalar fillval=cvScalarAll(0) )
.. ocv:pyoldfunction:: WarpPerspective(src, dst, mapMatrix, flags=CV_INNER_LINEAR+CV_WARP_FILL_OUTLIERS, fillval=(0, 0, 0, 0))-> None
:param src: Source image. :param src: Source image.
:param dst: Destination image that has the size ``dsize`` and the same type as ``src`` . :param dst: Destination image that has the size ``dsize`` and the same type as ``src`` .
...@@ -418,6 +441,9 @@ Computes the undistortion and rectification transformation map. ...@@ -418,6 +441,9 @@ Computes the undistortion and rectification transformation map.
.. ocv:function:: void initUndistortRectifyMap( InputArray cameraMatrix, InputArray distCoeffs, InputArray R, InputArray newCameraMatrix, Size size, int m1type, OutputArray map1, OutputArray map2 ) .. ocv:function:: void initUndistortRectifyMap( InputArray cameraMatrix, InputArray distCoeffs, InputArray R, InputArray newCameraMatrix, Size size, int m1type, OutputArray map1, OutputArray map2 )
.. ocv:cfunction:: void cvInitUndistortRectifyMap( const CvMat* cameraMatrix, const CvMat* distCoeffs, const CvMat* R, const CvMat* newCameraMatrix, CvArr* map1, CvArr* map2 )
.. ocv:pyoldfunction:: InitUndistortRectifyMap(cameraMatrix, distCoeffs, R, newCameraMatrix, map1, map2)-> None
:param cameraMatrix: Input camera matrix :math:`A=\vecthreethree{f_x}{0}{c_x}{0}{f_y}{c_y}{0}{0}{1}` . :param cameraMatrix: Input camera matrix :math:`A=\vecthreethree{f_x}{0}{c_x}{0}{f_y}{c_y}{0}{0}{1}` .
:param distCoeffs: Input vector of distortion coefficients :math:`(k_1, k_2, p_1, p_2[, k_3[, k_4, k_5, k_6]])` of 4, 5, or 8 elements. If the vector is NULL/empty, the zero distortion coefficients are assumed. :param distCoeffs: Input vector of distortion coefficients :math:`(k_1, k_2, p_1, p_2[, k_3[, k_4, k_5, k_6]])` of 4, 5, or 8 elements. If the vector is NULL/empty, the zero distortion coefficients are assumed.
...@@ -540,6 +566,9 @@ Computes the ideal point coordinates from the observed point coordinates. ...@@ -540,6 +566,9 @@ Computes the ideal point coordinates from the observed point coordinates.
.. ocv:function:: void undistortPoints( InputArray src, OutputArray dst, InputArray cameraMatrix, InputArray distCoeffs, InputArray R=noArray(), InputArray P=noArray()) .. ocv:function:: void undistortPoints( InputArray src, OutputArray dst, InputArray cameraMatrix, InputArray distCoeffs, InputArray R=noArray(), InputArray P=noArray())
.. ocv:cfunction:: void cvUndistortPoints( const CvMat* src, CvMat* dst, const CvMat* cameraMatrix, const CvMat* distCoeffs, const CvMat* R=NULL, const CvMat* P=NULL)
.. ocv:pyoldfunction:: UndistortPoints(src, dst, cameraMatrix, distCoeffs, R=None, P=None)-> None
:param src: Observed point coordinates, 1xN or Nx1 2-channel (CV_32FC2 or CV_64FC2). :param src: Observed point coordinates, 1xN or Nx1 2-channel (CV_32FC2 or CV_64FC2).
:param dst: Output ideal point coordinates after undistortion and reverse perspective transformation. :param dst: Output ideal point coordinates after undistortion and reverse perspective transformation.
......
...@@ -13,6 +13,9 @@ Calculates a histogram of a set of arrays. ...@@ -13,6 +13,9 @@ Calculates a histogram of a set of arrays.
.. ocv:function:: void calcHist( const Mat* arrays, int narrays, const int* channels, InputArray mask, SparseMat& hist, int dims, const int* histSize, const float** ranges, bool uniform=true, bool accumulate=false ) .. ocv:function:: void calcHist( const Mat* arrays, int narrays, const int* channels, InputArray mask, SparseMat& hist, int dims, const int* histSize, const float** ranges, bool uniform=true, bool accumulate=false )
.. ocv:cfunction:: void cvCalcHist( IplImage** image, CvHistogram* hist, int accumulate=0, const CvArr* mask=NULL )
.. ocv:pyoldfunction:: CalcHist(image, hist, accumulate=0, mask=None)-> None
:param arrays: Source arrays. They all should have the same depth, ``CV_8U`` or ``CV_32F`` , and the same size. Each of them can have an arbitrary number of channels. :param arrays: Source arrays. They all should have the same depth, ``CV_8U`` or ``CV_32F`` , and the same size. Each of them can have an arbitrary number of channels.
:param narrays: Number of source arrays. :param narrays: Number of source arrays.
...@@ -105,6 +108,9 @@ Calculates the back projection of a histogram. ...@@ -105,6 +108,9 @@ Calculates the back projection of a histogram.
.. ocv:function:: void calcBackProject( const Mat* arrays, int narrays, const int* channels, const SparseMat& hist, OutputArray backProject, const float** ranges, double scale=1, bool uniform=true ) .. ocv:function:: void calcBackProject( const Mat* arrays, int narrays, const int* channels, const SparseMat& hist, OutputArray backProject, const float** ranges, double scale=1, bool uniform=true )
.. ocv:cfunction:: void cvCalcBackProject( IplImage** image, CvArr* backProject, const CvHistogram* hist )
.. ocv:pyoldfunction:: CalcBackProject(image, backProject, hist)-> None
:param arrays: Source arrays. They all should have the same depth, ``CV_8U`` or ``CV_32F`` , and the same size. Each of them can have an arbitrary number of channels. :param arrays: Source arrays. They all should have the same depth, ``CV_8U`` or ``CV_32F`` , and the same size. Each of them can have an arbitrary number of channels.
:param narrays: Number of source arrays. :param narrays: Number of source arrays.
...@@ -148,6 +154,9 @@ Compares two histograms. ...@@ -148,6 +154,9 @@ Compares two histograms.
.. ocv:function:: double compareHist( const SparseMat& H1, const SparseMat& H2, int method ) .. ocv:function:: double compareHist( const SparseMat& H1, const SparseMat& H2, int method )
.. ocv:cfunction:: double cvCompareHist( const CvHistogram* hist1, const CvHistogram* hist2, int method )
.. ocv:pyoldfunction:: CompareHist(hist1, hist2, method)->float
:param H1: The first compared histogram. :param H1: The first compared histogram.
:param H2: The second compared histogram of the same size as ``H1`` . :param H2: The second compared histogram of the same size as ``H1`` .
......
...@@ -10,6 +10,9 @@ Applies an adaptive threshold to an array. ...@@ -10,6 +10,9 @@ Applies an adaptive threshold to an array.
.. ocv:function:: void adaptiveThreshold( InputArray src, OutputArray dst, double maxValue, int adaptiveMethod, int thresholdType, int blockSize, double C ) .. ocv:function:: void adaptiveThreshold( InputArray src, OutputArray dst, double maxValue, int adaptiveMethod, int thresholdType, int blockSize, double C )
.. ocv:cfunction:: void cvAdaptiveThreshold( const CvArr* src, CvArr* dst, double maxValue, int adaptiveMethod=CV_ADAPTIVE_THRESH_MEAN_C, int thresholdType=CV_THRESH_BINARY, int blockSize=3, double param1=5 )
.. ocv:pyoldfunction:: AdaptiveThreshold(src, dst, maxValue, adaptiveMethod=CV_ADAPTIVE_THRESH_MEAN_C, thresholdType=CV_THRESH_BINARY, blockSize=3, param1=5)-> None
:param src: Source 8-bit single-channel image. :param src: Source 8-bit single-channel image.
:param dst: Destination image of the same size and the same type as ``src`` . :param dst: Destination image of the same size and the same type as ``src`` .
...@@ -68,6 +71,9 @@ Converts an image from one color space to another. ...@@ -68,6 +71,9 @@ Converts an image from one color space to another.
.. ocv:function:: void cvtColor( InputArray src, OutputArray dst, int code, int dstCn=0 ) .. ocv:function:: void cvtColor( InputArray src, OutputArray dst, int code, int dstCn=0 )
.. ocv:cfunction:: void cvCvtColor( const CvArr* src, CvArr* dst, int code )
.. ocv:pyoldfunction:: CvtColor(src, dst, code)-> None
:param src: Source image: 8-bit unsigned, 16-bit unsigned ( ``CV_16UC...`` ), or single-precision floating-point. :param src: Source image: 8-bit unsigned, 16-bit unsigned ( ``CV_16UC...`` ), or single-precision floating-point.
:param dst: Destination image of the same size and depth as ``src`` . :param dst: Destination image of the same size and depth as ``src`` .
...@@ -470,6 +476,9 @@ Fills a connected component with the given color. ...@@ -470,6 +476,9 @@ Fills a connected component with the given color.
.. ocv:function:: int floodFill( InputOutputArray image, InputOutputArray mask, Point seed, Scalar newVal, Rect* rect=0, Scalar loDiff=Scalar(), Scalar upDiff=Scalar(), int flags=4 ) .. ocv:function:: int floodFill( InputOutputArray image, InputOutputArray mask, Point seed, Scalar newVal, Rect* rect=0, Scalar loDiff=Scalar(), Scalar upDiff=Scalar(), int flags=4 )
.. ocv:cfunction:: void cvFloodFill( CvArr* image, CvPoint seedPoint, CvScalar newVal, CvScalar loDiff=cvScalarAll(0), CvScalar upDiff=cvScalarAll(0), CvConnectedComp* comp=NULL, int flags=4, CvArr* mask=NULL )
.. ocv:pyoldfunction:: FloodFill(image, seedPoint, newVal, loDiff=(0, 0, 0, 0), upDiff=(0, 0, 0, 0), flags=4, mask=None)-> comp
:param image: Input/output 1- or 3-channel, 8-bit, or floating-point image. It is modified by the function unless the ``FLOODFILL_MASK_ONLY`` flag is set in the second variant of the function. See the details below. :param image: Input/output 1- or 3-channel, 8-bit, or floating-point image. It is modified by the function unless the ``FLOODFILL_MASK_ONLY`` flag is set in the second variant of the function. See the details below.
:param mask: (For the second function only) Operation mask that should be a single-channel 8-bit image, 2 pixels wider and 2 pixels taller. The function uses and updates the mask, so you take responsibility of initializing the ``mask`` content. Flood-filling cannot go across non-zero pixels in the mask. For example, an edge detector output can be used as a mask to stop filling at edges. It is possible to use the same mask in multiple calls to the function to make sure the filled area does not overlap. :param mask: (For the second function only) Operation mask that should be a single-channel 8-bit image, 2 pixels wider and 2 pixels taller. The function uses and updates the mask, so you take responsibility of initializing the ``mask`` content. Flood-filling cannot go across non-zero pixels in the mask. For example, an edge detector output can be used as a mask to stop filling at edges. It is possible to use the same mask in multiple calls to the function to make sure the filled area does not overlap.
...@@ -570,6 +579,9 @@ Restores the selected region in an image using the region neighborhood. ...@@ -570,6 +579,9 @@ Restores the selected region in an image using the region neighborhood.
.. ocv:function:: void inpaint( InputArray src, InputArray inpaintMask, OutputArray dst, double inpaintRadius, int flags ) .. ocv:function:: void inpaint( InputArray src, InputArray inpaintMask, OutputArray dst, double inpaintRadius, int flags )
.. ocv:cfunction:: void cvInpaint( const CvArr* src, const CvArr* mask, CvArr* dst, double inpaintRadius, int flags)
.. ocv:pyoldfunction:: Inpaint(src, mask, dst, inpaintRadius, flags) -> None
:param src: Input 8-bit 1-channel or 3-channel image. :param src: Input 8-bit 1-channel or 3-channel image.
:param inpaintMask: Inpainting mask, 8-bit 1-channel image. Non-zero pixels indicate the area that needs to be inpainted. :param inpaintMask: Inpainting mask, 8-bit 1-channel image. Non-zero pixels indicate the area that needs to be inpainted.
...@@ -600,6 +612,9 @@ Calculates the integral of an image. ...@@ -600,6 +612,9 @@ Calculates the integral of an image.
.. ocv:function:: void integral( InputArray image, OutputArray sum, OutputArray sqsum, OutputArray tilted, int sdepth=-1 ) .. ocv:function:: void integral( InputArray image, OutputArray sum, OutputArray sqsum, OutputArray tilted, int sdepth=-1 )
.. ocv:cfunction:: void cvIntegral( const CvArr* image, CvArr* sum, CvArr* sqsum=NULL, CvArr* tiltedSum=NULL )
.. ocv:pyoldfunction:: Integral(image, sum, sqsum=None, tiltedSum=None)-> None
:param image: Source image as :math:`W \times H` , 8-bit or floating-point (32f or 64f). :param image: Source image as :math:`W \times H` , 8-bit or floating-point (32f or 64f).
:param sum: Integral image as :math:`(W+1)\times (H+1)` , 32-bit integer or floating-point (32f or 64f). :param sum: Integral image as :math:`(W+1)\times (H+1)` , 32-bit integer or floating-point (32f or 64f).
...@@ -646,6 +661,9 @@ Applies a fixed-level threshold to each array element. ...@@ -646,6 +661,9 @@ Applies a fixed-level threshold to each array element.
.. ocv:function:: double threshold( InputArray src, OutputArray dst, double thresh, double maxVal, int thresholdType ) .. ocv:function:: double threshold( InputArray src, OutputArray dst, double thresh, double maxVal, int thresholdType )
.. ocv:cfunction:: double cvThreshold( const CvArr* src, CvArr* dst, double threshold, double maxValue, int thresholdType )
.. ocv:pyoldfunction:: Threshold(src, dst, threshold, maxValue, thresholdType)-> None
:param src: Source array (single-channel, 8-bit of 32-bit floating point) :param src: Source array (single-channel, 8-bit of 32-bit floating point)
:param dst: Destination array of the same size and type as ``src`` . :param dst: Destination array of the same size and type as ``src`` .
......
...@@ -9,6 +9,9 @@ Compares a template against overlapped image regions. ...@@ -9,6 +9,9 @@ Compares a template against overlapped image regions.
.. ocv:function:: void matchTemplate( InputArray image, InputArray temp, OutputArray result, int method ) .. ocv:function:: void matchTemplate( InputArray image, InputArray temp, OutputArray result, int method )
.. ocv:cfunction:: void cvMatchTemplate( const CvArr* image, const CvArr* templ, CvArr* result, int method )
.. ocv:pyoldfunction:: MatchTemplate(image, templ, result, method)-> None
:param image: Image where the search is running. It must be 8-bit or 32-bit floating-point. :param image: Image where the search is running. It must be 8-bit or 32-bit floating-point.
:param templ: Searched template. It must be not greater than the source image and have the same data type. :param templ: Searched template. It must be not greater than the source image and have the same data type.
......
...@@ -9,6 +9,9 @@ Calculates all of the moments up to the third order of a polygon or rasterized s ...@@ -9,6 +9,9 @@ Calculates all of the moments up to the third order of a polygon or rasterized s
.. ocv:function:: Moments moments( InputArray array, bool binaryImage=false ) .. ocv:function:: Moments moments( InputArray array, bool binaryImage=false )
.. ocv:cfunction:: void cvMoments( const CvArr* arr, CvMoments* moments, int binary=0 )
.. ocv:pyoldfunction:: Moments(arr, binary=0) -> moments
:param array: A raster image (single-channel, 8-bit or floating-point 2D array) or an array ( :math:`1 \times N` or :math:`N \times 1` ) of 2D points (``Point`` or ``Point2f`` ). :param array: A raster image (single-channel, 8-bit or floating-point 2D array) or an array ( :math:`1 \times N` or :math:`N \times 1` ) of 2D points (``Point`` or ``Point2f`` ).
:param binaryImage: If it is true, all non-zero image pixels are treated as 1's. The parameter is used for images only. :param binaryImage: If it is true, all non-zero image pixels are treated as 1's. The parameter is used for images only.
...@@ -112,6 +115,9 @@ Finds contours in a binary image. ...@@ -112,6 +115,9 @@ Finds contours in a binary image.
.. ocv:function:: void findContours( InputOutputArray image, OutputArrayOfArrays contours, int mode, int method, Point offset=Point()) .. ocv:function:: void findContours( InputOutputArray image, OutputArrayOfArrays contours, int mode, int method, Point offset=Point())
.. ocv:cfunction:: int cvFindContours( CvArr* image, CvMemStorage* storage, CvSeq** firstContour, int headerSize=sizeof(CvContour), int mode=CV_RETR_LIST, int method=CV_CHAIN_APPROX_SIMPLE, CvPoint offset=cvPoint(0, 0) )
.. ocv:pyoldfunction:: FindContours(image, storage, mode=CV_RETR_LIST, method=CV_CHAIN_APPROX_SIMPLE, offset=(0, 0)) -> cvseq
:param image: Source, an 8-bit single-channel image. Non-zero pixels are treated as 1's. Zero pixels remain 0's, so the image is treated as ``binary`` . You can use :ocv:func:`compare` , :ocv:func:`inRange` , :ocv:func:`threshold` , :ocv:func:`adaptiveThreshold` , :ocv:func:`Canny` , and others to create a binary image out of a grayscale or color one. The function modifies the ``image`` while extracting the contours. :param image: Source, an 8-bit single-channel image. Non-zero pixels are treated as 1's. Zero pixels remain 0's, so the image is treated as ``binary`` . You can use :ocv:func:`compare` , :ocv:func:`inRange` , :ocv:func:`threshold` , :ocv:func:`adaptiveThreshold` , :ocv:func:`Canny` , and others to create a binary image out of a grayscale or color one. The function modifies the ``image`` while extracting the contours.
:param contours: Detected contours. Each contour is stored as a vector of points. :param contours: Detected contours. Each contour is stored as a vector of points.
...@@ -153,6 +159,9 @@ Draws contours outlines or filled contours. ...@@ -153,6 +159,9 @@ Draws contours outlines or filled contours.
.. ocv:function:: void drawContours( InputOutputArray image, InputArrayOfArrays contours, int contourIdx, const Scalar& color, int thickness=1, int lineType=8, InputArray hierarchy=noArray(), int maxLevel=INT_MAX, Point offset=Point() ) .. ocv:function:: void drawContours( InputOutputArray image, InputArrayOfArrays contours, int contourIdx, const Scalar& color, int thickness=1, int lineType=8, InputArray hierarchy=noArray(), int maxLevel=INT_MAX, Point offset=Point() )
.. ocv:cfunction:: void cvDrawContours( CvArr *img, CvSeq* contour, CvScalar externalColor, CvScalar holeColor, int maxLevel, int thickness=1, int lineType=8 )
.. ocv:pyoldfunction:: DrawContours(img, contour, externalColor, holeColor, maxLevel, thickness=1, lineType=8, offset=(0, 0))-> None
:param image: Destination image. :param image: Destination image.
:param contours: All the input contours. Each contour is stored as a point vector. :param contours: All the input contours. Each contour is stored as a point vector.
...@@ -245,6 +254,9 @@ Calculates a contour perimeter or a curve length. ...@@ -245,6 +254,9 @@ Calculates a contour perimeter or a curve length.
.. ocv:function:: double arcLength( InputArray curve, bool closed ) .. ocv:function:: double arcLength( InputArray curve, bool closed )
.. ocv:cfunction:: double cvArcLength( const void* curve, CvSlice slice=CV_WHOLE_SEQ, int isClosed=-1 )
.. ocv:pyoldfunction:: ArcLength(curve, slice=CV_WHOLE_SEQ, isClosed=-1)-> double
:param curve: Input vector of 2D points, stored in ``std::vector`` or ``Mat``. :param curve: Input vector of 2D points, stored in ``std::vector`` or ``Mat``.
:param closed: Flag indicating whether the curve is closed or not. :param closed: Flag indicating whether the curve is closed or not.
...@@ -259,6 +271,9 @@ Calculates the up-right bounding rectangle of a point set. ...@@ -259,6 +271,9 @@ Calculates the up-right bounding rectangle of a point set.
.. ocv:function:: Rect boundingRect( InputArray points ) .. ocv:function:: Rect boundingRect( InputArray points )
.. ocv:cfunction:: CvRect cvBoundingRect( CvArr* points, int update=0 )
.. ocv:pyoldfunction:: BoundingRect(points, update=0)-> CvRect
:param points: Input 2D point set, stored in ``std::vector`` or ``Mat``. :param points: Input 2D point set, stored in ``std::vector`` or ``Mat``.
The function calculates and returns the minimal up-right bounding rectangle for the specified point set. The function calculates and returns the minimal up-right bounding rectangle for the specified point set.
...@@ -272,6 +287,9 @@ Calculates a contour area. ...@@ -272,6 +287,9 @@ Calculates a contour area.
.. ocv:function:: double contourArea( InputArray contour, bool oriented=false ) .. ocv:function:: double contourArea( InputArray contour, bool oriented=false )
.. ocv:cfunction:: double cvContourArea( const CvArr* contour, CvSlice slice=CV_WHOLE_SEQ )
.. ocv:pyoldfunction:: ContourArea(contour, slice=CV_WHOLE_SEQ)-> double
:param contour: Input vector of 2d points (contour vertices), stored in ``std::vector`` or ``Mat``. :param contour: Input vector of 2d points (contour vertices), stored in ``std::vector`` or ``Mat``.
:param orientation: Oriented area flag. If it is true, the function returns a signed area value, depending on the contour orientation (clockwise or counter-clockwise). Using this feature you can determine orientation of a contour by taking sign of the area. By default the parameter is ``false``, which means that the absolute value is returned. :param orientation: Oriented area flag. If it is true, the function returns a signed area value, depending on the contour orientation (clockwise or counter-clockwise). Using this feature you can determine orientation of a contour by taking sign of the area. By default the parameter is ``false``, which means that the absolute value is returned.
...@@ -337,6 +355,9 @@ Fits a line to a 2D or 3D point set. ...@@ -337,6 +355,9 @@ Fits a line to a 2D or 3D point set.
.. ocv:function:: void fitLine( InputArray points, OutputArray line, int distType, double param, double reps, double aeps ) .. ocv:function:: void fitLine( InputArray points, OutputArray line, int distType, double param, double reps, double aeps )
.. ocv:cfunction:: void cvFitLine( const CvArr* points, int distType, double param, double reps, double aeps, float* line )
.. ocv:pyoldfunction:: FitLine(points, distType, param, reps, aeps) -> line
:param points: Input vector of 2D or 3D points, stored in ``std::vector<>`` or ``Mat``. :param points: Input vector of 2D or 3D points, stored in ``std::vector<>`` or ``Mat``.
:param line: Output line parameters. In case of 2D fitting it should be a vector of 4 elements (like ``Vec4f``) - ``(vx, vy, x0, y0)``, where ``(vx, vy)`` is a normalized vector collinear to the line and ``(x0, y0)`` is a point on the line. In case of 3D fitting, it should be a vector of 6 elements (like ``Vec6f``) - ``(vx, vy, vz, x0, y0, z0)``, where ``(vx, vy, vz)`` is a normalized vector collinear to the line and ``(x0, y0, z0)`` is a point on the line. :param line: Output line parameters. In case of 2D fitting it should be a vector of 4 elements (like ``Vec4f``) - ``(vx, vy, x0, y0)``, where ``(vx, vy)`` is a normalized vector collinear to the line and ``(x0, y0)`` is a point on the line. In case of 3D fitting, it should be a vector of 6 elements (like ``Vec6f``) - ``(vx, vy, vz, x0, y0, z0)``, where ``(vx, vy, vz)`` is a normalized vector collinear to the line and ``(x0, y0, z0)`` is a point on the line.
...@@ -427,6 +448,9 @@ Finds a circle of the minimum area enclosing a 2D point set. ...@@ -427,6 +448,9 @@ Finds a circle of the minimum area enclosing a 2D point set.
.. ocv:function:: void minEnclosingCircle( InputArray points, Point2f& center, float& radius ) .. ocv:function:: void minEnclosingCircle( InputArray points, Point2f& center, float& radius )
.. ocv:cfunction:: int cvMinEnclosingCircle( const CvArr* points, CvPoint2D32f* center, float* radius )
.. ocv:pyoldfunction:: MinEnclosingCircle(points)-> (int, center, radius)
:param points: The input vector of 2D points, stored in ``std::vector<>`` or ``Mat``. :param points: The input vector of 2D points, stored in ``std::vector<>`` or ``Mat``.
:param center: Output center of the circle. :param center: Output center of the circle.
...@@ -443,6 +467,9 @@ Compares two shapes. ...@@ -443,6 +467,9 @@ Compares two shapes.
.. ocv:function:: double matchShapes( InputArray object1, InputArray object2, int method, double parameter=0 ) .. ocv:function:: double matchShapes( InputArray object1, InputArray object2, int method, double parameter=0 )
.. ocv:cfunction:: double cvMatchShapes( const void* object1, const void* object2, int method, double parameter=0 )
.. ocv:pyoldfunction:: MatchShapes(object1, object2, method, parameter=0)-> None
:param object1: The first contour or grayscale image. :param object1: The first contour or grayscale image.
:param object2: The second contour or grayscale image. :param object2: The second contour or grayscale image.
...@@ -493,6 +520,9 @@ Performs a point-in-contour test. ...@@ -493,6 +520,9 @@ Performs a point-in-contour test.
.. ocv:function:: double pointPolygonTest( InputArray contour, Point2f pt, bool measureDist ) .. ocv:function:: double pointPolygonTest( InputArray contour, Point2f pt, bool measureDist )
.. ocv:cfunction:: double cvPointPolygonTest( const CvArr* contour, CvPoint2D32f pt, int measureDist )
.. ocv:pyoldfunction:: PointPolygonTest(contour, pt, measureDist)-> double
:param contour: Input contour. :param contour: Input contour.
:param pt: Point tested against the contour. :param pt: Point tested against the contour.
......
...@@ -11,6 +11,9 @@ Calculates an optical flow for a sparse feature set using the iterative Lucas-Ka ...@@ -11,6 +11,9 @@ Calculates an optical flow for a sparse feature set using the iterative Lucas-Ka
.. ocv:function:: void calcOpticalFlowPyrLK( InputArray prevImg, InputArray nextImg, InputArray prevPts, InputOutputArray nextPts, OutputArray status, OutputArray err, Size winSize=Size(15,15), int maxLevel=3, TermCriteria criteria=TermCriteria(TermCriteria::COUNT+TermCriteria::EPS, 30, 0.01), double derivLambda=0.5, int flags=0 ) .. ocv:function:: void calcOpticalFlowPyrLK( InputArray prevImg, InputArray nextImg, InputArray prevPts, InputOutputArray nextPts, OutputArray status, OutputArray err, Size winSize=Size(15,15), int maxLevel=3, TermCriteria criteria=TermCriteria(TermCriteria::COUNT+TermCriteria::EPS, 30, 0.01), double derivLambda=0.5, int flags=0 )
.. ocv:cfunction:: void cvCalcOpticalFlowPyrLK( const CvArr* prev, const CvArr* curr, CvArr* prevPyr, CvArr* currPyr, const CvPoint2D32f* prevFeatures, CvPoint2D32f* currFeatures, int count, CvSize winSize, int level, char* status, float* trackError, CvTermCriteria criteria, int flags )
.. ocv:pyoldfunction:: CalcOpticalFlowPyrLK( prev, curr, prevPyr, currPyr, prevFeatures, winSize, level, criteria, flags, guesses=None) -> (currFeatures, status, trackError)
:param prevImg: First 8-bit single-channel or 3-channel input image. :param prevImg: First 8-bit single-channel or 3-channel input image.
:param nextImg: Second input image of the same size and the same type as ``prevImg`` . :param nextImg: Second input image of the same size and the same type as ``prevImg`` .
...@@ -129,6 +132,9 @@ Updates the motion history image by a moving silhouette. ...@@ -129,6 +132,9 @@ Updates the motion history image by a moving silhouette.
.. ocv:function:: void updateMotionHistory( InputArray silhouette, InputOutputArray mhi, double timestamp, double duration ) .. ocv:function:: void updateMotionHistory( InputArray silhouette, InputOutputArray mhi, double timestamp, double duration )
.. ocv:cfunction:: void cvUpdateMotionHistory( const CvArr* silhouette, CvArr* mhi, double timestamp, double duration )
.. ocv:pyoldfunction:: UpdateMotionHistory(silhouette, mhi, timestamp, duration)-> None
:param silhouette: Silhouette mask that has non-zero pixels where the motion occurs. :param silhouette: Silhouette mask that has non-zero pixels where the motion occurs.
:param mhi: Motion history image that is updated by the function (single-channel, 32-bit floating-point). :param mhi: Motion history image that is updated by the function (single-channel, 32-bit floating-point).
...@@ -162,6 +168,9 @@ Calculates a gradient orientation of a motion history image. ...@@ -162,6 +168,9 @@ Calculates a gradient orientation of a motion history image.
.. ocv:function:: void calcMotionGradient( InputArray mhi, OutputArray mask, OutputArray orientation, double delta1, double delta2, int apertureSize=3 ) .. ocv:function:: void calcMotionGradient( InputArray mhi, OutputArray mask, OutputArray orientation, double delta1, double delta2, int apertureSize=3 )
.. ocv:cfunction:: void cvCalcMotionGradient( const CvArr* mhi, CvArr* mask, CvArr* orientation, double delta1, double delta2, int apertureSize=3 )
.. ocv:pyoldfunction:: CalcMotionGradient(mhi, mask, orientation, delta1, delta2, apertureSize=3)-> None
:param mhi: Motion history single-channel floating-point image. :param mhi: Motion history single-channel floating-point image.
:param mask: Output mask image that has the type ``CV_8UC1`` and the same size as ``mhi`` . Its non-zero elements mark pixels where the motion gradient data is correct. :param mask: Output mask image that has the type ``CV_8UC1`` and the same size as ``mhi`` . Its non-zero elements mark pixels where the motion gradient data is correct.
...@@ -195,6 +204,9 @@ Calculates a global motion orientation in a selected region. ...@@ -195,6 +204,9 @@ Calculates a global motion orientation in a selected region.
.. ocv:function:: double calcGlobalOrientation( InputArray orientation, InputArray mask, InputArray mhi, double timestamp, double duration ) .. ocv:function:: double calcGlobalOrientation( InputArray orientation, InputArray mask, InputArray mhi, double timestamp, double duration )
.. ocv:cfunction:: double cvCalcGlobalOrientation( const CvArr* orientation, const CvArr* mask, const CvArr* mhi, double timestamp, double duration )
.. ocv:pyoldfunction:: CalcGlobalOrientation(orientation, mask, mhi, timestamp, duration)-> float
:param orientation: Motion gradient orientation image calculated by the function :ocv:func:`calcMotionGradient` . :param orientation: Motion gradient orientation image calculated by the function :ocv:func:`calcMotionGradient` .
:param mask: Mask image. It may be a conjunction of a valid gradient mask, also calculated by :ocv:func:`calcMotionGradient` , and the mask of a region whose direction needs to be calculated. :param mask: Mask image. It may be a conjunction of a valid gradient mask, also calculated by :ocv:func:`calcMotionGradient` , and the mask of a region whose direction needs to be calculated.
...@@ -220,6 +232,9 @@ Splits a motion history image into a few parts corresponding to separate indepen ...@@ -220,6 +232,9 @@ Splits a motion history image into a few parts corresponding to separate indepen
.. ocv:function:: void segmentMotion(InputArray mhi, OutputArray segmask, vector<Rect>& boundingRects, double timestamp, double segThresh) .. ocv:function:: void segmentMotion(InputArray mhi, OutputArray segmask, vector<Rect>& boundingRects, double timestamp, double segThresh)
.. ocv:cfunction:: CvSeq* cvSegmentMotion( const CvArr* mhi, CvArr* segMask, CvMemStorage* storage, double timestamp, double segThresh )
.. ocv:pyoldfunction:: SegmentMotion(mhi, segMask, storage, timestamp, segThresh)-> None
:param mhi: Motion history image. :param mhi: Motion history image.
:param segmask: Image where the found mask should be stored, single-channel, 32-bit floating-point. :param segmask: Image where the found mask should be stored, single-channel, 32-bit floating-point.
...@@ -242,6 +257,9 @@ Finds an object center, size, and orientation. ...@@ -242,6 +257,9 @@ Finds an object center, size, and orientation.
.. ocv:function:: RotatedRect CamShift( InputArray probImage, Rect& window, TermCriteria criteria ) .. ocv:function:: RotatedRect CamShift( InputArray probImage, Rect& window, TermCriteria criteria )
.. ocv:cfunction:: int cvCamShift( const CvArr* probImage, CvRect window, CvTermCriteria criteria, CvConnectedComp* comp, CvBox2D* box=NULL )
.. ocv:pyoldfunction:: CamShift(probImage, window, criteria)-> (int, comp, box)
:param probImage: Back projection of the object histogram. See :ocv:func:`calcBackProject` . :param probImage: Back projection of the object histogram. See :ocv:func:`calcBackProject` .
:param window: Initial search window. :param window: Initial search window.
...@@ -264,6 +282,9 @@ Finds an object on a back projection image. ...@@ -264,6 +282,9 @@ Finds an object on a back projection image.
.. ocv:function:: int meanShift( InputArray probImage, Rect& window, TermCriteria criteria ) .. ocv:function:: int meanShift( InputArray probImage, Rect& window, TermCriteria criteria )
.. ocv:cfunction:: int cvMeanShift( const CvArr* probImage, CvRect window, CvTermCriteria criteria, CvConnectedComp* comp )
.. ocv:pyoldfunction:: MeanShift(probImage, window, criteria)-> comp
:param probImage: Back projection of the object histogram. See :ocv:func:`calcBackProject` for details. :param probImage: Back projection of the object histogram. See :ocv:func:`calcBackProject` for details.
:param window: Initial search window. :param window: Initial search window.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment