|
|
|
@ -397,13 +397,13 @@ inline _InputOutputArray::_InputOutputArray(const cuda::HostMem& cuda_mem) |
|
|
|
|
inline |
|
|
|
|
Mat::Mat() |
|
|
|
|
: flags(MAGIC_VAL), dims(0), rows(0), cols(0), data(0), datastart(0), dataend(0), |
|
|
|
|
datalimit(0), allocator(0), u(0), size(&rows) |
|
|
|
|
datalimit(0), allocator(0), u(0), size(&rows), step(0) |
|
|
|
|
{} |
|
|
|
|
|
|
|
|
|
inline |
|
|
|
|
Mat::Mat(int _rows, int _cols, int _type) |
|
|
|
|
: flags(MAGIC_VAL), dims(0), rows(0), cols(0), data(0), datastart(0), dataend(0), |
|
|
|
|
datalimit(0), allocator(0), u(0), size(&rows) |
|
|
|
|
datalimit(0), allocator(0), u(0), size(&rows), step(0) |
|
|
|
|
{ |
|
|
|
|
create(_rows, _cols, _type); |
|
|
|
|
} |
|
|
|
@ -411,7 +411,7 @@ Mat::Mat(int _rows, int _cols, int _type) |
|
|
|
|
inline |
|
|
|
|
Mat::Mat(int _rows, int _cols, int _type, const Scalar& _s) |
|
|
|
|
: flags(MAGIC_VAL), dims(0), rows(0), cols(0), data(0), datastart(0), dataend(0), |
|
|
|
|
datalimit(0), allocator(0), u(0), size(&rows) |
|
|
|
|
datalimit(0), allocator(0), u(0), size(&rows), step(0) |
|
|
|
|
{ |
|
|
|
|
create(_rows, _cols, _type); |
|
|
|
|
*this = _s; |
|
|
|
@ -420,7 +420,7 @@ Mat::Mat(int _rows, int _cols, int _type, const Scalar& _s) |
|
|
|
|
inline |
|
|
|
|
Mat::Mat(Size _sz, int _type) |
|
|
|
|
: flags(MAGIC_VAL), dims(0), rows(0), cols(0), data(0), datastart(0), dataend(0), |
|
|
|
|
datalimit(0), allocator(0), u(0), size(&rows) |
|
|
|
|
datalimit(0), allocator(0), u(0), size(&rows), step(0) |
|
|
|
|
{ |
|
|
|
|
create( _sz.height, _sz.width, _type ); |
|
|
|
|
} |
|
|
|
@ -428,7 +428,7 @@ Mat::Mat(Size _sz, int _type) |
|
|
|
|
inline |
|
|
|
|
Mat::Mat(Size _sz, int _type, const Scalar& _s) |
|
|
|
|
: flags(MAGIC_VAL), dims(0), rows(0), cols(0), data(0), datastart(0), dataend(0), |
|
|
|
|
datalimit(0), allocator(0), u(0), size(&rows) |
|
|
|
|
datalimit(0), allocator(0), u(0), size(&rows), step(0) |
|
|
|
|
{ |
|
|
|
|
create(_sz.height, _sz.width, _type); |
|
|
|
|
*this = _s; |
|
|
|
@ -437,7 +437,7 @@ Mat::Mat(Size _sz, int _type, const Scalar& _s) |
|
|
|
|
inline |
|
|
|
|
Mat::Mat(int _dims, const int* _sz, int _type) |
|
|
|
|
: flags(MAGIC_VAL), dims(0), rows(0), cols(0), data(0), datastart(0), dataend(0), |
|
|
|
|
datalimit(0), allocator(0), u(0), size(&rows) |
|
|
|
|
datalimit(0), allocator(0), u(0), size(&rows), step(0) |
|
|
|
|
{ |
|
|
|
|
create(_dims, _sz, _type); |
|
|
|
|
} |
|
|
|
@ -445,7 +445,7 @@ Mat::Mat(int _dims, const int* _sz, int _type) |
|
|
|
|
inline |
|
|
|
|
Mat::Mat(int _dims, const int* _sz, int _type, const Scalar& _s) |
|
|
|
|
: flags(MAGIC_VAL), dims(0), rows(0), cols(0), data(0), datastart(0), dataend(0), |
|
|
|
|
datalimit(0), allocator(0), u(0), size(&rows) |
|
|
|
|
datalimit(0), allocator(0), u(0), size(&rows), step(0) |
|
|
|
|
{ |
|
|
|
|
create(_dims, _sz, _type); |
|
|
|
|
*this = _s; |
|
|
|
@ -454,7 +454,7 @@ Mat::Mat(int _dims, const int* _sz, int _type, const Scalar& _s) |
|
|
|
|
inline |
|
|
|
|
Mat::Mat(const std::vector<int>& _sz, int _type) |
|
|
|
|
: flags(MAGIC_VAL), dims(0), rows(0), cols(0), data(0), datastart(0), dataend(0), |
|
|
|
|
datalimit(0), allocator(0), u(0), size(&rows) |
|
|
|
|
datalimit(0), allocator(0), u(0), size(&rows), step(0) |
|
|
|
|
{ |
|
|
|
|
create(_sz, _type); |
|
|
|
|
} |
|
|
|
@ -462,7 +462,7 @@ Mat::Mat(const std::vector<int>& _sz, int _type) |
|
|
|
|
inline |
|
|
|
|
Mat::Mat(const std::vector<int>& _sz, int _type, const Scalar& _s) |
|
|
|
|
: flags(MAGIC_VAL), dims(0), rows(0), cols(0), data(0), datastart(0), dataend(0), |
|
|
|
|
datalimit(0), allocator(0), u(0), size(&rows) |
|
|
|
|
datalimit(0), allocator(0), u(0), size(&rows), step(0) |
|
|
|
|
{ |
|
|
|
|
create(_sz, _type); |
|
|
|
|
*this = _s; |
|
|
|
@ -472,7 +472,7 @@ inline |
|
|
|
|
Mat::Mat(const Mat& m) |
|
|
|
|
: flags(m.flags), dims(m.dims), rows(m.rows), cols(m.cols), data(m.data), |
|
|
|
|
datastart(m.datastart), dataend(m.dataend), datalimit(m.datalimit), allocator(m.allocator), |
|
|
|
|
u(m.u), size(&rows) |
|
|
|
|
u(m.u), size(&rows), step(0) |
|
|
|
|
{ |
|
|
|
|
if( u ) |
|
|
|
|
CV_XADD(&u->refcount, 1); |
|
|
|
@ -556,7 +556,7 @@ Mat::Mat(Size _sz, int _type, void* _data, size_t _step) |
|
|
|
|
template<typename _Tp> inline |
|
|
|
|
Mat::Mat(const std::vector<_Tp>& vec, bool copyData) |
|
|
|
|
: flags(MAGIC_VAL | DataType<_Tp>::type | CV_MAT_CONT_FLAG), dims(2), rows((int)vec.size()), |
|
|
|
|
cols(1), data(0), datastart(0), dataend(0), allocator(0), u(0), size(&rows) |
|
|
|
|
cols(1), data(0), datastart(0), dataend(0), datalimit(0), allocator(0), u(0), size(&rows), step(0) |
|
|
|
|
{ |
|
|
|
|
if(vec.empty()) |
|
|
|
|
return; |
|
|
|
@ -574,7 +574,7 @@ Mat::Mat(const std::vector<_Tp>& vec, bool copyData) |
|
|
|
|
template<typename _Tp, std::size_t _Nm> inline |
|
|
|
|
Mat::Mat(const std::array<_Tp, _Nm>& arr, bool copyData) |
|
|
|
|
: flags(MAGIC_VAL | DataType<_Tp>::type | CV_MAT_CONT_FLAG), dims(2), rows((int)arr.size()), |
|
|
|
|
cols(1), data(0), datastart(0), dataend(0), allocator(0), u(0), size(&rows) |
|
|
|
|
cols(1), data(0), datastart(0), dataend(0), datalimit(0), allocator(0), u(0), size(&rows), step(0) |
|
|
|
|
{ |
|
|
|
|
if(arr.empty()) |
|
|
|
|
return; |
|
|
|
@ -592,7 +592,7 @@ Mat::Mat(const std::array<_Tp, _Nm>& arr, bool copyData) |
|
|
|
|
template<typename _Tp, int n> inline |
|
|
|
|
Mat::Mat(const Vec<_Tp, n>& vec, bool copyData) |
|
|
|
|
: flags(MAGIC_VAL | DataType<_Tp>::type | CV_MAT_CONT_FLAG), dims(2), rows(n), cols(1), data(0), |
|
|
|
|
datastart(0), dataend(0), allocator(0), u(0), size(&rows) |
|
|
|
|
datastart(0), dataend(0), datalimit(0), allocator(0), u(0), size(&rows), step(0) |
|
|
|
|
{ |
|
|
|
|
if( !copyData ) |
|
|
|
|
{ |
|
|
|
@ -608,7 +608,7 @@ Mat::Mat(const Vec<_Tp, n>& vec, bool copyData) |
|
|
|
|
template<typename _Tp, int m, int n> inline |
|
|
|
|
Mat::Mat(const Matx<_Tp,m,n>& M, bool copyData) |
|
|
|
|
: flags(MAGIC_VAL | DataType<_Tp>::type | CV_MAT_CONT_FLAG), dims(2), rows(m), cols(n), data(0), |
|
|
|
|
datastart(0), dataend(0), allocator(0), u(0), size(&rows) |
|
|
|
|
datastart(0), dataend(0), datalimit(0), allocator(0), u(0), size(&rows), step(0) |
|
|
|
|
{ |
|
|
|
|
if( !copyData ) |
|
|
|
|
{ |
|
|
|
@ -624,7 +624,7 @@ Mat::Mat(const Matx<_Tp,m,n>& M, bool copyData) |
|
|
|
|
template<typename _Tp> inline |
|
|
|
|
Mat::Mat(const Point_<_Tp>& pt, bool copyData) |
|
|
|
|
: flags(MAGIC_VAL | DataType<_Tp>::type | CV_MAT_CONT_FLAG), dims(2), rows(2), cols(1), data(0), |
|
|
|
|
datastart(0), dataend(0), allocator(0), u(0), size(&rows) |
|
|
|
|
datastart(0), dataend(0), datalimit(0), allocator(0), u(0), size(&rows), step(0) |
|
|
|
|
{ |
|
|
|
|
if( !copyData ) |
|
|
|
|
{ |
|
|
|
@ -643,7 +643,7 @@ Mat::Mat(const Point_<_Tp>& pt, bool copyData) |
|
|
|
|
template<typename _Tp> inline |
|
|
|
|
Mat::Mat(const Point3_<_Tp>& pt, bool copyData) |
|
|
|
|
: flags(MAGIC_VAL | DataType<_Tp>::type | CV_MAT_CONT_FLAG), dims(2), rows(3), cols(1), data(0), |
|
|
|
|
datastart(0), dataend(0), allocator(0), u(0), size(&rows) |
|
|
|
|
datastart(0), dataend(0), datalimit(0), allocator(0), u(0), size(&rows), step(0) |
|
|
|
|
{ |
|
|
|
|
if( !copyData ) |
|
|
|
|
{ |
|
|
|
|