replaced "const InputArray&" => "InputArray"; made InputArray and OutputArray references. added "None()" constant (no array()).

This commit is contained in:
Vadim Pisarevsky 2011-06-06 14:51:27 +00:00
parent 6dc7ae0ff6
commit 0c877f62e9
68 changed files with 757 additions and 750 deletions

View File

@ -433,7 +433,7 @@ namespace cv
{
//! converts rotation vector to rotation matrix or vice versa using Rodrigues transformation
CV_EXPORTS_W void Rodrigues(const InputArray& src, OutputArray dst, OutputArray jacobian=OutputArray());
CV_EXPORTS_W void Rodrigues(InputArray src, OutputArray dst, OutputArray jacobian=None());
//! type of the robust estimation algorithm
enum
@ -443,95 +443,95 @@ enum
};
//! computes the best-fit perspective transformation mapping srcPoints to dstPoints.
CV_EXPORTS_W Mat findHomography( const InputArray& srcPoints, const InputArray& dstPoints,
CV_EXPORTS_W Mat findHomography( InputArray srcPoints, InputArray dstPoints,
int method=0, double ransacReprojThreshold=3,
OutputArray mask=OutputArray());
OutputArray mask=None());
//! variant of findHomography for backward compatibility
CV_EXPORTS Mat findHomography( const InputArray& srcPoints, const InputArray& dstPoints,
CV_EXPORTS Mat findHomography( InputArray srcPoints, InputArray dstPoints,
OutputArray mask, int method=0, double ransacReprojThreshold=3);
//! Computes RQ decomposition of 3x3 matrix
CV_EXPORTS_W Vec3d RQDecomp3x3( const InputArray& src, OutputArray mtxR, OutputArray mtxQ,
OutputArray Qx=OutputArray(),
OutputArray Qy=OutputArray(),
OutputArray Qz=OutputArray());
CV_EXPORTS_W Vec3d RQDecomp3x3( InputArray src, OutputArray mtxR, OutputArray mtxQ,
OutputArray Qx=None(),
OutputArray Qy=None(),
OutputArray Qz=None());
//! Decomposes the projection matrix into camera matrix and the rotation martix and the translation vector
CV_EXPORTS_W void decomposeProjectionMatrix( const InputArray& projMatrix, OutputArray cameraMatrix,
CV_EXPORTS_W void decomposeProjectionMatrix( InputArray projMatrix, OutputArray cameraMatrix,
OutputArray rotMatrix, OutputArray transVect,
OutputArray rotMatrixX=OutputArray(),
OutputArray rotMatrixY=OutputArray(),
OutputArray rotMatrixZ=OutputArray(),
OutputArray eulerAngles=OutputArray() );
OutputArray rotMatrixX=None(),
OutputArray rotMatrixY=None(),
OutputArray rotMatrixZ=None(),
OutputArray eulerAngles=None() );
//! computes derivatives of the matrix product w.r.t each of the multiplied matrix coefficients
CV_EXPORTS_W void matMulDeriv( const InputArray& A, const InputArray& B,
CV_EXPORTS_W void matMulDeriv( InputArray A, InputArray B,
OutputArray dABdA,
OutputArray dABdB );
//! composes 2 [R|t] transformations together. Also computes the derivatives of the result w.r.t the arguments
CV_EXPORTS_W void composeRT( const InputArray& rvec1, const InputArray& tvec1,
const InputArray& rvec2, const InputArray& tvec2,
CV_EXPORTS_W void composeRT( InputArray rvec1, InputArray tvec1,
InputArray rvec2, InputArray tvec2,
OutputArray rvec3, OutputArray tvec3,
OutputArray dr3dr1=OutputArray(), OutputArray dr3dt1=OutputArray(),
OutputArray dr3dr2=OutputArray(), OutputArray dr3dt2=OutputArray(),
OutputArray dt3dr1=OutputArray(), OutputArray dt3dt1=OutputArray(),
OutputArray dt3dr2=OutputArray(), OutputArray dt3dt2=OutputArray() );
OutputArray dr3dr1=None(), OutputArray dr3dt1=None(),
OutputArray dr3dr2=None(), OutputArray dr3dt2=None(),
OutputArray dt3dr1=None(), OutputArray dt3dt1=None(),
OutputArray dt3dr2=None(), OutputArray dt3dt2=None() );
//! projects points from the model coordinate space to the image coordinates. Also computes derivatives of the image coordinates w.r.t the intrinsic and extrinsic camera parameters
CV_EXPORTS_W void projectPoints( const InputArray& objectPoints,
const InputArray& rvec, const InputArray& tvec,
const InputArray& cameraMatrix, const InputArray& distCoeffs,
CV_EXPORTS_W void projectPoints( InputArray objectPoints,
InputArray rvec, InputArray tvec,
InputArray cameraMatrix, InputArray distCoeffs,
OutputArray imagePoints,
OutputArray jacobian=OutputArray(),
OutputArray jacobian=None(),
double aspectRatio=0 );
//! computes the camera pose from a few 3D points and the corresponding projections. The outliers are not handled.
CV_EXPORTS_W void solvePnP( const InputArray& objectPoints, const InputArray& imagePoints,
const InputArray& cameraMatrix, const InputArray& distCoeffs,
CV_EXPORTS_W void solvePnP( InputArray objectPoints, InputArray imagePoints,
InputArray cameraMatrix, InputArray distCoeffs,
OutputArray rvec, OutputArray tvec,
bool useExtrinsicGuess=false );
//! computes the camera pose from a few 3D points and the corresponding projections. The outliers are possible.
CV_EXPORTS_W void solvePnPRansac( const InputArray& objectPoints,
const InputArray& imagePoints,
const InputArray& cameraMatrix,
const InputArray& distCoeffs,
CV_EXPORTS_W void solvePnPRansac( InputArray objectPoints,
InputArray imagePoints,
InputArray cameraMatrix,
InputArray distCoeffs,
OutputArray rvec,
OutputArray tvec,
bool useExtrinsicGuess = false,
int iterationsCount = 100,
float reprojectionError = 8.0,
int minInliersCount = 100,
OutputArray inliers = OutputArray() );
OutputArray inliers = None() );
//! initializes camera matrix from a few 3D points and the corresponding projections.
CV_EXPORTS_W Mat initCameraMatrix2D( const InputArrayOfArrays& objectPoints,
const InputArrayOfArrays& imagePoints,
CV_EXPORTS_W Mat initCameraMatrix2D( InputArrayOfArrays objectPoints,
InputArrayOfArrays imagePoints,
Size imageSize, double aspectRatio=1. );
enum { CALIB_CB_ADAPTIVE_THRESH = 1, CALIB_CB_NORMALIZE_IMAGE = 2,
CALIB_CB_FILTER_QUADS = 4, CALIB_CB_FAST_CHECK = 8 };
//! finds checkerboard pattern of the specified size in the image
CV_EXPORTS_W bool findChessboardCorners( const InputArray& image, Size patternSize,
CV_EXPORTS_W bool findChessboardCorners( InputArray image, Size patternSize,
OutputArray corners,
int flags=CALIB_CB_ADAPTIVE_THRESH+
CALIB_CB_NORMALIZE_IMAGE );
//! finds subpixel-accurate positions of the chessboard corners
CV_EXPORTS bool find4QuadCornerSubpix(const InputArray& img, InputOutputArray corners, Size region_size);
CV_EXPORTS bool find4QuadCornerSubpix(InputArray img, InputOutputArray corners, Size region_size);
//! draws the checkerboard pattern (found or partly found) in the image
CV_EXPORTS_W void drawChessboardCorners( InputOutputArray image, Size patternSize,
const InputArray& corners, bool patternWasFound );
InputArray corners, bool patternWasFound );
enum { CALIB_CB_SYMMETRIC_GRID = 1, CALIB_CB_ASYMMETRIC_GRID = 2,
CALIB_CB_CLUSTERING = 4 };
//! finds circles' grid pattern of the specified size in the image
CV_EXPORTS bool findCirclesGrid( const InputArray& image, Size patternSize,
CV_EXPORTS bool findCirclesGrid( InputArray image, Size patternSize,
OutputArray centers, int flags=CALIB_CB_SYMMETRIC_GRID,
const Ptr<FeatureDetector> &blobDetector = new SimpleBlobDetector());
@ -557,8 +557,8 @@ enum
};
//! finds intrinsic and extrinsic camera parameters from several fews of a known calibration pattern.
CV_EXPORTS_W double calibrateCamera( const InputArrayOfArrays& objectPoints,
const InputArrayOfArrays& imagePoints,
CV_EXPORTS_W double calibrateCamera( InputArrayOfArrays objectPoints,
InputArrayOfArrays imagePoints,
Size imageSize,
CV_IN_OUT InputOutputArray cameraMatrix,
CV_IN_OUT InputOutputArray distCoeffs,
@ -566,7 +566,7 @@ CV_EXPORTS_W double calibrateCamera( const InputArrayOfArrays& objectPoints,
int flags=0 );
//! computes several useful camera characteristics from the camera matrix, camera frame resolution and the physical sensor size.
CV_EXPORTS_W void calibrationMatrixValues( const InputArray& cameraMatrix,
CV_EXPORTS_W void calibrationMatrixValues( InputArray cameraMatrix,
Size imageSize,
double apertureWidth,
double apertureHeight,
@ -577,9 +577,9 @@ CV_EXPORTS_W void calibrationMatrixValues( const InputArray& cameraMatrix,
CV_OUT double& aspectRatio );
//! finds intrinsic and extrinsic parameters of a stereo camera
CV_EXPORTS_W double stereoCalibrate( const InputArrayOfArrays& objectPoints,
const InputArrayOfArrays& imagePoints1,
const InputArrayOfArrays& imagePoints2,
CV_EXPORTS_W double stereoCalibrate( InputArrayOfArrays objectPoints,
InputArrayOfArrays imagePoints1,
InputArrayOfArrays imagePoints2,
CV_IN_OUT InputOutputArray cameraMatrix1,
CV_IN_OUT InputOutputArray distCoeffs1,
CV_IN_OUT InputOutputArray cameraMatrix2,
@ -592,9 +592,9 @@ CV_EXPORTS_W double stereoCalibrate( const InputArrayOfArrays& objectPoints,
//! computes the rectification transformation for a stereo camera from its intrinsic and extrinsic parameters
CV_EXPORTS void stereoRectify( const InputArray& cameraMatrix1, const InputArray& distCoeffs1,
const InputArray& cameraMatrix2, const InputArray& distCoeffs2,
Size imageSize, const InputArray& R, const InputArray& T,
CV_EXPORTS void stereoRectify( InputArray cameraMatrix1, InputArray distCoeffs1,
InputArray cameraMatrix2, InputArray distCoeffs2,
Size imageSize, InputArray R, InputArray T,
OutputArray R1, OutputArray R2,
OutputArray P1, OutputArray P2,
OutputArray Q, int flags=CALIB_ZERO_DISPARITY,
@ -602,36 +602,36 @@ CV_EXPORTS void stereoRectify( const InputArray& cameraMatrix1, const InputArray
CV_OUT Rect* validPixROI1=0, CV_OUT Rect* validPixROI2=0 );
//! computes the rectification transformation for an uncalibrated stereo camera (zero distortion is assumed)
CV_EXPORTS_W bool stereoRectifyUncalibrated( const InputArray& points1, const InputArray& points2,
const InputArray& F, Size imgSize,
CV_EXPORTS_W bool stereoRectifyUncalibrated( InputArray points1, InputArray points2,
InputArray F, Size imgSize,
OutputArray H1, OutputArray H2,
double threshold=5 );
//! computes the rectification transformations for 3-head camera, where all the heads are on the same line.
CV_EXPORTS_W float rectify3Collinear( const InputArray& cameraMatrix1, const InputArray& distCoeffs1,
const InputArray& cameraMatrix2, const InputArray& distCoeffs2,
const InputArray& cameraMatrix3, const InputArray& distCoeffs3,
const InputArrayOfArrays& imgpt1, const InputArrayOfArrays& imgpt3,
Size imageSize, const InputArray& R12, const InputArray& T12,
const InputArray& R13, const InputArray& T13,
CV_EXPORTS_W float rectify3Collinear( InputArray cameraMatrix1, InputArray distCoeffs1,
InputArray cameraMatrix2, InputArray distCoeffs2,
InputArray cameraMatrix3, InputArray distCoeffs3,
InputArrayOfArrays imgpt1, InputArrayOfArrays imgpt3,
Size imageSize, InputArray R12, InputArray T12,
InputArray R13, InputArray T13,
OutputArray R1, OutputArray R2, OutputArray R3,
OutputArray P1, OutputArray P2, OutputArray P3,
OutputArray Q, double alpha, Size newImgSize,
CV_OUT Rect* roi1, CV_OUT Rect* roi2, int flags );
//! returns the optimal new camera matrix
CV_EXPORTS_W Mat getOptimalNewCameraMatrix( const InputArray& cameraMatrix, const InputArray& distCoeffs,
CV_EXPORTS_W Mat getOptimalNewCameraMatrix( InputArray cameraMatrix, InputArray distCoeffs,
Size imageSize, double alpha, Size newImgSize=Size(),
CV_OUT Rect* validPixROI=0);
//! converts point coordinates from normal pixel coordinates to homogeneous coordinates ((x,y)->(x,y,1))
CV_EXPORTS_W void convertPointsToHomogeneous( const InputArray& src, OutputArray dst );
CV_EXPORTS_W void convertPointsToHomogeneous( InputArray src, OutputArray dst );
//! converts point coordinates from homogeneous to normal pixel coordinates ((x,y,z)->(x/z, y/z))
CV_EXPORTS_W void convertPointsFromHomogeneous( const InputArray& src, OutputArray dst );
CV_EXPORTS_W void convertPointsFromHomogeneous( InputArray src, OutputArray dst );
//! for backward compatibility
CV_EXPORTS void convertPointsHomogeneous( const InputArray& src, OutputArray dst );
CV_EXPORTS void convertPointsHomogeneous( InputArray src, OutputArray dst );
//! the algorithm for finding fundamental matrix
enum
@ -643,19 +643,19 @@ enum
};
//! finds fundamental matrix from a set of corresponding 2D points
CV_EXPORTS_W Mat findFundamentalMat( const InputArray& points1, const InputArray& points2,
CV_EXPORTS_W Mat findFundamentalMat( InputArray points1, InputArray points2,
int method=FM_RANSAC,
double param1=3., double param2=0.99,
OutputArray mask=OutputArray());
OutputArray mask=None());
//! variant of findFundamentalMat for backward compatibility
CV_EXPORTS Mat findFundamentalMat( const InputArray& points1, const InputArray& points2,
CV_EXPORTS Mat findFundamentalMat( InputArray points1, InputArray points2,
OutputArray mask, int method=FM_RANSAC,
double param1=3., double param2=0.99);
//! finds coordinates of epipolar lines corresponding the specified points
CV_EXPORTS void computeCorrespondEpilines( const InputArray& points1,
int whichImage, const InputArray& F,
CV_EXPORTS void computeCorrespondEpilines( InputArray points1,
int whichImage, InputArray F,
OutputArray lines );
template<> CV_EXPORTS void Ptr<CvStereoBMState>::delete_obj();
@ -678,7 +678,7 @@ public:
//! the method that reinitializes the state. The previous content is destroyed
void init(int preset, int ndisparities=0, int SADWindowSize=21);
//! the stereo correspondence operator. Finds the disparity for the specified rectified stereo pair
CV_WRAP_AS(compute) void operator()( const InputArray& left, const InputArray& right,
CV_WRAP_AS(compute) void operator()( InputArray left, InputArray right,
OutputArray disparity, int disptype=CV_16S );
//! pointer to the underlying CvStereoBMState
@ -709,7 +709,7 @@ public:
virtual ~StereoSGBM();
//! the stereo correspondence operator that computes disparity map for the specified rectified stereo pair
CV_WRAP_AS(compute) virtual void operator()(const InputArray& left, const InputArray& right,
CV_WRAP_AS(compute) virtual void operator()(InputArray left, InputArray right,
OutputArray disp);
CV_PROP_RW int minDisparity;
@ -738,17 +738,17 @@ CV_EXPORTS_W Rect getValidDisparityROI( Rect roi1, Rect roi2,
int SADWindowSize );
//! validates disparity using the left-right check. The matrix "cost" should be computed by the stereo correspondence algorithm
CV_EXPORTS_W void validateDisparity( InputOutputArray disparity, const InputArray& cost,
CV_EXPORTS_W void validateDisparity( InputOutputArray disparity, InputArray cost,
int minDisparity, int numberOfDisparities,
int disp12MaxDisp=1 );
//! reprojects disparity image to 3D: (x,y,d)->(X,Y,Z) using the matrix Q returned by cv::stereoRectify
CV_EXPORTS_W void reprojectImageTo3D( const InputArray& disparity,
OutputArray _3dImage, const InputArray& Q,
CV_EXPORTS_W void reprojectImageTo3D( InputArray disparity,
OutputArray _3dImage, InputArray Q,
bool handleMissingValues=false,
int ddepth=-1 );
CV_EXPORTS_W int estimateAffine3D(const InputArray& _from, const InputArray& _to,
CV_EXPORTS_W int estimateAffine3D(InputArray _from, InputArray _to,
OutputArray _out, OutputArray _outliers,
double param1=3, double param2=0.99);

View File

@ -1894,7 +1894,7 @@ cvDrawChessboardCorners( CvArr* _image, CvSize pattern_size,
}
}
bool cv::findChessboardCorners( const InputArray& _image, Size patternSize,
bool cv::findChessboardCorners( InputArray _image, Size patternSize,
OutputArray corners, int flags )
{
int count = patternSize.area()*2;
@ -1923,7 +1923,7 @@ int quiet_error(int status, const char* func_name,
}
void cv::drawChessboardCorners( InputOutputArray _image, Size patternSize,
const InputArray& _corners,
InputArray _corners,
bool patternWasFound )
{
Mat corners = _corners.getMat();
@ -1936,7 +1936,7 @@ void cv::drawChessboardCorners( InputOutputArray _image, Size patternSize,
nelems, patternWasFound );
}
bool cv::findCirclesGrid( const InputArray& _image, Size patternSize,
bool cv::findCirclesGrid( InputArray _image, Size patternSize,
OutputArray _centers, int flags, const Ptr<FeatureDetector> &blobDetector )
{
bool isAsymmetricGrid = (flags & CALIB_CB_ASYMMETRIC_GRID) ? true : false;

View File

@ -2768,8 +2768,8 @@ CV_IMPL int cvStereoRectifyUncalibrated(
}
void cv::reprojectImageTo3D( const InputArray& _disparity,
OutputArray __3dImage, const InputArray& _Qmat,
void cv::reprojectImageTo3D( InputArray _disparity,
OutputArray __3dImage, InputArray _Qmat,
bool handleMissingValues, int dtype )
{
Mat disparity = _disparity.getMat(), Q = _Qmat.getMat();
@ -3109,9 +3109,9 @@ cvDecomposeProjectionMatrix( const CvMat *projMatr, CvMat *calibMatr,
namespace cv
{
static void collectCalibrationData( const InputArrayOfArrays& objectPoints,
const InputArrayOfArrays& imagePoints1,
const InputArrayOfArrays& imagePoints2,
static void collectCalibrationData( InputArrayOfArrays objectPoints,
InputArrayOfArrays imagePoints1,
InputArrayOfArrays imagePoints2,
Mat& objPtMat, Mat& imgPtMat1, Mat* imgPtMat2,
Mat& npoints )
{
@ -3190,7 +3190,7 @@ static Mat prepareDistCoeffs(Mat& distCoeffs0, int rtype)
}
void cv::Rodrigues(const InputArray& _src, OutputArray _dst, OutputArray _jacobian)
void cv::Rodrigues(InputArray _src, OutputArray _dst, OutputArray _jacobian)
{
Mat src = _src.getMat();
bool v2m = src.cols == 1 || src.rows == 1;
@ -3207,7 +3207,7 @@ void cv::Rodrigues(const InputArray& _src, OutputArray _dst, OutputArray _jacobi
dst = Scalar(0);
}
void cv::matMulDeriv( const InputArray& _Amat, const InputArray& _Bmat,
void cv::matMulDeriv( InputArray _Amat, InputArray _Bmat,
OutputArray _dABdA, OutputArray _dABdB )
{
Mat A = _Amat.getMat(), B = _Bmat.getMat();
@ -3218,8 +3218,8 @@ void cv::matMulDeriv( const InputArray& _Amat, const InputArray& _Bmat,
}
void cv::composeRT( const InputArray& _rvec1, const InputArray& _tvec1,
const InputArray& _rvec2, const InputArray& _tvec2,
void cv::composeRT( InputArray _rvec1, InputArray _tvec1,
InputArray _rvec2, InputArray _tvec2,
OutputArray _rvec3, OutputArray _tvec3,
OutputArray _dr3dr1, OutputArray _dr3dt1,
OutputArray _dr3dr2, OutputArray _dr3dt2,
@ -3292,11 +3292,11 @@ void cv::composeRT( const InputArray& _rvec1, const InputArray& _tvec1,
}
void cv::projectPoints( const InputArray& _opoints,
const InputArray& _rvec,
const InputArray& _tvec,
const InputArray& _cameraMatrix,
const InputArray& _distCoeffs,
void cv::projectPoints( InputArray _opoints,
InputArray _rvec,
InputArray _tvec,
InputArray _cameraMatrix,
InputArray _distCoeffs,
OutputArray _ipoints,
OutputArray _jacobian,
double aspectRatio )
@ -3334,12 +3334,12 @@ void cv::projectPoints( const InputArray& _opoints,
&c_imagePoints, pdpdrot, pdpdt, pdpdf, pdpdc, pdpddist, aspectRatio );
}
cv::Mat cv::initCameraMatrix2D( const InputArrayOfArrays& objectPoints,
const InputArrayOfArrays& imagePoints,
cv::Mat cv::initCameraMatrix2D( InputArrayOfArrays objectPoints,
InputArrayOfArrays imagePoints,
Size imageSize, double aspectRatio )
{
Mat objPt, imgPt, npoints, cameraMatrix(3, 3, CV_64F);
collectCalibrationData( objectPoints, imagePoints, InputArrayOfArrays(),
collectCalibrationData( objectPoints, imagePoints, None(),
objPt, imgPt, 0, npoints );
CvMat _objPt = objPt, _imgPt = imgPt, _npoints = npoints, _cameraMatrix = cameraMatrix;
cvInitIntrinsicParams2D( &_objPt, &_imgPt, &_npoints,
@ -3348,8 +3348,8 @@ cv::Mat cv::initCameraMatrix2D( const InputArrayOfArrays& objectPoints,
}
double cv::calibrateCamera( const InputArrayOfArrays& _objectPoints,
const InputArrayOfArrays& _imagePoints,
double cv::calibrateCamera( InputArrayOfArrays _objectPoints,
InputArrayOfArrays _imagePoints,
Size imageSize, InputOutputArray _cameraMatrix, InputOutputArray _distCoeffs,
OutputArray _rvecs, OutputArray _tvecs, int flags )
{
@ -3364,7 +3364,7 @@ double cv::calibrateCamera( const InputArrayOfArrays& _objectPoints,
size_t i, nimages = _objectPoints.total();
CV_Assert( nimages > 0 );
Mat objPt, imgPt, npoints, rvecM((int)nimages, 3, CV_64FC1), tvecM((int)nimages, 3, CV_64FC1);
collectCalibrationData( _objectPoints, _imagePoints, InputArrayOfArrays(),
collectCalibrationData( _objectPoints, _imagePoints, None(),
objPt, imgPt, 0, npoints );
CvMat c_objPt = objPt, c_imgPt = imgPt, c_npoints = npoints;
CvMat c_cameraMatrix = cameraMatrix, c_distCoeffs = distCoeffs;
@ -3391,7 +3391,7 @@ double cv::calibrateCamera( const InputArrayOfArrays& _objectPoints,
}
void cv::calibrationMatrixValues( const InputArray& _cameraMatrix, Size imageSize,
void cv::calibrationMatrixValues( InputArray _cameraMatrix, Size imageSize,
double apertureWidth, double apertureHeight,
double& fovx, double& fovy, double& focalLength,
Point2d& principalPoint, double& aspectRatio )
@ -3402,9 +3402,9 @@ void cv::calibrationMatrixValues( const InputArray& _cameraMatrix, Size imageSiz
&fovx, &fovy, &focalLength, (CvPoint2D64f*)&principalPoint, &aspectRatio );
}
double cv::stereoCalibrate( const InputArrayOfArrays& _objectPoints,
const InputArrayOfArrays& _imagePoints1,
const InputArrayOfArrays& _imagePoints2,
double cv::stereoCalibrate( InputArrayOfArrays _objectPoints,
InputArrayOfArrays _imagePoints1,
InputArrayOfArrays _imagePoints2,
InputOutputArray _cameraMatrix1, InputOutputArray _distCoeffs1,
InputOutputArray _cameraMatrix2, InputOutputArray _distCoeffs2,
Size imageSize, OutputArray _Rmat, OutputArray _Tmat,
@ -3463,9 +3463,9 @@ double cv::stereoCalibrate( const InputArrayOfArrays& _objectPoints,
}
void cv::stereoRectify( const InputArray& _cameraMatrix1, const InputArray& _distCoeffs1,
const InputArray& _cameraMatrix2, const InputArray& _distCoeffs2,
Size imageSize, const InputArray& _Rmat, const InputArray& _Tmat,
void cv::stereoRectify( InputArray _cameraMatrix1, InputArray _distCoeffs1,
InputArray _cameraMatrix2, InputArray _distCoeffs2,
Size imageSize, InputArray _Rmat, InputArray _Tmat,
OutputArray _Rmat1, OutputArray _Rmat2,
OutputArray _Pmat1, OutputArray _Pmat2,
OutputArray _Qmat, int flags,
@ -3500,8 +3500,8 @@ void cv::stereoRectify( const InputArray& _cameraMatrix1, const InputArray& _dis
newImageSize, (CvRect*)validPixROI1, (CvRect*)validPixROI2);
}
bool cv::stereoRectifyUncalibrated( const InputArray& _points1, const InputArray& _points2,
const InputArray& _Fmat, Size imgSize,
bool cv::stereoRectifyUncalibrated( InputArray _points1, InputArray _points2,
InputArray _Fmat, Size imgSize,
OutputArray _Hmat1, OutputArray _Hmat2, double threshold )
{
int rtype = CV_64F;
@ -3516,8 +3516,8 @@ bool cv::stereoRectifyUncalibrated( const InputArray& _points1, const InputArray
return cvStereoRectifyUncalibrated(&c_pt1, &c_pt2, p_F, imgSize, &c_H1, &c_H2, threshold) > 0;
}
cv::Mat cv::getOptimalNewCameraMatrix( const InputArray& _cameraMatrix,
const InputArray& _distCoeffs,
cv::Mat cv::getOptimalNewCameraMatrix( InputArray _cameraMatrix,
InputArray _distCoeffs,
Size imgSize, double alpha, Size newImgSize,
Rect* validPixROI )
{
@ -3534,7 +3534,7 @@ cv::Mat cv::getOptimalNewCameraMatrix( const InputArray& _cameraMatrix,
}
cv::Vec3d cv::RQDecomp3x3( const InputArray& _Mmat,
cv::Vec3d cv::RQDecomp3x3( InputArray _Mmat,
OutputArray _Rmat,
OutputArray _Qmat,
OutputArray _Qx,
@ -3567,7 +3567,7 @@ cv::Vec3d cv::RQDecomp3x3( const InputArray& _Mmat,
}
void cv::decomposeProjectionMatrix( const InputArray& _projMatrix, OutputArray _cameraMatrix,
void cv::decomposeProjectionMatrix( InputArray _projMatrix, OutputArray _cameraMatrix,
OutputArray _rotMatrix, OutputArray _transVect,
OutputArray _rotMatrixX, OutputArray _rotMatrixY,
OutputArray _rotMatrixZ, OutputArray _eulerAngles )
@ -3614,8 +3614,8 @@ void cv::decomposeProjectionMatrix( const InputArray& _projMatrix, OutputArray _
namespace cv
{
static void adjust3rdMatrix(const InputArrayOfArrays& _imgpt1_0,
const InputArrayOfArrays& _imgpt3_0,
static void adjust3rdMatrix(InputArrayOfArrays _imgpt1_0,
InputArrayOfArrays _imgpt3_0,
const Mat& cameraMatrix1, const Mat& distCoeffs1,
const Mat& cameraMatrix3, const Mat& distCoeffs3,
const Mat& R1, const Mat& R3, const Mat& P1, Mat& P3 )
@ -3666,13 +3666,13 @@ static void adjust3rdMatrix(const InputArrayOfArrays& _imgpt1_0,
}
float cv::rectify3Collinear( const InputArray& _cameraMatrix1, const InputArray& _distCoeffs1,
const InputArray& _cameraMatrix2, const InputArray& _distCoeffs2,
const InputArray& _cameraMatrix3, const InputArray& _distCoeffs3,
const InputArrayOfArrays& _imgpt1,
const InputArrayOfArrays& _imgpt3,
Size imageSize, const InputArray& _Rmat12, const InputArray& _Tmat12,
const InputArray& _Rmat13, const InputArray& _Tmat13,
float cv::rectify3Collinear( InputArray _cameraMatrix1, InputArray _distCoeffs1,
InputArray _cameraMatrix2, InputArray _distCoeffs2,
InputArray _cameraMatrix3, InputArray _distCoeffs3,
InputArrayOfArrays _imgpt1,
InputArrayOfArrays _imgpt3,
Size imageSize, InputArray _Rmat12, InputArray _Tmat12,
InputArray _Rmat13, InputArray _Tmat13,
OutputArray _Rmat1, OutputArray _Rmat2, OutputArray _Rmat3,
OutputArray _Pmat1, OutputArray _Pmat2, OutputArray _Pmat3,
OutputArray _Qmat,

View File

@ -1053,7 +1053,7 @@ CV_IMPL void cvConvertPointsHomogeneous( const CvMat* src, CvMat* dst )
}
}
cv::Mat cv::findHomography( const InputArray& _points1, const InputArray& _points2,
cv::Mat cv::findHomography( InputArray _points1, InputArray _points2,
int method, double ransacReprojThreshold, OutputArray _mask )
{
Mat points1 = _points1.getMat(), points2 = _points2.getMat();
@ -1075,13 +1075,13 @@ cv::Mat cv::findHomography( const InputArray& _points1, const InputArray& _point
return H;
}
cv::Mat cv::findHomography( const InputArray& _points1, const InputArray& _points2,
cv::Mat cv::findHomography( InputArray _points1, InputArray _points2,
OutputArray _mask, int method, double ransacReprojThreshold )
{
return cv::findHomography(_points1, _points2, method, ransacReprojThreshold, _mask);
}
cv::Mat cv::findFundamentalMat( const InputArray& _points1, const InputArray& _points2,
cv::Mat cv::findFundamentalMat( InputArray _points1, InputArray _points2,
int method, double param1, double param2,
OutputArray _mask )
{
@ -1104,15 +1104,15 @@ cv::Mat cv::findFundamentalMat( const InputArray& _points1, const InputArray& _p
return F;
}
cv::Mat cv::findFundamentalMat( const InputArray& _points1, const InputArray& _points2,
cv::Mat cv::findFundamentalMat( InputArray _points1, InputArray _points2,
OutputArray _mask, int method, double param1, double param2 )
{
return cv::findFundamentalMat(_points1, _points2, method, param1, param2, _mask);
}
void cv::computeCorrespondEpilines( const InputArray& _points, int whichImage,
const InputArray& _Fmat, OutputArray _lines )
void cv::computeCorrespondEpilines( InputArray _points, int whichImage,
InputArray _Fmat, OutputArray _lines )
{
Mat points = _points.getMat(), F = _Fmat.getMat();
int npoints = points.checkVector(2);
@ -1123,7 +1123,7 @@ void cv::computeCorrespondEpilines( const InputArray& _points, int whichImage,
cvComputeCorrespondEpilines(&c_points, whichImage, &c_F, &c_lines);
}
void cv::convertPointsFromHomogeneous( const InputArray& _src, OutputArray _dst )
void cv::convertPointsFromHomogeneous( InputArray _src, OutputArray _dst )
{
Mat src = _src.getMat();
int npoints = src.checkVector(3), cn = 3;
@ -1140,7 +1140,7 @@ void cv::convertPointsFromHomogeneous( const InputArray& _src, OutputArray _dst
cvConvertPointsHomogeneous(&c_src, &c_dst);
}
void cv::convertPointsToHomogeneous( const InputArray& _src, OutputArray _dst )
void cv::convertPointsToHomogeneous( InputArray _src, OutputArray _dst )
{
Mat src = _src.getMat();
int npoints = src.checkVector(2), cn = 2;
@ -1157,7 +1157,7 @@ void cv::convertPointsToHomogeneous( const InputArray& _src, OutputArray _dst )
cvConvertPointsHomogeneous(&c_src, &c_dst);
}
void cv::convertPointsHomogeneous( const InputArray& _src, OutputArray _dst )
void cv::convertPointsHomogeneous( InputArray _src, OutputArray _dst )
{
int stype = _src.type(), dtype = _dst.type();
CV_Assert( _dst.fixedType() );

View File

@ -452,7 +452,7 @@ bool cv::Affine3DEstimator::checkSubset( const CvMat* ms1, int count )
return j == i;
}
int cv::estimateAffine3D(const InputArray& _from, const InputArray& _to,
int cv::estimateAffine3D(InputArray _from, InputArray _to,
OutputArray _out, OutputArray _outliers,
double param1, double param2)
{

View File

@ -226,7 +226,7 @@ int segment_hist_max(const Mat& hist, int& low_thresh, int& high_thresh)
}
bool cv::find4QuadCornerSubpix(const InputArray& _img, InputOutputArray _corners, Size region_size)
bool cv::find4QuadCornerSubpix(InputArray _img, InputOutputArray _corners, Size region_size)
{
Mat img = _img.getMat(), cornersM = _corners.getMat();
int ncorners = cornersM.checkVector(2, CV_32F);

View File

@ -43,8 +43,8 @@
#include "precomp.hpp"
using namespace cv;
void cv::solvePnP( const InputArray& _opoints, const InputArray& _ipoints,
const InputArray& _cameraMatrix, const InputArray& _distCoeffs,
void cv::solvePnP( InputArray _opoints, InputArray _ipoints,
InputArray _cameraMatrix, InputArray _distCoeffs,
OutputArray _rvec, OutputArray _tvec, bool useExtrinsicGuess )
{
Mat opoints = _opoints.getMat(), ipoints = _ipoints.getMat();
@ -257,8 +257,8 @@ namespace cv
}
}
void cv::solvePnPRansac(const InputArray& _opoints, const InputArray& _ipoints,
const InputArray& _cameraMatrix, const InputArray& _distCoeffs,
void cv::solvePnPRansac(InputArray _opoints, InputArray _ipoints,
InputArray _cameraMatrix, InputArray _distCoeffs,
OutputArray _rvec, OutputArray _tvec, bool useExtrinsicGuess,
int iterationsCount, float reprojectionError, int minInliersCount,
OutputArray _inliers)

View File

@ -920,7 +920,7 @@ void StereoBM::init(int _preset, int _ndisparities, int _SADWindowSize)
state->SADWindowSize = _SADWindowSize;
}
void StereoBM::operator()( const InputArray& _left, const InputArray& _right,
void StereoBM::operator()( InputArray _left, InputArray _right,
OutputArray _disparity, int disptype )
{
Mat left = _left.getMat(), right = _right.getMat();

View File

@ -819,7 +819,7 @@ static void computeDisparitySGBM( const Mat& img1, const Mat& img2,
typedef cv::Point_<short> Point2s;
void StereoSGBM::operator ()( const InputArray& _left, const InputArray& _right,
void StereoSGBM::operator ()( InputArray _left, InputArray _right,
OutputArray _disp )
{
Mat left = _left.getMat(), right = _right.getMat();
@ -958,7 +958,7 @@ void cv::filterSpeckles( InputOutputArray _img, double _newval, int maxSpeckleSi
}
}
void cv::validateDisparity( InputOutputArray _disp, const InputArray& _cost, int minDisparity,
void cv::validateDisparity( InputOutputArray _disp, InputArray _cost, int minDisparity,
int numberOfDisparities, int disp12MaxDiff )
{
Mat disp = _disp.getMat(), cost = _cost.getMat();

View File

@ -971,45 +971,45 @@ Below is the formal description of the ``Mat`` methods.
Mat::Mat
------------
.. c:function:: (1) Mat::Mat()
.. cpp:function:: Mat::Mat()
.. cpp:function:: Mat::Mat(int rows, int cols, int type)
.. cpp:function:: Mat::Mat(Size size, int type)
.. cpp:function:: Mat::Mat(int rows, int cols, int type, const Scalar& s)
.. cpp:function:: Mat::Mat(Size size, int type, const Scalar& s)
.. cpp:function:: Mat::Mat(const Mat& m)
.. cpp:function:: Mat::Mat(int rows, int cols, int type, void* data, size_t step=AUTO_STEP)
.. cpp:function:: Mat::Mat(Size size, int type, void* data, size_t step=AUTO_STEP)
.. cpp:function:: Mat::Mat(const Mat& m, const Range& rowRange, const Range& colRange)
.. cpp:function:: Mat::Mat(const Mat& m, const Rect& roi)
.. c:function:: (2) Mat::Mat(int rows, int cols, int type)
.. cpp:function:: Mat::Mat(const CvMat* m, bool copyData=false)
.. cpp:function:: Mat::Mat(const IplImage* img, bool copyData=false)
.. cpp:function:: template<typename T, int n> explicit Mat::Mat(const Vec<T, n>& vec, bool copyData=true)
.. c:function:: (3) Mat::Mat(Size size, int type)
.. cpp:function:: template<typename T, int m, int n> explicit Mat::Mat(const Matx<T, m, n>& vec, bool copyData=true)
.. c:function:: (4) Mat::Mat(int rows, int cols, int type, const Scalar& s)
.. c:function:: (5) Mat::Mat(Size size, int type, const Scalar& s)
.. c:function:: (6) Mat::Mat(const Mat& m)
.. c:function:: (7) Mat::Mat(int rows, int cols, int type, void* data, size_t step=AUTO_STEP)
.. c:function:: (8) Mat::Mat(Size size, int type, void* data, size_t step=AUTO_STEP)
.. c:function:: (9) Mat::Mat(const Mat& m, const Range& rowRange, const Range& colRange)
.. c:function:: (10) Mat::Mat(const Mat& m, const Rect& roi)
.. c:function:: (11) Mat::Mat(const CvMat* m, bool copyData=false)
.. c:function:: (12) Mat::Mat(const IplImage* img, bool copyData=false)
.. c:function:: (13) template<typename T, int n> explicit Mat::Mat(const Vec<T, n>& vec, bool copyData=true)
.. c:function:: (14) template<typename T, int m, int n> explicit Mat::Mat(const Matx<T, m, n>& vec, bool copyData=true)
.. c:function:: (15) template<typename T> explicit Mat::Mat(const vector<T>& vec, bool copyData=false)
.. c:function:: (16) Mat::Mat(const MatExpr& expr)
.. c:function:: (17) Mat::Mat(int ndims, const int* sizes, int type)
.. c:function:: (18) Mat::Mat(int ndims, const int* sizes, int type, const Scalar& s)
.. c:function:: (19) Mat::Mat(int ndims, const int* sizes, int type, void* data, const size_t* steps=0)
.. c:function:: (20) Mat::Mat(const Mat& m, const Range* ranges)
.. cpp:function:: template<typename T> explicit Mat::Mat(const vector<T>& vec, bool copyData=false)
.. cpp:function:: Mat::Mat(const MatExpr& expr)
.. cpp:function:: Mat::Mat(int ndims, const int* sizes, int type)
.. cpp:function:: Mat::Mat(int ndims, const int* sizes, int type, const Scalar& s)
.. cpp:function:: Mat::Mat(int ndims, const int* sizes, int type, void* data, const size_t* steps=0)
.. cpp:function:: Mat::Mat(const Mat& m, const Range* ranges)
Provides various array constructors.
@ -1509,7 +1509,9 @@ The method returns a Matlab-style identity matrix initializer, similarly to
Mat::create
---------------
.. cpp:function:: void Mat::create(int rows, int cols, int type)
.. cpp:function:: void Mat::create(Size size, int type)
.. cpp:function:: void Mat::create(int ndims, const int* sizes, int type)
Allocates new array data if needed.

View File

@ -1011,15 +1011,13 @@ See Also:
exp
---
.. c:function:: void exp(const Mat& src, Mat& dst)
.. c:function:: void exp(const MatND& src, MatND& dst)
.. c:function:: void exp(const InputArray& src, OutputArray dst)
Calculates the exponent of every array element.
:param src: Source array.
:param dst: Destination array of the same size and same type as ``src`` .
:param dst: Destination array; will have the same size and same type as ``src``.
The function ``exp`` calculates the exponent of every element of the input array:

View File

@ -1263,30 +1263,30 @@ protected:
/*!
Proxy datatype for passing Mat's and vector<>'s as input parameters
*/
class CV_EXPORTS InputArray
class CV_EXPORTS _InputArray
{
public:
enum { KIND_SHIFT=16, NONE=0<<KIND_SHIFT, MAT=1<<KIND_SHIFT,
MATX=2<<KIND_SHIFT, STD_VECTOR=3<<KIND_SHIFT,
STD_VECTOR_VECTOR=4<<KIND_SHIFT,
STD_VECTOR_MAT=5<<KIND_SHIFT, EXPR=6<<KIND_SHIFT };
InputArray();
InputArray(const Mat& m);
InputArray(const MatExpr& expr);
template<typename _Tp> InputArray(const vector<_Tp>& vec);
template<typename _Tp> InputArray(const vector<vector<_Tp> >& vec);
InputArray(const vector<Mat>& vec);
template<typename _Tp, int m, int n> InputArray(const Matx<_Tp, m, n>& matx);
InputArray(const double& val);
Mat getMat(int i=-1) const;
void getMatVector(vector<Mat>& mv) const;
int kind() const;
Size size(int i=-1) const;
size_t total(int i=-1) const;
int type(int i=-1) const;
int depth(int i=-1) const;
int channels(int i=-1) const;
bool empty() const;
_InputArray();
_InputArray(const Mat& m);
_InputArray(const MatExpr& expr);
template<typename _Tp> _InputArray(const vector<_Tp>& vec);
template<typename _Tp> _InputArray(const vector<vector<_Tp> >& vec);
_InputArray(const vector<Mat>& vec);
template<typename _Tp, int m, int n> _InputArray(const Matx<_Tp, m, n>& matx);
_InputArray(const double& val);
virtual Mat getMat(int i=-1) const;
virtual void getMatVector(vector<Mat>& mv) const;
virtual int kind() const;
virtual Size size(int i=-1) const;
virtual size_t total(int i=-1) const;
virtual int type(int i=-1) const;
virtual int depth(int i=-1) const;
virtual int channels(int i=-1) const;
virtual bool empty() const;
int flags;
void* obj;
@ -1312,31 +1312,34 @@ enum
/*!
Proxy datatype for passing Mat's and vector<>'s as input parameters
*/
class CV_EXPORTS OutputArray : public InputArray
class CV_EXPORTS _OutputArray : public _InputArray
{
public:
OutputArray();
OutputArray(Mat& m);
template<typename _Tp> OutputArray(vector<_Tp>& vec);
template<typename _Tp> OutputArray(vector<vector<_Tp> >& vec);
OutputArray(vector<Mat>& vec);
template<typename _Tp, int m, int n> OutputArray(Matx<_Tp, m, n>& matx);
bool fixedSize() const;
bool fixedType() const;
bool needed() const;
Mat& getMatRef(int i=-1);
void create(Size sz, int type, int i=-1, bool allocateVector=false, int fixedDepthMask=0);
void create(int rows, int cols, int type, int i=-1, bool allowTransposed=false, int fixedDepthMask=0);
void create(int dims, const int* size, int type, int i=-1, bool allowTransposed=false, int fixedDepthMask=0);
void release();
void clear();
_OutputArray();
_OutputArray(Mat& m);
template<typename _Tp> _OutputArray(vector<_Tp>& vec);
template<typename _Tp> _OutputArray(vector<vector<_Tp> >& vec);
_OutputArray(vector<Mat>& vec);
template<typename _Tp, int m, int n> _OutputArray(Matx<_Tp, m, n>& matx);
virtual bool fixedSize() const;
virtual bool fixedType() const;
virtual bool needed() const;
virtual Mat& getMatRef(int i=-1) const;
virtual void create(Size sz, int type, int i=-1, bool allocateVector=false, int fixedDepthMask=0) const;
virtual void create(int rows, int cols, int type, int i=-1, bool allowTransposed=false, int fixedDepthMask=0) const;
virtual void create(int dims, const int* size, int type, int i=-1, bool allowTransposed=false, int fixedDepthMask=0) const;
virtual void release() const;
virtual void clear() const;
};
typedef const _InputArray& InputArray;
typedef InputArray InputArrayOfArrays;
typedef const _OutputArray& OutputArray;
typedef OutputArray OutputArrayOfArrays;
typedef OutputArray InputOutputArray;
CV_EXPORTS OutputArray None();
typedef OutputArray InputOutputArray;
/////////////////////////////////////// Mat ///////////////////////////////////////////
enum { MAGIC_MASK=0xFFFF0000, TYPE_MASK=0x00000FFF, DEPTH_MASK=7 };
@ -1647,7 +1650,7 @@ public:
// It calls m.create(this->size(), this->type()).
void copyTo( OutputArray m ) const;
//! copies those matrix elements to "m" that are marked with non-zero mask elements.
void copyTo( OutputArray m, const InputArray& mask ) const;
void copyTo( OutputArray m, InputArray mask ) const;
//! converts matrix to another datatype with optional scalng. See cvConvertScale.
void convertTo( OutputArray m, int rtype, double alpha=1, double beta=0 ) const;
@ -1656,7 +1659,7 @@ public:
//! sets every matrix element to s
Mat& operator = (const Scalar& s);
//! sets some of the matrix elements to s, according to the mask
Mat& setTo(const Scalar& s, const InputArray& mask=InputArray());
Mat& setTo(const Scalar& s, InputArray mask=None());
//! creates alternative matrix header for the same data, with different
// number of channels and/or different number of rows. see cvReshape.
Mat reshape(int _cn, int _rows=0) const;
@ -1667,13 +1670,13 @@ public:
//! matrix inversion by means of matrix expressions
MatExpr inv(int method=DECOMP_LU) const;
//! per-element matrix multiplication by means of matrix expressions
MatExpr mul(const InputArray& m, double scale=1) const;
MatExpr mul(InputArray m, double scale=1) const;
MatExpr mul(const MatExpr& m, double scale=1) const;
//! computes cross-product of 2 3D vectors
Mat cross(const InputArray& m) const;
Mat cross(InputArray m) const;
//! computes dot-product
double dot(const InputArray& m) const;
double dot(InputArray m) const;
//! Matlab-style matrix initialization
static MatExpr zeros(int rows, int cols, int type);
@ -1923,7 +1926,7 @@ public:
float uniform(float a, float b);
//! returns uniformly distributed double-precision floating-point random number from [a,b) range
double uniform(double a, double b);
void fill( InputOutputArray mat, int distType, const InputArray& a, const InputArray& b );
void fill( InputOutputArray mat, int distType, InputArray a, InputArray b );
//! returns Gaussian random variate with mean zero.
double gaussian(double sigma);
@ -1968,68 +1971,68 @@ CV_EXPORTS Mat cvarrToMat(const CvArr* arr, bool copyData=false,
//! extracts Channel of Interest from CvMat or IplImage and makes cv::Mat out of it.
CV_EXPORTS void extractImageCOI(const CvArr* arr, OutputArray coiimg, int coi=-1);
//! inserts single-channel cv::Mat into a multi-channel CvMat or IplImage
CV_EXPORTS void insertImageCOI(const InputArray& coiimg, CvArr* arr, int coi=-1);
CV_EXPORTS void insertImageCOI(InputArray coiimg, CvArr* arr, int coi=-1);
//! adds one matrix to another (dst = src1 + src2)
CV_EXPORTS_W void add(const InputArray& src1, const InputArray& src2, OutputArray dst,
const InputArray& mask=InputArray(), int dtype=-1);
CV_EXPORTS_W void add(InputArray src1, InputArray src2, OutputArray dst,
InputArray mask=None(), int dtype=-1);
//! subtracts one matrix from another (dst = src1 - src2)
CV_EXPORTS_W void subtract(const InputArray& src1, const InputArray& src2, OutputArray dst,
const InputArray& mask=InputArray(), int dtype=-1);
CV_EXPORTS_W void subtract(InputArray src1, InputArray src2, OutputArray dst,
InputArray mask=None(), int dtype=-1);
//! computes element-wise weighted product of the two arrays (dst = scale*src1*src2)
CV_EXPORTS_W void multiply(const InputArray& src1, const InputArray& src2,
CV_EXPORTS_W void multiply(InputArray src1, InputArray src2,
OutputArray dst, double scale=1, int dtype=-1);
//! computes element-wise weighted quotient of the two arrays (dst = scale*src1/src2)
CV_EXPORTS_W void divide(const InputArray& src1, const InputArray& src2, OutputArray dst,
CV_EXPORTS_W void divide(InputArray src1, InputArray src2, OutputArray dst,
double scale=1, int dtype=-1);
//! computes element-wise weighted reciprocal of an array (dst = scale/src2)
CV_EXPORTS_W void divide(double scale, const InputArray& src2,
CV_EXPORTS_W void divide(double scale, InputArray src2,
OutputArray dst, int dtype=-1);
//! adds scaled array to another one (dst = alpha*src1 + src2)
CV_EXPORTS_W void scaleAdd(const InputArray& src1, double alpha, const InputArray& src2, OutputArray dst);
CV_EXPORTS_W void scaleAdd(InputArray src1, double alpha, InputArray src2, OutputArray dst);
//! computes weighted sum of two arrays (dst = alpha*src1 + beta*src2 + gamma)
CV_EXPORTS_W void addWeighted(const InputArray& src1, double alpha, const InputArray& src2,
CV_EXPORTS_W void addWeighted(InputArray src1, double alpha, InputArray src2,
double beta, double gamma, OutputArray dst, int dtype=-1);
//! scales array elements, computes absolute values and converts the results to 8-bit unsigned integers: dst(i)=saturate_cast<uchar>abs(src(i)*alpha+beta)
CV_EXPORTS_W void convertScaleAbs(const InputArray& src, OutputArray dst,
CV_EXPORTS_W void convertScaleAbs(InputArray src, OutputArray dst,
double alpha=1, double beta=0);
//! transforms array of numbers using a lookup table: dst(i)=lut(src(i))
CV_EXPORTS_W void LUT(const InputArray& src, const InputArray& lut, OutputArray dst,
CV_EXPORTS_W void LUT(InputArray src, InputArray lut, OutputArray dst,
int interpolation=0);
//! computes sum of array elements
CV_EXPORTS_W Scalar sum(const InputArray& src);
CV_EXPORTS_W Scalar sum(InputArray src);
//! computes the number of nonzero array elements
CV_EXPORTS_W int countNonZero( const InputArray& src );
CV_EXPORTS_W int countNonZero( InputArray src );
//! computes mean value of selected array elements
CV_EXPORTS_W Scalar mean(const InputArray& src, const InputArray& mask=InputArray());
CV_EXPORTS_W Scalar mean(InputArray src, InputArray mask=None());
//! computes mean value and standard deviation of all or selected array elements
CV_EXPORTS_W void meanStdDev(const InputArray& src, OutputArray mean, OutputArray stddev,
const InputArray& mask=InputArray());
CV_EXPORTS_W void meanStdDev(InputArray src, OutputArray mean, OutputArray stddev,
InputArray mask=None());
//! computes norm of the selected array part
CV_EXPORTS_W double norm(const InputArray& src1, int normType=NORM_L2, const InputArray& mask=InputArray());
CV_EXPORTS_W double norm(InputArray src1, int normType=NORM_L2, InputArray mask=None());
//! computes norm of selected part of the difference between two arrays
CV_EXPORTS_W double norm(const InputArray& src1, const InputArray& src2,
int normType=NORM_L2, const InputArray& mask=InputArray());
CV_EXPORTS_W double norm(InputArray src1, InputArray src2,
int normType=NORM_L2, InputArray mask=None());
//! scales and shifts array elements so that either the specified norm (alpha) or the minimum (alpha) and maximum (beta) array values get the specified values
CV_EXPORTS_W void normalize( const InputArray& src, OutputArray dst, double alpha=1, double beta=0,
int norm_type=NORM_L2, int dtype=-1, const InputArray& mask=InputArray());
CV_EXPORTS_W void normalize( InputArray src, OutputArray dst, double alpha=1, double beta=0,
int norm_type=NORM_L2, int dtype=-1, InputArray mask=None());
//! finds global minimum and maximum array elements and returns their values and their locations
CV_EXPORTS_W void minMaxLoc(const InputArray& src, CV_OUT double* minVal,
CV_EXPORTS_W void minMaxLoc(InputArray src, CV_OUT double* minVal,
CV_OUT double* maxVal=0, CV_OUT Point* minLoc=0,
CV_OUT Point* maxLoc=0, const InputArray& mask=InputArray());
CV_EXPORTS void minMaxIdx(const InputArray& src, double* minVal, double* maxVal,
int* minIdx=0, int* maxIdx=0, const InputArray& mask=InputArray());
CV_OUT Point* maxLoc=0, InputArray mask=None());
CV_EXPORTS void minMaxIdx(InputArray src, double* minVal, double* maxVal,
int* minIdx=0, int* maxIdx=0, InputArray mask=None());
//! transforms 2D matrix to 1D row or column vector by taking sum, minimum, maximum or mean value over all the rows
CV_EXPORTS_W void reduce(const InputArray& src, OutputArray dst, int dim, int rtype, int dtype=-1);
CV_EXPORTS_W void reduce(InputArray src, OutputArray dst, int dim, int rtype, int dtype=-1);
//! makes multi-channel array out of several single-channel arrays
CV_EXPORTS void merge(const Mat* mv, size_t count, OutputArray dst);
@ -2048,43 +2051,43 @@ CV_EXPORTS void mixChannels(const vector<Mat>& src, vector<Mat>& dst,
const int* fromTo, size_t npairs);
//! reverses the order of the rows, columns or both in a matrix
CV_EXPORTS_W void flip(const InputArray& src, OutputArray dst, int flipCode);
CV_EXPORTS_W void flip(InputArray src, OutputArray dst, int flipCode);
//! replicates the input matrix the specified number of times in the horizontal and/or vertical direction
CV_EXPORTS_W void repeat(const InputArray& src, int ny, int nx, OutputArray dst);
CV_EXPORTS_W void repeat(InputArray src, int ny, int nx, OutputArray dst);
CV_EXPORTS Mat repeat(const Mat& src, int ny, int nx);
CV_EXPORTS void hconcat(const Mat* src, size_t nsrc, OutputArray dst);
CV_EXPORTS void hconcat(const InputArray& src1, const InputArray& src2, OutputArray dst);
CV_EXPORTS_W void hconcat(const InputArray& src, OutputArray dst);
CV_EXPORTS void hconcat(InputArray src1, InputArray src2, OutputArray dst);
CV_EXPORTS_W void hconcat(InputArray src, OutputArray dst);
CV_EXPORTS void vconcat(const Mat* src, size_t nsrc, OutputArray dst);
CV_EXPORTS void vconcat(const InputArray& src1, const InputArray& src2, OutputArray dst);
CV_EXPORTS_W void vconcat(const InputArray& src, OutputArray dst);
CV_EXPORTS void vconcat(InputArray src1, InputArray src2, OutputArray dst);
CV_EXPORTS_W void vconcat(InputArray src, OutputArray dst);
//! computes bitwise conjunction of the two arrays (dst = src1 & src2)
CV_EXPORTS_W void bitwise_and(const InputArray& src1, const InputArray& src2,
OutputArray dst, const InputArray& mask=InputArray());
CV_EXPORTS_W void bitwise_and(InputArray src1, InputArray src2,
OutputArray dst, InputArray mask=None());
//! computes bitwise disjunction of the two arrays (dst = src1 | src2)
CV_EXPORTS_W void bitwise_or(const InputArray& src1, const InputArray& src2,
OutputArray dst, const InputArray& mask=InputArray());
CV_EXPORTS_W void bitwise_or(InputArray src1, InputArray src2,
OutputArray dst, InputArray mask=None());
//! computes bitwise exclusive-or of the two arrays (dst = src1 ^ src2)
CV_EXPORTS_W void bitwise_xor(const InputArray& src1, const InputArray& src2,
OutputArray dst, const InputArray& mask=InputArray());
CV_EXPORTS_W void bitwise_xor(InputArray src1, InputArray src2,
OutputArray dst, InputArray mask=None());
//! inverts each bit of array (dst = ~src)
CV_EXPORTS_W void bitwise_not(const InputArray& src, OutputArray dst,
const InputArray& mask=InputArray());
CV_EXPORTS_W void bitwise_not(InputArray src, OutputArray dst,
InputArray mask=None());
//! computes element-wise absolute difference of two arrays (dst = abs(src1 - src2))
CV_EXPORTS_W void absdiff(const InputArray& src1, const InputArray& src2, OutputArray dst);
CV_EXPORTS_W void absdiff(InputArray src1, InputArray src2, OutputArray dst);
//! set mask elements for those array elements which are within the element-specific bounding box (dst = lowerb <= src && src < upperb)
CV_EXPORTS_W void inRange(const InputArray& src, const InputArray& lowerb,
const InputArray& upperb, OutputArray dst);
CV_EXPORTS_W void inRange(InputArray src, InputArray lowerb,
InputArray upperb, OutputArray dst);
//! compares elements of two arrays (dst = src1 <cmpop> src2)
CV_EXPORTS_W void compare(const InputArray& src1, const InputArray& src2, OutputArray dst, int cmpop);
CV_EXPORTS_W void compare(InputArray src1, InputArray src2, OutputArray dst, int cmpop);
//! computes per-element minimum of two arrays (dst = min(src1, src2))
CV_EXPORTS_W void min(const InputArray& src1, const InputArray& src2, OutputArray dst);
CV_EXPORTS_W void min(InputArray src1, InputArray src2, OutputArray dst);
//! computes per-element maximum of two arrays (dst = max(src1, src2))
CV_EXPORTS_W void max(const InputArray& src1, const InputArray& src2, OutputArray dst);
CV_EXPORTS_W void max(InputArray src1, InputArray src2, OutputArray dst);
//! computes per-element minimum of two arrays (dst = min(src1, src2))
CV_EXPORTS void min(const Mat& src1, const Mat& src2, Mat& dst);
@ -2096,79 +2099,79 @@ CV_EXPORTS void max(const Mat& src1, const Mat& src2, Mat& dst);
CV_EXPORTS void max(const Mat& src1, double src2, Mat& dst);
//! computes square root of each matrix element (dst = src**0.5)
CV_EXPORTS_W void sqrt(const InputArray& src, OutputArray dst);
CV_EXPORTS_W void sqrt(InputArray src, OutputArray dst);
//! raises the input matrix elements to the specified power (b = a**power)
CV_EXPORTS_W void pow(const InputArray& src, double power, OutputArray dst);
CV_EXPORTS_W void pow(InputArray src, double power, OutputArray dst);
//! computes exponent of each matrix element (dst = e**src)
CV_EXPORTS_W void exp(const InputArray& src, OutputArray dst);
CV_EXPORTS_W void exp(InputArray src, OutputArray dst);
//! computes natural logarithm of absolute value of each matrix element: dst = log(abs(src))
CV_EXPORTS_W void log(const InputArray& src, OutputArray dst);
CV_EXPORTS_W void log(InputArray src, OutputArray dst);
//! computes cube root of the argument
CV_EXPORTS_W float cubeRoot(float val);
//! computes the angle in degrees (0..360) of the vector (x,y)
CV_EXPORTS_W float fastAtan2(float y, float x);
//! converts polar coordinates to Cartesian
CV_EXPORTS_W void polarToCart(const InputArray& magnitude, const InputArray& angle,
CV_EXPORTS_W void polarToCart(InputArray magnitude, InputArray angle,
OutputArray x, OutputArray y, bool angleInDegrees=false);
//! converts Cartesian coordinates to polar
CV_EXPORTS_W void cartToPolar(const InputArray& x, const InputArray& y,
CV_EXPORTS_W void cartToPolar(InputArray x, InputArray y,
OutputArray magnitude, OutputArray angle,
bool angleInDegrees=false);
//! computes angle (angle(i)) of each (x(i), y(i)) vector
CV_EXPORTS_W void phase(const InputArray& x, const InputArray& y, OutputArray angle,
CV_EXPORTS_W void phase(InputArray x, InputArray y, OutputArray angle,
bool angleInDegrees=false);
//! computes magnitude (magnitude(i)) of each (x(i), y(i)) vector
CV_EXPORTS_W void magnitude(const InputArray& x, const InputArray& y, OutputArray magnitude);
CV_EXPORTS_W void magnitude(InputArray x, InputArray y, OutputArray magnitude);
//! checks that each matrix element is within the specified range.
CV_EXPORTS_W bool checkRange(const InputArray& a, bool quiet=true, CV_OUT Point* pt=0,
CV_EXPORTS_W bool checkRange(InputArray a, bool quiet=true, CV_OUT Point* pt=0,
double minVal=-DBL_MAX, double maxVal=DBL_MAX);
//! implements generalized matrix product algorithm GEMM from BLAS
CV_EXPORTS_W void gemm(const InputArray& src1, const InputArray& src2, double alpha,
const InputArray& src3, double gamma, OutputArray dst, int flags=0);
CV_EXPORTS_W void gemm(InputArray src1, InputArray src2, double alpha,
InputArray src3, double gamma, OutputArray dst, int flags=0);
//! multiplies matrix by its transposition from the left or from the right
CV_EXPORTS_W void mulTransposed( const InputArray& src, OutputArray dst, bool aTa,
const InputArray& delta=InputArray(),
CV_EXPORTS_W void mulTransposed( InputArray src, OutputArray dst, bool aTa,
InputArray delta=None(),
double scale=1, int dtype=-1 );
//! transposes the matrix
CV_EXPORTS_W void transpose(const InputArray& src, OutputArray dst);
CV_EXPORTS_W void transpose(InputArray src, OutputArray dst);
//! performs affine transformation of each element of multi-channel input matrix
CV_EXPORTS_W void transform(const InputArray& src, OutputArray dst, const InputArray& m );
CV_EXPORTS_W void transform(InputArray src, OutputArray dst, InputArray m );
//! performs perspective transformation of each element of multi-channel input matrix
CV_EXPORTS_W void perspectiveTransform(const InputArray& src, OutputArray dst, const InputArray& m );
CV_EXPORTS_W void perspectiveTransform(InputArray src, OutputArray dst, InputArray m );
//! extends the symmetrical matrix from the lower half or from the upper half
CV_EXPORTS_W void completeSymm(InputOutputArray mtx, bool lowerToUpper=false);
//! initializes scaled identity matrix
CV_EXPORTS_W void setIdentity(InputOutputArray mtx, const Scalar& s=Scalar(1));
//! computes determinant of a square matrix
CV_EXPORTS_W double determinant(const InputArray& mtx);
CV_EXPORTS_W double determinant(InputArray mtx);
//! computes trace of a matrix
CV_EXPORTS_W Scalar trace(const InputArray& mtx);
CV_EXPORTS_W Scalar trace(InputArray mtx);
//! computes inverse or pseudo-inverse matrix
CV_EXPORTS_W double invert(const InputArray& src, OutputArray dst, int flags=DECOMP_LU);
CV_EXPORTS_W double invert(InputArray src, OutputArray dst, int flags=DECOMP_LU);
//! solves linear system or a least-square problem
CV_EXPORTS_W bool solve(const InputArray& src1, const InputArray& src2,
CV_EXPORTS_W bool solve(InputArray src1, InputArray src2,
OutputArray dst, int flags=DECOMP_LU);
//! sorts independently each matrix row or each matrix column
CV_EXPORTS_W void sort(const InputArray& src, OutputArray dst, int flags);
CV_EXPORTS_W void sort(InputArray src, OutputArray dst, int flags);
//! sorts independently each matrix row or each matrix column
CV_EXPORTS_W void sortIdx(const InputArray& src, OutputArray dst, int flags);
CV_EXPORTS_W void sortIdx(InputArray src, OutputArray dst, int flags);
//! finds real roots of a cubic polynomial
CV_EXPORTS_W int solveCubic(const InputArray& coeffs, OutputArray roots);
CV_EXPORTS_W int solveCubic(InputArray coeffs, OutputArray roots);
//! finds real and complex roots of a polynomial
CV_EXPORTS_W double solvePoly(const InputArray& coeffs, OutputArray roots, int maxIters=300);
CV_EXPORTS_W double solvePoly(InputArray coeffs, OutputArray roots, int maxIters=300);
//! finds eigenvalues of a symmetric matrix
CV_EXPORTS bool eigen(const InputArray& src, OutputArray eigenvalues, int lowindex=-1,
CV_EXPORTS bool eigen(InputArray src, OutputArray eigenvalues, int lowindex=-1,
int highindex=-1);
//! finds eigenvalues and eigenvectors of a symmetric matrix
CV_EXPORTS bool eigen(const InputArray& src, OutputArray eigenvalues,
CV_EXPORTS bool eigen(InputArray src, OutputArray eigenvalues,
OutputArray eigenvectors,
int lowindex=-1, int highindex=-1);
//! computes covariation matrix of a set of samples
CV_EXPORTS void calcCovarMatrix( const Mat* samples, int nsamples, Mat& covar, Mat& mean,
int flags, int ctype=CV_64F);
//! computes covariation matrix of a set of samples
CV_EXPORTS_W void calcCovarMatrix( const InputArray& samples, OutputArray covar,
CV_EXPORTS_W void calcCovarMatrix( InputArray samples, OutputArray covar,
OutputArray mean, int flags, int ctype=CV_64F);
/*!
@ -2231,17 +2234,17 @@ public:
//! default constructor
PCA();
//! the constructor that performs PCA
PCA(const InputArray& data, const InputArray& mean, int flags, int maxComponents=0);
PCA(InputArray data, InputArray mean, int flags, int maxComponents=0);
//! operator that performs PCA. The previously stored data, if any, is released
PCA& operator()(const InputArray& data, const InputArray& mean, int flags, int maxComponents=0);
PCA& operator()(InputArray data, InputArray mean, int flags, int maxComponents=0);
//! projects vector from the original space to the principal components subspace
Mat project(const InputArray& vec) const;
Mat project(InputArray vec) const;
//! projects vector from the original space to the principal components subspace
void project(const InputArray& vec, OutputArray result) const;
void project(InputArray vec, OutputArray result) const;
//! reconstructs the original vector from the projection
Mat backProject(const InputArray& vec) const;
Mat backProject(InputArray vec) const;
//! reconstructs the original vector from the projection
void backProject(const InputArray& vec, OutputArray result) const;
void backProject(InputArray vec, OutputArray result) const;
Mat eigenvectors; //!< eigenvectors of the covariation matrix
Mat eigenvalues; //!< eigenvalues of the covariation matrix
@ -2268,18 +2271,18 @@ public:
//! the default constructor
SVD();
//! the constructor that performs SVD
SVD( const InputArray& src, int flags=0 );
SVD( InputArray src, int flags=0 );
//! the operator that performs SVD. The previously allocated SVD::u, SVD::w are SVD::vt are released.
SVD& operator ()( const InputArray& src, int flags=0 );
SVD& operator ()( InputArray src, int flags=0 );
//! decomposes matrix and stores the results to user-provided matrices
static void compute( const InputArray& src, OutputArray w,
static void compute( InputArray src, OutputArray w,
OutputArray u, OutputArray vt, int flags=0 );
//! computes singular values of a matrix
static void compute( const InputArray& src, OutputArray w, int flags=0 );
static void compute( InputArray src, OutputArray w, int flags=0 );
//! performs back substitution
static void backSubst( const InputArray& w, const InputArray& u,
const InputArray& vt, const InputArray& rhs,
static void backSubst( InputArray w, InputArray u,
InputArray vt, InputArray rhs,
OutputArray dst );
template<typename _Tp, int m, int n, int nm> static void compute( const Matx<_Tp, m, n>& a,
@ -2290,28 +2293,28 @@ public:
const Matx<_Tp, m, nm>& u, const Matx<_Tp, n, nm>& vt, const Matx<_Tp, m, nb>& rhs, Matx<_Tp, n, nb>& dst );
//! finds dst = arg min_{|dst|=1} |m*dst|
static void solveZ( const InputArray& src, OutputArray dst );
static void solveZ( InputArray src, OutputArray dst );
//! performs back substitution, so that dst is the solution or pseudo-solution of m*dst = rhs, where m is the decomposed matrix
void backSubst( const InputArray& rhs, OutputArray dst ) const;
void backSubst( InputArray rhs, OutputArray dst ) const;
Mat u, w, vt;
};
//! computes Mahalanobis distance between two vectors: sqrt((v1-v2)'*icovar*(v1-v2)), where icovar is the inverse covariation matrix
CV_EXPORTS_W double Mahalanobis(const InputArray& v1, const InputArray& v2, const InputArray& icovar);
CV_EXPORTS_W double Mahalanobis(InputArray v1, InputArray v2, InputArray icovar);
//! a synonym for Mahalanobis
CV_EXPORTS double Mahalonobis(const InputArray& v1, const InputArray& v2, const InputArray& icovar);
CV_EXPORTS double Mahalonobis(InputArray v1, InputArray v2, InputArray icovar);
//! performs forward or inverse 1D or 2D Discrete Fourier Transformation
CV_EXPORTS_W void dft(const InputArray& src, OutputArray dst, int flags=0, int nonzeroRows=0);
CV_EXPORTS_W void dft(InputArray src, OutputArray dst, int flags=0, int nonzeroRows=0);
//! performs inverse 1D or 2D Discrete Fourier Transformation
CV_EXPORTS_W void idft(const InputArray& src, OutputArray dst, int flags=0, int nonzeroRows=0);
CV_EXPORTS_W void idft(InputArray src, OutputArray dst, int flags=0, int nonzeroRows=0);
//! performs forward or inverse 1D or 2D Discrete Cosine Transformation
CV_EXPORTS_W void dct(const InputArray& src, OutputArray dst, int flags=0);
CV_EXPORTS_W void dct(InputArray src, OutputArray dst, int flags=0);
//! performs inverse 1D or 2D Discrete Cosine Transformation
CV_EXPORTS_W void idct(const InputArray& src, OutputArray dst, int flags=0);
CV_EXPORTS_W void idct(InputArray src, OutputArray dst, int flags=0);
//! computes element-wise product of the two Fourier spectrums. The second spectrum can optionally be conjugated before the multiplication
CV_EXPORTS_W void mulSpectrums(const InputArray& a, const InputArray& b, OutputArray c,
CV_EXPORTS_W void mulSpectrums(InputArray a, InputArray b, OutputArray c,
int flags, bool conjB=false);
//! computes the minimal vector size vecsize1 >= vecsize so that the dft() of the vector of length vecsize1 can be computed efficiently
CV_EXPORTS_W int getOptimalDFTSize(int vecsize);
@ -2326,9 +2329,9 @@ enum
KMEANS_USE_INITIAL_LABELS=1 // Uses the user-provided labels for K-Means initialization
};
//! clusters the input data using k-Means algorithm
CV_EXPORTS_W double kmeans( const InputArray& data, int K, CV_OUT InputOutputArray bestLabels,
CV_EXPORTS_W double kmeans( InputArray data, int K, CV_OUT InputOutputArray bestLabels,
TermCriteria criteria, int attempts,
int flags, OutputArray centers=OutputArray() );
int flags, OutputArray centers=None() );
//! returns the thread-local Random number generator
CV_EXPORTS RNG& theRNG();
@ -2337,10 +2340,10 @@ CV_EXPORTS RNG& theRNG();
template<typename _Tp> static inline _Tp randu() { return (_Tp)theRNG(); }
//! fills array with uniformly-distributed random numbers from the range [low, high)
CV_EXPORTS_W void randu(CV_IN_OUT OutputArray dst, const InputArray& low, const InputArray& high);
CV_EXPORTS_W void randu(CV_IN_OUT OutputArray dst, InputArray low, InputArray high);
//! fills array with normally-distributed random numbers with the specified mean and the standard deviation
CV_EXPORTS_W void randn(CV_IN_OUT OutputArray dst, const InputArray& mean, const InputArray& stddev);
CV_EXPORTS_W void randn(CV_IN_OUT OutputArray dst, InputArray mean, InputArray stddev);
//! shuffles the input array elements
CV_EXPORTS void randShuffle(InputOutputArray dst, double iterFactor=1., RNG* rng=0);
@ -3647,30 +3650,30 @@ public:
//! the default constructor
CV_WRAP KDTree();
//! the full constructor that builds the search tree
CV_WRAP KDTree(const InputArray& points, bool copyAndReorderPoints=false);
CV_WRAP KDTree(InputArray points, bool copyAndReorderPoints=false);
//! the full constructor that builds the search tree
CV_WRAP KDTree(const InputArray& points, const InputArray& _labels,
CV_WRAP KDTree(InputArray points, InputArray _labels,
bool copyAndReorderPoints=false);
//! builds the search tree
CV_WRAP void build(const InputArray& points, bool copyAndReorderPoints=false);
CV_WRAP void build(InputArray points, bool copyAndReorderPoints=false);
//! builds the search tree
CV_WRAP void build(const InputArray& points, const InputArray& labels,
CV_WRAP void build(InputArray points, InputArray labels,
bool copyAndReorderPoints=false);
//! finds the K nearest neighbors of "vec" while looking at Emax (at most) leaves
CV_WRAP int findNearest(const InputArray& vec, int K, int Emax,
CV_WRAP int findNearest(InputArray vec, int K, int Emax,
OutputArray neighborsIdx,
OutputArray neighbors=OutputArray(),
OutputArray dist=OutputArray(),
OutputArray labels=OutputArray()) const;
OutputArray neighbors=None(),
OutputArray dist=None(),
OutputArray labels=None()) const;
//! finds all the points from the initial set that belong to the specified box
CV_WRAP void findOrthoRange(const InputArray& minBounds,
const InputArray& maxBounds,
CV_WRAP void findOrthoRange(InputArray minBounds,
InputArray maxBounds,
OutputArray neighborsIdx,
OutputArray neighbors=OutputArray(),
OutputArray labels=OutputArray()) const;
OutputArray neighbors=None(),
OutputArray labels=None()) const;
//! returns vectors with the specified indices
CV_WRAP void getPoints(const InputArray& idx, OutputArray pts,
OutputArray labels=OutputArray()) const;
CV_WRAP void getPoints(InputArray idx, OutputArray pts,
OutputArray labels=None()) const;
//! return a vector with the specified index
const float* getPoint(int ptidx, int* label=0) const;
//! returns the search space dimensionality

View File

@ -745,8 +745,8 @@ static inline Mat cvarrToMatND(const CvArr* arr, bool copyData=false, int coiMod
///////////////////////////////////////////// SVD //////////////////////////////////////////////////////
inline SVD::SVD() {}
inline SVD::SVD( const InputArray& m, int flags ) { operator ()(m, flags); }
inline void SVD::solveZ( const InputArray& m, OutputArray _dst )
inline SVD::SVD( InputArray m, int flags ) { operator ()(m, flags); }
inline void SVD::solveZ( InputArray m, OutputArray _dst )
{
SVD svd(m);
_dst.create(svd.vt.cols, 1, svd.vt.type());
@ -1099,18 +1099,18 @@ process( const Mat_<T1>& m1, const Mat_<T2>& m2, Mat_<T3>& m3, Op op )
/////////////////////////////// Input/Output Arrays /////////////////////////////////
template<typename _Tp> InputArray::InputArray(const vector<_Tp>& vec)
template<typename _Tp> _InputArray::_InputArray(const vector<_Tp>& vec)
: flags(STD_VECTOR + DataType<_Tp>::type), obj((void*)&vec) {}
template<typename _Tp> InputArray::InputArray(const vector<vector<_Tp> >& vec)
template<typename _Tp> _InputArray::_InputArray(const vector<vector<_Tp> >& vec)
: flags(STD_VECTOR_VECTOR + DataType<_Tp>::type), obj((void*)&vec) {}
template<typename _Tp, int m, int n> InputArray::InputArray(const Matx<_Tp, m, n>& mtx)
template<typename _Tp, int m, int n> _InputArray::_InputArray(const Matx<_Tp, m, n>& mtx)
: flags(MATX + DataType<_Tp>::type), obj((void*)&mtx), sz(n, m) {}
template<typename _Tp> OutputArray::OutputArray(vector<_Tp>& vec) : InputArray(vec) {}
template<typename _Tp> OutputArray::OutputArray(vector<vector<_Tp> >& vec) : InputArray(vec) {}
template<typename _Tp, int m, int n> OutputArray::OutputArray(Matx<_Tp, m, n>& mtx) : InputArray(mtx) {}
template<typename _Tp> _OutputArray::_OutputArray(vector<_Tp>& vec) : _InputArray(vec) {}
template<typename _Tp> _OutputArray::_OutputArray(vector<vector<_Tp> >& vec) : _InputArray(vec) {}
template<typename _Tp, int m, int n> _OutputArray::_OutputArray(Matx<_Tp, m, n>& mtx) : _InputArray(mtx) {}
//////////////////////////////////// Matrix Expressions /////////////////////////////////////////

View File

@ -951,7 +951,7 @@ static inline bool checkScalar(const Mat& sc, int atype, int sckind, int akind)
if( sc.dims > 2 || (sc.cols != 1 && sc.rows != 1) || !sc.isContinuous() )
return false;
int cn = CV_MAT_CN(atype);
if( akind == InputArray::MATX && sckind != InputArray::MATX )
if( akind == _InputArray::MATX && sckind != _InputArray::MATX )
return false;
return sc.size() == Size(1, 1) || sc.size() == Size(1, cn) || sc.size() == Size(cn, 1) ||
(sc.size() == Size(1, 4) && sc.type() == CV_64F && cn <= 4);
@ -975,8 +975,8 @@ static void convertAndUnrollScalar( const Mat& sc, int buftype, uchar* scbuf, si
}
void binary_op(const InputArray& _src1, const InputArray& _src2, OutputArray& _dst,
const InputArray& _mask, const BinaryFunc* tab, bool bitwise)
void binary_op(InputArray _src1, InputArray _src2, OutputArray _dst,
InputArray _mask, const BinaryFunc* tab, bool bitwise)
{
int kind1 = _src1.kind(), kind2 = _src2.kind();
Mat src1 = _src1.getMat(), src2 = _src2.getMat();
@ -1005,7 +1005,7 @@ void binary_op(const InputArray& _src1, const InputArray& _src2, OutputArray& _d
return;
}
if( (kind1 == InputArray::MATX) + (kind2 == InputArray::MATX) == 1 ||
if( (kind1 == _InputArray::MATX) + (kind2 == _InputArray::MATX) == 1 ||
src1.size != src2.size || src1.type() != src2.type() )
{
if( checkScalar(src1, src2.type(), kind1, kind2) )
@ -1130,62 +1130,62 @@ static BinaryFunc minTab[] =
}
void cv::bitwise_and(const InputArray& a, const InputArray& b, OutputArray c, const InputArray& mask)
void cv::bitwise_and(InputArray a, InputArray b, OutputArray c, InputArray mask)
{
BinaryFunc f = and8u;
binary_op(a, b, c, mask, &f, true);
}
void cv::bitwise_or(const InputArray& a, const InputArray& b, OutputArray c, const InputArray& mask)
void cv::bitwise_or(InputArray a, InputArray b, OutputArray c, InputArray mask)
{
BinaryFunc f = or8u;
binary_op(a, b, c, mask, &f, true);
}
void cv::bitwise_xor(const InputArray& a, const InputArray& b, OutputArray c, const InputArray& mask)
void cv::bitwise_xor(InputArray a, InputArray b, OutputArray c, InputArray mask)
{
BinaryFunc f = xor8u;
binary_op(a, b, c, mask, &f, true);
}
void cv::bitwise_not(const InputArray& a, OutputArray c, const InputArray& mask)
void cv::bitwise_not(InputArray a, OutputArray c, InputArray mask)
{
BinaryFunc f = not8u;
binary_op(a, a, c, mask, &f, true);
}
void cv::max( const InputArray& src1, const InputArray& src2, OutputArray dst )
void cv::max( InputArray src1, InputArray src2, OutputArray dst )
{
binary_op(src1, src2, dst, InputArray(), maxTab, false );
binary_op(src1, src2, dst, None(), maxTab, false );
}
void cv::min( const InputArray& src1, const InputArray& src2, OutputArray dst )
void cv::min( InputArray src1, InputArray src2, OutputArray dst )
{
binary_op(src1, src2, dst, InputArray(), minTab, false );
binary_op(src1, src2, dst, None(), minTab, false );
}
void cv::max(const Mat& src1, const Mat& src2, Mat& dst)
{
OutputArray _dst(dst);
binary_op(src1, src2, _dst, InputArray(), maxTab, false );
binary_op(src1, src2, _dst, None(), maxTab, false );
}
void cv::min(const Mat& src1, const Mat& src2, Mat& dst)
{
OutputArray _dst(dst);
binary_op(src1, src2, _dst, InputArray(), minTab, false );
binary_op(src1, src2, _dst, None(), minTab, false );
}
void cv::max(const Mat& src1, double src2, Mat& dst)
{
OutputArray _dst(dst);
binary_op(src1, src2, _dst, InputArray(), maxTab, false );
binary_op(src1, src2, _dst, None(), maxTab, false );
}
void cv::min(const Mat& src1, double src2, Mat& dst)
{
OutputArray _dst(dst);
binary_op(src1, src2, _dst, InputArray(), minTab, false );
binary_op(src1, src2, _dst, None(), minTab, false );
}
/****************************************************************************************\
@ -1195,8 +1195,8 @@ void cv::min(const Mat& src1, double src2, Mat& dst)
namespace cv
{
void arithm_op(const InputArray& _src1, const InputArray& _src2, OutputArray& _dst,
const InputArray& _mask, int dtype, BinaryFunc* tab, bool muldiv=false, void* usrdata=0)
void arithm_op(InputArray _src1, InputArray _src2, OutputArray _dst,
InputArray _mask, int dtype, BinaryFunc* tab, bool muldiv=false, void* usrdata=0)
{
int kind1 = _src1.kind(), kind2 = _src2.kind();
Mat src1 = _src1.getMat(), src2 = _src2.getMat();
@ -1216,7 +1216,7 @@ void arithm_op(const InputArray& _src1, const InputArray& _src2, OutputArray& _d
bool haveScalar = false, swapped12 = false;
if( (kind1 == InputArray::MATX) + (kind2 == InputArray::MATX) == 1 ||
if( (kind1 == _InputArray::MATX) + (kind2 == _InputArray::MATX) == 1 ||
src1.size != src2.size || src1.channels() != src2.channels() )
{
if( checkScalar(src1, src2.type(), kind1, kind2) )
@ -1452,21 +1452,21 @@ static BinaryFunc absdiffTab[] =
}
void cv::add( const InputArray& src1, const InputArray& src2, OutputArray dst,
const InputArray& mask, int dtype )
void cv::add( InputArray src1, InputArray src2, OutputArray dst,
InputArray mask, int dtype )
{
arithm_op(src1, src2, dst, mask, dtype, addTab );
}
void cv::subtract( const InputArray& src1, const InputArray& src2, OutputArray dst,
const InputArray& mask, int dtype )
void cv::subtract( InputArray src1, InputArray src2, OutputArray dst,
InputArray mask, int dtype )
{
arithm_op(src1, src2, dst, mask, dtype, subTab );
}
void cv::absdiff( const InputArray& src1, const InputArray& src2, OutputArray dst )
void cv::absdiff( InputArray src1, InputArray src2, OutputArray dst )
{
arithm_op(src1, src2, dst, InputArray(), -1, absdiffTab);
arithm_op(src1, src2, dst, None(), -1, absdiffTab);
}
/****************************************************************************************\
@ -1776,22 +1776,22 @@ static BinaryFunc recipTab[] =
}
void cv::multiply(const InputArray& src1, const InputArray& src2,
void cv::multiply(InputArray src1, InputArray src2,
OutputArray dst, double scale, int dtype)
{
arithm_op(src1, src2, dst, InputArray(), dtype, mulTab, true, &scale);
arithm_op(src1, src2, dst, None(), dtype, mulTab, true, &scale);
}
void cv::divide(const InputArray& src1, const InputArray& src2,
void cv::divide(InputArray src1, InputArray src2,
OutputArray dst, double scale, int dtype)
{
arithm_op(src1, src2, dst, InputArray(), dtype, divTab, true, &scale);
arithm_op(src1, src2, dst, None(), dtype, divTab, true, &scale);
}
void cv::divide(double scale, const InputArray& src2,
void cv::divide(double scale, InputArray src2,
OutputArray dst, int dtype)
{
arithm_op(src2, src2, dst, InputArray(), dtype, recipTab, true, &scale);
arithm_op(src2, src2, dst, None(), dtype, recipTab, true, &scale);
}
/****************************************************************************************\
@ -1940,11 +1940,11 @@ static BinaryFunc addWeightedTab[] =
}
void cv::addWeighted( const InputArray& src1, double alpha, const InputArray& src2,
void cv::addWeighted( InputArray src1, double alpha, InputArray src2,
double beta, double gamma, OutputArray dst, int dtype )
{
double scalars[] = {alpha, beta, gamma};
arithm_op(src1, src2, dst, InputArray(), dtype, addWeightedTab, true, scalars);
arithm_op(src1, src2, dst, None(), dtype, addWeightedTab, true, scalars);
}
@ -2077,7 +2077,7 @@ static double getMaxVal(int depth)
}
void cv::compare(const InputArray& _src1, const InputArray& _src2, OutputArray _dst, int op)
void cv::compare(InputArray _src1, InputArray _src2, OutputArray _dst, int op)
{
CV_Assert( op == CMP_LT || op == CMP_LE || op == CMP_EQ ||
op == CMP_NE || op == CMP_GE || op == CMP_GT );
@ -2096,7 +2096,7 @@ void cv::compare(const InputArray& _src1, const InputArray& _src2, OutputArray _
bool haveScalar = false;
if( (kind1 == InputArray::MATX) + (kind2 == InputArray::MATX) == 1 ||
if( (kind1 == _InputArray::MATX) + (kind2 == _InputArray::MATX) == 1 ||
src1.size != src2.size || src1.type() != src2.type() )
{
if( checkScalar(src1, src2.type(), kind1, kind2) )
@ -2307,15 +2307,15 @@ static InRangeFunc inRangeTab[] =
}
void cv::inRange(const InputArray& _src, const InputArray& _lowerb,
const InputArray& _upperb, OutputArray _dst)
void cv::inRange(InputArray _src, InputArray _lowerb,
InputArray _upperb, OutputArray _dst)
{
int skind = _src.kind(), lkind = _lowerb.kind(), ukind = _upperb.kind();
Mat src = _src.getMat(), lb = _lowerb.getMat(), ub = _upperb.getMat();
bool lbScalar = false, ubScalar = false;
if( (lkind == InputArray::MATX && skind != InputArray::MATX) ||
if( (lkind == _InputArray::MATX && skind != _InputArray::MATX) ||
src.size != lb.size || src.type() != lb.type() )
{
if( !checkScalar(lb, src.type(), lkind, skind) )
@ -2324,7 +2324,7 @@ void cv::inRange(const InputArray& _src, const InputArray& _lowerb,
lbScalar = true;
}
if( (ukind == InputArray::MATX && skind != InputArray::MATX) ||
if( (ukind == _InputArray::MATX && skind != _InputArray::MATX) ||
src.size != ub.size || src.type() != ub.type() )
{
if( !checkScalar(ub, src.type(), ukind, skind) )

View File

@ -851,7 +851,7 @@ BinaryFunc getConvertScaleFunc(int sdepth, int ddepth)
}
void cv::convertScaleAbs( const InputArray& _src, OutputArray _dst, double alpha, double beta )
void cv::convertScaleAbs( InputArray _src, OutputArray _dst, double alpha, double beta )
{
Mat src = _src.getMat();
int cn = src.channels();
@ -990,7 +990,7 @@ static LUTFunc lutTab[] =
}
void cv::LUT( const InputArray& _src, const InputArray& _lut, OutputArray _dst, int interpolation )
void cv::LUT( InputArray _src, InputArray _lut, OutputArray _dst, int interpolation )
{
Mat src = _src.getMat(), lut = _lut.getMat();
CV_Assert( interpolation == 0 );
@ -1016,8 +1016,8 @@ void cv::LUT( const InputArray& _src, const InputArray& _lut, OutputArray _dst,
}
void cv::normalize( const InputArray& _src, OutputArray _dst, double a, double b,
int norm_type, int rtype, const InputArray& _mask )
void cv::normalize( InputArray _src, OutputArray _dst, double a, double b,
int norm_type, int rtype, InputArray _mask )
{
Mat src = _src.getMat(), mask = _mask.getMat();

View File

@ -260,7 +260,7 @@ void Mat::copyTo( OutputArray _dst ) const
}
}
void Mat::copyTo( OutputArray _dst, const InputArray& _mask ) const
void Mat::copyTo( OutputArray _dst, InputArray _mask ) const
{
Mat mask = _mask.getMat();
if( !mask.data )
@ -333,7 +333,7 @@ Mat& Mat::operator = (const Scalar& s)
return *this;
}
Mat& Mat::setTo(const Scalar& s, const InputArray& _mask)
Mat& Mat::setTo(const Scalar& s, InputArray _mask)
{
Mat mask = _mask.getMat();
if( !mask.data )
@ -441,7 +441,7 @@ flipVert( const uchar* src0, size_t sstep, uchar* dst0, size_t dstep, Size size,
}
}
void flip( const InputArray& _src, OutputArray _dst, int flip_mode )
void flip( InputArray _src, OutputArray _dst, int flip_mode )
{
Mat src = _src.getMat();
@ -460,7 +460,7 @@ void flip( const InputArray& _src, OutputArray _dst, int flip_mode )
}
void repeat(const InputArray& _src, int ny, int nx, OutputArray _dst)
void repeat(InputArray _src, int ny, int nx, OutputArray _dst)
{
Mat src = _src.getMat();
CV_Assert( src.dims <= 2 );

View File

@ -3547,14 +3547,14 @@ KDTree::KDTree()
normType = NORM_L2;
}
KDTree::KDTree(const InputArray& _points, bool _copyData)
KDTree::KDTree(InputArray _points, bool _copyData)
{
maxDepth = -1;
normType = NORM_L2;
build(_points, _copyData);
}
KDTree::KDTree(const InputArray& _points, const InputArray& _labels, bool _copyData)
KDTree::KDTree(InputArray _points, InputArray _labels, bool _copyData)
{
maxDepth = -1;
normType = NORM_L2;
@ -3637,13 +3637,13 @@ computeSums( const Mat& points, const size_t* ofs, int a, int b, double* sums )
}
void KDTree::build(const InputArray& _points, bool _copyData)
void KDTree::build(InputArray _points, bool _copyData)
{
build(_points, InputArray(), _copyData);
build(_points, None(), _copyData);
}
void KDTree::build(const InputArray& __points, const InputArray& __labels, bool _copyData)
void KDTree::build(InputArray __points, InputArray __labels, bool _copyData)
{
Mat _points = __points.getMat(), _labels = __labels.getMat();
CV_Assert(_points.type() == CV_32F && !_points.empty());
@ -3753,7 +3753,7 @@ struct PQueueElem
};
int KDTree::findNearest(const InputArray& _vec, int K, int emax,
int KDTree::findNearest(InputArray _vec, int K, int emax,
OutputArray _neighborsIdx, OutputArray _neighbors,
OutputArray _dist, OutputArray _labels) const
@ -3896,8 +3896,8 @@ int KDTree::findNearest(const InputArray& _vec, int K, int emax,
}
void KDTree::findOrthoRange(const InputArray& _lowerBound,
const InputArray& _upperBound,
void KDTree::findOrthoRange(InputArray _lowerBound,
InputArray _upperBound,
OutputArray _neighborsIdx,
OutputArray _neighbors,
OutputArray _labels ) const
@ -3953,7 +3953,7 @@ void KDTree::findOrthoRange(const InputArray& _lowerBound,
}
void KDTree::getPoints(const InputArray& _idx, OutputArray _pts, OutputArray _labels) const
void KDTree::getPoints(InputArray _idx, OutputArray _pts, OutputArray _labels) const
{
Mat idxmat = _idx.getMat(), pts, labelsmat;
CV_Assert( idxmat.isContinuous() && idxmat.type() == CV_32S &&

View File

@ -1452,7 +1452,7 @@ static void CCSIDFT_64f( const double* src, double* dst, int n, int nf, int* fac
}
void cv::dft( const InputArray& _src0, OutputArray _dst, int flags, int nonzero_rows )
void cv::dft( InputArray _src0, OutputArray _dst, int flags, int nonzero_rows )
{
static DFTFunc dft_tbl[6] =
{
@ -1840,12 +1840,12 @@ void cv::dft( const InputArray& _src0, OutputArray _dst, int flags, int nonzero_
}
void cv::idft( const InputArray& src, OutputArray dst, int flags, int nonzero_rows )
void cv::idft( InputArray src, OutputArray dst, int flags, int nonzero_rows )
{
dft( src, dst, flags | DFT_INVERSE, nonzero_rows );
}
void cv::mulSpectrums( const InputArray& _srcA, const InputArray& _srcB,
void cv::mulSpectrums( InputArray _srcA, InputArray _srcB,
OutputArray _dst, int flags, bool conjB )
{
Mat srcA = _srcA.getMat(), srcB = _srcB.getMat();
@ -2218,7 +2218,7 @@ static void IDCT_64f(const double* src, int src_step, double* dft_src, double* d
}
void cv::dct( const InputArray& _src0, OutputArray _dst, int flags )
void cv::dct( InputArray _src0, OutputArray _dst, int flags )
{
static DCTFunc dct_tbl[4] =
{
@ -2373,7 +2373,7 @@ void cv::dct( const InputArray& _src0, OutputArray _dst, int flags )
}
void cv::idct( const InputArray& src, OutputArray dst, int flags )
void cv::idct( InputArray src, OutputArray dst, int flags )
{
dct( src, dst, flags | DCT_INVERSE );
}

View File

@ -866,7 +866,7 @@ SVBkSb( int m, int n, const double* w, size_t wstep,
m(0,1)*((double)m(1,0)*m(2,2) - (double)m(1,2)*m(2,0)) + \
m(0,2)*((double)m(1,0)*m(2,1) - (double)m(1,1)*m(2,0)))
double cv::determinant( const InputArray& _mat )
double cv::determinant( InputArray _mat )
{
Mat mat = _mat.getMat();
double result = 0;
@ -943,7 +943,7 @@ double cv::determinant( const InputArray& _mat )
#define Df( y, x ) ((float*)(dstdata + y*dststep))[x]
#define Dd( y, x ) ((double*)(dstdata + y*dststep))[x]
double cv::invert( const InputArray& _src, OutputArray _dst, int method )
double cv::invert( InputArray _src, OutputArray _dst, int method )
{
bool result = false;
Mat src = _src.getMat();
@ -1122,7 +1122,7 @@ double cv::invert( const InputArray& _src, OutputArray _dst, int method )
* Solving a linear system *
\****************************************************************************************/
bool cv::solve( const InputArray& _src, const InputArray& _src2arg, OutputArray _dst, int method )
bool cv::solve( InputArray _src, InputArray _src2arg, OutputArray _dst, int method )
{
bool result = true;
Mat src = _src.getMat(), _src2 = _src2arg.getMat();
@ -1401,7 +1401,7 @@ bool cv::solve( const InputArray& _src, const InputArray& _src2arg, OutputArray
namespace cv
{
static bool eigen( const InputArray& _src, OutputArray _evals, OutputArray _evects, bool computeEvects, int, int )
static bool eigen( InputArray _src, OutputArray _evals, OutputArray _evects, bool computeEvects, int, int )
{
Mat src = _src.getMat();
int type = src.type();
@ -1433,12 +1433,12 @@ static bool eigen( const InputArray& _src, OutputArray _evals, OutputArray _evec
}
bool cv::eigen( const InputArray& src, OutputArray evals, int lowindex, int highindex )
bool cv::eigen( InputArray src, OutputArray evals, int lowindex, int highindex )
{
return eigen(src, evals, OutputArray(), false, lowindex, highindex);
return eigen(src, evals, None(), false, lowindex, highindex);
}
bool cv::eigen( const InputArray& src, OutputArray evals, OutputArray evects,
bool cv::eigen( InputArray src, OutputArray evals, OutputArray evects,
int lowindex, int highindex )
{
return eigen(src, evals, evects, true, lowindex, highindex);
@ -1447,7 +1447,7 @@ bool cv::eigen( const InputArray& src, OutputArray evals, OutputArray evects,
namespace cv
{
static void _SVDcompute( const InputArray& _aarr, OutputArray _w,
static void _SVDcompute( InputArray _aarr, OutputArray _w,
OutputArray _u, OutputArray _vt, int flags )
{
Mat src = _aarr.getMat();
@ -1515,18 +1515,18 @@ static void _SVDcompute( const InputArray& _aarr, OutputArray _w,
}
void SVD::compute( const InputArray& a, OutputArray w, OutputArray u, OutputArray vt, int flags )
void SVD::compute( InputArray a, OutputArray w, OutputArray u, OutputArray vt, int flags )
{
_SVDcompute(a, w, u, vt, flags);
}
void SVD::compute( const InputArray& a, OutputArray w, int flags )
void SVD::compute( InputArray a, OutputArray w, int flags )
{
_SVDcompute(a, w, OutputArray(), OutputArray(), flags);
_SVDcompute(a, w, None(), None(), flags);
}
void SVD::backSubst( const InputArray& _w, const InputArray& _u, const InputArray& _vt,
const InputArray& _rhs, OutputArray _dst )
void SVD::backSubst( InputArray _w, InputArray _u, InputArray _vt,
InputArray _rhs, OutputArray _dst )
{
Mat w = _w.getMat(), u = _u.getMat(), vt = _vt.getMat(), rhs = _rhs.getMat();
int type = w.type(), esz = (int)w.elemSize();
@ -1553,14 +1553,14 @@ void SVD::backSubst( const InputArray& _w, const InputArray& _u, const InputArra
}
SVD& SVD::operator ()(const InputArray& a, int flags)
SVD& SVD::operator ()(InputArray a, int flags)
{
_SVDcompute(a, w, u, vt, flags);
return *this;
}
void SVD::backSubst( const InputArray& rhs, OutputArray dst ) const
void SVD::backSubst( InputArray rhs, OutputArray dst ) const
{
backSubst( w, u, vt, rhs, dst );
}

View File

@ -319,7 +319,7 @@ static void Sqrt_64f(const double* src, double* dst, int len)
* Cartezian -> Polar *
\****************************************************************************************/
void magnitude( const InputArray& src1, const InputArray& src2, OutputArray dst )
void magnitude( InputArray src1, InputArray src2, OutputArray dst )
{
Mat X = src1.getMat(), Y = src2.getMat();
int type = X.type(), depth = X.depth(), cn = X.channels();
@ -350,7 +350,7 @@ void magnitude( const InputArray& src1, const InputArray& src2, OutputArray dst
}
void phase( const InputArray& src1, const InputArray& src2, OutputArray dst, bool angleInDegrees )
void phase( InputArray src1, InputArray src2, OutputArray dst, bool angleInDegrees )
{
Mat X = src1.getMat(), Y = src2.getMat();
int type = X.type(), depth = X.depth(), cn = X.channels();
@ -407,7 +407,7 @@ void phase( const InputArray& src1, const InputArray& src2, OutputArray dst, boo
}
void cartToPolar( const InputArray& src1, const InputArray& src2,
void cartToPolar( InputArray src1, InputArray src2,
OutputArray dst1, OutputArray dst2, bool angleInDegrees )
{
Mat X = src1.getMat(), Y = src2.getMat();
@ -553,7 +553,7 @@ static void SinCos_32f( const float *angle, float *sinval, float* cosval,
}
void polarToCart( const InputArray& src1, const InputArray& src2,
void polarToCart( InputArray src1, InputArray src2,
OutputArray dst1, OutputArray dst2, bool angleInDegrees )
{
Mat Mag = src1.getMat(), Angle = src2.getMat();
@ -1117,7 +1117,7 @@ static void Exp_64f( const double *_x, double *y, int n )
#endif
void exp( const InputArray& _src, OutputArray _dst )
void exp( InputArray _src, OutputArray _dst )
{
Mat src = _src.getMat();
int type = src.type(), depth = src.depth(), cn = src.channels();
@ -1762,7 +1762,7 @@ static void Log_64f( const double *x, double *y, int n )
#endif
void log( const InputArray& _src, OutputArray _dst )
void log( InputArray _src, OutputArray _dst )
{
Mat src = _src.getMat();
int type = src.type(), depth = src.depth(), cn = src.channels();
@ -1858,7 +1858,7 @@ static IPowFunc ipowTab[] =
};
void pow( const InputArray& _src, double power, OutputArray _dst )
void pow( InputArray _src, double power, OutputArray _dst )
{
Mat src = _src.getMat();
int type = src.type(), depth = src.depth(), cn = src.channels();
@ -1957,14 +1957,14 @@ void pow( const InputArray& _src, double power, OutputArray _dst )
}
}
void sqrt(const InputArray& a, OutputArray b)
void sqrt(InputArray a, OutputArray b)
{
pow(a, 0.5, b);
}
/************************** CheckArray for NaN's, Inf's *********************************/
bool checkRange(const InputArray& _src, bool quiet, Point* pt,
bool checkRange(InputArray _src, bool quiet, Point* pt,
double minVal, double maxVal)
{
Mat src = _src.getMat();
@ -2191,7 +2191,7 @@ CV_IMPL int cvCheckArr( const CvArr* arr, int flags,
-----------------------------------------------------------------------
*/
int cv::solveCubic( const InputArray& _coeffs, OutputArray _roots )
int cv::solveCubic( InputArray _coeffs, OutputArray _roots )
{
const int n0 = 3;
Mat coeffs = _coeffs.getMat();
@ -2320,7 +2320,7 @@ int cv::solveCubic( const InputArray& _coeffs, OutputArray _roots )
/* finds complex roots of a polynomial using Durand-Kerner method:
http://en.wikipedia.org/wiki/Durand%E2%80%93Kerner_method */
double cv::solvePoly( const InputArray& _coeffs0, OutputArray _roots0, int maxIters )
double cv::solvePoly( InputArray _coeffs0, OutputArray _roots0, int maxIters )
{
typedef Complex<double> C;

View File

@ -685,8 +685,8 @@ static void GEMMStore_64fc( const Complexd* c_data, size_t c_step,
}
void cv::gemm( const InputArray& matA, const InputArray& matB, double alpha,
const InputArray& matC, double beta, OutputArray matD, int flags )
void cv::gemm( InputArray matA, InputArray matB, double alpha,
InputArray matC, double beta, OutputArray matD, int flags )
{
const int block_lin_size = 128;
const int block_size = block_lin_size * block_lin_size;
@ -1731,7 +1731,7 @@ static TransformFunc diagTransformTab[] =
}
void cv::transform( const InputArray& _src, OutputArray _dst, const InputArray& _mtx )
void cv::transform( InputArray _src, OutputArray _dst, InputArray _mtx )
{
Mat src = _src.getMat(), m = _mtx.getMat();
int depth = src.depth(), scn = src.channels(), dcn = m.rows;
@ -1908,7 +1908,7 @@ perspectiveTransform_64f(const double* src, double* dst, const double* m, int le
}
void cv::perspectiveTransform( const InputArray& _src, OutputArray _dst, const InputArray& _mtx )
void cv::perspectiveTransform( InputArray _src, OutputArray _dst, InputArray _mtx )
{
Mat src = _src.getMat(), m = _mtx.getMat();
int depth = src.depth(), scn = src.channels(), dcn = m.rows-1;
@ -2041,7 +2041,7 @@ typedef void (*ScaleAddFunc)(const uchar* src1, const uchar* src2, uchar* dst, i
}
void cv::scaleAdd( const InputArray& _src1, double alpha, const InputArray& _src2, OutputArray _dst )
void cv::scaleAdd( InputArray _src1, double alpha, InputArray _src2, OutputArray _dst )
{
Mat src1 = _src1.getMat(), src2 = _src2.getMat();
int depth = src1.depth(), cn = src1.channels();
@ -2120,7 +2120,7 @@ void cv::calcCovarMatrix( const Mat* data, int nsamples, Mat& covar, Mat& _mean,
_mean = mean.reshape(1, size.height);
}
void cv::calcCovarMatrix( const InputArray& _data, OutputArray _covar, InputOutputArray _mean, int flags, int ctype )
void cv::calcCovarMatrix( InputArray _data, OutputArray _covar, InputOutputArray _mean, int flags, int ctype )
{
Mat data = _data.getMat(), mean;
CV_Assert( ((flags & CV_COVAR_ROWS) != 0) ^ ((flags & CV_COVAR_COLS) != 0) );
@ -2158,7 +2158,7 @@ void cv::calcCovarMatrix( const InputArray& _data, OutputArray _covar, InputOutp
* Mahalanobis *
\****************************************************************************************/
double cv::Mahalanobis( const InputArray& _v1, const InputArray& _v2, const InputArray& _icovar )
double cv::Mahalanobis( InputArray _v1, InputArray _v2, InputArray _icovar )
{
Mat v1 = _v1.getMat(), v2 = _v2.getMat(), icovar = _icovar.getMat();
int type = v1.type(), depth = v1.depth();
@ -2239,7 +2239,7 @@ double cv::Mahalanobis( const InputArray& _v1, const InputArray& _v2, const Inpu
return std::sqrt(result);
}
double cv::Mahalonobis( const InputArray& _v1, const InputArray& _v2, const InputArray& _icovar )
double cv::Mahalonobis( InputArray _v1, InputArray _v2, InputArray _icovar )
{
return Mahalanobis(_v1, _v2, _icovar);
}
@ -2446,8 +2446,8 @@ typedef void (*MulTransposedFunc)(const Mat& src, Mat& dst, const Mat& delta, do
}
void cv::mulTransposed( const InputArray& _src, OutputArray _dst, bool ata,
const InputArray& _delta, double scale, int dtype )
void cv::mulTransposed( InputArray _src, OutputArray _dst, bool ata,
InputArray _delta, double scale, int dtype )
{
Mat src = _src.getMat(), delta = _delta.getMat();
const int gemm_level = 100; // boundary above which GEMM is faster.
@ -2701,7 +2701,7 @@ static DotProdFunc dotProdTab[] =
(DotProdFunc)dotProd_64f, 0
};
double Mat::dot(const InputArray& _mat) const
double Mat::dot(InputArray _mat) const
{
Mat mat = _mat.getMat();
int cn = channels();
@ -2733,12 +2733,12 @@ double Mat::dot(const InputArray& _mat) const
PCA::PCA() {}
PCA::PCA(const InputArray& data, const InputArray& mean, int flags, int maxComponents)
PCA::PCA(InputArray data, InputArray mean, int flags, int maxComponents)
{
operator()(data, mean, flags, maxComponents);
}
PCA& PCA::operator()(const InputArray& _data, const InputArray& __mean, int flags, int maxComponents)
PCA& PCA::operator()(InputArray _data, InputArray __mean, int flags, int maxComponents)
{
Mat data = _data.getMat(), _mean = __mean.getMat();
int covar_flags = CV_COVAR_SCALE;
@ -2823,7 +2823,7 @@ PCA& PCA::operator()(const InputArray& _data, const InputArray& __mean, int flag
}
void PCA::project(const InputArray& _data, OutputArray result) const
void PCA::project(InputArray _data, OutputArray result) const
{
Mat data = _data.getMat();
CV_Assert( mean.data && eigenvectors.data &&
@ -2846,14 +2846,14 @@ void PCA::project(const InputArray& _data, OutputArray result) const
gemm( eigenvectors, tmp_data, 1, Mat(), 0, result, 0 );
}
Mat PCA::project(const InputArray& data) const
Mat PCA::project(InputArray data) const
{
Mat result;
project(data, result);
return result;
}
void PCA::backProject(const InputArray& _data, OutputArray result) const
void PCA::backProject(InputArray _data, OutputArray result) const
{
Mat data = _data.getMat();
CV_Assert( mean.data && eigenvectors.data &&
@ -2874,7 +2874,7 @@ void PCA::backProject(const InputArray& _data, OutputArray result) const
}
}
Mat PCA::backProject(const InputArray& data) const
Mat PCA::backProject(InputArray data) const
{
Mat result;
backProject(data, result);

View File

@ -1589,7 +1589,7 @@ MatExpr Mat::inv(int method) const
}
MatExpr Mat::mul(const InputArray& m, double scale) const
MatExpr Mat::mul(InputArray m, double scale) const
{
MatExpr e;
MatOp_Bin::makeExpr(e, '*', *this, m.getMat(), scale);

View File

@ -698,7 +698,7 @@ void cv::extractImageCOI(const CvArr* arr, OutputArray _ch, int coi)
mixChannels( &mat, 1, &ch, 1, _pairs, 1 );
}
void cv::insertImageCOI(const InputArray& _ch, CvArr* arr, int coi)
void cv::insertImageCOI(InputArray _ch, CvArr* arr, int coi)
{
Mat ch = _ch.getMat(), mat = cvarrToMat(arr, false, true, 1);
if(coi < 0)
@ -860,13 +860,13 @@ void scalarToRawData(const Scalar& s, void* _buf, int type, int unroll_to)
Input/Output Array
\*************************************************************************************************/
InputArray::InputArray() : flags(0), obj(0) {}
InputArray::InputArray(const Mat& m) : flags(MAT), obj((void*)&m) {}
InputArray::InputArray(const vector<Mat>& vec) : flags(STD_VECTOR_MAT), obj((void*)&vec) {}
InputArray::InputArray(const double& val) : flags(MATX+CV_64F), obj((void*)&val), sz(Size(1,1)) {}
InputArray::InputArray(const MatExpr& expr) : flags(EXPR), obj((void*)&expr) {}
_InputArray::_InputArray() : flags(0), obj(0) {}
_InputArray::_InputArray(const Mat& m) : flags(MAT), obj((void*)&m) {}
_InputArray::_InputArray(const vector<Mat>& vec) : flags(STD_VECTOR_MAT), obj((void*)&vec) {}
_InputArray::_InputArray(const double& val) : flags(MATX+CV_64F), obj((void*)&val), sz(Size(1,1)) {}
_InputArray::_InputArray(const MatExpr& expr) : flags(EXPR), obj((void*)&expr) {}
Mat InputArray::getMat(int i) const
Mat _InputArray::getMat(int i) const
{
int k = kind();
@ -921,7 +921,7 @@ Mat InputArray::getMat(int i) const
}
void InputArray::getMatVector(vector<Mat>& mv) const
void _InputArray::getMatVector(vector<Mat>& mv) const
{
int k = kind();
@ -1002,12 +1002,12 @@ void InputArray::getMatVector(vector<Mat>& mv) const
}
}
int InputArray::kind() const
int _InputArray::kind() const
{
return flags & -(1 << KIND_SHIFT);
}
Size InputArray::size(int i) const
Size _InputArray::size(int i) const
{
int k = kind();
@ -1065,12 +1065,12 @@ Size InputArray::size(int i) const
}
}
size_t InputArray::total(int i) const
size_t _InputArray::total(int i) const
{
return size(i).area();
}
int InputArray::type(int i) const
int _InputArray::type(int i) const
{
int k = kind();
@ -1096,17 +1096,17 @@ int InputArray::type(int i) const
}
}
int InputArray::depth(int i) const
int _InputArray::depth(int i) const
{
return CV_MAT_DEPTH(type(i));
}
int InputArray::channels(int i) const
int _InputArray::channels(int i) const
{
return CV_MAT_CN(type(i));
}
bool InputArray::empty() const
bool _InputArray::empty() const
{
int k = kind();
@ -1143,23 +1143,23 @@ bool InputArray::empty() const
}
OutputArray::OutputArray() {}
OutputArray::OutputArray(Mat& m) : InputArray(m) {}
OutputArray::OutputArray(vector<Mat>& vec) : InputArray(vec) {}
_OutputArray::_OutputArray() {}
_OutputArray::_OutputArray(Mat& m) : _InputArray(m) {}
_OutputArray::_OutputArray(vector<Mat>& vec) : _InputArray(vec) {}
bool OutputArray::fixedSize() const
bool _OutputArray::fixedSize() const
{
int k = kind();
return k == MATX;
}
bool OutputArray::fixedType() const
bool _OutputArray::fixedType() const
{
int k = kind();
return k != MAT && k != STD_VECTOR_MAT;
}
void OutputArray::create(Size _sz, int type, int i, bool allowTransposed, int fixedDepthMask)
void _OutputArray::create(Size _sz, int type, int i, bool allowTransposed, int fixedDepthMask) const
{
int k = kind();
if( k == MAT && i < 0 && !allowTransposed && fixedDepthMask == 0 )
@ -1171,7 +1171,7 @@ void OutputArray::create(Size _sz, int type, int i, bool allowTransposed, int fi
create(2, sz, type, i, allowTransposed, fixedDepthMask);
}
void OutputArray::create(int rows, int cols, int type, int i, bool allowTransposed, int fixedDepthMask)
void _OutputArray::create(int rows, int cols, int type, int i, bool allowTransposed, int fixedDepthMask) const
{
int k = kind();
if( k == MAT && i < 0 && !allowTransposed && fixedDepthMask == 0 )
@ -1183,7 +1183,7 @@ void OutputArray::create(int rows, int cols, int type, int i, bool allowTranspos
create(2, sz, type, i, allowTransposed, fixedDepthMask);
}
void OutputArray::create(int dims, const int* size, int type, int i, bool allocateVector, int fixedDepthMask)
void _OutputArray::create(int dims, const int* size, int type, int i, bool allocateVector, int fixedDepthMask) const
{
int k = kind();
type = CV_MAT_TYPE(type);
@ -1331,7 +1331,7 @@ void OutputArray::create(int dims, const int* size, int type, int i, bool alloca
}
}
void OutputArray::release()
void _OutputArray::release() const
{
int k = kind();
@ -1363,7 +1363,7 @@ void OutputArray::release()
}
}
void OutputArray::clear()
void _OutputArray::clear() const
{
int k = kind();
@ -1376,12 +1376,12 @@ void OutputArray::clear()
release();
}
bool OutputArray::needed() const
bool _OutputArray::needed() const
{
return kind() != NONE;
}
Mat& OutputArray::getMatRef(int i)
Mat& _OutputArray::getMatRef(int i) const
{
int k = kind();
if( i < 0 )
@ -1397,6 +1397,9 @@ Mat& OutputArray::getMatRef(int i)
return v[i];
}
}
static _OutputArray _none;
OutputArray None() { return _none; }
}
@ -1431,13 +1434,13 @@ void cv::hconcat(const Mat* src, size_t nsrc, OutputArray _dst)
}
}
void cv::hconcat(const InputArray& src1, const InputArray& src2, OutputArray dst)
void cv::hconcat(InputArray src1, InputArray src2, OutputArray dst)
{
Mat src[] = {src1.getMat(), src2.getMat()};
hconcat(src, 2, dst);
}
void cv::hconcat(const InputArray& _src, OutputArray dst)
void cv::hconcat(InputArray _src, OutputArray dst)
{
vector<Mat> src;
_src.getMatVector(src);
@ -1471,13 +1474,13 @@ void cv::vconcat(const Mat* src, size_t nsrc, OutputArray _dst)
}
}
void cv::vconcat(const InputArray& src1, const InputArray& src2, OutputArray dst)
void cv::vconcat(InputArray src1, InputArray src2, OutputArray dst)
{
Mat src[] = {src1.getMat(), src2.getMat()};
vconcat(src, 2, dst);
}
void cv::vconcat(const InputArray& _src, OutputArray dst)
void cv::vconcat(InputArray _src, OutputArray dst)
{
vector<Mat> src;
_src.getMatVector(src);
@ -1526,7 +1529,7 @@ void cv::setIdentity( InputOutputArray _m, const Scalar& s )
//////////////////////////////////////////// trace ///////////////////////////////////////////
cv::Scalar cv::trace( const InputArray& _m )
cv::Scalar cv::trace( InputArray _m )
{
Mat m = _m.getMat();
CV_Assert( m.dims <= 2 );
@ -1665,7 +1668,7 @@ static TransposeInplaceFunc transposeInplaceTab[] =
}
void cv::transpose( const InputArray& _src, OutputArray _dst )
void cv::transpose( InputArray _src, OutputArray _dst )
{
Mat src = _src.getMat();
size_t esz = src.elemSize();
@ -1725,7 +1728,7 @@ void cv::completeSymm( InputOutputArray _m, bool LtoR )
}
cv::Mat cv::Mat::cross(const InputArray& _m) const
cv::Mat cv::Mat::cross(InputArray _m) const
{
Mat m = _m.getMat();
int t = type(), d = CV_MAT_DEPTH(t);
@ -1850,7 +1853,7 @@ typedef void (*ReduceFunc)( const Mat& src, Mat& dst );
}
void cv::reduce(const InputArray& _src, OutputArray _dst, int dim, int op, int dtype)
void cv::reduce(InputArray _src, OutputArray _dst, int dim, int op, int dtype)
{
Mat src = _src.getMat();
CV_Assert( src.dims <= 2 );
@ -2086,7 +2089,7 @@ typedef void (*SortFunc)(const Mat& src, Mat& dst, int flags);
}
void cv::sort( const InputArray& _src, OutputArray _dst, int flags )
void cv::sort( InputArray _src, OutputArray _dst, int flags )
{
static SortFunc tab[] =
{
@ -2101,7 +2104,7 @@ void cv::sort( const InputArray& _src, OutputArray _dst, int flags )
func( src, dst, flags );
}
void cv::sortIdx( const InputArray& _src, OutputArray _dst, int flags )
void cv::sortIdx( InputArray _src, OutputArray _dst, int flags )
{
static SortFunc tab[] =
{
@ -2237,7 +2240,7 @@ static void generateCentersPP(const Mat& _data, Mat& _out_centers,
}
double cv::kmeans( const InputArray& _data, int K,
double cv::kmeans( InputArray _data, int K,
InputOutputArray _bestLabels,
TermCriteria criteria, int attempts,
int flags, OutputArray _centers )
@ -2597,7 +2600,7 @@ cvKMeans2( const CvArr* _samples, int cluster_count, CvArr* _labels,
labels.cols + labels.rows - 1 == data.rows );
double compactness = cv::kmeans(data, cluster_count, labels, termcrit, attempts,
flags, _centers ? cv::OutputArray(centers) : cv::OutputArray() );
flags, _centers ? cv::_OutputArray(centers) : cv::_OutputArray() );
if( _compactness )
*_compactness = compactness;
return 1;

View File

@ -443,7 +443,7 @@ static RandnScaleFunc randnScaleTab[] =
(RandnScaleFunc)randnScale_64f, 0
};
void RNG::fill( InputOutputArray _mat, int disttype, const InputArray& _param1arg, const InputArray& _param2arg )
void RNG::fill( InputOutputArray _mat, int disttype, InputArray _param1arg, InputArray _param2arg )
{
Mat mat = _mat.getMat(), _param1 = _param1arg.getMat(), _param2 = _param2arg.getMat();
int depth = mat.depth(), cn = mat.channels();
@ -718,12 +718,12 @@ RNG& theRNG()
}
void cv::randu(InputOutputArray dst, const InputArray& low, const InputArray& high)
void cv::randu(InputOutputArray dst, InputArray low, InputArray high)
{
theRNG().fill(dst, RNG::UNIFORM, low, high);
}
void cv::randn(InputOutputArray dst, const InputArray& mean, const InputArray& stddev)
void cv::randn(InputOutputArray dst, InputArray mean, InputArray stddev)
{
theRNG().fill(dst, RNG::NORMAL, mean, stddev);
}

View File

@ -392,7 +392,7 @@ static SumSqrFunc sumSqrTab[] =
}
cv::Scalar cv::sum( const InputArray& _src )
cv::Scalar cv::sum( InputArray _src )
{
Mat src = _src.getMat();
int k, cn = src.channels(), depth = src.depth();
@ -445,7 +445,7 @@ cv::Scalar cv::sum( const InputArray& _src )
return s;
}
int cv::countNonZero( const InputArray& _src )
int cv::countNonZero( InputArray _src )
{
Mat src = _src.getMat();
CountNonZeroFunc func = countNonZeroTab[src.depth()];
@ -463,7 +463,7 @@ int cv::countNonZero( const InputArray& _src )
return nz;
}
cv::Scalar cv::mean( const InputArray& _src, const InputArray& _mask )
cv::Scalar cv::mean( InputArray _src, InputArray _mask )
{
Mat src = _src.getMat(), mask = _mask.getMat();
if( !mask.empty() )
@ -523,7 +523,7 @@ cv::Scalar cv::mean( const InputArray& _src, const InputArray& _mask )
}
void cv::meanStdDev( const InputArray& _src, OutputArray _mean, OutputArray _sdv, const InputArray& _mask )
void cv::meanStdDev( InputArray _src, OutputArray _mean, OutputArray _sdv, InputArray _mask )
{
Mat src = _src.getMat(), mask = _mask.getMat();
if( !mask.empty() )
@ -601,7 +601,7 @@ void cv::meanStdDev( const InputArray& _src, OutputArray _mean, OutputArray _sdv
for( j = 0; j < 2; j++ )
{
const double* sptr = j == 0 ? s : sq;
OutputArray& _dst = j == 0 ? _mean : _sdv;
_OutputArray _dst = j == 0 ? _mean : _sdv;
if( !_dst.needed() )
continue;
@ -733,9 +733,9 @@ static void ofs2idx(const Mat& a, size_t ofs, int* idx)
}
void cv::minMaxIdx(const InputArray& _src, double* minVal,
void cv::minMaxIdx(InputArray _src, double* minVal,
double* maxVal, int* minIdx, int* maxIdx,
const InputArray& _mask)
InputArray _mask)
{
Mat src = _src.getMat(), mask = _mask.getMat();
int depth = src.depth();
@ -782,8 +782,8 @@ void cv::minMaxIdx(const InputArray& _src, double* minVal,
ofs2idx(src, maxidx, maxIdx);
}
void cv::minMaxLoc( const InputArray& _img, double* minVal, double* maxVal,
Point* minLoc, Point* maxLoc, const InputArray& mask )
void cv::minMaxLoc( InputArray _img, double* minVal, double* maxVal,
Point* minLoc, Point* maxLoc, InputArray mask )
{
Mat img = _img.getMat();
CV_Assert(img.dims <= 2);
@ -1017,7 +1017,7 @@ static NormDiffFunc normDiffTab[3][8] =
}
double cv::norm( const InputArray& _src, int normType, const InputArray& _mask )
double cv::norm( InputArray _src, int normType, InputArray _mask )
{
Mat src = _src.getMat(), mask = _mask.getMat();
int depth = src.depth(), cn = src.channels();
@ -1111,7 +1111,7 @@ double cv::norm( const InputArray& _src, int normType, const InputArray& _mask )
}
double cv::norm( const InputArray& _src1, const InputArray& _src2, int normType, const InputArray& _mask )
double cv::norm( InputArray _src1, InputArray _src2, int normType, InputArray _mask )
{
if( normType & CV_RELATIVE )
return norm(_src1, _src2, normType & ~CV_RELATIVE, _mask)/(norm(_src2, normType, _mask) + DBL_EPSILON);

View File

@ -88,7 +88,7 @@ CV_EXPORTS int createButton( const string& bar_name, ButtonCallback on_change,
bool initial_button_state CV_DEFAULT(0));
//-------------------------
CV_EXPORTS_W void imshow( const string& winname, const InputArray& mat );
CV_EXPORTS_W void imshow( const string& winname, InputArray mat );
typedef void (CV_CDECL *TrackbarCallback)(int pos, void* userdata);
@ -106,10 +106,10 @@ typedef void (*MouseCallback )(int event, int x, int y, int flags, void* param);
CV_EXPORTS void setMouseCallback( const string& windowName, MouseCallback onMouse, void* param=0);
CV_EXPORTS_W Mat imread( const string& filename, int flags=1 );
CV_EXPORTS_W bool imwrite( const string& filename, const InputArray& img,
CV_EXPORTS_W bool imwrite( const string& filename, InputArray img,
const vector<int>& params=vector<int>());
CV_EXPORTS_W Mat imdecode( const InputArray& buf, int flags );
CV_EXPORTS_W bool imencode( const string& ext, const InputArray& img,
CV_EXPORTS_W Mat imdecode( InputArray buf, int flags );
CV_EXPORTS_W bool imencode( const string& ext, InputArray img,
vector<uchar>& buf,
const vector<int>& params=vector<int>());

View File

@ -295,7 +295,7 @@ static bool imwrite_( const string& filename, const Mat& image,
return code;
}
bool imwrite( const string& filename, const InputArray& _img,
bool imwrite( const string& filename, InputArray _img,
const vector<int>& params )
{
Mat img = _img.getMat();
@ -389,14 +389,14 @@ imdecode_( const Mat& buf, int flags, int hdrtype, Mat* mat=0 )
}
Mat imdecode( const InputArray& _buf, int flags )
Mat imdecode( InputArray _buf, int flags )
{
Mat buf = _buf.getMat(), img;
imdecode_( buf, flags, LOAD_MAT, &img );
return img;
}
bool imencode( const string& ext, const InputArray& _image,
bool imencode( const string& ext, InputArray _image,
vector<uchar>& buf, const vector<int>& params )
{
Mat temp, image = _image.getMat();

View File

@ -146,7 +146,7 @@ double cv::getWindowProperty(const string& winname, int prop_id)
return cvGetWindowProperty(winname.c_str(),prop_id);
}
void cv::imshow( const string& winname, const InputArray& _img )
void cv::imshow( const string& winname, InputArray _img )
{
Mat img = _img.getMat();
CvMat c_img = img;

View File

@ -287,28 +287,28 @@ enum { KERNEL_GENERAL=0, KERNEL_SYMMETRICAL=1, KERNEL_ASYMMETRICAL=2,
KERNEL_SMOOTH=4, KERNEL_INTEGER=8 };
//! returns type (one of KERNEL_*) of 1D or 2D kernel specified by its coefficients.
CV_EXPORTS int getKernelType(const InputArray& kernel, Point anchor);
CV_EXPORTS int getKernelType(InputArray kernel, Point anchor);
//! returns the primitive row filter with the specified kernel
CV_EXPORTS Ptr<BaseRowFilter> getLinearRowFilter(int srcType, int bufType,
const InputArray& kernel, int anchor,
InputArray kernel, int anchor,
int symmetryType);
//! returns the primitive column filter with the specified kernel
CV_EXPORTS Ptr<BaseColumnFilter> getLinearColumnFilter(int bufType, int dstType,
const InputArray& kernel, int anchor,
InputArray kernel, int anchor,
int symmetryType, double delta=0,
int bits=0);
//! returns 2D filter with the specified kernel
CV_EXPORTS Ptr<BaseFilter> getLinearFilter(int srcType, int dstType,
const InputArray& kernel,
InputArray kernel,
Point anchor=Point(-1,-1),
double delta=0, int bits=0);
//! returns the separable linear filter engine
CV_EXPORTS Ptr<FilterEngine> createSeparableLinearFilter(int srcType, int dstType,
const InputArray& rowKernel, const InputArray& columnKernel,
InputArray rowKernel, InputArray columnKernel,
Point _anchor=Point(-1,-1), double delta=0,
int _rowBorderType=BORDER_DEFAULT,
int _columnBorderType=-1,
@ -316,7 +316,7 @@ CV_EXPORTS Ptr<FilterEngine> createSeparableLinearFilter(int srcType, int dstTyp
//! returns the non-separable linear filter engine
CV_EXPORTS Ptr<FilterEngine> createLinearFilter(int srcType, int dstType,
const InputArray& kernel, Point _anchor=Point(-1,-1),
InputArray kernel, Point _anchor=Point(-1,-1),
double delta=0, int _rowBorderType=BORDER_DEFAULT,
int _columnBorderType=-1, const Scalar& _borderValue=Scalar());
@ -358,14 +358,14 @@ CV_EXPORTS Ptr<BaseRowFilter> getMorphologyRowFilter(int op, int type, int ksize
//! returns vertical 1D morphological filter
CV_EXPORTS Ptr<BaseColumnFilter> getMorphologyColumnFilter(int op, int type, int ksize, int anchor=-1);
//! returns 2D morphological filter
CV_EXPORTS Ptr<BaseFilter> getMorphologyFilter(int op, int type, const InputArray& kernel,
CV_EXPORTS Ptr<BaseFilter> getMorphologyFilter(int op, int type, InputArray kernel,
Point anchor=Point(-1,-1));
//! returns "magic" border value for erosion and dilation. It is automatically transformed to Scalar::all(-DBL_MAX) for dilation.
static inline Scalar morphologyDefaultBorderValue() { return Scalar::all(DBL_MAX); }
//! returns morphological filter engine. Only MORPH_ERODE and MORPH_DILATE are supported.
CV_EXPORTS Ptr<FilterEngine> createMorphologyFilter(int op, int type, const InputArray& kernel,
CV_EXPORTS Ptr<FilterEngine> createMorphologyFilter(int op, int type, InputArray kernel,
Point anchor=Point(-1,-1), int _rowBorderType=BORDER_CONSTANT,
int _columnBorderType=-1,
const Scalar& _borderValue=morphologyDefaultBorderValue());
@ -378,124 +378,124 @@ CV_EXPORTS_W Mat getStructuringElement(int shape, Size ksize, Point anchor=Point
template<> CV_EXPORTS void Ptr<IplConvKernel>::delete_obj();
//! copies 2D array to a larger destination array with extrapolation of the outer part of src using the specified border mode
CV_EXPORTS_W void copyMakeBorder( const InputArray& src, OutputArray dst,
CV_EXPORTS_W void copyMakeBorder( InputArray src, OutputArray dst,
int top, int bottom, int left, int right,
int borderType, const Scalar& value=Scalar() );
//! smooths the image using median filter.
CV_EXPORTS_W void medianBlur( const InputArray& src, OutputArray dst, int ksize );
CV_EXPORTS_W void medianBlur( InputArray src, OutputArray dst, int ksize );
//! smooths the image using Gaussian filter.
CV_EXPORTS_AS(gaussianBlur) void GaussianBlur( const InputArray& src,
CV_EXPORTS_AS(gaussianBlur) void GaussianBlur( InputArray src,
OutputArray dst, Size ksize,
double sigma1, double sigma2=0,
int borderType=BORDER_DEFAULT );
//! smooths the image using bilateral filter
CV_EXPORTS_W void bilateralFilter( const InputArray& src, OutputArray dst, int d,
CV_EXPORTS_W void bilateralFilter( InputArray src, OutputArray dst, int d,
double sigmaColor, double sigmaSpace,
int borderType=BORDER_DEFAULT );
//! smooths the image using the box filter. Each pixel is processed in O(1) time
CV_EXPORTS_W void boxFilter( const InputArray& src, OutputArray dst, int ddepth,
CV_EXPORTS_W void boxFilter( InputArray src, OutputArray dst, int ddepth,
Size ksize, Point anchor=Point(-1,-1),
bool normalize=true,
int borderType=BORDER_DEFAULT );
//! a synonym for normalized box filter
CV_EXPORTS_W void blur( const InputArray& src, OutputArray dst,
CV_EXPORTS_W void blur( InputArray src, OutputArray dst,
Size ksize, Point anchor=Point(-1,-1),
int borderType=BORDER_DEFAULT );
//! applies non-separable 2D linear filter to the image
CV_EXPORTS_W void filter2D( const InputArray& src, OutputArray dst, int ddepth,
const InputArray& kernel, Point anchor=Point(-1,-1),
CV_EXPORTS_W void filter2D( InputArray src, OutputArray dst, int ddepth,
InputArray kernel, Point anchor=Point(-1,-1),
double delta=0, int borderType=BORDER_DEFAULT );
//! applies separable 2D linear filter to the image
CV_EXPORTS_W void sepFilter2D( const InputArray& src, OutputArray dst, int ddepth,
const InputArray& kernelX, const InputArray& kernelY,
CV_EXPORTS_W void sepFilter2D( InputArray src, OutputArray dst, int ddepth,
InputArray kernelX, InputArray kernelY,
Point anchor=Point(-1,-1),
double delta=0, int borderType=BORDER_DEFAULT );
//! applies generalized Sobel operator to the image
CV_EXPORTS_AS(sobel) void Sobel( const InputArray& src, OutputArray dst, int ddepth,
CV_EXPORTS_AS(sobel) void Sobel( InputArray src, OutputArray dst, int ddepth,
int dx, int dy, int ksize=3,
double scale=1, double delta=0,
int borderType=BORDER_DEFAULT );
//! applies the vertical or horizontal Scharr operator to the image
CV_EXPORTS_AS(scharr) void Scharr( const InputArray& src, OutputArray dst, int ddepth,
CV_EXPORTS_AS(scharr) void Scharr( InputArray src, OutputArray dst, int ddepth,
int dx, int dy, double scale=1, double delta=0,
int borderType=BORDER_DEFAULT );
//! applies Laplacian operator to the image
CV_EXPORTS_AS(laplacian) void Laplacian( const InputArray& src, OutputArray dst, int ddepth,
CV_EXPORTS_AS(laplacian) void Laplacian( InputArray src, OutputArray dst, int ddepth,
int ksize=1, double scale=1, double delta=0,
int borderType=BORDER_DEFAULT );
//! applies Canny edge detector and produces the edge map.
CV_EXPORTS_AS(canny) void Canny( const InputArray& image, OutputArray edges,
CV_EXPORTS_AS(canny) void Canny( InputArray image, OutputArray edges,
double threshold1, double threshold2,
int apertureSize=3, bool L2gradient=false );
//! computes minimum eigen value of 2x2 derivative covariation matrix at each pixel - the cornerness criteria
CV_EXPORTS_W void cornerMinEigenVal( const InputArray& src, OutputArray dst,
CV_EXPORTS_W void cornerMinEigenVal( InputArray src, OutputArray dst,
int blockSize, int ksize=3,
int borderType=BORDER_DEFAULT );
//! computes Harris cornerness criteria at each image pixel
CV_EXPORTS_W void cornerHarris( const InputArray& src, OutputArray dst, int blockSize,
CV_EXPORTS_W void cornerHarris( InputArray src, OutputArray dst, int blockSize,
int ksize, double k,
int borderType=BORDER_DEFAULT );
//! computes both eigenvalues and the eigenvectors of 2x2 derivative covariation matrix at each pixel. The output is stored as 6-channel matrix.
CV_EXPORTS_W void cornerEigenValsAndVecs( const InputArray& src, OutputArray dst,
CV_EXPORTS_W void cornerEigenValsAndVecs( InputArray src, OutputArray dst,
int blockSize, int ksize,
int borderType=BORDER_DEFAULT );
//! computes another complex cornerness criteria at each pixel
CV_EXPORTS_W void preCornerDetect( const InputArray& src, OutputArray dst, int ksize,
CV_EXPORTS_W void preCornerDetect( InputArray src, OutputArray dst, int ksize,
int borderType=BORDER_DEFAULT );
//! adjusts the corner locations with sub-pixel accuracy to maximize the certain cornerness criteria
CV_EXPORTS void cornerSubPix( const InputArray& image, InputOutputArray corners,
CV_EXPORTS void cornerSubPix( InputArray image, InputOutputArray corners,
Size winSize, Size zeroZone,
TermCriteria criteria );
//! finds the strong enough corners where the cornerMinEigenVal() or cornerHarris() report the local maxima
CV_EXPORTS_W void goodFeaturesToTrack( const InputArray& image, OutputArray corners,
CV_EXPORTS_W void goodFeaturesToTrack( InputArray image, OutputArray corners,
int maxCorners, double qualityLevel, double minDistance,
const InputArray& mask=InputArray(), int blockSize=3,
InputArray mask=None(), int blockSize=3,
bool useHarrisDetector=false, double k=0.04 );
//! finds lines in the black-n-white image using the standard or pyramid Hough transform
CV_EXPORTS_AS(houghLines) void HoughLines( const InputArray& image, OutputArray lines,
CV_EXPORTS_AS(houghLines) void HoughLines( InputArray image, OutputArray lines,
double rho, double theta, int threshold,
double srn=0, double stn=0 );
//! finds line segments in the black-n-white image using probabalistic Hough transform
CV_EXPORTS_AS(houghLinesP) void HoughLinesP( const InputArray& image, OutputArray lines,
CV_EXPORTS_AS(houghLinesP) void HoughLinesP( InputArray image, OutputArray lines,
double rho, double theta, int threshold,
double minLineLength=0, double maxLineGap=0 );
//! finds circles in the grayscale image using 2+1 gradient Hough transform
CV_EXPORTS_AS(houghCircles) void HoughCircles( const InputArray& image, OutputArray circles,
CV_EXPORTS_AS(houghCircles) void HoughCircles( InputArray image, OutputArray circles,
int method, double dp, double minDist,
double param1=100, double param2=100,
int minRadius=0, int maxRadius=0 );
//! erodes the image (applies the local minimum operator)
CV_EXPORTS_W void erode( const InputArray& src, OutputArray dst, const InputArray& kernel,
CV_EXPORTS_W void erode( InputArray src, OutputArray dst, InputArray kernel,
Point anchor=Point(-1,-1), int iterations=1,
int borderType=BORDER_CONSTANT,
const Scalar& borderValue=morphologyDefaultBorderValue() );
//! dilates the image (applies the local maximum operator)
CV_EXPORTS_W void dilate( const InputArray& src, OutputArray dst, const InputArray& kernel,
CV_EXPORTS_W void dilate( InputArray src, OutputArray dst, InputArray kernel,
Point anchor=Point(-1,-1), int iterations=1,
int borderType=BORDER_CONSTANT,
const Scalar& borderValue=morphologyDefaultBorderValue() );
//! applies an advanced morphological operation to the image
CV_EXPORTS_W void morphologyEx( const InputArray& src, OutputArray dst,
int op, const InputArray& kernel,
CV_EXPORTS_W void morphologyEx( InputArray src, OutputArray dst,
int op, InputArray kernel,
Point anchor=Point(-1,-1), int iterations=1,
int borderType=BORDER_CONSTANT,
const Scalar& borderValue=morphologyDefaultBorderValue() );
@ -513,20 +513,20 @@ enum
};
//! resizes the image
CV_EXPORTS_W void resize( const InputArray& src, OutputArray dst,
CV_EXPORTS_W void resize( InputArray src, OutputArray dst,
Size dsize, double fx=0, double fy=0,
int interpolation=INTER_LINEAR );
//! warps the image using affine transformation
CV_EXPORTS_W void warpAffine( const InputArray& src, OutputArray dst,
const InputArray& M, Size dsize,
CV_EXPORTS_W void warpAffine( InputArray src, OutputArray dst,
InputArray M, Size dsize,
int flags=INTER_LINEAR,
int borderMode=BORDER_CONSTANT,
const Scalar& borderValue=Scalar());
//! warps the image using perspective transformation
CV_EXPORTS_W void warpPerspective( const InputArray& src, OutputArray dst,
const InputArray& M, Size dsize,
CV_EXPORTS_W void warpPerspective( InputArray src, OutputArray dst,
InputArray M, Size dsize,
int flags=INTER_LINEAR,
int borderMode=BORDER_CONSTANT,
const Scalar& borderValue=Scalar());
@ -539,13 +539,13 @@ enum
};
//! warps the image using the precomputed maps. The maps are stored in either floating-point or integer fixed-point format
CV_EXPORTS_W void remap( const InputArray& src, OutputArray dst,
const InputArray& map1, const InputArray& map2,
CV_EXPORTS_W void remap( InputArray src, OutputArray dst,
InputArray map1, InputArray map2,
int interpolation, int borderMode=BORDER_CONSTANT,
const Scalar& borderValue=Scalar());
//! converts maps for remap from floating-point to fixed-point format or backwards
CV_EXPORTS_W void convertMaps( const InputArray& map1, const InputArray& map2,
CV_EXPORTS_W void convertMaps( InputArray map1, InputArray map2,
OutputArray dstmap1, OutputArray dstmap2,
int dstmap1type, bool nninterpolation=false );
@ -556,34 +556,34 @@ CV_EXPORTS Mat getPerspectiveTransform( const Point2f src[], const Point2f dst[]
//! returns 2x3 affine transformation for the corresponding 3 point pairs.
CV_EXPORTS Mat getAffineTransform( const Point2f src[], const Point2f dst[] );
//! computes 2x3 affine transformation matrix that is inverse to the specified 2x3 affine transformation.
CV_EXPORTS_W void invertAffineTransform( const InputArray& M, OutputArray iM );
CV_EXPORTS_W void invertAffineTransform( InputArray M, OutputArray iM );
//! extracts rectangle from the image at sub-pixel location
CV_EXPORTS_W void getRectSubPix( const InputArray& image, Size patchSize,
CV_EXPORTS_W void getRectSubPix( InputArray image, Size patchSize,
Point2f center, OutputArray patch, int patchType=-1 );
//! computes the integral image
CV_EXPORTS_W void integral( const InputArray& src, OutputArray sum, int sdepth=-1 );
CV_EXPORTS_W void integral( InputArray src, OutputArray sum, int sdepth=-1 );
//! computes the integral image and integral for the squared image
CV_EXPORTS_AS(integral2) void integral( const InputArray& src, OutputArray sum,
CV_EXPORTS_AS(integral2) void integral( InputArray src, OutputArray sum,
OutputArray sqsum, int sdepth=-1 );
//! computes the integral image, integral for the squared image and the tilted integral image
CV_EXPORTS_AS(integral3) void integral( const InputArray& src, OutputArray sum,
CV_EXPORTS_AS(integral3) void integral( InputArray src, OutputArray sum,
OutputArray sqsum, OutputArray tilted,
int sdepth=-1 );
//! adds image to the accumulator (dst += src). Unlike cv::add, dst and src can have different types.
CV_EXPORTS_W void accumulate( const InputArray& src, CV_IN_OUT InputOutputArray dst,
const InputArray& mask=InputArray() );
CV_EXPORTS_W void accumulate( InputArray src, CV_IN_OUT InputOutputArray dst,
InputArray mask=None() );
//! adds squared src image to the accumulator (dst += src*src).
CV_EXPORTS_W void accumulateSquare( const InputArray& src, CV_IN_OUT InputOutputArray dst,
const InputArray& mask=InputArray() );
CV_EXPORTS_W void accumulateSquare( InputArray src, CV_IN_OUT InputOutputArray dst,
InputArray mask=None() );
//! adds product of the 2 images to the accumulator (dst += src1*src2).
CV_EXPORTS_W void accumulateProduct( const InputArray& src1, const InputArray& src2,
CV_IN_OUT InputOutputArray dst, const InputArray& mask=InputArray() );
CV_EXPORTS_W void accumulateProduct( InputArray src1, InputArray src2,
CV_IN_OUT InputOutputArray dst, InputArray mask=None() );
//! updates the running average (dst = dst*(1-alpha) + src*alpha)
CV_EXPORTS_W void accumulateWeighted( const InputArray& src, CV_IN_OUT InputOutputArray dst,
double alpha, const InputArray& mask=InputArray() );
CV_EXPORTS_W void accumulateWeighted( InputArray src, CV_IN_OUT InputOutputArray dst,
double alpha, InputArray mask=None() );
//! type of the threshold operation
enum { THRESH_BINARY=CV_THRESH_BINARY, THRESH_BINARY_INV=CV_THRESH_BINARY_INV,
@ -592,36 +592,36 @@ enum { THRESH_BINARY=CV_THRESH_BINARY, THRESH_BINARY_INV=CV_THRESH_BINARY_INV,
THRESH_OTSU=CV_THRESH_OTSU };
//! applies fixed threshold to the image
CV_EXPORTS_W double threshold( const InputArray& src, OutputArray dst,
CV_EXPORTS_W double threshold( InputArray src, OutputArray dst,
double thresh, double maxval, int type );
//! adaptive threshold algorithm
enum { ADAPTIVE_THRESH_MEAN_C=0, ADAPTIVE_THRESH_GAUSSIAN_C=1 };
//! applies variable (adaptive) threshold to the image
CV_EXPORTS_W void adaptiveThreshold( const InputArray& src, OutputArray dst,
CV_EXPORTS_W void adaptiveThreshold( InputArray src, OutputArray dst,
double maxValue, int adaptiveMethod,
int thresholdType, int blockSize, double C );
//! smooths and downsamples the image
CV_EXPORTS_W void pyrDown( const InputArray& src, OutputArray dst,
CV_EXPORTS_W void pyrDown( InputArray src, OutputArray dst,
const Size& dstsize=Size());
//! upsamples and smoothes the image
CV_EXPORTS_W void pyrUp( const InputArray& src, OutputArray dst,
CV_EXPORTS_W void pyrUp( InputArray src, OutputArray dst,
const Size& dstsize=Size());
//! builds the gaussian pyramid using pyrDown() as a basic operation
CV_EXPORTS void buildPyramid( const InputArray& src, OutputArrayOfArrays dst, int maxlevel );
CV_EXPORTS void buildPyramid( InputArray src, OutputArrayOfArrays dst, int maxlevel );
//! corrects lens distortion for the given camera matrix and distortion coefficients
CV_EXPORTS_W void undistort( const InputArray& src, OutputArray dst,
const InputArray& cameraMatrix,
const InputArray& distCoeffs,
const InputArray& newCameraMatrix=InputArray() );
CV_EXPORTS_W void undistort( InputArray src, OutputArray dst,
InputArray cameraMatrix,
InputArray distCoeffs,
InputArray newCameraMatrix=None() );
//! initializes maps for cv::remap() to correct lens distortion and optionally rectify the image
CV_EXPORTS_W void initUndistortRectifyMap( const InputArray& cameraMatrix, const InputArray& distCoeffs,
const InputArray& R, const InputArray& newCameraMatrix,
CV_EXPORTS_W void initUndistortRectifyMap( InputArray cameraMatrix, InputArray distCoeffs,
InputArray R, InputArray newCameraMatrix,
Size size, int m1type, OutputArray map1, OutputArray map2 );
enum
@ -631,38 +631,38 @@ enum
};
//! initializes maps for cv::remap() for wide-angle
CV_EXPORTS_W float initWideAngleProjMap( const InputArray& cameraMatrix, const InputArray& distCoeffs,
CV_EXPORTS_W float initWideAngleProjMap( InputArray cameraMatrix, InputArray distCoeffs,
Size imageSize, int destImageWidth,
int m1type, OutputArray map1, OutputArray map2,
int projType=PROJ_SPHERICAL_EQRECT, double alpha=0);
//! returns the default new camera matrix (by default it is the same as cameraMatrix unless centerPricipalPoint=true)
CV_EXPORTS_W Mat getDefaultNewCameraMatrix( const InputArray& cameraMatrix, Size imgsize=Size(),
CV_EXPORTS_W Mat getDefaultNewCameraMatrix( InputArray cameraMatrix, Size imgsize=Size(),
bool centerPrincipalPoint=false );
//! returns points' coordinates after lens distortion correction
CV_EXPORTS void undistortPoints( const InputArray& src, OutputArray dst,
const InputArray& cameraMatrix, const InputArray& distCoeffs,
const InputArray& R=InputArray(), const InputArray& P=InputArray());
CV_EXPORTS void undistortPoints( InputArray src, OutputArray dst,
InputArray cameraMatrix, InputArray distCoeffs,
InputArray R=None(), InputArray P=None());
template<> CV_EXPORTS void Ptr<CvHistogram>::delete_obj();
//! computes the joint dense histogram for a set of images.
CV_EXPORTS void calcHist( const Mat* images, int nimages,
const int* channels, const InputArray& mask,
const int* channels, InputArray mask,
OutputArray hist, int dims, const int* histSize,
const float** ranges, bool uniform=true, bool accumulate=false );
//! computes the joint sparse histogram for a set of images.
CV_EXPORTS void calcHist( const Mat* images, int nimages,
const int* channels, const InputArray& mask,
const int* channels, InputArray mask,
SparseMat& hist, int dims,
const int* histSize, const float** ranges,
bool uniform=true, bool accumulate=false );
//! computes back projection for the set of images
CV_EXPORTS void calcBackProject( const Mat* images, int nimages,
const int* channels, const InputArray& hist,
const int* channels, InputArray hist,
OutputArray backProject, const float** ranges,
double scale=1, bool uniform=true );
@ -673,23 +673,23 @@ CV_EXPORTS void calcBackProject( const Mat* images, int nimages,
double scale=1, bool uniform=true );
//! compares two histograms stored in dense arrays
CV_EXPORTS_W double compareHist( const InputArray& H1, const InputArray& H2, int method );
CV_EXPORTS_W double compareHist( InputArray H1, InputArray H2, int method );
//! compares two histograms stored in sparse arrays
CV_EXPORTS double compareHist( const SparseMat& H1, const SparseMat& H2, int method );
//! normalizes the grayscale image brightness and contrast by normalizing its histogram
CV_EXPORTS_W void equalizeHist( const InputArray& src, OutputArray dst );
CV_EXPORTS_W void equalizeHist( InputArray src, OutputArray dst );
CV_EXPORTS float EMD( const InputArray& signature1, const InputArray& signature2,
int distType, const InputArray& cost=InputArray(),
float* lowerBound=0, OutputArray flow=OutputArray() );
CV_EXPORTS float EMD( InputArray signature1, InputArray signature2,
int distType, InputArray cost=None(),
float* lowerBound=0, OutputArray flow=None() );
//! segments the image using watershed algorithm
CV_EXPORTS_W void watershed( const InputArray& image, InputOutputArray markers );
CV_EXPORTS_W void watershed( InputArray image, InputOutputArray markers );
//! filters image using meanshift algorithm
CV_EXPORTS_W void pyrMeanShiftFiltering( const InputArray& src, OutputArray dst,
CV_EXPORTS_W void pyrMeanShiftFiltering( InputArray src, OutputArray dst,
double sp, double sr, int maxLevel=1,
TermCriteria termcrit=TermCriteria(
TermCriteria::MAX_ITER+TermCriteria::EPS,5,1) );
@ -712,7 +712,7 @@ enum
};
//! segments the image using GrabCut algorithm
CV_EXPORTS_W void grabCut( const InputArray& img, InputOutputArray mask, Rect rect,
CV_EXPORTS_W void grabCut( InputArray img, InputOutputArray mask, Rect rect,
InputOutputArray bgdModel, InputOutputArray fgdModel,
int iterCount, int mode = GC_EVAL );
@ -724,15 +724,15 @@ enum
};
//! restores the damaged image areas using one of the available intpainting algorithms
CV_EXPORTS_W void inpaint( const InputArray& src, const InputArray& inpaintMask,
CV_EXPORTS_W void inpaint( InputArray src, InputArray inpaintMask,
OutputArray dst, double inpaintRange, int flags );
//! builds the discrete Voronoi diagram
CV_EXPORTS_W void distanceTransform( const InputArray& src, OutputArray dst,
CV_EXPORTS_W void distanceTransform( InputArray src, OutputArray dst,
OutputArray labels, int distanceType, int maskSize );
//! computes the distance transform map
CV_EXPORTS void distanceTransform( const InputArray& src, OutputArray dst,
CV_EXPORTS void distanceTransform( InputArray src, OutputArray dst,
int distanceType, int maskSize );
enum { FLOODFILL_FIXED_RANGE = 1 << 16, FLOODFILL_MASK_ONLY = 1 << 17 };
@ -750,7 +750,7 @@ CV_EXPORTS_W int floodFill( InputOutputArray image, InputOutputArray mask,
int flags=4 );
//! converts image from one color space to another
CV_EXPORTS_W void cvtColor( const InputArray& src, OutputArray dst, int code, int dstCn=0 );
CV_EXPORTS_W void cvtColor( InputArray src, OutputArray dst, int code, int dstCn=0 );
//! raster image moments
class CV_EXPORTS_W_MAP Moments
@ -775,7 +775,7 @@ public:
};
//! computes moments of the rasterized shape or a vector of points
CV_EXPORTS_W Moments moments( const InputArray& array, bool binaryImage=false );
CV_EXPORTS_W Moments moments( InputArray array, bool binaryImage=false );
//! computes 7 Hu invariants from the moments
CV_EXPORTS void HuMoments( const Moments& moments, double hu[7] );
@ -784,7 +784,7 @@ CV_EXPORTS void HuMoments( const Moments& moments, double hu[7] );
enum { TM_SQDIFF=0, TM_SQDIFF_NORMED=1, TM_CCORR=2, TM_CCORR_NORMED=3, TM_CCOEFF=4, TM_CCOEFF_NORMED=5 };
//! computes the proximity map for the raster template and the image where the template is searched for
CV_EXPORTS_W void matchTemplate( const InputArray& image, const InputArray& templ,
CV_EXPORTS_W void matchTemplate( InputArray image, InputArray templ,
OutputArray result, int method );
//! mode of the contour retrieval algorithm
@ -815,46 +815,46 @@ CV_EXPORTS void findContours( InputOutputArray image, OutputArrayOfArrays contou
int mode, int method, Point offset=Point());
//! draws contours in the image
CV_EXPORTS void drawContours( InputOutputArray image, const InputArrayOfArrays& contours,
CV_EXPORTS void drawContours( InputOutputArray image, InputArrayOfArrays contours,
int contourIdx, const Scalar& color,
int thickness=1, int lineType=8,
const InputArray& hierarchy=InputArray(),
InputArray hierarchy=None(),
int maxLevel=INT_MAX, Point offset=Point() );
//! approximates contour or a curve using Douglas-Peucker algorithm
CV_EXPORTS void approxPolyDP( const InputArray& curve,
CV_EXPORTS void approxPolyDP( InputArray curve,
OutputArray approxCurve,
double epsilon, bool closed );
//! computes the contour perimeter (closed=true) or a curve length
CV_EXPORTS_W double arcLength( const InputArray& curve, bool closed );
CV_EXPORTS_W double arcLength( InputArray curve, bool closed );
//! computes the bounding rectangle for a contour
CV_EXPORTS_W Rect boundingRect( const InputArray& points );
CV_EXPORTS_W Rect boundingRect( InputArray points );
//! computes the contour area
CV_EXPORTS_W double contourArea( const InputArray& contour, bool oriented=false );
CV_EXPORTS_W double contourArea( InputArray contour, bool oriented=false );
//! computes the minimal rotated rectangle for a set of points
CV_EXPORTS_W RotatedRect minAreaRect( const InputArray& points );
CV_EXPORTS_W RotatedRect minAreaRect( InputArray points );
//! computes the minimal enclosing circle for a set of points
CV_EXPORTS_W void minEnclosingCircle( const InputArray& points,
CV_EXPORTS_W void minEnclosingCircle( InputArray points,
Point2f& center, float& radius );
//! matches two contours using one of the available algorithms
CV_EXPORTS_W double matchShapes( const InputArray& contour1, const InputArray& contour2,
CV_EXPORTS_W double matchShapes( InputArray contour1, InputArray contour2,
int method, double parameter );
//! computes convex hull for a set of 2D points.
CV_EXPORTS void convexHull( const InputArray& points, OutputArray hull,
CV_EXPORTS void convexHull( InputArray points, OutputArray hull,
bool clockwise=false, bool returnPoints=true );
//! returns true iff the contour is convex. Does not support contours with self-intersection
CV_EXPORTS_W bool isContourConvex( const InputArray& contour );
CV_EXPORTS_W bool isContourConvex( InputArray contour );
//! fits ellipse to the set of 2D points
CV_EXPORTS_W RotatedRect fitEllipse( const InputArray& points );
CV_EXPORTS_W RotatedRect fitEllipse( InputArray points );
//! fits line to the set of 2D points using M-estimator algorithm
CV_EXPORTS void fitLine( const InputArray& points, OutputArray line, int distType,
CV_EXPORTS void fitLine( InputArray points, OutputArray line, int distType,
double param, double reps, double aeps );
//! checks if the point is inside the contour. Optionally computes the signed distance from the point to the contour boundary
CV_EXPORTS_W double pointPolygonTest( const InputArray& contour, Point2f pt, bool measureDist );
CV_EXPORTS_W double pointPolygonTest( InputArray contour, Point2f pt, bool measureDist );
}

View File

@ -350,7 +350,7 @@ inline int getAccTabIdx(int sdepth, int ddepth)
}
void cv::accumulate( const InputArray& _src, InputOutputArray _dst, const InputArray& _mask )
void cv::accumulate( InputArray _src, InputOutputArray _dst, InputArray _mask )
{
Mat src = _src.getMat(), dst = _dst.getMat(), mask = _mask.getMat();
int sdepth = src.depth(), ddepth = dst.depth(), cn = src.channels();
@ -374,7 +374,7 @@ void cv::accumulate( const InputArray& _src, InputOutputArray _dst, const InputA
}
void cv::accumulateSquare( const InputArray& _src, InputOutputArray _dst, const InputArray& _mask )
void cv::accumulateSquare( InputArray _src, InputOutputArray _dst, InputArray _mask )
{
Mat src = _src.getMat(), dst = _dst.getMat(), mask = _mask.getMat();
int sdepth = src.depth(), ddepth = dst.depth(), cn = src.channels();
@ -397,8 +397,8 @@ void cv::accumulateSquare( const InputArray& _src, InputOutputArray _dst, const
func(ptrs[0], ptrs[1], ptrs[2], len, cn);
}
void cv::accumulateProduct( const InputArray& _src1, const InputArray& _src2,
InputOutputArray _dst, const InputArray& _mask )
void cv::accumulateProduct( InputArray _src1, InputArray _src2,
InputOutputArray _dst, InputArray _mask )
{
Mat src1 = _src1.getMat(), src2 = _src2.getMat(), dst = _dst.getMat(), mask = _mask.getMat();
int sdepth = src1.depth(), ddepth = dst.depth(), cn = src1.channels();
@ -423,8 +423,8 @@ void cv::accumulateProduct( const InputArray& _src1, const InputArray& _src2,
}
void cv::accumulateWeighted( const InputArray& _src, CV_IN_OUT InputOutputArray _dst,
double alpha, const InputArray& _mask )
void cv::accumulateWeighted( InputArray _src, CV_IN_OUT InputOutputArray _dst,
double alpha, InputArray _mask )
{
Mat src = _src.getMat(), dst = _dst.getMat(), mask = _mask.getMat();
int sdepth = src.depth(), ddepth = dst.depth(), cn = src.channels();

View File

@ -335,7 +335,7 @@ CV_IMPL void cvCanny( const void* srcarr, void* dstarr,
}
}
void cv::Canny( const InputArray& image, OutputArray _edges,
void cv::Canny( InputArray image, OutputArray _edges,
double threshold1, double threshold2,
int apertureSize, bool L2gradient )
{

View File

@ -2774,7 +2774,7 @@ struct YUV420i2BGRA8888Invoker
// The main function //
//////////////////////////////////////////////////////////////////////////////////////////
void cv::cvtColor( const InputArray& _src, OutputArray _dst, int code, int dcn )
void cv::cvtColor( InputArray _src, OutputArray _dst, int code, int dcn )
{
Mat src = _src.getMat(), dst;
Size sz = src.size();

View File

@ -1519,13 +1519,13 @@ void cv::findContours( const InputOutputArray _image, OutputArrayOfArrays _conto
void cv::findContours( InputOutputArray _image, OutputArrayOfArrays _contours,
int mode, int method, Point offset)
{
findContours(_image, _contours, OutputArrayOfArrays(), mode, method, offset);
findContours(_image, _contours, None(), mode, method, offset);
}
namespace cv
{
static void addChildContour(const InputArrayOfArrays& contours,
static void addChildContour(InputArrayOfArrays contours,
size_t ncontours,
const Vec4i* hierarchy,
int i, vector<CvSeq>& seq,
@ -1552,9 +1552,9 @@ static void addChildContour(const InputArrayOfArrays& contours,
}
void cv::drawContours( InputOutputArray _image, const InputArrayOfArrays& _contours,
void cv::drawContours( InputOutputArray _image, InputArrayOfArrays _contours,
int contourIdx, const Scalar& color, int thickness,
int lineType, const InputArray& _hierarchy,
int lineType, InputArray _hierarchy,
int maxLevel, Point offset )
{
Mat image = _image.getMat(), hierarchy = _hierarchy.getMat();
@ -1632,7 +1632,7 @@ void cv::drawContours( InputOutputArray _image, const InputArrayOfArrays& _conto
}
void cv::approxPolyDP( const InputArray& _curve, OutputArray _approxCurve,
void cv::approxPolyDP( InputArray _curve, OutputArray _approxCurve,
double epsilon, bool closed )
{
Mat curve = _curve.getMat();
@ -1649,7 +1649,7 @@ void cv::approxPolyDP( const InputArray& _curve, OutputArray _approxCurve,
}
double cv::arcLength( const InputArray& _curve, bool closed )
double cv::arcLength( InputArray _curve, bool closed )
{
Mat curve = _curve.getMat();
CV_Assert(curve.checkVector(2) >= 0 && (curve.depth() == CV_32F || curve.depth() == CV_32S));
@ -1658,7 +1658,7 @@ double cv::arcLength( const InputArray& _curve, bool closed )
}
cv::Rect cv::boundingRect( const InputArray& _points )
cv::Rect cv::boundingRect( InputArray _points )
{
Mat points = _points.getMat();
CV_Assert(points.checkVector(2) >= 0 && (points.depth() == CV_32F || points.depth() == CV_32S));
@ -1667,7 +1667,7 @@ cv::Rect cv::boundingRect( const InputArray& _points )
}
double cv::contourArea( const InputArray& _contour, bool oriented )
double cv::contourArea( InputArray _contour, bool oriented )
{
Mat contour = _contour.getMat();
CV_Assert(contour.checkVector(2) >= 0 && (contour.depth() == CV_32F || contour.depth() == CV_32S));
@ -1676,7 +1676,7 @@ double cv::contourArea( const InputArray& _contour, bool oriented )
}
cv::RotatedRect cv::minAreaRect( const InputArray& _points )
cv::RotatedRect cv::minAreaRect( InputArray _points )
{
Mat points = _points.getMat();
CV_Assert(points.checkVector(2) >= 0 && (points.depth() == CV_32F || points.depth() == CV_32S));
@ -1685,7 +1685,7 @@ cv::RotatedRect cv::minAreaRect( const InputArray& _points )
}
void cv::minEnclosingCircle( const InputArray& _points,
void cv::minEnclosingCircle( InputArray _points,
Point2f& center, float& radius )
{
Mat points = _points.getMat();
@ -1695,8 +1695,8 @@ void cv::minEnclosingCircle( const InputArray& _points,
}
double cv::matchShapes( const InputArray& _contour1,
const InputArray& _contour2,
double cv::matchShapes( InputArray _contour1,
InputArray _contour2,
int method, double parameter )
{
Mat contour1 = _contour1.getMat(), contour2 = _contour2.getMat();
@ -1709,7 +1709,7 @@ double cv::matchShapes( const InputArray& _contour1,
}
void cv::convexHull( const InputArray& _points, OutputArray _hull, bool clockwise, bool returnPoints )
void cv::convexHull( InputArray _points, OutputArray _hull, bool clockwise, bool returnPoints )
{
Mat points = _points.getMat();
int nelems = points.checkVector(2), depth = points.depth();
@ -1730,7 +1730,7 @@ void cv::convexHull( const InputArray& _points, OutputArray _hull, bool clockwis
shull.copyTo(dhull);
}
bool cv::isContourConvex( const InputArray& _contour )
bool cv::isContourConvex( InputArray _contour )
{
Mat contour = _contour.getMat();
CV_Assert(contour.checkVector(2) >= 0 &&
@ -1739,7 +1739,7 @@ bool cv::isContourConvex( const InputArray& _contour )
return cvCheckContourConvexity(&c) > 0;
}
cv::RotatedRect cv::fitEllipse( const InputArray& _points )
cv::RotatedRect cv::fitEllipse( InputArray _points )
{
Mat points = _points.getMat();
CV_Assert(points.checkVector(2) >= 0 &&
@ -1749,7 +1749,7 @@ cv::RotatedRect cv::fitEllipse( const InputArray& _points )
}
void cv::fitLine( const InputArray& _points, OutputArray _line, int distType,
void cv::fitLine( InputArray _points, OutputArray _line, int distType,
double param, double reps, double aeps )
{
Mat points = _points.getMat();
@ -1767,7 +1767,7 @@ void cv::fitLine( const InputArray& _points, OutputArray _line, int distType,
}
double cv::pointPolygonTest( const InputArray& _contour,
double cv::pointPolygonTest( InputArray _contour,
Point2f pt, bool measureDist )
{
Mat contour = _contour.getMat();

View File

@ -299,7 +299,7 @@ cornerEigenValsVecs( const Mat& src, Mat& eigenv, int block_size,
}
void cv::cornerMinEigenVal( const InputArray& _src, OutputArray _dst, int blockSize, int ksize, int borderType )
void cv::cornerMinEigenVal( InputArray _src, OutputArray _dst, int blockSize, int ksize, int borderType )
{
Mat src = _src.getMat();
_dst.create( src.size(), CV_32F );
@ -308,7 +308,7 @@ void cv::cornerMinEigenVal( const InputArray& _src, OutputArray _dst, int blockS
}
void cv::cornerHarris( const InputArray& _src, OutputArray _dst, int blockSize, int ksize, double k, int borderType )
void cv::cornerHarris( InputArray _src, OutputArray _dst, int blockSize, int ksize, double k, int borderType )
{
Mat src = _src.getMat();
_dst.create( src.size(), CV_32F );
@ -317,7 +317,7 @@ void cv::cornerHarris( const InputArray& _src, OutputArray _dst, int blockSize,
}
void cv::cornerEigenValsAndVecs( const InputArray& _src, OutputArray _dst, int blockSize, int ksize, int borderType )
void cv::cornerEigenValsAndVecs( InputArray _src, OutputArray _dst, int blockSize, int ksize, int borderType )
{
Mat src = _src.getMat();
Size dsz = _dst.size();
@ -330,7 +330,7 @@ void cv::cornerEigenValsAndVecs( const InputArray& _src, OutputArray _dst, int b
}
void cv::preCornerDetect( const InputArray& _src, OutputArray _dst, int ksize, int borderType )
void cv::preCornerDetect( InputArray _src, OutputArray _dst, int ksize, int borderType )
{
Mat Dx, Dy, D2x, D2y, Dxy, src = _src.getMat();

View File

@ -254,7 +254,7 @@ cvFindCornerSubPix( const void* srcarr, CvPoint2D32f* corners,
}
}
void cv::cornerSubPix( const InputArray& _image, InputOutputArray _corners,
void cv::cornerSubPix( InputArray _image, InputOutputArray _corners,
Size winSize, Size zeroZone,
TermCriteria criteria )
{

View File

@ -470,7 +470,7 @@ static bool IPPDeriv(const Mat& src, Mat& dst, int ddepth, int dx, int dy, int k
#endif
void cv::Sobel( const InputArray& _src, OutputArray _dst, int ddepth, int dx, int dy,
void cv::Sobel( InputArray _src, OutputArray _dst, int ddepth, int dx, int dy,
int ksize, double scale, double delta, int borderType )
{
Mat src = _src.getMat();
@ -503,7 +503,7 @@ void cv::Sobel( const InputArray& _src, OutputArray _dst, int ddepth, int dx, in
}
void cv::Scharr( const InputArray& _src, OutputArray _dst, int ddepth, int dx, int dy,
void cv::Scharr( InputArray _src, OutputArray _dst, int ddepth, int dx, int dy,
double scale, double delta, int borderType )
{
Mat src = _src.getMat();
@ -536,7 +536,7 @@ void cv::Scharr( const InputArray& _src, OutputArray _dst, int ddepth, int dx, i
}
void cv::Laplacian( const InputArray& _src, OutputArray _dst, int ddepth, int ksize,
void cv::Laplacian( InputArray _src, OutputArray _dst, int ddepth, int ksize,
double scale, double delta, int borderType )
{
Mat src = _src.getMat();

View File

@ -850,7 +850,7 @@ cvDistTransform( const void* srcarr, void* dstarr,
}
}
void cv::distanceTransform( const InputArray& _src, OutputArray _dst, OutputArray _labels,
void cv::distanceTransform( InputArray _src, OutputArray _dst, OutputArray _labels,
int distanceType, int maskSize )
{
Mat src = _src.getMat();
@ -860,7 +860,7 @@ void cv::distanceTransform( const InputArray& _src, OutputArray _dst, OutputArra
cvDistTransform(&c_src, &c_dst, distanceType, maskSize, 0, &c_labels);
}
void cv::distanceTransform( const InputArray& _src, OutputArray _dst,
void cv::distanceTransform( InputArray _src, OutputArray _dst,
int distanceType, int maskSize )
{
Mat src = _src.getMat();

View File

@ -1138,8 +1138,8 @@ icvDistC( const float *x, const float *y, void *user_param )
}
float cv::EMD( const InputArray& _signature1, const InputArray& _signature2,
int distType, const InputArray& _cost,
float cv::EMD( InputArray _signature1, InputArray _signature2,
int distType, InputArray _cost,
float* lowerBound, OutputArray _flow )
{
Mat signature1 = _signature1.getMat(), signature2 = _signature2.getMat();

View File

@ -52,9 +52,9 @@ template<typename T> struct greaterThanPtr
}
void cv::goodFeaturesToTrack( const InputArray& _image, OutputArray _corners,
void cv::goodFeaturesToTrack( InputArray _image, OutputArray _corners,
int maxCorners, double qualityLevel, double minDistance,
const InputArray& _mask, int blockSize,
InputArray _mask, int blockSize,
bool useHarrisDetector, double harrisK )
{
Mat image = _image.getMat(), mask = _mask.getMat();

View File

@ -453,7 +453,7 @@ void FilterEngine::apply(const Mat& src, Mat& dst,
* Separable linear filter *
\****************************************************************************************/
int cv::getKernelType(const InputArray& filter_kernel, Point anchor)
int cv::getKernelType(InputArray filter_kernel, Point anchor)
{
Mat _kernel = filter_kernel.getMat();
CV_Assert( _kernel.channels() == 1 );
@ -2528,7 +2528,7 @@ template<typename ST, typename DT> struct FixedPtCastEx
}
cv::Ptr<cv::BaseRowFilter> cv::getLinearRowFilter( int srcType, int bufType,
const InputArray& _kernel, int anchor,
InputArray _kernel, int anchor,
int symmetryType )
{
Mat kernel = _kernel.getMat();
@ -2579,7 +2579,7 @@ cv::Ptr<cv::BaseRowFilter> cv::getLinearRowFilter( int srcType, int bufType,
cv::Ptr<cv::BaseColumnFilter> cv::getLinearColumnFilter( int bufType, int dstType,
const InputArray& _kernel, int anchor,
InputArray _kernel, int anchor,
int symmetryType, double delta,
int bits )
{
@ -2676,7 +2676,7 @@ cv::Ptr<cv::BaseColumnFilter> cv::getLinearColumnFilter( int bufType, int dstTyp
cv::Ptr<cv::FilterEngine> cv::createSeparableLinearFilter(
int _srcType, int _dstType,
const InputArray& __rowKernel, const InputArray& __columnKernel,
InputArray __rowKernel, InputArray __columnKernel,
Point _anchor, double _delta,
int _rowBorderType, int _columnBorderType,
const Scalar& _borderValue )
@ -2877,7 +2877,7 @@ template<typename ST, class CastOp, class VecOp> struct Filter2D : public BaseFi
}
cv::Ptr<cv::BaseFilter> cv::getLinearFilter(int srcType, int dstType,
const InputArray& filter_kernel, Point anchor,
InputArray filter_kernel, Point anchor,
double delta, int bits)
{
Mat _kernel = filter_kernel.getMat();
@ -2955,7 +2955,7 @@ cv::Ptr<cv::BaseFilter> cv::getLinearFilter(int srcType, int dstType,
cv::Ptr<cv::FilterEngine> cv::createLinearFilter( int _srcType, int _dstType,
const InputArray& filter_kernel,
InputArray filter_kernel,
Point _anchor, double _delta,
int _rowBorderType, int _columnBorderType,
const Scalar& _borderValue )
@ -2987,8 +2987,8 @@ cv::Ptr<cv::FilterEngine> cv::createLinearFilter( int _srcType, int _dstType,
}
void cv::filter2D( const InputArray& _src, OutputArray _dst, int ddepth,
const InputArray& _kernel, Point anchor,
void cv::filter2D( InputArray _src, OutputArray _dst, int ddepth,
InputArray _kernel, Point anchor,
double delta, int borderType )
{
Mat src = _src.getMat(), kernel = _kernel.getMat();
@ -3028,8 +3028,8 @@ void cv::filter2D( const InputArray& _src, OutputArray _dst, int ddepth,
}
void cv::sepFilter2D( const InputArray& _src, OutputArray _dst, int ddepth,
const InputArray& _kernelX, const InputArray& _kernelY, Point anchor,
void cv::sepFilter2D( InputArray _src, OutputArray _dst, int ddepth,
InputArray _kernelX, InputArray _kernelY, Point anchor,
double delta, int borderType )
{
Mat src = _src.getMat(), kernelX = _kernelX.getMat(), kernelY = _kernelY.getMat();

View File

@ -525,7 +525,7 @@ void estimateSegmentation( GCGraph<double>& graph, Mat& mask )
}
}
void cv::grabCut( const InputArray& _img, InputOutputArray _mask, Rect rect,
void cv::grabCut( InputArray _img, InputOutputArray _mask, Rect rect,
InputOutputArray _bgdModel, InputOutputArray _fgdModel,
int iterCount, int mode )
{

View File

@ -593,7 +593,7 @@ calcHist_8u( vector<uchar*>& _ptrs, const vector<int>& _deltas,
}
void cv::calcHist( const Mat* images, int nimages, const int* channels,
const InputArray& _mask, OutputArray _hist, int dims, const int* histSize,
InputArray _mask, OutputArray _hist, int dims, const int* histSize,
const float** ranges, bool uniform, bool accumulate )
{
Mat mask = _mask.getMat();
@ -816,7 +816,7 @@ static void calcHist( const Mat* images, int nimages, const int* channels,
}
void cv::calcHist( const Mat* images, int nimages, const int* channels,
const InputArray& _mask, SparseMat& hist, int dims, const int* histSize,
InputArray _mask, SparseMat& hist, int dims, const int* histSize,
const float** ranges, bool uniform, bool accumulate )
{
Mat mask = _mask.getMat();
@ -1120,7 +1120,7 @@ calcBackProj_8u( vector<uchar*>& _ptrs, const vector<int>& _deltas,
}
void cv::calcBackProject( const Mat* images, int nimages, const int* channels,
const InputArray& _hist, OutputArray _backProject,
InputArray _hist, OutputArray _backProject,
const float** ranges, double scale, bool uniform )
{
Mat hist = _hist.getMat();
@ -1316,7 +1316,7 @@ void cv::calcBackProject( const Mat* images, int nimages, const int* channels,
////////////////// C O M P A R E H I S T O G R A M S ////////////////////////
double cv::compareHist( const InputArray& _H1, const InputArray& _H2, int method )
double cv::compareHist( InputArray _H1, InputArray _H2, int method )
{
Mat H1 = _H1.getMat(), H2 = _H2.getMat();
const Mat* arrays[] = {&H1, &H2, 0};
@ -2409,7 +2409,7 @@ CV_IMPL void cvEqualizeHist( const CvArr* srcarr, CvArr* dstarr )
}
void cv::equalizeHist( const InputArray& _src, OutputArray _dst )
void cv::equalizeHist( InputArray _src, OutputArray _dst )
{
Mat src = _src.getMat();
_dst.create( src.size(), src.type() );

View File

@ -1090,7 +1090,7 @@ namespace cv
const int STORAGE_SIZE = 1 << 12;
static void seqToMat(const CvSeq* seq, OutputArray& _arr)
static void seqToMat(const CvSeq* seq, OutputArray _arr)
{
if( seq && seq->total > 0 )
{
@ -1104,7 +1104,7 @@ static void seqToMat(const CvSeq* seq, OutputArray& _arr)
}
void cv::HoughLines( const InputArray& _image, OutputArray _lines,
void cv::HoughLines( InputArray _image, OutputArray _lines,
double rho, double theta, int threshold,
double srn, double stn )
{
@ -1117,7 +1117,7 @@ void cv::HoughLines( const InputArray& _image, OutputArray _lines,
seqToMat(seq, _lines);
}
void cv::HoughLinesP( const InputArray& _image, OutputArray _lines,
void cv::HoughLinesP( InputArray _image, OutputArray _lines,
double rho, double theta, int threshold,
double minLineLength, double maxGap )
{
@ -1129,7 +1129,7 @@ void cv::HoughLinesP( const InputArray& _image, OutputArray _lines,
seqToMat(seq, _lines);
}
void cv::HoughCircles( const InputArray& _image, OutputArray _circles,
void cv::HoughCircles( InputArray _image, OutputArray _circles,
int method, double dp, double min_dist,
double param1, double param2,
int minRadius, int maxRadius )

View File

@ -1317,7 +1317,7 @@ typedef void (*ResizeAreaFunc)( const Mat& src, Mat& dst,
//////////////////////////////////////////////////////////////////////////////////////////
void cv::resize( const InputArray& _src, OutputArray _dst, Size dsize,
void cv::resize( InputArray _src, OutputArray _dst, Size dsize,
double inv_scale_x, double inv_scale_y, int interpolation )
{
static ResizeFunc linear_tab[] =
@ -2401,8 +2401,8 @@ typedef void (*RemapFunc)(const Mat& _src, Mat& _dst, const Mat& _xy,
}
void cv::remap( const InputArray& _src, OutputArray _dst,
const InputArray& _map1, const InputArray& _map2,
void cv::remap( InputArray _src, OutputArray _dst,
InputArray _map1, InputArray _map2,
int interpolation, int borderType, const Scalar& borderValue )
{
static RemapNNFunc nn_tab[] =
@ -2667,7 +2667,7 @@ void cv::remap( const InputArray& _src, OutputArray _dst,
}
void cv::convertMaps( const InputArray& _map1, const InputArray& _map2,
void cv::convertMaps( InputArray _map1, InputArray _map2,
OutputArray _dstmap1, OutputArray _dstmap2,
int dstm1type, bool nninterpolate )
{
@ -2806,8 +2806,8 @@ void cv::convertMaps( const InputArray& _map1, const InputArray& _map2,
}
void cv::warpAffine( const InputArray& _src, OutputArray _dst,
const InputArray& _M0, Size dsize,
void cv::warpAffine( InputArray _src, OutputArray _dst,
InputArray _M0, Size dsize,
int flags, int borderType, const Scalar& borderValue )
{
Mat src = _src.getMat(), M0 = _M0.getMat();
@ -2944,7 +2944,7 @@ void cv::warpAffine( const InputArray& _src, OutputArray _dst,
}
void cv::warpPerspective( const InputArray& _src, OutputArray _dst, const InputArray& _M0,
void cv::warpPerspective( InputArray _src, OutputArray _dst, InputArray _M0,
Size dsize, int flags, int borderType, const Scalar& borderValue )
{
Mat src = _src.getMat(), M0 = _M0.getMat();
@ -3146,7 +3146,7 @@ cv::Mat cv::getAffineTransform( const Point2f src[], const Point2f dst[] )
return M;
}
void cv::invertAffineTransform(const InputArray& _matM, OutputArray __iM)
void cv::invertAffineTransform(InputArray _matM, OutputArray __iM)
{
Mat matM = _matM.getMat();
CV_Assert(matM.rows == 2 && matM.cols == 3);

View File

@ -807,7 +807,7 @@ cvInpaint( const CvArr* _input_img, const CvArr* _inpaint_mask, CvArr* _output_i
}
}
void cv::inpaint( const InputArray& _src, const InputArray& _mask, OutputArray _dst,
void cv::inpaint( InputArray _src, InputArray _mask, OutputArray _dst,
double inpaintRange, int flags )
{
Mat src = _src.getMat(), mask = _mask.getMat();

View File

@ -604,7 +604,7 @@ Moments::operator CvMoments() const
}
cv::Moments cv::moments( const InputArray& _array, bool binaryImage )
cv::Moments cv::moments( InputArray _array, bool binaryImage )
{
CvMoments om;
Mat arr = _array.getMat();

View File

@ -909,7 +909,7 @@ cv::Ptr<cv::BaseColumnFilter> cv::getMorphologyColumnFilter(int op, int type, in
}
cv::Ptr<cv::BaseFilter> cv::getMorphologyFilter(int op, int type, const InputArray& _kernel, Point anchor)
cv::Ptr<cv::BaseFilter> cv::getMorphologyFilter(int op, int type, InputArray _kernel, Point anchor)
{
Mat kernel = _kernel.getMat();
int depth = CV_MAT_DEPTH(type);
@ -943,7 +943,7 @@ cv::Ptr<cv::BaseFilter> cv::getMorphologyFilter(int op, int type, const InputArr
}
cv::Ptr<cv::FilterEngine> cv::createMorphologyFilter( int op, int type, const InputArray& _kernel,
cv::Ptr<cv::FilterEngine> cv::createMorphologyFilter( int op, int type, InputArray _kernel,
Point anchor, int _rowBorderType, int _columnBorderType,
const Scalar& _borderValue )
{
@ -1038,8 +1038,8 @@ cv::Mat cv::getStructuringElement(int shape, Size ksize, Point anchor)
namespace cv
{
static void morphOp( int op, const InputArray& _src, OutputArray& _dst,
const InputArray& _kernel,
static void morphOp( int op, InputArray _src, OutputArray _dst,
InputArray _kernel,
Point anchor, int iterations,
int borderType, const Scalar& borderValue )
{
@ -1087,7 +1087,7 @@ template<> void Ptr<IplConvKernel>::delete_obj()
}
void cv::erode( const InputArray& src, OutputArray dst, const InputArray& kernel,
void cv::erode( InputArray src, OutputArray dst, InputArray kernel,
Point anchor, int iterations,
int borderType, const Scalar& borderValue )
{
@ -1095,7 +1095,7 @@ void cv::erode( const InputArray& src, OutputArray dst, const InputArray& kernel
}
void cv::dilate( const InputArray& src, OutputArray dst, const InputArray& kernel,
void cv::dilate( InputArray src, OutputArray dst, InputArray kernel,
Point anchor, int iterations,
int borderType, const Scalar& borderValue )
{
@ -1103,8 +1103,8 @@ void cv::dilate( const InputArray& src, OutputArray dst, const InputArray& kerne
}
void cv::morphologyEx( const InputArray& _src, OutputArray _dst, int op,
const InputArray& kernel, Point anchor, int iterations,
void cv::morphologyEx( InputArray _src, OutputArray _dst, int op,
InputArray kernel, Point anchor, int iterations,
int borderType, const Scalar& borderValue )
{
Mat src = _src.getMat(), temp;

View File

@ -401,7 +401,7 @@ typedef void (*PyrFunc)(const Mat&, Mat&);
}
void cv::pyrDown( const InputArray& _src, OutputArray _dst, const Size& _dsz )
void cv::pyrDown( InputArray _src, OutputArray _dst, const Size& _dsz )
{
Mat src = _src.getMat();
Size dsz = _dsz == Size() ? Size((src.cols + 1)/2, (src.rows + 1)/2) : _dsz;
@ -425,7 +425,7 @@ void cv::pyrDown( const InputArray& _src, OutputArray _dst, const Size& _dsz )
func( src, dst );
}
void cv::pyrUp( const InputArray& _src, OutputArray _dst, const Size& _dsz )
void cv::pyrUp( InputArray _src, OutputArray _dst, const Size& _dsz )
{
Mat src = _src.getMat();
Size dsz = _dsz == Size() ? Size(src.cols*2, src.rows*2) : _dsz;
@ -449,7 +449,7 @@ void cv::pyrUp( const InputArray& _src, OutputArray _dst, const Size& _dsz )
func( src, dst );
}
void cv::buildPyramid( const InputArray& _src, OutputArrayOfArrays _dst, int maxlevel )
void cv::buildPyramid( InputArray _src, OutputArrayOfArrays _dst, int maxlevel )
{
Mat src = _src.getMat();
_dst.create( maxlevel + 1, 1, 0 );

View File

@ -868,7 +868,7 @@ cvGetQuadrangleSubPix( const void* srcarr, void* dstarr, const CvMat* mat )
}
void cv::getRectSubPix( const InputArray& _image, Size patchSize, Point2f center,
void cv::getRectSubPix( InputArray _image, Size patchSize, Point2f center,
OutputArray _patch, int patchType )
{
Mat image = _image.getMat();

View File

@ -303,7 +303,7 @@ cvWatershed( const CvArr* srcarr, CvArr* dstarr )
}
void cv::watershed( const InputArray& _src, InputOutputArray markers )
void cv::watershed( InputArray _src, InputOutputArray markers )
{
Mat src = _src.getMat();
CvMat c_src = _src.getMat(), c_markers = markers.getMat();
@ -526,7 +526,7 @@ cvPyrMeanShiftFiltering( const CvArr* srcarr, CvArr* dstarr,
delete[] dst_pyramid;
}
void cv::pyrMeanShiftFiltering( const InputArray& _src, OutputArray _dst,
void cv::pyrMeanShiftFiltering( InputArray _src, OutputArray _dst,
double sp, double sr, int maxLevel,
TermCriteria termcrit )
{

View File

@ -294,7 +294,7 @@ cv::Ptr<cv::FilterEngine> cv::createBoxFilter( int srcType, int dstType, Size ks
}
void cv::boxFilter( const InputArray& _src, OutputArray _dst, int ddepth,
void cv::boxFilter( InputArray _src, OutputArray _dst, int ddepth,
Size ksize, Point anchor,
bool normalize, int borderType )
{
@ -316,7 +316,7 @@ void cv::boxFilter( const InputArray& _src, OutputArray _dst, int ddepth,
f->apply( src, dst );
}
void cv::blur( const InputArray& src, OutputArray dst,
void cv::blur( InputArray src, OutputArray dst,
Size ksize, Point anchor, int borderType )
{
boxFilter( src, dst, -1, ksize, anchor, true, borderType );
@ -410,7 +410,7 @@ cv::Ptr<cv::FilterEngine> cv::createGaussianFilter( int type, Size ksize,
}
void cv::GaussianBlur( const InputArray& _src, OutputArray _dst, Size ksize,
void cv::GaussianBlur( InputArray _src, OutputArray _dst, Size ksize,
double sigma1, double sigma2,
int borderType )
{
@ -1219,7 +1219,7 @@ medianBlur_SortNet( const Mat& _src, Mat& _dst, int m )
}
void cv::medianBlur( const InputArray& _src0, OutputArray _dst, int ksize )
void cv::medianBlur( InputArray _src0, OutputArray _dst, int ksize )
{
Mat src0 = _src0.getMat();
_dst.create( src0.size(), src0.type() );
@ -1518,7 +1518,7 @@ bilateralFilter_32f( const Mat& src, Mat& dst, int d,
}
void cv::bilateralFilter( const InputArray& _src, OutputArray _dst, int d,
void cv::bilateralFilter( InputArray _src, OutputArray _dst, int d,
double sigmaColor, double sigmaSpace,
int borderType )
{

View File

@ -225,7 +225,7 @@ typedef void (*IntegralFunc)(const uchar* src, size_t srcstep, uchar* sum, size_
}
void cv::integral( const InputArray& _src, OutputArray _sum, OutputArray _sqsum, OutputArray _tilted, int sdepth )
void cv::integral( InputArray _src, OutputArray _sum, OutputArray _sqsum, OutputArray _tilted, int sdepth )
{
Mat src = _src.getMat(), sum, sqsum, tilted;
int depth = src.depth(), cn = src.channels();
@ -270,14 +270,14 @@ void cv::integral( const InputArray& _src, OutputArray _sum, OutputArray _sqsum,
tilted.data, tilted.step, src.size(), cn );
}
void cv::integral( const InputArray& src, OutputArray sum, int sdepth )
void cv::integral( InputArray src, OutputArray sum, int sdepth )
{
integral( src, sum, OutputArray(), OutputArray(), sdepth );
integral( src, sum, None(), None(), sdepth );
}
void cv::integral( const InputArray& src, OutputArray sum, OutputArray sqsum, int sdepth )
void cv::integral( InputArray src, OutputArray sum, OutputArray sqsum, int sdepth )
{
integral( src, sum, sqsum, OutputArray(), sdepth );
integral( src, sum, sqsum, None(), sdepth );
}
@ -300,8 +300,8 @@ cvIntegral( const CvArr* image, CvArr* sumImage,
tilted0 = tilted = cv::cvarrToMat(tiltedSumImage);
ptilted = &tilted;
}
cv::integral( src, sum, psqsum ? cv::OutputArray(*psqsum) : cv::OutputArray(),
ptilted ? cv::OutputArray(*ptilted) : cv::OutputArray(), sum.depth() );
cv::integral( src, sum, psqsum ? cv::_OutputArray(*psqsum) : cv::_OutputArray(),
ptilted ? cv::_OutputArray(*ptilted) : cv::_OutputArray(), sum.depth() );
CV_Assert( sum.data == sum0.data && sqsum.data == sqsum0.data && tilted.data == tilted0.data );
}

View File

@ -232,7 +232,7 @@ cv::crossCorr( const Mat& img, const Mat& templ, Mat& corr,
/*****************************************************************************************/
void cv::matchTemplate( const InputArray& _img, const InputArray& _templ, OutputArray _result, int method )
void cv::matchTemplate( InputArray _img, InputArray _templ, OutputArray _result, int method )
{
CV_Assert( CV_TM_SQDIFF <= method && method <= CV_TM_CCOEFF_NORMED );

View File

@ -498,7 +498,7 @@ getThreshVal_Otsu_8u( const Mat& _src )
}
double cv::threshold( const InputArray& _src, OutputArray _dst, double thresh, double maxval, int type )
double cv::threshold( InputArray _src, OutputArray _dst, double thresh, double maxval, int type )
{
Mat src = _src.getMat();
bool use_otsu = (type & THRESH_OTSU) != 0;
@ -548,7 +548,7 @@ double cv::threshold( const InputArray& _src, OutputArray _dst, double thresh, d
}
void cv::adaptiveThreshold( const InputArray& _src, OutputArray _dst, double maxValue,
void cv::adaptiveThreshold( InputArray _src, OutputArray _dst, double maxValue,
int method, int type, int blockSize, double delta )
{
Mat src = _src.getMat();

View File

@ -42,7 +42,7 @@
#include "precomp.hpp"
cv::Mat cv::getDefaultNewCameraMatrix( const InputArray& _cameraMatrix, Size imgsize,
cv::Mat cv::getDefaultNewCameraMatrix( InputArray _cameraMatrix, Size imgsize,
bool centerPrincipalPoint )
{
Mat cameraMatrix = _cameraMatrix.getMat();
@ -59,8 +59,8 @@ cv::Mat cv::getDefaultNewCameraMatrix( const InputArray& _cameraMatrix, Size img
return newCameraMatrix;
}
void cv::initUndistortRectifyMap( const InputArray& _cameraMatrix, const InputArray& _distCoeffs,
const InputArray& _matR, const InputArray& _newCameraMatrix,
void cv::initUndistortRectifyMap( InputArray _cameraMatrix, InputArray _distCoeffs,
InputArray _matR, InputArray _newCameraMatrix,
Size size, int m1type, OutputArray _map1, OutputArray _map2 )
{
Mat cameraMatrix = _cameraMatrix.getMat(), distCoeffs = _distCoeffs.getMat();
@ -161,8 +161,8 @@ void cv::initUndistortRectifyMap( const InputArray& _cameraMatrix, const InputAr
}
void cv::undistort( const InputArray& _src, OutputArray _dst, const InputArray& _cameraMatrix,
const InputArray& _distCoeffs, const InputArray& _newCameraMatrix )
void cv::undistort( InputArray _src, OutputArray _dst, InputArray _cameraMatrix,
InputArray _distCoeffs, InputArray _newCameraMatrix )
{
Mat src = _src.getMat(), cameraMatrix = _cameraMatrix.getMat();
Mat distCoeffs = _distCoeffs.getMat(), newCameraMatrix = _newCameraMatrix.getMat();
@ -381,11 +381,11 @@ void cvUndistortPoints( const CvMat* _src, CvMat* _dst, const CvMat* _cameraMatr
}
void cv::undistortPoints( const InputArray& _src, OutputArray _dst,
const InputArray& _cameraMatrix,
const InputArray& _distCoeffs,
const InputArray& _Rmat,
const InputArray& _Pmat )
void cv::undistortPoints( InputArray _src, OutputArray _dst,
InputArray _cameraMatrix,
InputArray _distCoeffs,
InputArray _Rmat,
InputArray _Pmat )
{
Mat src = _src.getMat(), cameraMatrix = _cameraMatrix.getMat();
Mat distCoeffs = _distCoeffs.getMat(), R = _Rmat.getMat(), P = _Pmat.getMat();
@ -488,7 +488,7 @@ static Point2f invMapPointSpherical(Point2f _p, float alpha, int projType)
}
float cv::initWideAngleProjMap( const InputArray& _cameraMatrix0, const InputArray& _distCoeffs0,
float cv::initWideAngleProjMap( InputArray _cameraMatrix0, InputArray _distCoeffs0,
Size imageSize, int destImageWidth, int m1type,
OutputArray _map1, OutputArray _map2, int projType, double _alpha )
{

View File

@ -197,7 +197,7 @@ static void copyMakeConstBorder_8u( const uchar* src, size_t srcstep, Size srcro
}
void cv::copyMakeBorder( const InputArray& _src, OutputArray _dst, int top, int bottom,
void cv::copyMakeBorder( InputArray _src, OutputArray _dst, int top, int bottom,
int left, int right, int borderType, const Scalar& value )
{
Mat src = _src.getMat();

View File

@ -203,7 +203,7 @@ void CV_KMeansTest::run( int /*start_from*/ )
int code = cvtest::TS::OK;
Mat bestLabels;
// 1. flag==KMEANS_PP_CENTERS
kmeans( data, 3, bestLabels, TermCriteria( TermCriteria::COUNT, iters, 0.0), 0, KMEANS_PP_CENTERS, OutputArray() );
kmeans( data, 3, bestLabels, TermCriteria( TermCriteria::COUNT, iters, 0.0), 0, KMEANS_PP_CENTERS, None() );
if( calcErr( bestLabels, labels, sizes, false ) > 0.01f )
{
ts->printf( cvtest::TS::LOG, "bad accuracy if flag==KMEANS_PP_CENTERS" );
@ -211,7 +211,7 @@ void CV_KMeansTest::run( int /*start_from*/ )
}
// 2. flag==KMEANS_RANDOM_CENTERS
kmeans( data, 3, bestLabels, TermCriteria( TermCriteria::COUNT, iters, 0.0), 0, KMEANS_RANDOM_CENTERS, OutputArray() );
kmeans( data, 3, bestLabels, TermCriteria( TermCriteria::COUNT, iters, 0.0), 0, KMEANS_RANDOM_CENTERS, None() );
if( calcErr( bestLabels, labels, sizes, false ) > 0.01f )
{
ts->printf( cvtest::TS::LOG, "bad accuracy if flag==KMEANS_PP_CENTERS" );
@ -223,7 +223,7 @@ void CV_KMeansTest::run( int /*start_from*/ )
RNG rng;
for( int i = 0; i < 0.5f * pointsCount; i++ )
bestLabels.at<int>( rng.next() % pointsCount, 0 ) = rng.next() % 3;
kmeans( data, 3, bestLabels, TermCriteria( TermCriteria::COUNT, iters, 0.0), 0, KMEANS_USE_INITIAL_LABELS, OutputArray() );
kmeans( data, 3, bestLabels, TermCriteria( TermCriteria::COUNT, iters, 0.0), 0, KMEANS_USE_INITIAL_LABELS, None() );
if( calcErr( bestLabels, labels, sizes, false ) > 0.01f )
{
ts->printf( cvtest::TS::LOG, "bad accuracy if flag==KMEANS_PP_CENTERS" );

View File

@ -3971,7 +3971,7 @@ static double cppKMeans(const CvArr* _samples, int cluster_count, CvArr* _labels
(labels.cols == 1 || labels.rows == 1) &&
labels.cols + labels.rows - 1 == data.rows );
return cv::kmeans(data, cluster_count, labels, termcrit, attempts,
flags, _centers ? cv::OutputArray(centers) : cv::OutputArray() );
flags, _centers ? cv::_OutputArray(centers) : cv::_OutputArray() );
}
#define cvKMeans2(samples, nclusters, labels, termcrit, attempts, flags, centers) \

View File

@ -432,7 +432,8 @@ class CppHeaderParser(object):
("OutputArrayOfArrays", "vector<Mat>"),
("InputArray", "Mat"),
("InputOutputArray", "Mat"),
("OutputArray", "Mat")]).strip()
("OutputArray", "Mat"),
("None", arg_type)]).strip()
args.append([arg_type, arg_name, defval, modlist])
npos = arg_start-1

View File

@ -407,7 +407,7 @@ CV_WRAP static inline void convertPointsHomogeneous( const Mat& src, CV_OUT Mat&
}
//! finds circles' grid pattern of the specified size in the image
CV_WRAP static inline void findCirclesGridDefault( const InputArray& image, Size patternSize,
CV_WRAP static inline void findCirclesGridDefault( InputArray image, Size patternSize,
OutputArray centers, int flags=CALIB_CB_SYMMETRIC_GRID )
{
findCirclesGrid(image, patternSize, centers, flags);

View File

@ -358,7 +358,7 @@ public:
//! the virtual destructor
virtual ~BackgroundSubtractor();
//! the update operator that takes the next video frame and returns the current foreground mask as 8-bit binary image.
CV_WRAP_AS(apply) virtual void operator()(const InputArray& image, OutputArray fgmask,
CV_WRAP_AS(apply) virtual void operator()(InputArray image, OutputArray fgmask,
double learningRate=0);
virtual void getBackgroundImage(OutputArray) const;
@ -385,7 +385,7 @@ public:
//! the destructor
virtual ~BackgroundSubtractorMOG();
//! the update operator
virtual void operator()(const InputArray& image, OutputArray fgmask, double learningRate=0);
virtual void operator()(InputArray image, OutputArray fgmask, double learningRate=0);
//! re-initiaization method
virtual void initialize(Size frameSize, int frameType);
@ -412,7 +412,7 @@ public:
//! the destructor
virtual ~BackgroundSubtractorMOG2();
//! the update operator
virtual void operator()(const InputArray& image, OutputArray fgmask, double learningRate=-1);
virtual void operator()(InputArray image, OutputArray fgmask, double learningRate=-1);
virtual void getBackgroundImage(OutputArray) const;

View File

@ -244,30 +244,30 @@ namespace cv
{
//! updates motion history image using the current silhouette
CV_EXPORTS_W void updateMotionHistory( const InputArray& silhouette, InputOutputArray mhi,
CV_EXPORTS_W void updateMotionHistory( InputArray silhouette, InputOutputArray mhi,
double timestamp, double duration );
//! computes the motion gradient orientation image from the motion history image
CV_EXPORTS_W void calcMotionGradient( const InputArray& mhi, OutputArray mask,
CV_EXPORTS_W void calcMotionGradient( InputArray mhi, OutputArray mask,
OutputArray orientation,
double delta1, double delta2,
int apertureSize=3 );
//! computes the global orientation of the selected motion history image part
CV_EXPORTS_W double calcGlobalOrientation( const InputArray& orientation, const InputArray& mask,
const InputArray& mhi, double timestamp,
CV_EXPORTS_W double calcGlobalOrientation( InputArray orientation, InputArray mask,
InputArray mhi, double timestamp,
double duration );
CV_EXPORTS_W void segmentMotion(const InputArray& mhi, OutputArray segmask,
CV_EXPORTS_W void segmentMotion(InputArray mhi, OutputArray segmask,
vector<Rect>& boundingRects,
double timestamp, double segThresh);
//! updates the object tracking window using CAMSHIFT algorithm
CV_EXPORTS_W RotatedRect CamShift( const InputArray& probImage, CV_IN_OUT Rect& window,
CV_EXPORTS_W RotatedRect CamShift( InputArray probImage, CV_IN_OUT Rect& window,
TermCriteria criteria );
//! updates the object tracking window using meanshift algorithm
CV_EXPORTS_W int meanShift( const InputArray& probImage, CV_IN_OUT Rect& window,
CV_EXPORTS_W int meanShift( InputArray probImage, CV_IN_OUT Rect& window,
TermCriteria criteria );
/*!
@ -315,8 +315,8 @@ public:
enum { OPTFLOW_USE_INITIAL_FLOW=4, OPTFLOW_FARNEBACK_GAUSSIAN=256 };
//! computes sparse optical flow using multi-scale Lucas-Kanade algorithm
CV_EXPORTS_W void calcOpticalFlowPyrLK( const InputArray& prevImg, const InputArray& nextImg,
const InputArray& prevPts, CV_OUT InputOutputArray nextPts,
CV_EXPORTS_W void calcOpticalFlowPyrLK( InputArray prevImg, InputArray nextImg,
InputArray prevPts, CV_OUT InputOutputArray nextPts,
OutputArray status, OutputArray err,
Size winSize=Size(15,15), int maxLevel=3,
TermCriteria criteria=TermCriteria(
@ -326,13 +326,13 @@ CV_EXPORTS_W void calcOpticalFlowPyrLK( const InputArray& prevImg, const InputAr
int flags=0 );
//! computes dense optical flow using Farneback algorithm
CV_EXPORTS_W void calcOpticalFlowFarneback( const InputArray& prev, const InputArray& next,
CV_EXPORTS_W void calcOpticalFlowFarneback( InputArray prev, InputArray next,
CV_OUT InputOutputArray flow, double pyr_scale, int levels, int winsize,
int iterations, int poly_n, double poly_sigma, int flags );
//! estimates the best-fit Euqcidean, similarity, affine or perspective transformation
// that maps one 2D point set to another or one image to another.
CV_EXPORTS_W Mat estimateRigidTransform( const InputArray& src, const InputArray& dst,
CV_EXPORTS_W Mat estimateRigidTransform( InputArray src, InputArray dst,
bool fullAffine);
}

View File

@ -59,7 +59,7 @@ namespace cv
{
BackgroundSubtractor::~BackgroundSubtractor() {}
void BackgroundSubtractor::operator()(const InputArray&, OutputArray, double)
void BackgroundSubtractor::operator()(InputArray, OutputArray, double)
{
}
@ -385,7 +385,7 @@ static void process8uC3( BackgroundSubtractorMOG& obj, const Mat& image, Mat& fg
}
}
void BackgroundSubtractorMOG::operator()(const InputArray& _image, OutputArray _fgmask, double learningRate)
void BackgroundSubtractorMOG::operator()(InputArray _image, OutputArray _fgmask, double learningRate)
{
Mat image = _image.getMat();
bool needToInitialize = nframes == 0 || learningRate >= 1 || image.size() != frameSize || image.type() != frameType;

View File

@ -1257,7 +1257,7 @@ void BackgroundSubtractorMOG2::initialize(Size _frameSize, int _frameType)
bgmodelUsedModes = Scalar::all(0);
}
void BackgroundSubtractorMOG2::operator()(const InputArray& _image, OutputArray _fgmask, double learningRate)
void BackgroundSubtractorMOG2::operator()(InputArray _image, OutputArray _fgmask, double learningRate)
{
Mat image = _image.getMat();
bool needToInitialize = nframes == 0 || learningRate >= 1 || image.size() != frameSize || image.type() != frameType;

View File

@ -290,7 +290,7 @@ cvCamShift( const void* imgProb, CvRect windowIn,
}
cv::RotatedRect cv::CamShift( const InputArray& _probImage, Rect& window,
cv::RotatedRect cv::CamShift( InputArray _probImage, Rect& window,
TermCriteria criteria )
{
CvConnectedComp comp;
@ -302,7 +302,7 @@ cv::RotatedRect cv::CamShift( const InputArray& _probImage, Rect& window,
return RotatedRect(Point2f(box.center), Size2f(box.size), box.angle);
}
int cv::meanShift( const InputArray& _probImage, Rect& window, TermCriteria criteria )
int cv::meanShift( InputArray _probImage, Rect& window, TermCriteria criteria )
{
CvConnectedComp comp;
Mat probImage = _probImage.getMat();

View File

@ -42,8 +42,8 @@
#include <float.h>
#include <stdio.h>
void cv::calcOpticalFlowPyrLK( const InputArray& _prevImg, const InputArray& _nextImg,
const InputArray& _prevPts, InputOutputArray _nextPts,
void cv::calcOpticalFlowPyrLK( InputArray _prevImg, InputArray _nextImg,
InputArray _prevPts, InputOutputArray _nextPts,
OutputArray _status, OutputArray _err,
Size winSize, int maxLevel,
TermCriteria criteria,
@ -1869,8 +1869,8 @@ cvEstimateRigidTransform( const CvArr* matA, const CvArr* matB, CvMat* matM, int
return 1;
}
cv::Mat cv::estimateRigidTransform( const InputArray& src1,
const InputArray& src2,
cv::Mat cv::estimateRigidTransform( InputArray src1,
InputArray src2,
bool fullAffine )
{
Mat M(2, 3, CV_64F), A = src1.getMat(), B = src2.getMat();

View File

@ -442,7 +442,7 @@ cvSegmentMotion( const CvArr* mhiimg, CvArr* segmask, CvMemStorage* storage,
}
void cv::updateMotionHistory( const InputArray& _silhouette, InputOutputArray _mhi,
void cv::updateMotionHistory( InputArray _silhouette, InputOutputArray _mhi,
double timestamp, double duration )
{
Mat silhouette = _silhouette.getMat();
@ -450,7 +450,7 @@ void cv::updateMotionHistory( const InputArray& _silhouette, InputOutputArray _m
cvUpdateMotionHistory( &c_silhouette, &c_mhi, timestamp, duration );
}
void cv::calcMotionGradient( const InputArray& _mhi, OutputArray _mask,
void cv::calcMotionGradient( InputArray _mhi, OutputArray _mask,
OutputArray _orientation,
double delta1, double delta2,
int aperture_size )
@ -462,8 +462,8 @@ void cv::calcMotionGradient( const InputArray& _mhi, OutputArray _mask,
cvCalcMotionGradient(&c_mhi, &c_mask, &c_orientation, delta1, delta2, aperture_size);
}
double cv::calcGlobalOrientation( const InputArray& _orientation, const InputArray& _mask,
const InputArray& _mhi, double timestamp,
double cv::calcGlobalOrientation( InputArray _orientation, InputArray _mask,
InputArray _mhi, double timestamp,
double duration )
{
Mat orientation = _orientation.getMat(), mask = _mask.getMat(), mhi = _mhi.getMat();
@ -471,7 +471,7 @@ double cv::calcGlobalOrientation( const InputArray& _orientation, const InputArr
return cvCalcGlobalOrientation(&c_orientation, &c_mask, &c_mhi, timestamp, duration);
}
void cv::segmentMotion(const InputArray& _mhi, OutputArray _segmask,
void cv::segmentMotion(InputArray _mhi, OutputArray _segmask,
vector<Rect>& boundingRects,
double timestamp, double segThresh)
{

View File

@ -563,7 +563,7 @@ FarnebackUpdateFlow_GaussianBlur( const Mat& _R0, const Mat& _R1,
}
void cv::calcOpticalFlowFarneback( const InputArray& _prev0, const InputArray& _next0,
void cv::calcOpticalFlowFarneback( InputArray _prev0, InputArray _next0,
OutputArray _flow0, double pyr_scale, int levels, int winsize,
int iterations, int poly_n, double poly_sigma, int flags )
{