margin-bottom: 7px;
}
-dl.pyoldfunction > dt:first-child {
- margin-bottom: 7px;
- color: #8080B0;
-}
-
-dl.pyoldfunction > dt:first-child tt.descname
-{
- color: #8080B0;
-}
-
-dl.pyoldfunction > dt:first-child tt.descclassname
-{
- color: #8080B0;
-}
-
dl.jfunction > dt:first-child {
margin-bottom: 7px;
}
else:
return ''
-class OCVPyOldModulelevel(OCVPyModulelevel):
- directive_prefix = 'pyold'
- pass
-
class OCVPyXRefRole(XRefRole):
def process_link(self, env, refnode, has_explicit_title, title, target):
refnode['ocv:module'] = env.temp_data.get('ocv:module')
'cfunction': ObjType(l_('cfunction'), 'cfunc', 'cfuncx'),
'jfunction': ObjType(l_('jfunction'), 'jfunc', 'jfuncx'),
'pyfunction': ObjType(l_('pyfunction'), 'pyfunc'),
- 'pyoldfunction': ObjType(l_('pyoldfunction'), 'pyoldfunc'),
'member': ObjType(l_('member'), 'member'),
'emember': ObjType(l_('emember'), 'emember'),
'type': ObjType(l_('type'), 'type'),
'cfunction': OCVCFunctionObject,
'jfunction': OCVJavaFunctionObject,
'pyfunction': OCVPyModulelevel,
- 'pyoldfunction': OCVPyOldModulelevel,
'member': OCVMemberObject,
'emember': OCVEnumMemberObject,
'type': OCVTypeObject,
'jfunc' : OCVXRefRole(fix_parens=True),
'jfuncx' : OCVXRefRole(),
'pyfunc' : OCVPyXRefRole(),
- 'pyoldfunc' : OCVPyXRefRole(),
'member': OCVXRefRole(),
'emember': OCVXRefRole(),
'type': OCVXRefRole(),
'cfunction': _('C function'),
'jfunction': _('Java method'),
'pyfunction': _('Python function'),
- 'pyoldfunction': _('Legacy Python function'),
'member': _('C++ member'),
'emember': _('enum member'),
'type': _('C/C++ type'),
.. ocv:cfunction:: double cvCalibrateCamera2( const CvMat* object_points, const CvMat* image_points, const CvMat* point_counts, CvSize image_size, CvMat* camera_matrix, CvMat* distortion_coeffs, CvMat* rotation_vectors=NULL, CvMat* translation_vectors=NULL, int flags=0, CvTermCriteria term_crit=cvTermCriteria( CV_TERMCRIT_ITER+CV_TERMCRIT_EPS,30,DBL_EPSILON) )
-.. ocv:pyoldfunction:: cv.CalibrateCamera2(objectPoints, imagePoints, pointCounts, imageSize, cameraMatrix, distCoeffs, rvecs, tvecs, flags=0)-> None
-
:param objectPoints: In the new interface it is a vector of vectors of calibration pattern points in the calibration pattern coordinate space. The outer vector contains as many elements as the number of the pattern views. If the same calibration pattern is shown in each view and it is fully visible, all the vectors will be the same. Although, it is possible to use partially occluded patterns, or even different patterns in different views. Then, the vectors will be different. The points are 3D, but since they are in a pattern coordinate system, then, if the rig is planar, it may make sense to put the model to a XY coordinate plane so that Z-coordinate of each input object point is 0.
In the old interface all the vectors of object points from different views are concatenated together.
.. ocv:cfunction:: void cvComputeCorrespondEpilines( const CvMat* points, int which_image, const CvMat* fundamental_matrix, CvMat* correspondent_lines )
-.. ocv:pyoldfunction:: cv.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 whichImage: Index of the image (1 or 2) that contains the ``points`` .
.. ocv:function:: void convertPointsHomogeneous( InputArray src, OutputArray dst )
.. ocv:cfunction:: void cvConvertPointsHomogeneous( const CvMat* src, CvMat* dst )
-.. ocv:pyoldfunction:: cv.ConvertPointsHomogeneous(src, dst) -> None
:param src: Input array or vector of 2D, 3D, or 4D points.
.. ocv:cfunction:: void cvDecomposeProjectionMatrix( const CvMat * projMatr, CvMat * calibMatr, CvMat * rotMatr, CvMat * posVect, CvMat * rotMatrX=NULL, CvMat * rotMatrY=NULL, CvMat * rotMatrZ=NULL, CvPoint3D64f * eulerAngles=NULL )
-.. ocv:pyoldfunction:: cv.DecomposeProjectionMatrix(projMatrix, cameraMatrix, rotMatrix, transVect, rotMatrX=None, rotMatrY=None, rotMatrZ=None) -> eulerAngles
-
:param projMatrix: 3x4 input projection matrix P.
:param cameraMatrix: Output 3x3 camera matrix K.
.. ocv:pyfunction:: cv2.drawChessboardCorners(image, patternSize, corners, patternWasFound) -> image
.. ocv:cfunction:: void cvDrawChessboardCorners( CvArr* image, CvSize pattern_size, CvPoint2D32f* corners, int count, int pattern_was_found )
-.. ocv:pyoldfunction:: cv.DrawChessboardCorners(image, patternSize, corners, patternWasFound)-> None
:param image: Destination image. It must be an 8-bit color image.
.. ocv:pyfunction:: cv2.findChessboardCorners(image, patternSize[, corners[, flags]]) -> retval, corners
.. ocv:cfunction:: int cvFindChessboardCorners( const void* image, CvSize pattern_size, CvPoint2D32f* corners, int* corner_count=NULL, int flags=CV_CALIB_CB_ADAPTIVE_THRESH+CV_CALIB_CB_NORMALIZE_IMAGE )
-.. ocv:pyoldfunction:: cv.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.
.. ocv:cfunction:: void cvFindExtrinsicCameraParams2( const CvMat* object_points, const CvMat* image_points, const CvMat* camera_matrix, const CvMat* distortion_coeffs, CvMat* rotation_vector, CvMat* translation_vector, int use_extrinsic_guess=0 )
-.. ocv:pyoldfunction:: cv.FindExtrinsicCameraParams2(objectPoints, imagePoints, cameraMatrix, distCoeffs, rvec, tvec, useExtrinsicGuess=0 ) -> None
-
:param objectPoints: Array of object points in the object coordinate space, 3xN/Nx3 1-channel or 1xN/Nx1 3-channel, where N is the number of points. ``vector<Point3f>`` can be also passed here.
:param imagePoints: Array of corresponding image points, 2xN/Nx2 1-channel or 1xN/Nx1 2-channel, where N is the number of points. ``vector<Point2f>`` can be also passed here.
.. ocv:pyfunction:: cv2.findFundamentalMat(points1, points2[, method[, param1[, param2[, mask]]]]) -> retval, mask
.. ocv:cfunction:: int cvFindFundamentalMat( const CvMat* points1, const CvMat* points2, CvMat* fundamental_matrix, int method=CV_FM_RANSAC, double param1=3., double param2=0.99, CvMat* status=NULL )
-.. ocv:pyoldfunction:: cv.FindFundamentalMat(points1, points2, fundamentalMatrix, method=CV_FM_RANSAC, param1=1., param2=0.99, status=None) -> retval
:param points1: Array of ``N`` points from the first image. The point coordinates should be floating-point (single or double precision).
.. ocv:cfunction:: int cvFindHomography( const CvMat* src_points, const CvMat* dst_points, CvMat* homography, int method=0, double ransacReprojThreshold=3, CvMat* mask=0 )
-.. ocv:pyoldfunction:: cv.FindHomography(srcPoints, dstPoints, H, method=0, 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 dstPoints: Coordinates of the points in the target plane, a matrix of the type ``CV_32FC2`` or a ``vector<Point2f>`` .
.. ocv:cfunction:: void cvGetOptimalNewCameraMatrix( const CvMat* camera_matrix, const CvMat* dist_coeffs, CvSize image_size, double alpha, CvMat* new_camera_matrix, CvSize new_imag_size=cvSize(0,0), CvRect* valid_pixel_ROI=0, int center_principal_point=0 )
-.. ocv:pyoldfunction:: cv.GetOptimalNewCameraMatrix(cameraMatrix, distCoeffs, imageSize, alpha, newCameraMatrix, newImageSize=(0, 0), validPixROI=0, centerPrincipalPoint=0) -> None
-
: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],[s_1, s_2, s_3, s_4]])` of 4, 5, 8 or 12 elements. If the vector is NULL/empty, the zero distortion coefficients are assumed.
.. ocv:cfunction:: void cvInitIntrinsicParams2D( const CvMat* object_points, const CvMat* image_points, const CvMat* npoints, CvSize image_size, CvMat* camera_matrix, double aspect_ratio=1. )
-.. ocv:pyoldfunction:: cv.InitIntrinsicParams2D(objectPoints, imagePoints, npoints, imageSize, cameraMatrix, aspectRatio=1.) -> None
-
:param objectPoints: Vector of vectors of the calibration pattern points in the calibration pattern coordinate space. In the old interface all the per-view vectors are concatenated. See :ocv:func:`calibrateCamera` for details.
:param imagePoints: Vector of vectors of the projections of the calibration pattern points. In the old interface all the per-view vectors are concatenated.
.. ocv:cfunction:: void cvProjectPoints2( const CvMat* object_points, const CvMat* rotation_vector, const CvMat* translation_vector, const CvMat* camera_matrix, const CvMat* distortion_coeffs, CvMat* image_points, CvMat* dpdrot=NULL, CvMat* dpdt=NULL, CvMat* dpdf=NULL, CvMat* dpdc=NULL, CvMat* dpddist=NULL, double aspect_ratio=0 )
-.. ocv:pyoldfunction:: cv.ProjectPoints2(objectPoints, rvec, tvec, cameraMatrix, distCoeffs, imagePoints, dpdrot=None, dpdt=None, dpdf=None, dpdc=None, dpddist=None)-> None
-
:param objectPoints: Array of object points, 3xN/Nx3 1-channel or 1xN/Nx1 3-channel (or ``vector<Point3f>`` ), where N is the number of points in the view.
:param rvec: Rotation vector. See :ocv:func:`Rodrigues` for details.
.. ocv:cfunction:: void cvReprojectImageTo3D( const CvArr* disparityImage, CvArr* _3dImage, const CvMat* Q, int handleMissingValues=0 )
-.. ocv:pyoldfunction:: cv.ReprojectImageTo3D(disparity, _3dImage, Q, handleMissingValues=0) -> None
-
:param disparity: Input single-channel 8-bit unsigned, 16-bit signed, 32-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.
.. ocv:pyfunction:: cv2.RQDecomp3x3(src[, mtxR[, mtxQ[, Qx[, Qy[, Qz]]]]]) -> retval, mtxR, mtxQ, Qx, Qy, Qz
.. ocv:cfunction:: void cvRQDecomp3x3( const CvMat * matrixM, CvMat * matrixR, CvMat * matrixQ, CvMat * matrixQx=NULL, CvMat * matrixQy=NULL, CvMat * matrixQz=NULL, CvPoint3D64f * eulerAngles=NULL )
-.. ocv:pyoldfunction:: cv.RQDecomp3x3(M, R, Q, Qx=None, Qy=None, Qz=None) -> eulerAngles
:param src: 3x3 input matrix.
.. ocv:cfunction:: int cvRodrigues2( const CvMat* src, CvMat* dst, CvMat* jacobian=0 )
-.. ocv:pyoldfunction:: cv.Rodrigues2(src, dst, jacobian=0)-> None
-
:param src: Input rotation vector (3x1 or 1x3) or rotation matrix (3x3).
:param dst: Output rotation matrix (3x3) or rotation vector (3x1 or 1x3), respectively.
.. ocv:cfunction:: double cvStereoCalibrate( const CvMat* object_points, const CvMat* image_points1, const CvMat* image_points2, const CvMat* npoints, CvMat* camera_matrix1, CvMat* dist_coeffs1, CvMat* camera_matrix2, CvMat* dist_coeffs2, CvSize image_size, CvMat* R, CvMat* T, CvMat* E=0, CvMat* F=0, CvTermCriteria term_crit=cvTermCriteria( CV_TERMCRIT_ITER+CV_TERMCRIT_EPS,30,1e-6), int flags=CV_CALIB_FIX_INTRINSIC )
-.. ocv:pyoldfunction:: cv.StereoCalibrate(objectPoints, imagePoints1, imagePoints2, pointCounts, cameraMatrix1, distCoeffs1, cameraMatrix2, distCoeffs2, imageSize, R, T, E=None, F=None, term_crit=(CV_TERMCRIT_ITER+CV_TERMCRIT_EPS, 30, 1e-6), flags=CV_CALIB_FIX_INTRINSIC)-> None
-
:param objectPoints: Vector of vectors of the calibration pattern points.
:param imagePoints1: Vector of vectors of the projections of the calibration pattern points, observed by the first camera.
.. ocv:cfunction:: void cvStereoRectify( const CvMat* camera_matrix1, const CvMat* camera_matrix2, const CvMat* dist_coeffs1, const CvMat* dist_coeffs2, CvSize image_size, 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 new_image_size=cvSize(0,0), CvRect* valid_pix_ROI1=0, CvRect* valid_pix_ROI2=0 )
-.. ocv:pyoldfunction:: cv.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 cameraMatrix2: Second camera matrix.
.. ocv:cfunction:: int cvStereoRectifyUncalibrated( const CvMat* points1, const CvMat* points2, const CvMat* F, CvSize img_size, CvMat* H1, CvMat* H2, double threshold=5 )
-.. ocv:pyoldfunction:: cv.StereoRectifyUncalibrated(points1, points2, F, imageSize, H1, H2, threshold=5)-> None
-
:param points1: Array of feature points in the first image.
:param points2: The corresponding points in the second image. The same formats as in :ocv:func:`findFundamentalMat` are supported.
.. ocv:cfunction:: int cvKMeans2( const CvArr* samples, int cluster_count, CvArr* labels, CvTermCriteria termcrit, int attempts=1, CvRNG* rng=0, int flags=0, CvArr* _centers=0, double* compactness=0 )
-.. ocv:pyoldfunction:: cv.KMeans2(samples, nclusters, labels, termcrit, attempts=1, flags=0, centers=None) -> float
-
:param samples: Floating-point matrix of input samples, one row per sample.
:param cluster_count: Number of clusters to split the set by.
.. ocv:cfunction:: void cvCircle( CvArr* img, CvPoint center, int radius, CvScalar color, int thickness=1, int line_type=8, int shift=0 )
-.. ocv:pyoldfunction:: cv.Circle(img, center, radius, color, thickness=1, lineType=8, shift=0)-> None
-
:param img: Image where the circle is drawn.
:param center: Center of the circle.
.. ocv:cfunction:: int cvClipLine( CvSize img_size, CvPoint* pt1, CvPoint* pt2 )
-.. ocv:pyoldfunction:: cv.ClipLine(imgSize, pt1, pt2) -> (point1, point2)
-
:param imgSize: Image size. The image rectangle is ``Rect(0, 0, imgSize.width, imgSize.height)`` .
:param imgRect: Image rectangle.
.. ocv:cfunction:: void cvEllipse( CvArr* img, CvPoint center, CvSize axes, double angle, double start_angle, double end_angle, CvScalar color, int thickness=1, int line_type=8, int shift=0 )
-.. ocv:pyoldfunction:: cv.Ellipse(img, center, axes, angle, start_angle, end_angle, color, thickness=1, lineType=8, shift=0)-> None
-
.. ocv:cfunction:: void cvEllipseBox( CvArr* img, CvBox2D box, CvScalar color, int thickness=1, int line_type=8, int shift=0 )
-.. ocv:pyoldfunction:: cv.EllipseBox(img, box, color, thickness=1, lineType=8, shift=0)-> None
-
:param img: Image.
:param center: Center of the ellipse.
.. ocv:cfunction:: void cvFillConvexPoly( CvArr* img, const CvPoint* pts, int npts, CvScalar color, int line_type=8, int shift=0 )
-.. ocv:pyoldfunction:: cv.FillConvexPoly(img, pn, color, lineType=8, shift=0)-> None
-
:param img: Image.
:param pts: Polygon vertices.
.. ocv:cfunction:: void cvFillPoly( CvArr* img, CvPoint** pts, const int* npts, int contours, CvScalar color, int line_type=8, int shift=0 )
-.. ocv:pyoldfunction:: cv.FillPoly(img, polys, color, lineType=8, shift=0)-> None
-
:param img: Image.
:param pts: Array of polygons where each polygon is represented as an array of points.
.. ocv:cfunction:: void cvGetTextSize( const char* text_string, const CvFont* font, CvSize* text_size, int* baseline )
-.. ocv:pyoldfunction:: cv.GetTextSize(textString, font)-> (textSize, baseline)
-
:param text: Input text string.
:param fontFace: Font to use. See the :ocv:func:`putText` for details.
.. ocv:cfunction:: void cvLine( CvArr* img, CvPoint pt1, CvPoint pt2, CvScalar color, int thickness=1, int line_type=8, int shift=0 )
-.. ocv:pyoldfunction:: cv.Line(img, pt1, pt2, color, thickness=1, lineType=8, shift=0)-> None
-
:param img: Image.
:param pt1: First point of the line segment.
.. ocv:cfunction:: void cvRectangle( CvArr* img, CvPoint pt1, CvPoint pt2, CvScalar color, int thickness=1, int line_type=8, int shift=0 )
-.. ocv:pyoldfunction:: cv.Rectangle(img, pt1, pt2, color, thickness=1, lineType=8, shift=0)-> None
-
:param img: Image.
:param pt1: Vertex of the rectangle.
.. ocv:cfunction:: void cvPolyLine( CvArr* img, CvPoint** pts, const int* npts, int contours, int is_closed, CvScalar color, int thickness=1, int line_type=8, int shift=0 )
-.. ocv:pyoldfunction:: cv.PolyLine(img, polys, is_closed, color, thickness=1, lineType=8, shift=0) -> None
-
:param img: Image.
:param pts: Array of polygonal curves.
.. ocv:cfunction:: void cvDrawContours( CvArr * img, CvSeq* contour, CvScalar external_color, CvScalar hole_color, int max_level, int thickness=1, int line_type=8, CvPoint offset=cvPoint(0,0) )
-.. ocv:pyoldfunction:: cv.DrawContours(img, contour, external_color, hole_color, max_level, thickness=1, lineType=8, offset=(0, 0))-> None
-
:param image: Destination image.
:param contours: All the input contours. Each contour is stored as a point vector.
.. ocv:cfunction:: void cvPutText( CvArr* img, const char* text, CvPoint org, const CvFont* font, CvScalar color )
-.. ocv:pyoldfunction:: cv.PutText(img, text, org, font, color)-> None
-
:param img: Image.
:param text: Text string to be drawn.
Creates a copy of a sequence.
.. ocv:cfunction:: CvSeq* cvCloneSeq( const CvSeq* seq, CvMemStorage* storage=NULL )
-.. ocv:pyoldfunction:: cv.CloneSeq(seq, storage)-> None
:param seq: Sequence
.. ocv:cfunction:: CvMemStorage* cvCreateMemStorage( int block_size=0 )
-.. ocv:pyoldfunction:: cv.CreateMemStorage(blockSize=0) -> memstorage
-
-
:param block_size: Size of the storage blocks in bytes. If it is 0, the block size is set to a default value - currently it is about 64K.
The function creates an empty memory storage. See
.. ocv:cfunction:: void cvClearND( CvArr* arr, const int* idx )
-.. ocv:pyoldfunction:: cv.ClearND(arr, idx)-> None
-
:param arr: Input array
:param idx: Array of the element indices
Makes a full copy of an image, including the header, data, and ROI.
.. ocv:cfunction:: IplImage* cvCloneImage(const IplImage* image)
-.. ocv:pyoldfunction:: cv.CloneImage(image) -> image
:param image: The original image
Creates a full matrix copy.
.. ocv:cfunction:: CvMat* cvCloneMat(const CvMat* mat)
-.. ocv:pyoldfunction:: cv.CloneMat(mat) -> mat
:param mat: Matrix to be copied
Creates full copy of a multi-dimensional array and returns a pointer to the copy.
.. ocv:cfunction:: CvMatND* cvCloneMatND(const CvMatND* mat)
-.. ocv:pyoldfunction:: cv.CloneMatND(mat) -> matND
:param mat: Input array
Converts one array to another with optional linear transformation.
.. ocv:cfunction:: void cvConvertScale(const CvArr* src, CvArr* dst, double scale=1, double shift=0)
-.. ocv:pyoldfunction:: cv.ConvertScale(src, dst, scale=1.0, shift=0.0)-> None
-.. ocv:pyoldfunction:: cv.Convert(src, dst)-> None
::
Copies one array to another.
.. ocv:cfunction:: void cvCopy(const CvArr* src, CvArr* dst, const CvArr* mask=NULL)
-.. ocv:pyoldfunction:: cv.Copy(src, dst, mask=None)-> None
:param src: The source array
Allocates array data
.. ocv:cfunction:: void cvCreateData(CvArr* arr)
-.. ocv:pyoldfunction:: cv.CreateData(arr) -> None
:param arr: Array header
Creates an image header and allocates the image data.
.. ocv:cfunction:: IplImage* cvCreateImage(CvSize size, int depth, int channels)
-.. ocv:pyoldfunction:: cv.CreateImage(size, depth, channels)->image
:param size: Image width and height
Creates an image header but does not allocate the image data.
.. ocv:cfunction:: IplImage* cvCreateImageHeader(CvSize size, int depth, int channels)
-.. ocv:pyoldfunction:: cv.CreateImageHeader(size, depth, channels) -> image
:param size: Image width and height
Creates a matrix header and allocates the matrix data.
.. ocv:cfunction:: CvMat* cvCreateMat( int rows, int cols, int type)
-.. ocv:pyoldfunction:: cv.CreateMat(rows, cols, type) -> mat
:param rows: Number of rows in the matrix
Creates a matrix header but does not allocate the matrix data.
.. ocv:cfunction:: CvMat* cvCreateMatHeader( int rows, int cols, int type)
-.. ocv:pyoldfunction:: cv.CreateMatHeader(rows, cols, type) -> mat
:param rows: Number of rows in the matrix
Creates the header and allocates the data for a multi-dimensional dense array.
.. ocv:cfunction:: CvMatND* cvCreateMatND( int dims, const int* sizes, int type)
-.. ocv:pyoldfunction:: cv.CreateMatND(dims, type) -> matND
:param dims: Number of array dimensions. This must not exceed CV_MAX_DIM (32 by default, but can be changed at build time).
Creates a new matrix header but does not allocate the matrix data.
.. ocv:cfunction:: CvMatND* cvCreateMatNDHeader( int dims, const int* sizes, int type)
-.. ocv:pyoldfunction:: cv.CreateMatNDHeader(dims, type) -> matND
:param dims: Number of array dimensions
Calculates the cross product of two 3D vectors.
.. ocv:cfunction:: void cvCrossProduct(const CvArr* src1, const CvArr* src2, CvArr* dst)
-.. ocv:pyoldfunction:: cv.CrossProduct(src1, src2, dst)-> None
:param src1: The first source vector
Calculates the dot product of two arrays in Euclidean metrics.
.. ocv:cfunction:: double cvDotProduct(const CvArr* src1, const CvArr* src2)
-.. ocv:pyoldfunction:: cv.DotProduct(src1, src2) -> float
:param src1: The first source array
.. ocv:cfunction:: CvScalar cvGet3D(const CvArr* arr, int idx0, int idx1, int idx2)
.. ocv:cfunction:: CvScalar cvGetND( const CvArr* arr, const int* idx )
-.. ocv:pyoldfunction:: cv.Get1D(arr, idx) -> scalar
-.. ocv:pyoldfunction:: cv.Get2D(arr, idx0, idx1) -> scalar
-.. ocv:pyoldfunction:: cv.Get3D(arr, idx0, idx1, idx2) -> scalar
-.. ocv:pyoldfunction:: cv.GetND(arr, indices) -> scalar
-
Return a specific array element.
:param arr: Input array
.. ocv:cfunction:: CvMat* cvGetCols( const CvArr* arr, CvMat* submat, int start_col, int end_col )
-.. ocv:pyoldfunction:: cv.GetCol(arr, col)-> submat
-
-.. ocv:pyoldfunction:: cv.GetCols(arr, startCol, endCol)-> submat
-
:param arr: Input array
:param submat: Pointer to the resulting sub-array header
Returns one of array diagonals.
.. ocv:cfunction:: CvMat* cvGetDiag(const CvArr* arr, CvMat* submat, int diag=0)
-.. ocv:pyoldfunction:: cv.GetDiag(arr, diag=0)-> submat
:param arr: Input array
Return number of array dimensions
.. ocv:cfunction:: int cvGetDims(const CvArr* arr, int* sizes=NULL)
-.. ocv:pyoldfunction:: cv.GetDims(arr) -> (dim1, dim2, ...)
:param arr: Input array
Returns type of array elements.
.. ocv:cfunction:: int cvGetElemType(const CvArr* arr)
-.. ocv:pyoldfunction:: cv.GetElemType(arr)-> int
:param arr: Input array
.. ocv:cfunction:: IplImage* cvGetImage( const CvArr* arr, IplImage* image_header )
-.. ocv:pyoldfunction:: cv.GetImage(arr) -> iplimage
-
:param arr: Input array
:param image_header: Pointer to ``IplImage`` structure used as a temporary buffer
Returns the index of the channel of interest.
.. ocv:cfunction:: int cvGetImageCOI(const IplImage* image)
-.. ocv:pyoldfunction:: cv.GetImageCOI(image) -> int
:param image: A pointer to the image header
Returns the image ROI.
.. ocv:cfunction:: CvRect cvGetImageROI(const IplImage* image)
-.. ocv:pyoldfunction:: cv.GetImageROI(image)-> CvRect
:param image: A pointer to the image header
Returns matrix header for arbitrary array.
.. ocv:cfunction:: CvMat* cvGetMat(const CvArr* arr, CvMat* header, int* coi=NULL, int allowND=0)
-.. ocv:pyoldfunction:: cv.GetMat(arr, allowND=0) -> mat
:param arr: Input array
.. ocv:cfunction:: double cvGetReal3D(const CvArr* arr, int idx0, int idx1, int idx2)
.. ocv:cfunction:: double cvGetRealND( const CvArr* arr, const int* idx )
-.. ocv:pyoldfunction:: cv.GetReal1D(arr, idx0)->float
-.. ocv:pyoldfunction:: cv.GetReal2D(arr, idx0, idx1)->float
-.. ocv:pyoldfunction:: cv.GetReal3D(arr, idx0, idx1, idx2)->float
-.. ocv:pyoldfunction:: cv.GetRealND(arr, idx)->float
-
:param arr: Input array. Must have a single channel.
:param idx0: The first zero-based component of the element index
.. ocv:cfunction:: CvMat* cvGetRows( const CvArr* arr, CvMat* submat, int start_row, int end_row, int delta_row=1 )
-.. ocv:pyoldfunction:: cv.GetRow(arr, row)-> submat
-.. ocv:pyoldfunction:: cv.GetRows(arr, startRow, endRow, deltaRow=1)-> submat
-
:param arr: Input array
:param submat: Pointer to the resulting sub-array header
Returns size of matrix or image ROI.
.. ocv:cfunction:: CvSize cvGetSize(const CvArr* arr)
-.. ocv:pyoldfunction:: cv.GetSize(arr)-> (width, height)
:param arr: array header
Returns matrix header corresponding to the rectangular sub-array of input image or matrix.
.. ocv:cfunction:: CvMat* cvGetSubRect(const CvArr* arr, CvMat* submat, CvRect rect)
-.. ocv:pyoldfunction:: cv.GetSubRect(arr, rect) -> submat
:param arr: Input array
Resets the image ROI to include the entire image and releases the ROI structure.
.. ocv:cfunction:: void cvResetImageROI(IplImage* image)
-.. ocv:pyoldfunction:: cv.ResetImageROI(image)-> None
:param image: A pointer to the image header
.. ocv:cfunction:: CvMat* cvReshape( const CvArr* arr, CvMat* header, int new_cn, int new_rows=0 )
-.. ocv:pyoldfunction:: cv.Reshape(arr, newCn, newRows=0) -> mat
-
:param arr: Input array
:param header: Output header to be filled
.. ocv:cfunction:: CvArr* cvReshapeMatND( const CvArr* arr, int sizeof_header, CvArr* header, int new_cn, int new_dims, int* new_sizes )
-.. ocv:pyoldfunction:: cv.ReshapeMatND(arr, newCn, newDims) -> mat
-
:param arr: Input array
:param sizeof_header: Size of output header to distinguish between IplImage, CvMat and CvMatND output headers
Sets every element of an array to a given value.
.. ocv:cfunction:: void cvSet(CvArr* arr, CvScalar value, const CvArr* mask=NULL)
-.. ocv:pyoldfunction:: cv.Set(arr, value, mask=None)-> None
:param arr: The destination array
.. ocv:cfunction:: void cvSetND( CvArr* arr, const int* idx, CvScalar value )
-.. ocv:pyoldfunction:: cv.Set1D(arr, idx, value) -> None
-.. ocv:pyoldfunction:: cv.Set2D(arr, idx0, idx1, value) -> None
-.. ocv:pyoldfunction:: cv.Set3D(arr, idx0, idx1, idx2, value) -> None
-.. ocv:pyoldfunction:: cv.SetND(arr, indices, value) -> None
-
-
:param arr: Input array
:param idx0: The first zero-based component of the element index
Assigns user data to the array header.
.. ocv:cfunction:: void cvSetData(CvArr* arr, void* data, int step)
-.. ocv:pyoldfunction:: cv.SetData(arr, data, step)-> None
:param arr: Array header
Sets the channel of interest in an IplImage.
.. ocv:cfunction:: void cvSetImageCOI( IplImage* image, int coi)
-.. ocv:pyoldfunction:: cv.SetImageCOI(image, coi)-> None
:param image: A pointer to the image header
Sets an image Region Of Interest (ROI) for a given rectangle.
.. ocv:cfunction:: void cvSetImageROI( IplImage* image, CvRect rect)
-.. ocv:pyoldfunction:: cv.SetImageROI(image, rect)-> None
:param image: A pointer to the image header
.. ocv:cfunction:: void cvSetRealND( CvArr* arr, const int* idx, double value )
-.. ocv:pyoldfunction:: cv.SetReal1D(arr, idx, value) -> None
-.. ocv:pyoldfunction:: cv.SetReal2D(arr, idx0, idx1, value) -> None
-.. ocv:pyoldfunction:: cv.SetReal3D(arr, idx0, idx1, idx2, value) -> None
-.. ocv:pyoldfunction:: cv.SetRealND(arr, indices, value) -> None
-
:param arr: Input array
:param idx0: The first zero-based component of the element index
Clears the array.
.. ocv:cfunction:: void cvSetZero(CvArr* arr)
-.. ocv:pyoldfunction:: cv.SetZero(arr) -> None
:param arr: Array to be cleared
Returns the particular element of single-channel floating-point matrix.
.. ocv:cfunction:: double cvmGet(const CvMat* mat, int row, int col)
-.. ocv:pyoldfunction:: cv.mGet(mat, row, col) -> float
:param mat: Input matrix
Sets a specific element of a single-channel floating-point matrix.
.. ocv:cfunction:: void cvmSet(CvMat* mat, int row, int col, double value)
-.. ocv:pyoldfunction:: cv.mSet(mat, row, col, value)-> None
:param mat: The matrix
Initializes a random number generator state.
.. ocv:cfunction:: CvRNG cvRNG(int64 seed=-1)
-.. ocv:pyoldfunction:: cv.RNG(seed=-1LL)-> CvRNG
:param seed: 64-bit value used to initiate a random sequence
.. ocv:cfunction:: void cvRandArr( CvRNG* rng, CvArr* arr, int dist_type, CvScalar param1, CvScalar param2 )
-.. ocv:pyoldfunction:: cv.RandArr(rng, arr, distType, param1, param2)-> None
-
:param rng: CvRNG state initialized by :ocv:cfunc:`RNG`
:param arr: The destination array
Returns a 32-bit unsigned integer and updates RNG.
.. ocv:cfunction:: unsigned cvRandInt(CvRNG* rng)
-.. ocv:pyoldfunction:: cv.RandInt(rng)-> unsigned
:param rng: CvRNG state initialized by :ocv:cfunc:`RNG`.
Returns a floating-point random number and updates RNG.
.. ocv:cfunction:: double cvRandReal(CvRNG* rng)
-.. ocv:pyoldfunction:: cv.RandReal(rng) -> float
:param rng: RNG state initialized by :ocv:cfunc:`RNG`
---------
Create a CvMat from an object that supports the array interface.
-.. ocv:pyoldfunction:: cv.fromarray(array, allowND=False) -> mat
-
:param object: Any object that supports the array interface
:param allowND: If true, will return a CvMatND
.. ocv:cfunction:: void* cvLoad( const char* filename, CvMemStorage* memstorage=NULL, const char* name=NULL, const char** real_name=NULL )
-.. ocv:pyoldfunction:: cv.Load(filename, storage=None, name=None)-> generic
-
:param filename: File name
:param memstorage: Memory storage for dynamic structures, such as :ocv:struct:`CvSeq` or :ocv:struct:`CvGraph` . It is not used for matrices or images.
.. ocv:cfunction:: void cvSave( const char* filename, const void* struct_ptr, const char* name=NULL, const char* comment=NULL, CvAttrList attributes=cvAttrList() )
-.. ocv:pyoldfunction:: cv.Save(filename, structPtr, name=None, comment=None)-> None
-
:param filename: File name
:param struct_ptr: Object to save
.. 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:: cv.AbsDiff(src1, src2, dst)-> None
-.. ocv:pyoldfunction:: cv.AbsDiffS(src, dst, value)-> None
:param src1: first input array or a scalar.
.. 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:: cv.Add(src1, src2, dst, mask=None)-> None
-.. ocv:pyoldfunction:: cv.AddS(src, value, dst, mask=None)-> None
:param src1: first input array or a scalar.
.. ocv:pyfunction:: cv2.addWeighted(src1, alpha, src2, beta, gamma[, dst[, dtype]]) -> dst
.. ocv:cfunction:: void cvAddWeighted(const CvArr* src1, double alpha, const CvArr* src2, double beta, double gamma, CvArr* dst)
-.. ocv:pyoldfunction:: cv.AddWeighted(src1, alpha, src2, beta, gamma, dst)-> None
:param src1: first input array.
.. 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:: cv.And(src1, src2, dst, mask=None)-> None
-.. ocv:pyoldfunction:: cv.AndS(src, value, dst, mask=None)-> None
:param src1: first input array or a scalar.
.. ocv:pyfunction:: cv2.bitwise_not(src[, dst[, mask]]) -> dst
.. ocv:cfunction:: void cvNot(const CvArr* src, CvArr* dst)
-.. ocv:pyoldfunction:: cv.Not(src, dst)-> None
:param src: input array.
.. 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:: cv.Or(src1, src2, dst, mask=None)-> None
-.. ocv:pyoldfunction:: cv.OrS(src, value, dst, mask=None)-> None
:param src1: first input array or a scalar.
.. 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:: cv.Xor(src1, src2, dst, mask=None)-> None
-.. ocv:pyoldfunction:: cv.XorS(src, value, dst, mask=None)-> None
:param src1: first input array or a scalar.
.. ocv:cfunction:: void cvCalcCovarMatrix( const CvArr** vects, int count, CvArr* cov_mat, CvArr* avg, int flags )
-.. ocv:pyoldfunction:: cv.CalcCovarMatrix(vects, covMat, avg, flags)-> None
-
:param samples: samples stored either as separate matrices or as rows/columns of a single matrix.
:param nsamples: number of samples when they are stored separately.
.. ocv:cfunction:: void cvCartToPolar( const CvArr* x, const CvArr* y, CvArr* magnitude, CvArr* angle=NULL, int angle_in_degrees=0 )
-.. ocv:pyoldfunction:: cv.CartToPolar(x, y, magnitude, angle=None, angleInDegrees=0)-> None
-
:param x: array of x-coordinates; this must be a single-precision or double-precision floating-point array.
:param y: array of y-coordinates, that must have the same size and same type as ``x``.
.. ocv:cfunction:: void cvCmp( const CvArr* src1, const CvArr* src2, CvArr* dst, int cmp_op )
-.. ocv:pyoldfunction:: cv.Cmp(src1, src2, dst, cmpOp)-> None
-
.. ocv:cfunction:: void cvCmpS( const CvArr* src, double value, CvArr* dst, int cmp_op )
-.. ocv:pyoldfunction:: cv.CmpS(src, value, dst, cmpOp)-> None
-
:param src1: first input array or a scalar (in the case of ``cvCmp``, ``cv.Cmp``, ``cvCmpS``, ``cv.CmpS`` it is always an array); when it is an array, it must have a single channel.
:param src2: second input array or a scalar (in the case of ``cvCmp`` and ``cv.Cmp`` it is always an array; in the case of ``cvCmpS``, ``cv.CmpS`` it is always a scalar); when it is an array, it must have a single channel.
.. ocv:pyfunction:: cv2.convertScaleAbs(src[, dst[, alpha[, beta]]]) -> dst
.. ocv:cfunction:: void cvConvertScaleAbs(const CvArr* src, CvArr* dst, double scale=1, double shift=0)
-.. ocv:pyoldfunction:: cv.ConvertScaleAbs(src, dst, scale=1.0, shift=0.0)-> None
:param src: input array.
.. ocv:cfunction:: int cvCountNonZero(const CvArr* arr)
-.. ocv:pyoldfunction:: cv.CountNonZero(arr)-> int
-
:param src: single-channel array.
The function returns the number of non-zero elements in ``src`` :
.. ocv:pyfunction:: cv2.dct(src[, dst[, flags]]) -> dst
.. ocv:cfunction:: void cvDCT(const CvArr* src, CvArr* dst, int flags)
-.. ocv:pyoldfunction:: cv.DCT(src, dst, flags)-> None
:param src: input floating-point array.
.. ocv:cfunction:: void cvDFT( const CvArr* src, CvArr* dst, int flags, int nonzero_rows=0 )
-.. ocv:pyoldfunction:: cv.DFT(src, dst, flags, nonzeroRows=0)-> None
-
:param src: input array that could be real or complex.
:param dst: output array whose size and type depends on the ``flags`` .
.. ocv:pyfunction:: cv2.divide(scale, src2[, dst[, dtype]]) -> dst
.. ocv:cfunction:: void cvDiv(const CvArr* src1, const CvArr* src2, CvArr* dst, double scale=1)
-.. ocv:pyoldfunction:: cv.Div(src1, src2, dst, scale=1) -> None
:param src1: first input array.
.. ocv:cfunction:: double cvDet( const CvArr* mat )
-.. ocv:pyoldfunction:: cv.Det(mat) -> float
-
:param mtx: input matrix that must have ``CV_32FC1`` or ``CV_64FC1`` type and square size.
The function ``determinant`` calculates and returns the determinant of the specified matrix. For small matrices ( ``mtx.cols=mtx.rows<=3`` ),
.. ocv:cfunction:: void cvEigenVV( CvArr* mat, CvArr* evects, CvArr* evals, double eps=0, int lowindex=-1, int highindex=-1 )
-.. ocv:pyoldfunction:: cv.EigenVV(mat, evects, evals, eps, lowindex=-1, highindex=-1)-> None
-
:param src: input matrix that must have ``CV_32FC1`` or ``CV_64FC1`` type, square size and be symmetrical (``src`` :sup:`T` == ``src``).
:param eigenvalues: output vector of eigenvalues of the same type as ``src``; the eigenvalues are stored in the descending order.
.. ocv:pyfunction:: cv2.exp(src[, dst]) -> dst
.. ocv:cfunction:: void cvExp(const CvArr* src, CvArr* dst)
-.. ocv:pyoldfunction:: cv.Exp(src, dst)-> None
:param src: input array.
.. ocv:cfunction:: void cvFlip( const CvArr* src, CvArr* dst=NULL, int flip_mode=0 )
-.. ocv:pyoldfunction:: cv.Flip(src, dst=None, flipMode=0)-> None
-
:param src: input array.
:param dst: output array of the same size and type as ``src``.
.. ocv:pyfunction:: cv2.gemm(src1, src2, alpha, src3, gamma[, dst[, flags]]) -> dst
.. ocv:cfunction:: void cvGEMM( const CvArr* src1, const CvArr* src2, double alpha, const CvArr* src3, double beta, CvArr* dst, int tABC=0)
-.. ocv:pyoldfunction:: cv.GEMM(src1, src2, alpha, 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.
.. ocv:pyfunction:: cv2.getOptimalDFTSize(vecsize) -> retval
.. ocv:cfunction:: int cvGetOptimalDFTSize(int size0)
-.. ocv:pyoldfunction:: cv.GetOptimalDFTSize(size0)-> int
:param vecsize: vector size.
.. 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:: cv.InRange(src, lower, upper, dst)-> None
-.. ocv:pyoldfunction:: cv.InRangeS(src, lower, upper, dst)-> None
:param src: first input array.
.. ocv:cfunction:: double cvInvert( const CvArr* src, CvArr* dst, int method=CV_LU )
-.. ocv:pyoldfunction:: cv.Invert(src, dst, method=CV_LU) -> float
-
:param src: input floating-point ``M x N`` matrix.
:param dst: output matrix of ``N x M`` size and the same type as ``src``.
.. ocv:pyfunction:: cv2.log(src[, dst]) -> dst
.. ocv:cfunction:: void cvLog(const CvArr* src, CvArr* dst)
-.. ocv:pyoldfunction:: cv.Log(src, dst)-> None
:param src: input array.
.. ocv:pyfunction:: cv2.LUT(src, lut[, dst]) -> dst
.. ocv:cfunction:: void cvLUT(const CvArr* src, CvArr* dst, const CvArr* lut)
-.. ocv:pyoldfunction:: cv.LUT(src, dst, lut)-> None
:param src: input array of 8-bit elements.
.. ocv:cfunction:: double cvMahalanobis( const CvArr* vec1, const CvArr* vec2, const CvArr* mat )
-.. ocv:pyoldfunction:: cv.Mahalonobis(vec1, vec2, mat) -> None
-
:param vec1: first 1D input vector.
:param vec2: second 1D input vector.
.. 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:: cv.Max(src1, src2, dst)-> None
-.. ocv:pyoldfunction:: cv.MaxS(src, value, dst)-> None
:param src1: first input array.
.. ocv:cfunction:: CvScalar cvAvg( const CvArr* arr, const CvArr* mask=NULL )
-.. ocv:pyoldfunction:: cv.Avg(arr, mask=None) -> scalar
-
:param src: input array that should have from 1 to 4 channels so that the result can be stored in :ocv:class:`Scalar_` .
:param mask: optional operation mask.
.. ocv:cfunction:: void cvAvgSdv( const CvArr* arr, CvScalar* mean, CvScalar* std_dev, const CvArr* mask=NULL )
-.. ocv:pyoldfunction:: cv.AvgSdv(arr, mask=None) -> (mean, stdDev)
-
:param src: input array that should have from 1 to 4 channels so that the results can be stored in :ocv:class:`Scalar_` 's.
:param mean: output parameter: calculated mean value.
.. ocv:pyfunction:: cv2.merge(mv[, dst]) -> dst
.. ocv:cfunction:: void cvMerge(const CvArr* src0, const CvArr* src1, const CvArr* src2, const CvArr* src3, CvArr* dst)
-.. ocv:pyoldfunction:: cv.Merge(src0, src1, src2, src3, dst)-> None
:param mv: input array or vector of matrices to be merged; all the matrices in ``mv`` must have the same size and the same depth.
.. 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:: cv.Min(src1, src2, dst)-> None
-.. ocv:pyoldfunction:: cv.MinS(src, value, dst)-> None
:param src1: first input array.
.. ocv:cfunction:: void cvMinMaxLoc( const CvArr* arr, double* min_val, double* max_val, CvPoint* min_loc=NULL, CvPoint* max_loc=NULL, const CvArr* mask=NULL )
-.. ocv:pyoldfunction:: cv.MinMaxLoc(arr, mask=None)-> (minVal, maxVal, minLoc, maxLoc)
-
:param src: input single-channel array.
:param minVal: pointer to the returned minimum value; ``NULL`` is used if not required.
.. ocv:cfunction:: void cvMixChannels( const CvArr** src, int src_count, CvArr** dst, int dst_count, const int* from_to, int pair_count )
-.. ocv:pyoldfunction:: cv.MixChannels(src, dst, fromTo) -> None
-
:param src: input array or vector of matricesl; all of the matrices must have the same size and the same depth.
:param nsrcs: number of matrices in ``src``.
.. ocv:pyfunction:: cv2.mulSpectrums(a, b, flags[, c[, conjB]]) -> c
.. ocv:cfunction:: void cvMulSpectrums( const CvArr* src1, const CvArr* src2, CvArr* dst, int flags)
-.. ocv:pyoldfunction:: cv.MulSpectrums(src1, src2, dst, flags)-> None
:param src1: first input array.
.. ocv:pyfunction:: cv2.multiply(src1, src2[, dst[, scale[, dtype]]]) -> dst
.. ocv:cfunction:: void cvMul(const CvArr* src1, const CvArr* src2, CvArr* dst, double scale=1)
-.. ocv:pyoldfunction:: cv.Mul(src1, src2, dst, scale=1) -> None
:param src1: first input array.
.. ocv:cfunction:: void cvMulTransposed( const CvArr* src, CvArr* dst, int order, const CvArr* delta=NULL, double scale=1. )
-.. ocv:pyoldfunction:: cv.MulTransposed(src, dst, order, delta=None, scale=1.0) -> None
-
:param src: input single-channel matrix. Note that unlike :ocv:func:`gemm`, the function can multiply not only floating-point matrices.
:param dst: output square matrix.
.. ocv:cfunction:: double cvNorm( const CvArr* arr1, const CvArr* arr2=NULL, int norm_type=CV_L2, const CvArr* mask=NULL )
-.. ocv:pyoldfunction:: cv.Norm(arr1, arr2, normType=CV_L2, mask=None) -> float
-
:param src1: first input array.
:param src2: second input array of the same size and the same type as ``src1``.
.. ocv:pyfunction:: cv2.perspectiveTransform(src, m[, dst]) -> dst
.. ocv:cfunction:: void cvPerspectiveTransform(const CvArr* src, CvArr* dst, const CvMat* mat)
-.. ocv:pyoldfunction:: cv.PerspectiveTransform(src, dst, mat)-> None
:param src: input two-channel or three-channel floating-point array; each element is a 2D/3D vector to be transformed.
.. ocv:cfunction:: void cvPolarToCart( const CvArr* magnitude, const CvArr* angle, CvArr* x, CvArr* y, int angle_in_degrees=0 )
-.. ocv:pyoldfunction:: cv.PolarToCart(magnitude, angle, x, y, angleInDegrees=0)-> None
-
:param magnitude: input 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: input floating-point array of angles of 2D vectors.
.. ocv:pyfunction:: cv2.pow(src, power[, dst]) -> dst
.. ocv:cfunction:: void cvPow( const CvArr* src, CvArr* dst, double power)
-.. ocv:pyoldfunction:: cv.Pow(src, dst, power)-> None
:param src: input array.
.. ocv:pyfunction:: cv2.reduce(src, dim, rtype[, dst[, dtype]]) -> dst
.. ocv:cfunction:: void cvReduce(const CvArr* src, CvArr* dst, int dim=-1, int op=CV_REDUCE_SUM)
-.. ocv:pyoldfunction:: cv.Reduce(src, dst, dim=-1, op=CV_REDUCE_SUM)-> None
:param src: input 2D matrix.
.. ocv:cfunction:: void cvRepeat(const CvArr* src, CvArr* dst)
-.. ocv:pyoldfunction:: cv.Repeat(src, dst)-> None
-
:param src: input array to replicate.
:param dst: output array of the same type as ``src``.
.. ocv:pyfunction:: cv2.scaleAdd(src1, alpha, src2[, dst]) -> dst
.. ocv:cfunction:: void cvScaleAdd(const CvArr* src1, CvScalar scale, const CvArr* src2, CvArr* dst)
-.. ocv:pyoldfunction:: cv.ScaleAdd(src1, scale, src2, dst)-> None
:param src1: first input array.
.. ocv:cfunction:: void cvSetIdentity(CvArr* mat, CvScalar value=cvRealScalar(1))
-.. ocv:pyoldfunction:: cv.SetIdentity(mat, value=1)-> None
-
:param mtx: matrix to initialize (not necessarily square).
:param value: value to assign to diagonal elements.
.. ocv:pyfunction:: cv2.solve(src1, src2[, dst[, flags]]) -> retval, dst
.. ocv:cfunction:: int cvSolve(const CvArr* src1, const CvArr* src2, CvArr* dst, int method=CV_LU)
-.. ocv:pyoldfunction:: cv.Solve(A, B, X, method=CV_LU)-> None
:param src1: input matrix on the left-hand side of the system.
.. ocv:cfunction:: int cvSolveCubic( const CvMat* coeffs, CvMat* roots )
-.. ocv:pyoldfunction:: cv.SolveCubic(coeffs, roots)-> None
-
:param coeffs: equation coefficients, an array of 3 or 4 elements.
:param roots: output array of real roots that has 1 or 3 elements.
.. ocv:cfunction:: void cvSplit(const CvArr* src, CvArr* dst0, CvArr* dst1, CvArr* dst2, CvArr* dst3)
-.. ocv:pyoldfunction:: cv.Split(src, dst0, dst1, dst2, dst3)-> None
-
:param src: input multi-channel array.
:param mv: output array or vector of arrays; in the first variant of the function the number of arrays must match ``src.channels()``; the arrays themselves are reallocated, if needed.
.. ocv:pyfunction:: cv2.sqrt(src[, dst]) -> dst
.. ocv:cfunction:: float cvSqrt(float value)
-.. ocv:pyoldfunction:: cv.Sqrt(value)-> float
:param src: input floating-point array.
.. ocv:cfunction:: void cvSubRS( const CvArr* src, CvScalar value, CvArr* dst, const CvArr* mask=NULL )
.. ocv:cfunction:: void cvSubS( const CvArr* src, CvScalar value, CvArr* dst, const CvArr* mask=NULL )
-.. ocv:pyoldfunction:: cv.Sub(src1, src2, dst, mask=None) -> None
-.. ocv:pyoldfunction:: cv.SubRS(src, value, dst, mask=None) -> None
-.. ocv:pyoldfunction:: cv.SubS(src, value, dst, mask=None) -> None
-
:param src1: first input array or a scalar.
:param src2: second input array or a scalar.
.. ocv:cfunction:: void cvSVD( CvArr* A, CvArr* W, CvArr* U=NULL, CvArr* V=NULL, int flags=0 )
-.. ocv:pyoldfunction:: cv.SVD(A, W, U=None, V=None, flags=0) -> None
-
:param src: decomposed matrix
:param w: calculated singular values
.. ocv:cfunction:: void cvSVBkSb( const CvArr* W, const CvArr* U, const CvArr* V, const CvArr* B, CvArr* X, int flags )
-.. ocv:pyoldfunction:: cv.SVBkSb(W, U, V, B, X, flags) -> None
-
:param w: singular values
:param u: left singular vectors
.. ocv:cfunction:: CvScalar cvSum(const CvArr* arr)
-.. ocv:pyoldfunction:: cv.Sum(arr) -> scalar
-
:param arr: input array that must have from 1 to 4 channels.
The functions ``sum`` calculate and return the sum of array elements, independently for each channel.
.. ocv:cfunction:: CvScalar cvTrace(const CvArr* mat)
-.. ocv:pyoldfunction:: cv.Trace(mat) -> scalar
-
:param mat: input matrix.
The function ``trace`` returns the sum of the diagonal elements of the matrix ``mtx`` .
.. ocv:cfunction:: void cvTransform( const CvArr* src, CvArr* dst, const CvMat* transmat, const CvMat* shiftvec=NULL )
-.. ocv:pyoldfunction:: cv.Transform(src, dst, transmat, shiftvec=None)-> None
-
:param src: input array that must have as many channels (1 to 4) as ``m.cols`` or ``m.cols-1``.
:param dst: output array of the same size and depth as ``src``; it has as many channels as ``m.rows``.
.. ocv:pyfunction:: cv2.transpose(src[, dst]) -> dst
.. ocv:cfunction:: void cvTranspose(const CvArr* src, CvArr* dst)
-.. ocv:pyoldfunction:: cv.Transpose(src, dst)-> None
:param src: input array.
.. ocv:pyfunction:: cv2.fastAtan2(y, x) -> retval
.. ocv:cfunction:: float cvFastArctan(float y, float x)
-.. ocv:pyoldfunction:: cv.FastArctan(y, x)-> float
:param x: x-coordinate of the vector.
.. ocv:cfunction:: float cvCbrt( float value )
-.. ocv:pyoldfunction:: cv.Cbrt(value)-> float
-
:param val: A function argument.
The function ``cubeRoot`` computes :math:`\sqrt[3]{\texttt{val}}`. Negative arguments are handled correctly. NaN and Inf are not handled. The accuracy approaches the maximum possible accuracy for single-precision data.
Rounds floating-point number to the nearest integer not smaller than the original.
.. ocv:cfunction:: int cvCeil(double value)
-.. ocv:pyoldfunction:: cv.Ceil(value) -> int
:param value: floating-point number. If the value is outside of ``INT_MIN`` ... ``INT_MAX`` range, the result is not defined.
Rounds floating-point number to the nearest integer not larger than the original.
.. ocv:cfunction:: int cvFloor(double value)
-.. ocv:pyoldfunction:: cv.Floor(value) -> int
:param value: floating-point number. If the value is outside of ``INT_MIN`` ... ``INT_MAX`` range, the result is not defined.
Rounds floating-point number to the nearest integer
.. ocv:cfunction:: int cvRound(double value)
-.. ocv:pyoldfunction:: cv.Round(value) -> int
:param value: floating-point number. If the value is outside of ``INT_MIN`` ... ``INT_MAX`` range, the result is not defined.
Determines if the argument is Infinity.
.. ocv:cfunction:: int cvIsInf(double value)
-.. ocv:pyoldfunction:: cv.IsInf(value)-> int
:param value: The input floating-point value
Determines if the argument is Not A Number.
.. ocv:cfunction:: int cvIsNaN(double value)
-.. ocv:pyoldfunction:: cv.IsNaN(value)-> int
:param value: The input floating-point value
.. ocv:cfunction:: CvMat* cvLoadImageM( const char* filename, int iscolor=CV_LOAD_IMAGE_COLOR )
-.. ocv:pyoldfunction:: cv.LoadImage(filename, iscolor=CV_LOAD_IMAGE_COLOR) -> None
-
-.. ocv:pyoldfunction:: cv.LoadImageM(filename, iscolor=CV_LOAD_IMAGE_COLOR) -> None
-
:param filename: Name of file to be loaded.
:param flags: Flags specifying the color type of a loaded image:
.. ocv:cfunction:: int cvSaveImage( const char* filename, const CvArr* image, const int* params=0 )
-.. ocv:pyoldfunction:: cv.SaveImage(filename, image)-> None
-
:param filename: Name of the file.
:param image: Image to be saved.
.. ocv:pyfunction:: cv2.VideoCapture(device) -> <VideoCapture object>
.. ocv:cfunction:: CvCapture* cvCaptureFromCAM( int device )
-.. ocv:pyoldfunction:: cv.CaptureFromCAM(index) -> CvCapture
.. ocv:cfunction:: CvCapture* cvCaptureFromFile( const char* filename )
-.. ocv:pyoldfunction:: cv.CaptureFromFile(filename) -> CvCapture
:param filename: name of the opened video file
.. ocv:cfunction:: int cvGrabFrame(CvCapture* capture)
-.. ocv:pyoldfunction:: cv.GrabFrame(capture) -> int
-
The methods/functions grab the next frame from video file or camera and return true (non-zero) in the case of success.
The primary use of the function is in multi-camera environments, especially when the cameras do not have hardware synchronization. That is, you call ``VideoCapture::grab()`` for each camera and after that call the slower method ``VideoCapture::retrieve()`` to decode and get frame from each camera. This way the overhead on demosaicing or motion jpeg decompression etc. is eliminated and the retrieved frames from different cameras will be closer in time.
.. ocv:cfunction:: IplImage* cvRetrieveFrame( CvCapture* capture, int streamIdx=0 )
-.. ocv:pyoldfunction:: cv.RetrieveFrame(capture) -> image
-
The methods/functions decode and return the just grabbed frame. If no frames has been grabbed (camera has been disconnected, or there are no more frames in video file), the methods return false and the functions return NULL pointer.
.. note:: OpenCV 1.x functions ``cvRetrieveFrame`` and ``cv.RetrieveFrame`` return image stored inside the video capturing structure. It is not allowed to modify or release the image! You can copy the frame using :ocv:cfunc:`cvCloneImage` and then do whatever you want with the copy.
.. ocv:cfunction:: IplImage* cvQueryFrame(CvCapture* capture)
-.. ocv:pyoldfunction:: cv.QueryFrame(capture) -> image
-
The methods/functions combine :ocv:func:`VideoCapture::grab` and :ocv:func:`VideoCapture::retrieve` in one call. This is the most convenient method for reading video files or capturing data from decode and return the just grabbed frame. If no frames has been grabbed (camera has been disconnected, or there are no more frames in video file), the methods return false and the functions return NULL pointer.
.. note:: OpenCV 1.x functions ``cvRetrieveFrame`` and ``cv.RetrieveFrame`` return image stored inside the video capturing structure. It is not allowed to modify or release the image! You can copy the frame using :ocv:cfunc:`cvCloneImage` and then do whatever you want with the copy.
.. ocv:cfunction:: double cvGetCaptureProperty( CvCapture* capture, int property_id )
-.. ocv:pyoldfunction:: cv.GetCaptureProperty(capture, property_id) -> float
-
-
:param propId: Property identifier. It can be one of the following:
* **CV_CAP_PROP_POS_MSEC** Current position of the video file in milliseconds or video capture timestamp.
.. ocv:cfunction:: int cvSetCaptureProperty( CvCapture* capture, int property_id, double value )
-.. ocv:pyoldfunction:: cv.SetCaptureProperty(capture, property_id, value) -> retval
-
:param propId: Property identifier. It can be one of the following:
* **CV_CAP_PROP_POS_MSEC** Current position of the video file in milliseconds.
.. ocv:pyfunction:: cv2.VideoWriter([filename, fourcc, fps, frameSize[, isColor]]) -> <VideoWriter object>
.. ocv:cfunction:: CvVideoWriter* cvCreateVideoWriter( const char* filename, int fourcc, double fps, CvSize frame_size, int is_color=1 )
-.. ocv:pyoldfunction:: cv.CreateVideoWriter(filename, fourcc, fps, frame_size, is_color=true) -> CvVideoWriter
.. ocv:pyfunction:: cv2.VideoWriter.isOpened() -> retval
.. ocv:pyfunction:: cv2.VideoWriter.open(filename, fourcc, fps, frameSize[, isColor]) -> retval
.. ocv:pyfunction:: cv2.VideoWriter.write(image) -> None
.. ocv:cfunction:: int cvWriteFrame( CvVideoWriter* writer, const IplImage* image )
-.. ocv:pyoldfunction:: cv.WriteFrame(writer, image)->int
:param writer: Video writer structure (OpenCV 1.x API)
.. ocv:cfunction:: int cvCreateTrackbar( const char* trackbar_name, const char* window_name, int* value, int count, CvTrackbarCallback on_change=NULL )
-.. ocv:pyoldfunction:: cv.CreateTrackbar(trackbarName, windowName, value, count, onChange) -> None
-
:param trackbarname: Name of the created trackbar.
:param winname: Name of the window that will be used as a parent of the created trackbar.
.. ocv:cfunction:: int cvGetTrackbarPos( const char* trackbar_name, const char* window_name )
-.. ocv:pyoldfunction:: cv.GetTrackbarPos(trackbarName, windowName) -> retval
-
:param trackbarname: Name of the trackbar.
:param winname: Name of the window that is the parent of the trackbar.
.. ocv:cfunction:: void cvShowImage( const char* name, const CvArr* image )
-.. ocv:pyoldfunction:: cv.ShowImage(name, image) -> None
-
:param winname: Name of the window.
:param image: Image to be shown.
.. ocv:cfunction:: int cvNamedWindow( const char* name, int flags=CV_WINDOW_AUTOSIZE )
-.. ocv:pyoldfunction:: cv.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 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 :ocv:func:`imshow` ), and you cannot change the window size manually.
.. ocv:cfunction:: void cvDestroyWindow( const char* name )
-.. ocv:pyoldfunction:: cv.DestroyWindow(name)-> None
-
:param winname: Name of the window to be destroyed.
The function ``destroyWindow`` destroys the window with the given name.
.. ocv:cfunction:: void cvDestroyAllWindows()
-.. ocv:pyoldfunction:: cv.DestroyAllWindows()-> None
-
The function ``destroyAllWindows`` destroys all of the opened HighGUI windows.
.. ocv:cfunction:: void cvMoveWindow( const char* name, int x, int y )
-.. ocv:pyoldfunction:: cv.MoveWindow(name, x, y)-> None
-
:param winname: Window name
:param x: The new x-coordinate of the window
.. ocv:cfunction:: void cvResizeWindow( const char* name, int width, int height )
-.. ocv:pyoldfunction:: cv.ResizeWindow(name, width, height)-> None
-
:param winname: Window name
:param width: The new window width
.. ocv:cfunction:: void cvSetMouseCallback( const char* window_name, CvMouseCallback on_mouse, void* param=NULL )
-.. ocv:pyoldfunction:: cv.SetMouseCallback(windowName, onMouse, param=None) -> None
-
:param winname: Window name
:param onMouse: Mouse callback. See OpenCV samples, such as http://code.opencv.org/projects/opencv/repository/revisions/master/entry/samples/cpp/ffilldemo.cpp, on how to specify and use the callback.
.. ocv:cfunction:: void cvSetTrackbarPos( const char* trackbar_name, const char* window_name, int pos )
-.. ocv:pyoldfunction:: cv.SetTrackbarPos(trackbarName, windowName, pos)-> None
-
:param trackbarname: Name of the trackbar.
:param winname: Name of the window that is the parent of trackbar.
.. ocv:cfunction:: int cvWaitKey( int delay=0 )
-.. ocv:pyoldfunction:: cv.WaitKey(delay=0)-> int
-
:param delay: Delay in milliseconds. 0 is the special value that means "forever".
The function ``waitKey`` waits for a key event infinitely (when
.. ocv:cfunction:: void cvCanny( const CvArr* image, CvArr* edges, double threshold1, double threshold2, int aperture_size=3 )
-.. ocv:pyoldfunction:: cv.Canny(image, edges, threshold1, threshold2, aperture_size=3) -> None
-
:param image: single-channel 8-bit input image.
:param edges: output edge map; it has the same size and type as ``image`` .
.. ocv:cfunction:: void cvCornerEigenValsAndVecs( const CvArr* image, CvArr* eigenvv, int block_size, int aperture_size=3 )
-.. ocv:pyoldfunction:: cv.CornerEigenValsAndVecs(image, eigenvv, blockSize, aperture_size=3) -> None
-
: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)`` .
.. ocv:cfunction:: void cvCornerHarris( const CvArr* image, CvArr* harris_responce, int block_size, int aperture_size=3, double k=0.04 )
-.. ocv:pyoldfunction:: cv.CornerHarris(image, harris_dst, blockSize, aperture_size=3, k=0.04) -> None
-
: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`` .
.. ocv:cfunction:: void cvCornerMinEigenVal( const CvArr* image, CvArr* eigenval, int block_size, int aperture_size=3 )
-.. ocv:pyoldfunction:: cv.CornerMinEigenVal(image, eigenval, blockSize, aperture_size=3) -> None
-
: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`` .
.. ocv:cfunction:: void cvFindCornerSubPix( const CvArr* image, CvPoint2D32f* corners, int count, CvSize win, CvSize zero_zone, CvTermCriteria criteria )
-.. ocv:pyoldfunction:: cv.FindCornerSubPix(image, corners, win, zero_zone, criteria) -> corners
-
:param image: Input image.
:param corners: Initial coordinates of the input corners and refined coordinates provided for output.
.. ocv:cfunction:: void cvGoodFeaturesToTrack( const CvArr* image, CvArr* eig_image, CvArr* temp_image, CvPoint2D32f* corners, int* corner_count, double quality_level, double min_distance, const CvArr* mask=NULL, int block_size=3, int use_harris=0, double k=0.04 )
-.. ocv:pyoldfunction:: cv.GoodFeaturesToTrack(image, eigImage, tempImage, cornerCount, qualityLevel, minDistance, mask=None, blockSize=3, useHarris=0, k=0.04) -> cornerCount
-
:param image: Input 8-bit or floating-point 32-bit, single-channel image.
:param eig_image: The parameter is ignored.
.. ocv:cfunction:: CvSeq* cvHoughLines2( CvArr* image, void* line_storage, int method, double rho, double theta, int threshold, double param1=0, double param2=0 )
-.. ocv:pyoldfunction:: cv.HoughLines2(image, storage, method, rho, theta, threshold, param1=0, param2=0)-> lines
-
:param image: 8-bit, single-channel binary source image. The image may be modified by the function.
:param lines: Output vector of lines. Each line is represented by a two-element vector :math:`(\rho, \theta)` . :math:`\rho` is the distance from the coordinate origin :math:`(0,0)` (top-left corner of the image). :math:`\theta` is the line rotation angle in radians ( :math:`0 \sim \textrm{vertical line}, \pi/2 \sim \textrm{horizontal line}` ).
.. ocv:cfunction:: void cvPreCornerDetect( const CvArr* image, CvArr* corners, int aperture_size=3 )
-.. ocv:pyoldfunction:: cv.PreCornerDetect(image, corners, apertureSize=3)-> None
-
: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`` .
.. ocv:pyfunction:: cv2.dilate(src, kernel[, dst[, anchor[, iterations[, borderType[, borderValue]]]]]) -> dst
.. ocv:cfunction:: void cvDilate( const CvArr* src, CvArr* dst, IplConvKernel* element=NULL, int iterations=1 )
-.. ocv:pyoldfunction:: cv.Dilate(src, dst, element=None, iterations=1)-> None
:param src: input image; the number of channels can be arbitrary, but the depth should be one of ``CV_8U``, ``CV_16U``, ``CV_16S``, ``CV_32F` or ``CV_64F``.
.. ocv:pyfunction:: cv2.erode(src, kernel[, dst[, anchor[, iterations[, borderType[, borderValue]]]]]) -> dst
.. ocv:cfunction:: void cvErode( const CvArr* src, CvArr* dst, IplConvKernel* element=NULL, int iterations=1)
-.. ocv:pyoldfunction:: cv.Erode(src, dst, element=None, iterations=1)-> None
:param src: input image; the number of channels can be arbitrary, but the depth should be one of ``CV_8U``, ``CV_16U``, ``CV_16S``, ``CV_32F` or ``CV_64F``.
.. ocv:cfunction:: void cvFilter2D( const CvArr* src, CvArr* dst, const CvMat* kernel, CvPoint anchor=cvPoint(-1,-1) )
-.. ocv:pyoldfunction:: cv.Filter2D(src, dst, kernel, anchor=(-1, -1))-> None
-
:param src: input image.
:param dst: output image of the same size and the same number of channels as ``src``.
.. ocv:cfunction:: IplConvKernel* cvCreateStructuringElementEx( int cols, int rows, int anchor_x, int anchor_y, int shape, int* values=NULL )
-.. ocv:pyoldfunction:: cv.CreateStructuringElementEx(cols, rows, anchorX, anchorY, shape, values=None)-> kernel
-
:param shape: Element shape that could be one of the following:
* **MORPH_RECT** - a rectangular structuring element:
.. ocv:pyfunction:: cv2.morphologyEx(src, op, kernel[, dst[, anchor[, iterations[, borderType[, borderValue]]]]]) -> dst
.. ocv:cfunction:: void cvMorphologyEx( const CvArr* src, CvArr* dst, CvArr* temp, IplConvKernel* element, int operation, int iterations=1 )
-.. ocv:pyoldfunction:: cv.MorphologyEx(src, dst, temp, element, operation, iterations=1)-> None
:param src: Source image. The number of channels can be arbitrary. The depth should be one of ``CV_8U``, ``CV_16U``, ``CV_16S``, ``CV_32F` or ``CV_64F``.
.. ocv:cfunction:: void cvLaplace( const CvArr* src, CvArr* dst, int aperture_size=3 )
-.. ocv:pyoldfunction:: cv.Laplace(src, dst, apertureSize=3) -> None
-
:param src: Source image.
:param dst: Destination image of the same size and the same number of channels as ``src`` .
.. ocv:cfunction:: void cvPyrDown( const CvArr* src, CvArr* dst, int filter=CV_GAUSSIAN_5x5 )
-.. ocv:pyoldfunction:: cv.PyrDown(src, dst, filter=CV_GAUSSIAN_5X5) -> None
-
:param src: input image.
:param dst: output image; it has the specified size and the same type as ``src``.
.. ocv:cfunction:: cvPyrUp( const CvArr* src, CvArr* dst, int filter=CV_GAUSSIAN_5x5 )
-.. ocv:pyoldfunction:: cv.PyrUp(src, dst, filter=CV_GAUSSIAN_5X5) -> None
-
:param src: input image.
:param dst: output image. It has the specified size and the same type as ``src`` .
.. ocv:cfunction:: void cvPyrMeanShiftFiltering( const CvArr* src, CvArr* dst, double sp, double sr, int max_level=1, CvTermCriteria termcrit= cvTermCriteria(CV_TERMCRIT_ITER+CV_TERMCRIT_EPS,5,1))
-.. ocv:pyoldfunction:: cv.PyrMeanShiftFiltering(src, dst, sp, sr, max_level=1, termcrit=(CV_TERMCRIT_ITER+CV_TERMCRIT_EPS, 5, 1)) -> None
-
:param src: The source 8-bit, 3-channel image.
:param dst: The destination image of the same format and the same size as the source.
.. ocv:cfunction:: void cvSmooth( const CvArr* src, CvArr* dst, int smoothtype=CV_GAUSSIAN, int size1=3, int size2=0, double sigma1=0, double sigma2=0 )
-.. ocv:pyoldfunction:: cv.Smooth(src, dst, smoothtype=CV_GAUSSIAN, param1=3, param2=0, param3=0, param4=0)-> None
-
:param src: The source image
:param dst: The destination image
.. ocv:cfunction:: void cvSobel( const CvArr* src, CvArr* dst, int xorder, int yorder, int aperture_size=3 )
-.. ocv:pyoldfunction:: cv.Sobel(src, dst, xorder, yorder, apertureSize=3)-> None
-
:param src: input image.
:param dst: output image of the same size and the same number of channels as ``src`` .
.. ocv:cfunction:: CvMat* cvGetAffineTransform( const CvPoint2D32f * src, const CvPoint2D32f * dst, CvMat * map_matrix )
-.. ocv:pyoldfunction:: cv.GetAffineTransform(src, dst, mapMatrix)-> None
-
:param src: Coordinates of triangle vertices in the source image.
:param dst: Coordinates of the corresponding triangle vertices in the destination image.
.. ocv:cfunction:: CvMat* cvGetPerspectiveTransform( const CvPoint2D32f* src, const CvPoint2D32f* dst, CvMat* map_matrix )
-.. ocv:pyoldfunction:: cv.GetPerspectiveTransform(src, dst, mapMatrix)-> None
-
:param src: Coordinates of quadrangle vertices in the source image.
:param dst: Coordinates of the corresponding quadrangle vertices in the destination image.
.. ocv:pyfunction:: cv2.getRectSubPix(image, patchSize, center[, patch[, patchType]]) -> patch
.. ocv:cfunction:: void cvGetRectSubPix( const CvArr* src, CvArr* dst, CvPoint2D32f center )
-.. ocv:pyoldfunction:: cv.GetRectSubPix(src, dst, center)-> None
:param src: Source image.
.. ocv:cfunction:: CvMat* cv2DRotationMatrix( CvPoint2D32f center, double angle, double scale, CvMat* map_matrix )
-.. ocv:pyoldfunction:: cv.GetRotationMatrix2D(center, angle, scale, mapMatrix)-> None
-
: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).
.. ocv:cfunction:: void cvLogPolar( const CvArr* src, CvArr* dst, CvPoint2D32f center, double M, int flags=CV_INTER_LINEAR+CV_WARP_FILL_OUTLIERS )
-.. ocv:pyoldfunction:: cv.LogPolar(src, dst, center, M, flags=CV_INNER_LINEAR+CV_WARP_FILL_OUTLIERS)-> None
-
:param src: Source image
:param dst: Destination image
.. ocv:pyfunction:: cv2.remap(src, map1, map2, interpolation[, dst[, borderMode[, borderValue]]]) -> dst
.. 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:: cv.Remap(src, dst, mapx, mapy, flags=CV_INNER_LINEAR+CV_WARP_FILL_OUTLIERS, fillval=(0, 0, 0, 0))-> None
:param src: Source image.
.. ocv:pyfunction:: cv2.resize(src, dsize[, dst[, fx[, fy[, interpolation]]]]) -> dst
.. ocv:cfunction:: void cvResize( const CvArr* src, CvArr* dst, int interpolation=CV_INTER_LINEAR )
-.. ocv:pyoldfunction:: cv.Resize(src, dst, interpolation=CV_INTER_LINEAR)-> None
:param src: input image.
.. ocv:cfunction:: void cvWarpAffine( const CvArr* src, CvArr* dst, const CvMat* map_matrix, int flags=CV_INTER_LINEAR+CV_WARP_FILL_OUTLIERS, CvScalar fillval=cvScalarAll(0) )
-.. ocv:pyoldfunction:: cv.WarpAffine(src, dst, mapMatrix, flags=CV_INTER_LINEAR+CV_WARP_FILL_OUTLIERS, fillval=(0, 0, 0, 0))-> None
-
.. ocv:cfunction:: void cvGetQuadrangleSubPix( const CvArr* src, CvArr* dst, const CvMat* map_matrix )
-.. ocv:pyoldfunction:: cv.GetQuadrangleSubPix(src, dst, mapMatrix)-> None
-
:param src: input image.
:param dst: output image that has the size ``dsize`` and the same type as ``src`` .
.. ocv:cfunction:: void cvWarpPerspective( const CvArr* src, CvArr* dst, const CvMat* map_matrix, int flags=CV_INTER_LINEAR+CV_WARP_FILL_OUTLIERS, CvScalar fillval=cvScalarAll(0) )
-.. ocv:pyoldfunction:: cv.WarpPerspective(src, dst, mapMatrix, flags=CV_INNER_LINEAR+CV_WARP_FILL_OUTLIERS, fillval=(0, 0, 0, 0))-> None
-
:param src: input image.
:param dst: output image that has the size ``dsize`` and the same type as ``src`` .
.. ocv:cfunction:: void cvInitUndistortRectifyMap( const CvMat* camera_matrix, const CvMat* dist_coeffs, const CvMat * R, const CvMat* new_camera_matrix, CvArr* mapx, CvArr* mapy )
.. ocv:cfunction:: void cvInitUndistortMap( const CvMat* camera_matrix, const CvMat* distortion_coeffs, CvArr* mapx, CvArr* mapy )
-.. ocv:pyoldfunction:: cv.InitUndistortRectifyMap(cameraMatrix, distCoeffs, R, newCameraMatrix, map1, map2)-> None
-.. ocv:pyoldfunction:: cv.InitUndistortMap(cameraMatrix, distCoeffs, 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 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.
.. ocv:cfunction:: void cvUndistort2( const CvArr* src, CvArr* dst, const CvMat* camera_matrix, const CvMat* distortion_coeffs, const CvMat* new_camera_matrix=0 )
-.. ocv:pyoldfunction:: cv.Undistort2(src, dst, cameraMatrix, distCoeffs)-> None
-
:param src: Input (distorted) image.
:param dst: Output (corrected) image that has the same size and type as ``src`` .
.. 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* camera_matrix, const CvMat* dist_coeffs, const CvMat* R=0, const CvMat* P=0 )
-.. ocv:pyoldfunction:: cv.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).
.. ocv:pyfunction:: cv2.calcHist(images, channels, mask, histSize, ranges[, hist[, accumulate]]) -> hist
.. ocv:cfunction:: void cvCalcHist( IplImage** image, CvHistogram* hist, int accumulate=0, const CvArr* mask=NULL )
-.. ocv:pyoldfunction:: cv.CalcHist(image, hist, accumulate=0, mask=None)-> None
:param images: 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.
.. ocv:pyfunction:: cv2.calcBackProject(images, channels, hist, ranges, scale[, dst]) -> dst
.. ocv:cfunction:: void cvCalcBackProject( IplImage** image, CvArr* backProject, const CvHistogram* hist )
-.. ocv:pyoldfunction:: cv.CalcBackProject(image, back_project, hist) -> None
:param images: 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.
.. ocv:pyfunction:: cv2.compareHist(H1, H2, method) -> retval
.. ocv:cfunction:: double cvCompareHist( const CvHistogram* hist1, const CvHistogram* hist2, int method )
-.. ocv:pyoldfunction:: cv.CompareHist(hist1, hist2, method)->float
:param H1: First compared histogram.
.. ocv:cfunction:: float cvCalcEMD2( const CvArr* signature1, const CvArr* signature2, int distance_type, CvDistanceFunction distance_func=NULL, const CvArr* cost_matrix=NULL, CvArr* flow=NULL, float* lower_bound=NULL, void* userdata=NULL )
-.. ocv:pyoldfunction:: cv.CalcEMD2(signature1, signature2, distance_type, distance_func=None, cost_matrix=None, flow=None, lower_bound=None, userdata=None) -> float
-
:param signature1: First signature, a :math:`\texttt{size1}\times \texttt{dims}+1` floating-point matrix. Each row stores the point weight followed by the point coordinates. The matrix is allowed to have a single column (weights only) if the user-defined cost matrix is used.
:param signature2: Second signature of the same format as ``signature1`` , though the number of rows may be different. The total weights may be different. In this case an extra "dummy" point is added to either ``signature1`` or ``signature2`` .
.. ocv:cfunction:: void cvCalcBackProjectPatch( IplImage** images, CvArr* dst, CvSize patch_size, CvHistogram* hist, int method, double factor )
-.. ocv:pyoldfunction:: cv.CalcBackProjectPatch(images, dst, patch_size, hist, method, factor)-> None
-
:param images: Source images (though, you may pass CvMat** as well).
:param dst: Destination image.
.. ocv:cfunction:: void cvCalcProbDensity( const CvHistogram* hist1, const CvHistogram* hist2, CvHistogram* dst_hist, double scale=255 )
-.. ocv:pyoldfunction:: cv.CalcProbDensity(hist1, hist2, dst_hist, scale=255) -> None
-
:param hist1: First histogram (the divisor).
:param hist2: Second histogram.
Clears the histogram.
.. ocv:cfunction:: void cvClearHist( CvHistogram* hist )
-.. ocv:pyoldfunction:: cv.ClearHist(hist)-> None
:param hist: Histogram.
.. ocv:cfunction:: CvHistogram* cvCreateHist( int dims, int* sizes, int type, float** ranges=NULL, int uniform=1 )
-.. ocv:pyoldfunction:: cv.CreateHist(dims, type, ranges=None, uniform=1) -> hist
-
:param dims: Number of histogram dimensions.
:param sizes: Array of the histogram dimension sizes.
.. ocv:cfunction:: void cvGetMinMaxHistValue( const CvHistogram* hist, float* min_value, float* max_value, int* min_idx=NULL, int* max_idx=NULL )
-.. ocv:pyoldfunction:: cv.GetMinMaxHistValue(hist)-> (min_value, max_value, min_idx, max_idx)
-
:param hist: Histogram.
:param min_value: Pointer to the minimum value of the histogram.
Normalizes the histogram.
.. ocv:cfunction:: void cvNormalizeHist( CvHistogram* hist, double factor )
-.. ocv:pyoldfunction:: cv.NormalizeHist(hist, factor)-> None
:param hist: Pointer to the histogram.
Thresholds the histogram.
.. ocv:cfunction:: void cvThreshHist( CvHistogram* hist, double threshold )
-.. ocv:pyoldfunction:: cv.ThreshHist(hist, threshold) -> None
:param hist: Pointer to the histogram.
.. ocv:cfunction:: void cvAdaptiveThreshold( const CvArr* src, CvArr* dst, double max_value, int adaptive_method=CV_ADAPTIVE_THRESH_MEAN_C, int threshold_type=CV_THRESH_BINARY, int block_size=3, double param1=5 )
-.. ocv:pyoldfunction:: cv.AdaptiveThreshold(src, dst, maxValue, adaptive_method=CV_ADAPTIVE_THRESH_MEAN_C, thresholdType=CV_THRESH_BINARY, blockSize=3, param1=5)-> None
-
:param src: Source 8-bit single-channel image.
:param dst: Destination image of the same size and the same type as ``src`` .
.. ocv:pyfunction:: cv2.cvtColor(src, code[, dst[, dstCn]]) -> dst
.. ocv:cfunction:: void cvCvtColor( const CvArr* src, CvArr* dst, int code )
-.. ocv:pyoldfunction:: cv.CvtColor(src, dst, code)-> None
:param src: input image: 8-bit unsigned, 16-bit unsigned ( ``CV_16UC...`` ), or single-precision floating-point.
.. ocv:cfunction:: void cvDistTransform( const CvArr* src, CvArr* dst, int distance_type=CV_DIST_L2, int mask_size=3, const float* mask=NULL, CvArr* labels=NULL, int labelType=CV_DIST_LABEL_CCOMP )
-.. ocv:pyoldfunction:: cv.DistTransform(src, dst, distance_type=CV_DIST_L2, mask_size=3, mask=None, labels=None) -> None
-
:param src: 8-bit, single-channel (binary) source image.
:param dst: Output image with calculated distances. It is a 32-bit floating-point, single-channel image of the same size as ``src`` .
.. ocv:pyfunction:: cv2.floodFill(image, mask, seedPoint, newVal[, loDiff[, upDiff[, flags]]]) -> retval, image, mask, rect
.. ocv:cfunction:: void cvFloodFill( CvArr* image, CvPoint seed_point, CvScalar new_val, CvScalar lo_diff=cvScalarAll(0), CvScalar up_diff=cvScalarAll(0), CvConnectedComp* comp=NULL, int flags=4, CvArr* mask=NULL )
-.. ocv:pyoldfunction:: cv.FloodFill(image, seed_point, new_val, lo_diff=(0, 0, 0, 0), up_diff=(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.
.. ocv:cfunction:: void cvIntegral( const CvArr* image, CvArr* sum, CvArr* sqsum=NULL, CvArr* tilted_sum=NULL )
-.. ocv:pyoldfunction:: cv.Integral(image, sum, sqsum=None, tiltedSum=None)-> None
-
:param image: input 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).
.. ocv:cfunction:: double cvThreshold( const CvArr* src, CvArr* dst, double threshold, double max_value, int threshold_type )
-.. ocv:pyoldfunction:: cv.Threshold(src, dst, threshold, maxValue, thresholdType)-> None
-
:param src: input array (single-channel, 8-bit or 32-bit floating point).
:param dst: output array of the same size and type as ``src``.
.. ocv:cfunction:: void cvAcc( const CvArr* image, CvArr* sum, const CvArr* mask=NULL )
-.. ocv:pyoldfunction:: cv.Acc(image, sum, mask=None) -> None
-
:param src: Input image as 1- or 3-channel, 8-bit or 32-bit floating point.
:param dst: Accumulator image with the same number of channels as input image, 32-bit or 64-bit floating-point.
.. ocv:cfunction:: void cvSquareAcc( const CvArr* image, CvArr* sqsum, const CvArr* mask=NULL )
-.. ocv:pyoldfunction:: cv.SquareAcc(image, sqsum, mask=None) -> None
-
:param src: Input image as 1- or 3-channel, 8-bit or 32-bit floating point.
:param dst: Accumulator image with the same number of channels as input image, 32-bit or 64-bit floating-point.
.. ocv:cfunction:: void cvMultiplyAcc( const CvArr* image1, const CvArr* image2, CvArr* acc, const CvArr* mask=NULL )
-.. ocv:pyoldfunction:: cv.MultiplyAcc(image1, image2, acc, mask=None)-> None
-
:param src1: First input image, 1- or 3-channel, 8-bit or 32-bit floating point.
:param src2: Second input image of the same type and the same size as ``src1`` .
.. ocv:pyfunction:: cv2.accumulateWeighted(src, dst, alpha[, mask]) -> dst
.. ocv:cfunction:: void cvRunningAvg( const CvArr* image, CvArr* acc, double alpha, const CvArr* mask=NULL )
-.. ocv:pyoldfunction:: cv.RunningAvg(image, acc, alpha, mask=None)-> None
:param src: Input image as 1- or 3-channel, 8-bit or 32-bit floating point.
.. ocv:pyfunction:: cv2.matchTemplate(image, templ, method[, result]) -> result
.. ocv:cfunction:: void cvMatchTemplate( const CvArr* image, const CvArr* templ, CvArr* result, int method )
-.. ocv:pyoldfunction:: cv.MatchTemplate(image, templ, result, method)-> None
:param image: Image where the search is running. It must be 8-bit or 32-bit floating-point.
.. ocv:cfunction:: void cvMoments( const CvArr* arr, CvMoments* moments, int binary=0 )
-.. ocv:pyoldfunction:: cv.Moments(arr, binary=0) -> moments
-
:param array: 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.
.. ocv:cfunction:: void cvGetHuMoments( CvMoments* moments, CvHuMoments* hu_moments )
-.. ocv:pyoldfunction:: cv.GetHuMoments(moments) -> hu
-
:param moments: Input moments computed with :ocv:func:`moments` .
:param hu: Output Hu invariants.
.. ocv:cfunction:: int cvFindContours( CvArr* image, CvMemStorage* storage, CvSeq** first_contour, int header_size=sizeof(CvContour), int mode=CV_RETR_LIST, int method=CV_CHAIN_APPROX_SIMPLE, CvPoint offset=cvPoint(0,0) )
-.. ocv:pyoldfunction:: cv.FindContours(image, storage, mode=CV_RETR_LIST, method=CV_CHAIN_APPROX_SIMPLE, offset=(0, 0)) -> 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.
.. ocv:cfunction:: CvSeq* cvApproxChains( CvSeq* src_seq, CvMemStorage* storage, int method=CV_CHAIN_APPROX_SIMPLE, double parameter=0, int minimal_perimeter=0, int recursive=0 )
-.. ocv:pyoldfunction:: cv.ApproxChains(src_seq, storage, method=CV_CHAIN_APPROX_SIMPLE, parameter=0, minimal_perimeter=0, recursive=0)-> contours
-
:param src_seq: Pointer to the approximated Freeman chain that can refer to other chains.
:param storage: Storage location for the resulting polylines.
.. ocv:cfunction:: double cvArcLength( const void* curve, CvSlice slice=CV_WHOLE_SEQ, int is_closed=-1 )
-.. ocv:pyoldfunction:: cv.ArcLength(curve, slice=CV_WHOLE_SEQ, isClosed=-1) -> float
-
:param curve: Input vector of 2D points, stored in ``std::vector`` or ``Mat``.
:param closed: Flag indicating whether the curve is closed or not.
.. ocv:pyfunction:: cv2.boundingRect(points) -> retval
.. ocv:cfunction:: CvRect cvBoundingRect( CvArr* points, int update=0 )
-.. ocv:pyoldfunction:: cv.BoundingRect(points, update=0)-> CvRect
:param points: Input 2D point set, stored in ``std::vector`` or ``Mat``.
.. ocv:cfunction:: double cvContourArea( const CvArr* contour, CvSlice slice=CV_WHOLE_SEQ, int oriented=0 )
-.. ocv:pyoldfunction:: cv.ContourArea(contour, slice=CV_WHOLE_SEQ) -> float
-
:param contour: Input vector of 2D points (contour vertices), stored in ``std::vector`` or ``Mat``.
:param oriented: 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 the sign of an area. By default, the parameter is ``false``, which means that the absolute value is returned.
.. ocv:cfunction:: CvSeq* cvConvexHull2( const CvArr* input, void* hull_storage=NULL, int orientation=CV_CLOCKWISE, int return_points=0 )
-.. ocv:pyoldfunction:: cv.ConvexHull2(points, storage, orientation=CV_CLOCKWISE, return_points=0) -> convexHull
-
:param points: Input 2D point set, stored in ``std::vector`` or ``Mat``.
:param hull: Output convex hull. It is either an integer vector of indices or vector of points. In the first case, the ``hull`` elements are 0-based indices of the convex hull points in the original array (since the set of convex hull points is a subset of the original point set). In the second case, ``hull`` elements are the convex hull points themselves.
.. ocv:cfunction:: CvSeq* cvConvexityDefects( const CvArr* contour, const CvArr* convexhull, CvMemStorage* storage=NULL )
-.. ocv:pyoldfunction:: cv.ConvexityDefects(contour, convexhull, storage)-> convexityDefects
-
:param contour: Input contour.
:param convexhull: Convex hull obtained using :ocv:func:`convexHull` that should contain indices of the contour points that make the hull.
.. ocv:pyfunction:: cv2.fitEllipse(points) -> retval
.. ocv:cfunction:: CvBox2D cvFitEllipse2( const CvArr* points )
-.. ocv:pyoldfunction:: cv.FitEllipse2(points)-> Box2D
:param points: Input 2D point set, stored in:
.. ocv:cfunction:: void cvFitLine( const CvArr* points, int dist_type, double param, double reps, double aeps, float* line )
-.. ocv:pyoldfunction:: cv.FitLine(points, dist_type, param, reps, aeps) -> line
-
: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.
.. ocv:pyfunction:: cv2.isContourConvex(contour) -> retval
.. ocv:cfunction:: int cvCheckContourConvexity( const CvArr* contour )
-.. ocv:pyoldfunction:: cv.CheckContourConvexity(contour)-> int
:param contour: Input vector of 2D points, stored in:
.. ocv:cfunction:: CvBox2D cvMinAreaRect2( const CvArr* points, CvMemStorage* storage=NULL )
-.. ocv:pyoldfunction:: cv.MinAreaRect2(points, storage=None) -> Box2D
-
:param points: Input vector of 2D points, stored in:
* ``std::vector<>`` or ``Mat`` (C++ interface)
.. ocv:cfunction:: int cvMinEnclosingCircle( const CvArr* points, CvPoint2D32f* center, float* radius )
-.. ocv:pyoldfunction:: cv.MinEnclosingCircle(points)-> (int, center, radius)
-
:param points: Input vector of 2D points, stored in:
* ``std::vector<>`` or ``Mat`` (C++ interface)
.. ocv:pyfunction:: cv2.matchShapes(contour1, contour2, method, parameter) -> retval
.. ocv:cfunction:: double cvMatchShapes( const void* object1, const void* object2, int method, double parameter=0 )
-.. ocv:pyoldfunction:: cv.MatchShapes(object1, object2, method, parameter=0) -> float
:param object1: First contour or grayscale image.
.. ocv:pyfunction:: cv2.pointPolygonTest(contour, pt, measureDist) -> retval
.. ocv:cfunction:: double cvPointPolygonTest( const CvArr* contour, CvPoint2D32f pt, int measure_dist )
-.. ocv:pyoldfunction:: cv.PointPolygonTest(contour, pt, measure_dist) -> float
:param contour: Input contour.
return "C"
if line.startswith(".. ocv:pyfunction::"):
return "Python2"
- if line.startswith(".. ocv:pyoldfunction::"):
- return "Python1"
if line.startswith(".. ocv:jfunction::"):
return "Java"
return None
.. ocv:cfunction:: float cvQueryHistValue_3D(CvHistogram hist, int idx0, int idx1, int idx2)
.. ocv:cfunction:: float cvQueryHistValue_nD(CvHistogram hist, const int* idx)
-.. ocv:pyoldfunction:: cv.QueryHistValue_1D(hist, idx0) -> float
-.. ocv:pyoldfunction:: cv.QueryHistValue_2D(hist, idx0, idx1) -> float
-.. ocv:pyoldfunction:: cv.QueryHistValue_3D(hist, idx0, idx1, idx2) -> float
-.. ocv:pyoldfunction:: cv.QueryHistValue_nD(hist, idx) -> float
-
:param hist: Histogram.
:param idx0: 0-th index.
.. ocv:cfunction:: void cvCalcOpticalFlowBM( const CvArr* prev, const CvArr* curr, CvSize block_size, CvSize shift_size, CvSize max_range, int use_previous, CvArr* velx, CvArr* vely )
-.. ocv:pyoldfunction:: cv.CalcOpticalFlowBM(prev, curr, blockSize, shiftSize, max_range, usePrevious, velx, vely)-> None
-
:param prev: First image, 8-bit, single-channel
:param curr: Second image, 8-bit, single-channel
.. ocv:cfunction:: void cvCalcOpticalFlowHS(const CvArr* prev, const CvArr* curr, int use_previous, CvArr* velx, CvArr* vely, double lambda, CvTermCriteria criteria)
-.. ocv:pyoldfunction:: cv.CalcOpticalFlowHS(prev, curr, usePrevious, velx, vely, lambda, criteria)-> None
-
:param prev: First image, 8-bit, single-channel
:param curr: Second image, 8-bit, single-channel
.. ocv:cfunction:: void cvCalcOpticalFlowLK( const CvArr* prev, const CvArr* curr, CvSize win_size, CvArr* velx, CvArr* vely )
-.. ocv:pyoldfunction:: cv.CalcOpticalFlowLK(prev, curr, winSize, velx, vely)-> None
-
:param prev: First image, 8-bit, single-channel
:param curr: Second image, 8-bit, single-channel
Calculates the coordinates of the Voronoi diagram cells.
.. ocv:cfunction:: void cvCalcSubdivVoronoi2D( CvSubdiv2D* subdiv )
-.. ocv:pyoldfunction:: cv.CalcSubdivVoronoi2D(subdiv)-> None
:param subdiv: Delaunay subdivision, in which all the points are already added.
Removes all virtual points.
.. ocv:cfunction:: void cvClearSubdivVoronoi2D( CvSubdiv2D* subdiv )
-.. ocv:pyoldfunction:: cv.ClearSubdivVoronoi2D(subdiv)-> None
:param subdiv: Delaunay subdivision.
Creates an empty Delaunay triangulation.
.. ocv:cfunction:: CvSubdiv2D* cvCreateSubdivDelaunay2D( CvRect rect, CvMemStorage* storage )
-.. ocv:pyoldfunction:: cv.CreateSubdivDelaunay2D(rect, storage) -> CvSubdiv2D
:param rect: Rectangle that includes all of the 2D points that are to be added to the subdivision.
Finds the subdivision vertex closest to the given point.
.. ocv:cfunction:: CvSubdiv2DPoint* cvFindNearestPoint2D( CvSubdiv2D* subdiv, CvPoint2D32f pt )
-.. ocv:pyoldfunction:: cv.FindNearestPoint2D(subdiv, pt)-> point
:param subdiv: Delaunay or another subdivision.
Returns the edge destination.
.. ocv:cfunction:: CvSubdiv2DPoint* cvSubdiv2DEdgeDst( CvSubdiv2DEdge edge )
-.. ocv:pyoldfunction:: cv.Subdiv2DEdgeDst(edge)-> point
:param edge: Subdivision edge (not a quad-edge).
Returns one of the edges related to the given edge.
.. ocv:cfunction:: CvSubdiv2DEdge cvSubdiv2DGetEdge( CvSubdiv2DEdge edge, CvNextEdgeType type )
-.. ocv:pyoldfunction:: cv.Subdiv2DGetEdge(edge, type)-> CvSubdiv2DEdge
:param edge: Subdivision edge (not a quad-edge).
Returns next edge around the edge origin.
.. ocv:cfunction:: CvSubdiv2DEdge cvSubdiv2DNextEdge( CvSubdiv2DEdge edge )
-.. ocv:pyoldfunction:: cv.Subdiv2DNextEdge(edge)-> CvSubdiv2DEdge
:param edge: Subdivision edge (not a quad-edge).
Returns the location of a point within a Delaunay triangulation.
.. ocv:cfunction:: CvSubdiv2DPointLocation cvSubdiv2DLocate( CvSubdiv2D* subdiv, CvPoint2D32f pt, CvSubdiv2DEdge* edge, CvSubdiv2DPoint** vertex=NULL )
-.. ocv:pyoldfunction:: cv.Subdiv2DLocate(subdiv, pt) -> (loc, where)
:param subdiv: Delaunay or another subdivision.
Returns another edge of the same quad-edge.
.. ocv:cfunction:: CvSubdiv2DEdge cvSubdiv2DRotateEdge( CvSubdiv2DEdge edge, int rotate )
-.. ocv:pyoldfunction:: cv.Subdiv2DRotateEdge(edge, rotate)-> CvSubdiv2DEdge
:param edge: Subdivision edge (not a quad-edge).
Inserts a single point into a Delaunay triangulation.
.. ocv:cfunction:: CvSubdiv2DPoint* cvSubdivDelaunay2DInsert( CvSubdiv2D* subdiv, CvPoint2D32f pt)
-.. ocv:pyoldfunction:: cv.SubdivDelaunay2DInsert(subdiv, pt)-> point
:param subdiv: Delaunay subdivision created by the function :ocv:cfunc:`CreateSubdivDelaunay2D`.
.. ocv:cfunction:: void cvExtractSURF( const CvArr* image, const CvArr* mask, CvSeq** keypoints, CvSeq** descriptors, CvMemStorage* storage, CvSURFParams params )
-.. ocv:pyoldfunction:: cv.ExtractSURF(image, mask, storage, params)-> (keypoints, descriptors)
-
:param image: Input 8-bit grayscale image
:param mask: Optional input mask that marks the regions where we should detect features.
.. ocv:cfunction:: CvSeq* cvHaarDetectObjects( const CvArr* image, CvHaarClassifierCascade* cascade, CvMemStorage* storage, double scale_factor=1.1, int min_neighbors=3, int flags=0, CvSize min_size=cvSize(0,0), CvSize max_size=cvSize(0,0) )
-.. ocv:pyoldfunction:: cv.HaarDetectObjects(image, cascade, storage, scale_factor=1.1, min_neighbors=3, flags=0, min_size=(0, 0)) -> detectedObjects
-
:param cascade: Haar classifier cascade (OpenCV 1.x API only). It can be loaded from XML or YAML file using :ocv:cfunc:`Load`. When the cascade is not needed anymore, release it using ``cvReleaseHaarClassifierCascade(&cascade)``.
:param image: Matrix of the type ``CV_8U`` containing an image where objects are detected.
.. ocv:pyfunction:: cv2.inpaint(src, inpaintMask, inpaintRadius, flags[, dst]) -> dst
.. ocv:cfunction:: void cvInpaint( const CvArr* src, const CvArr* inpaint_mask, CvArr* dst, double inpaintRange, int flags )
-.. ocv:pyoldfunction:: cv.Inpaint(src, mask, dst, inpaintRadius, flags) -> None
:param src: Input 8-bit 1-channel or 3-channel image.
.. ocv:pyfunction:: cv2.calcOpticalFlowPyrLK(prevImg, nextImg, prevPts, nextPts[, status[, err[, winSize[, maxLevel[, criteria[, flags[, minEigThreshold]]]]]]]) -> nextPts, status, err
.. ocv:cfunction:: void cvCalcOpticalFlowPyrLK( const CvArr* prev, const CvArr* curr, CvArr* prev_pyr, CvArr* curr_pyr, const CvPoint2D32f* prev_features, CvPoint2D32f* curr_features, int count, CvSize win_size, int level, char* status, float* track_error, CvTermCriteria criteria, int flags )
-.. ocv:pyoldfunction:: cv.CalcOpticalFlowPyrLK(prev, curr, prevPyr, currPyr, prevFeatures, winSize, level, criteria, flags, guesses=None) -> (currFeatures, status, track_error)
:param prevImg: first 8-bit input image or pyramid constructed by :ocv:func:`buildOpticalFlowPyramid`.
.. ocv:pyfunction:: cv2.updateMotionHistory(silhouette, mhi, timestamp, duration) -> mhi
.. ocv:cfunction:: void cvUpdateMotionHistory( const CvArr* silhouette, CvArr* mhi, double timestamp, double duration )
-.. ocv:pyoldfunction:: cv.UpdateMotionHistory(silhouette, mhi, timestamp, duration)-> None
:param silhouette: Silhouette mask that has non-zero pixels where the motion occurs.
.. ocv:pyfunction:: cv2.calcMotionGradient(mhi, delta1, delta2[, mask[, orientation[, apertureSize]]]) -> mask, orientation
.. ocv:cfunction:: void cvCalcMotionGradient( const CvArr* mhi, CvArr* mask, CvArr* orientation, double delta1, double delta2, int aperture_size=3 )
-.. ocv:pyoldfunction:: cv.CalcMotionGradient(mhi, mask, orientation, delta1, delta2, apertureSize=3)-> None
:param mhi: Motion history single-channel floating-point image.
.. ocv:pyfunction:: cv2.calcGlobalOrientation(orientation, mask, mhi, timestamp, duration) -> retval
.. ocv:cfunction:: double cvCalcGlobalOrientation( const CvArr* orientation, const CvArr* mask, const CvArr* mhi, double timestamp, double duration )
-.. ocv:pyoldfunction:: cv.CalcGlobalOrientation(orientation, mask, mhi, timestamp, duration)-> float
:param orientation: Motion gradient orientation image calculated by the function :ocv:func:`calcMotionGradient` .
.. ocv:pyfunction:: cv2.segmentMotion(mhi, timestamp, segThresh[, segmask]) -> segmask, boundingRects
.. ocv:cfunction:: CvSeq* cvSegmentMotion( const CvArr* mhi, CvArr* seg_mask, CvMemStorage* storage, double timestamp, double seg_thresh )
-.. ocv:pyoldfunction:: cv.SegmentMotion(mhi, seg_mask, storage, timestamp, seg_thresh) -> boundingRects
:param mhi: Motion history image.
.. ocv:cfunction:: int cvCamShift( const CvArr* prob_image, CvRect window, CvTermCriteria criteria, CvConnectedComp* comp, CvBox2D* box=NULL )
-.. ocv:pyoldfunction:: cv.CamShift(prob_image, window, criteria) -> (int, comp, box)
-
:param probImage: Back projection of the object histogram. See :ocv:func:`calcBackProject` .
:param window: Initial search window.
.. ocv:pyfunction:: cv2.meanShift(probImage, window, criteria) -> retval, window
.. ocv:cfunction:: int cvMeanShift( const CvArr* prob_image, CvRect window, CvTermCriteria criteria, CvConnectedComp* comp )
-.. ocv:pyoldfunction:: cv.MeanShift(prob_image, window, criteria) -> comp
:param probImage: Back projection of the object histogram. See :ocv:func:`calcBackProject` for details.
.. ocv:pyfunction:: cv2.KalmanFilter([dynamParams, measureParams[, controlParams[, type]]]) -> <KalmanFilter object>
.. ocv:cfunction:: CvKalman* cvCreateKalman( int dynam_params, int measure_params, int control_params=0 )
-.. ocv:pyoldfunction:: cv.CreateKalman(dynam_params, measure_params, control_params=0) -> CvKalman
The full constructor.
.. ocv:pyfunction:: cv2.KalmanFilter.predict([control]) -> retval
.. ocv:cfunction:: const CvMat* cvKalmanPredict( CvKalman* kalman, const CvMat* control=NULL)
-.. ocv:pyoldfunction:: cv.KalmanPredict(kalman, control=None) -> mat
:param control: The optional input control
.. ocv:cfunction:: const CvMat* cvKalmanCorrect( CvKalman* kalman, const CvMat* measurement )
-.. ocv:pyoldfunction:: cv.KalmanCorrect(kalman, measurement) -> mat
-
:param measurement: The measured system parameters