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