replaced "const InputArray&" => "InputArray"; made InputArray and OutputArray references. added "None()" constant (no array()).
This commit is contained in:
@@ -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) )
|
||||
|
@@ -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();
|
||||
|
||||
|
@@ -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 );
|
||||
|
@@ -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 &&
|
||||
|
@@ -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 );
|
||||
}
|
||||
|
@@ -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 );
|
||||
}
|
||||
|
@@ -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;
|
||||
|
||||
|
@@ -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);
|
||||
|
@@ -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);
|
||||
|
@@ -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;
|
||||
|
@@ -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);
|
||||
}
|
||||
|
@@ -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);
|
||||
|
Reference in New Issue
Block a user