Lines Matching refs:MAT
86 Mat src(dims, isz, CV_8U, srcptr, srcstep);
87 Mat dst(dims, isz, CV_8U, dstptr, dststep);
89 const Mat* arrays[] = { &src, &dst };
117 Mat src(dims, isz, CV_8U, (void*)srcptr, srcstep);
118 Mat dst(dims, isz, CV_8U, dstptr, dststep);
120 const Mat* arrays[] = { &src, &dst };
150 Mat src(dims, isz, CV_8U, srcptr, srcstep);
151 Mat dst(dims, isz, CV_8U, dstptr, dststep);
153 const Mat* arrays[] = { &src, &dst };
225 MatAllocator* Mat::getStdAllocator()
231 void swap( Mat& a, Mat& b )
263 static inline void setSize( Mat& m, int _dims, const int* _sz,
323 static void updateContinuityFlag(Mat& m)
340 m.flags |= Mat::CONTINUOUS_FLAG;
342 m.flags &= ~Mat::CONTINUOUS_FLAG;
345 static void finalizeHdr(Mat& m)
370 void Mat::create(int d, const int* _sizes, int _type)
420 void Mat::copySize(const Mat& m)
430 void Mat::deallocate()
437 Mat::Mat(const Mat& m, const Range& _rowRange, const Range& _colRange)
482 Mat::Mat(const Mat& m, const Rect& roi)
511 Mat::Mat(int _dims, const int* _sizes, int _type, void* _data, const size_t* _steps)
522 Mat::Mat(const Mat& m, const Range* ranges)
549 static Mat cvMatNDToMat(const CvMatND* m, bool copyData)
551 Mat thiz;
572 Mat temp(thiz);
580 static Mat cvMatToMat(const CvMat* m, bool copyData)
582 Mat thiz;
589 thiz.flags = Mat::MAGIC_VAL + (m->type & (CV_MAT_TYPE_MASK|CV_MAT_CONT_FLAG));
604 Mat(m->rows, m->cols, m->type, m->data.ptr, m->step).copyTo(thiz);
611 static Mat iplImageToMat(const IplImage* img, bool copyData)
613 Mat m;
628 m.flags = Mat::MAGIC_VAL + CV_MAKETYPE(imgdepth, img->nChannels);
638 m.flags = Mat::MAGIC_VAL + CV_MAKETYPE(imgdepth, selectedPlane ? 1 : img->nChannels);
648 m.flags |= (m.cols*esz == m.step.p[0] || m.rows == 1 ? Mat::CONTINUOUS_FLAG : 0);
653 Mat m2 = m;
669 Mat Mat::diag(int d) const
672 Mat m = *this;
703 void Mat::pop_back(size_t nelems)
724 void Mat::push_back_(const void* elem)
738 void Mat::reserve(size_t nelems)
757 Mat m(dims, size.p, type());
761 Mat mpart = m.rowRange(0, r);
771 void Mat::resize(size_t nelems)
788 void Mat::resize(size_t nelems, const Scalar& s)
795 Mat part = rowRange(saveRows, size.p[0]);
800 void Mat::push_back(const Mat& elems)
807 Mat tmp = elems;
837 Mat part = rowRange(r, r + delta);
843 Mat cvarrToMat(const CvArr* arr, bool copyData,
847 return Mat();
864 return Mat();
867 return Mat(total, 1, type, seq->first->data);
873 return Mat(total, 1, type, bufdata);
876 Mat buf(total, 1, type);
881 return Mat();
884 void Mat::locateROI( Size& wholeSize, Point& ofs ) const
905 Mat& Mat::adjustROI( int dtop, int dbottom, int dleft, int dright )
927 Mat mat = cvarrToMat(arr, false, true, 1);
928 _ch.create(mat.dims, mat.size, mat.depth());
929 Mat ch = _ch.getMat();
935 CV_Assert(0 <= coi && coi < mat.channels());
937 mixChannels( &mat, 1, &ch, 1, _pairs, 1 );
942 Mat ch = _ch.getMat(), mat = cvarrToMat(arr, false, true, 1);
948 CV_Assert(ch.size == mat.size && ch.depth() == mat.depth() && 0 <= coi && coi < mat.channels());
950 mixChannels( &ch, 1, &mat, 1, _pairs, 1 );
956 Mat Mat::reshape(int new_cn, int new_rows) const
959 Mat hdr = *this;
1011 Mat Mat::diag(const Mat& d)
1015 Mat m(len, len, d.type(), Scalar(0));
1016 Mat md = m.diag();
1024 int Mat::checkVector(int _elemChannels, int _depth, bool _requireContinuous) const
1115 Mat _InputArray::getMat_(int i) const
1120 if( k == MAT )
1122 const Mat* m = (const Mat*)obj;
1139 return (Mat)*((const MatExpr*)obj);
1145 return Mat(sz, flags, obj);
1154 return !v.empty() ? Mat(size(), t, (void*)&v[0]) : Mat();
1164 return Mat();
1165 Mat m(1, n, t);
1173 return Mat();
1182 return !v.empty() ? Mat(size(i), t, (void*)&v[0]) : Mat();
1187 const std::vector<Mat>& v = *(const std::vector<Mat>*)obj;
1205 return Mat();
1212 return Mat();
1225 return Mat();
1249 if( k == MAT )
1251 const Mat* m = (const Mat*)obj;
1260 void _InputArray::getMatVector(std::vector<Mat>& mv) const
1265 if( k == MAT )
1267 const Mat& m = *(const Mat*)obj;
1272 mv[i] = m.dims == 2 ? Mat(1, m.cols, m.type(), (void*)m.ptr(i)) :
1273 Mat(m.dims-1, &m.size[1], m.type(), (void*)m.ptr(i), &m.step[1]);
1279 Mat m = *(const MatExpr*)obj;
1294 mv[i] = Mat(1, sz.width, CV_MAT_TYPE(flags), (uchar*)obj + esz*sz.width*i);
1307 mv[i] = Mat(1, cn, t, (void*)(&v[0] + esz*i));
1327 mv[i] = Mat(size(i), t, (void*)&v[0]);
1334 const std::vector<Mat>& v = *(const std::vector<Mat>*)obj;
1370 const std::vector<Mat>& v = *(const std::vector<Mat>*)obj;
1397 if( k == MAT )
1399 Mat& v = *(Mat*)obj;
1466 if( k == MAT )
1469 return ((const Mat*)obj)->size();
1523 const std::vector<Mat>& vv = *(const std::vector<Mat>*)obj;
1572 else if( k == MAT )
1575 const Mat& m = *(const Mat*)obj;
1592 const std::vector<Mat>& vv = *(const std::vector<Mat>*)obj;
1594 const Mat& m = vv[i];
1629 if( k1 == MAT )
1631 const Mat* m = ((const Mat*)obj);
1632 if( k2 == MAT )
1633 return m->size == ((const Mat*)arr.obj)->size;
1643 if( k2 == MAT )
1644 return m->size == ((const Mat*)arr.obj)->size;
1662 if( k == MAT )
1665 return ((const Mat*)obj)->dims;
1706 const std::vector<Mat>& vv = *(const std::vector<Mat>*)obj;
1750 if( k == MAT )
1753 return ((const Mat*)obj)->total();
1764 const std::vector<Mat>& vv = *(const std::vector<Mat>*)obj;
1789 if( k == MAT )
1790 return ((const Mat*)obj)->type();
1818 const std::vector<Mat>& vv = *(const std::vector<Mat>*)obj;
1855 if( k == MAT )
1856 return ((const Mat*)obj)->empty();
1890 const std::vector<Mat>& vv = *(const std::vector<Mat>*)obj;
1917 if( k == MAT )
1918 return i < 0 ? ((const Mat*)obj)->isContinuous() : true;
1929 const std::vector<Mat>& vv = *(const std::vector<Mat>*)obj;
1949 if( k == MAT )
1950 return i < 0 ? ((const Mat*)obj)->isSubmatrix() : false;
1961 const std::vector<Mat>& vv = *(const std::vector<Mat>*)obj;
1981 if( k == MAT )
1984 const Mat * const m = ((const Mat*)obj);
2000 const std::vector<Mat>& vv = *(const std::vector<Mat>*)obj;
2030 if( k == MAT )
2033 return ((const Mat*)obj)->step;
2048 const std::vector<Mat>& vv = *(const std::vector<Mat>*)obj;
2078 else if( k == MAT || k == MATX || k == STD_VECTOR || k == STD_BOOL_VECTOR )
2080 Mat m = getMat();
2086 if( arr.kind() == MAT )
2089 Mat(e).copyTo(arr);
2103 else if( k == MAT || k == MATX || k == STD_VECTOR || k == STD_BOOL_VECTOR )
2105 Mat m = getMat();
2127 if( k == MAT && i < 0 && !allowTransposed && fixedDepthMask == 0 )
2129 CV_Assert(!fixedSize() || ((Mat*)obj)->size.operator()() == _sz);
2130 CV_Assert(!fixedType() || ((Mat*)obj)->type() == mtype);
2131 ((Mat*)obj)->create(_sz, mtype);
2169 if( k == MAT && i < 0 && !allowTransposed && fixedDepthMask == 0 )
2171 CV_Assert(!fixedSize() || ((Mat*)obj)->size.operator()() == Size(_cols, _rows));
2172 CV_Assert(!fixedType() || ((Mat*)obj)->type() == mtype);
2173 ((Mat*)obj)->create(_rows, _cols, mtype);
2214 if( k == MAT )
2217 Mat& m = *(Mat*)obj;
2382 std::vector<Mat>& v = *(std::vector<Mat>*)obj;
2406 Mat& m = v[i];
2513 if( k == MAT )
2515 ((Mat*)obj)->release();
2560 ((std::vector<Mat>*)obj)->clear();
2577 if( k == MAT )
2580 ((Mat*)obj)->resize(0);
2592 Mat& _OutputArray::getMatRef(int i) const
2597 CV_Assert( k == MAT );
2598 return *(Mat*)obj;
2603 std::vector<Mat>& v = *(std::vector<Mat>*)obj;
2653 else if( k == MAT || k == MATX || k == STD_VECTOR )
2655 Mat m = getMat();
2662 Mat value = arr.getMat();
2678 else if (k == MAT)
2680 u.copyTo(*(Mat*)obj); // TODO check u.getMat()
2693 void _OutputArray::assign(const Mat& m) const
2700 else if (k == MAT)
2702 *(Mat*)obj = m;
2724 void cv::hconcat(const Mat* src, size_t nsrc, OutputArray _dst)
2742 Mat dst = _dst.getMat();
2745 Mat dpart = dst(Rect(cols, 0, src[i].cols, src[i].rows));
2753 Mat src[] = {src1.getMat(), src2.getMat()};
2759 std::vector<Mat> src;
2764 void cv::vconcat(const Mat* src, size_t nsrc, OutputArray _dst)
2782 Mat dst = _dst.getMat();
2785 Mat dpart(dst, Rect(0, rows, src[i].cols, src[i].rows));
2793 Mat src[] = {src1.getMat(), src2.getMat()};
2799 std::vector<Mat> src;
2836 ocl::KernelArg::Constant(Mat(1, 1, sctype, s)));
2853 Mat m = _m.getMat();
2893 Mat m = _m.getMat();
3101 Mat src = _src.getMat();
3109 Mat dst = _dst.getMat();
3210 Mat m = _m.getMat();
3227 cv::Mat cv::Mat::cross(InputArray _m) const
3229 Mat m = _m.getMat();
3233 Mat result(rows, cols, tp);
3268 reduceR_( const Mat& srcmat, Mat& dstmat )
3311 reduceC_( const Mat& srcmat, Mat& dstmat )
3350 typedef void (*ReduceFunc)( const Mat& src, Mat& dst );
3379 static inline void reduceSumC_8u16u16s32f_64f(const cv::Mat& srcmat, cv::Mat& dstmat)
3424 cv::Mat dstroi = dstmat.rowRange(y, y + 1);
3436 cv::Mat dstroi = dstmat.rowRange(y, y + 1);
3470 static inline void reduce##optype##C##favor(const cv::Mat& srcmat, cv::Mat& dstmat) \
3483 cv::Mat dstroi = dstmat.rowRange(y, y + 1); \
3646 Mat src = _src.getMat();
3648 Mat dst = _dst.getMat(), temp = dst;
3820 template<typename T> static void sort_( const Mat& src, Mat& dst, int flags )
3942 template<typename T> static void sortIdx_( const Mat& src, Mat& dst, int flags )
4035 typedef void (*SortFunc)(const Mat& src, Mat& dst, int flags);
4046 Mat src = _src.getMat();
4050 Mat dst = _dst.getMat();
4061 Mat src = _src.getMat();
4065 Mat dst = _dst.getMat();
4076 cv::Mat m = cv::cvarrToMat(arr);
4089 cv::Mat src = cv::cvarrToMat(srcarr), dst = cv::cvarrToMat(dstarr);
4098 cv::Mat m = cv::cvarrToMat(matrix);
4105 cv::Mat srcA = cv::cvarrToMat(srcAarr), dst = cv::cvarrToMat(dstarr);
4115 cv::Mat src = cv::cvarrToMat(srcarr), dst = cv::cvarrToMat(dstarr);
4139 CvMat stub, *mat = (CvMat*)arr;
4146 if( !CV_IS_MAT(mat) )
4147 mat = cvGetMat( mat, &stub);
4149 rows = mat->rows;
4150 cols = mat->cols;
4151 type = CV_MAT_TYPE(mat->type);
4154 if( CV_IS_MAT_CONT(mat->type) )
4161 step = mat->step / CV_ELEM_SIZE(type);
4165 int* idata = mat->data.i;
4184 float* fdata = mat->data.fl;
4200 cv::Mat src = cv::cvarrToMat(_src);
4204 cv::Mat idx0 = cv::cvarrToMat(_idx), idx = idx0;
4212 cv::Mat dst0 = cv::cvarrToMat(_dst), dst = dst0;
4225 cv::Mat data = cv::cvarrToMat(_samples), labels = cv::cvarrToMat(_labels), centers;
4254 Mat Mat::reshape(int _cn, int _newndims, const int* _newsz) const
4266 return Mat();
4274 NAryMatIterator::NAryMatIterator(const Mat** _arrays, Mat* _planes, int _narrays)
4280 NAryMatIterator::NAryMatIterator(const Mat** _arrays, uchar** _ptrs, int _narrays)
4286 void NAryMatIterator::init(const Mat** _arrays, Mat* _planes, uchar** _ptrs, int _narrays)
4311 const Mat& A = *arrays[i];
4372 const Mat& A = *arrays[i];
4376 planes[i] = Mat();
4380 planes[i] = Mat(1, (int)size, A.type(), A.data);
4416 const Mat& A = *arrays[i];
4740 SparseMat::SparseMat(const Mat& m)
4816 void SparseMat::copyTo( Mat& m ) const
4878 void SparseMat::convertTo( Mat& m, int rtype, double alpha, double beta ) const
5400 CvMatND::CvMatND(const cv::Mat& m)
5406 type |= m.flags & cv::Mat::CONTINUOUS_FLAG;
5409 _IplImage::_IplImage(const cv::Mat& m)