|
|
|
@ -1304,6 +1304,8 @@ const _Tp& Mat::at(const Vec<int, n>& idx) const |
|
|
|
|
template<typename _Tp> inline |
|
|
|
|
MatConstIterator_<_Tp> Mat::begin() const |
|
|
|
|
{ |
|
|
|
|
if (empty()) |
|
|
|
|
return MatConstIterator_<_Tp>(); |
|
|
|
|
CV_DbgAssert( elemSize() == sizeof(_Tp) ); |
|
|
|
|
return MatConstIterator_<_Tp>((const Mat_<_Tp>*)this); |
|
|
|
|
} |
|
|
|
@ -1311,6 +1313,8 @@ MatConstIterator_<_Tp> Mat::begin() const |
|
|
|
|
template<typename _Tp> inline |
|
|
|
|
MatConstIterator_<_Tp> Mat::end() const |
|
|
|
|
{ |
|
|
|
|
if (empty()) |
|
|
|
|
return MatConstIterator_<_Tp>(); |
|
|
|
|
CV_DbgAssert( elemSize() == sizeof(_Tp) ); |
|
|
|
|
MatConstIterator_<_Tp> it((const Mat_<_Tp>*)this); |
|
|
|
|
it += total(); |
|
|
|
@ -1320,6 +1324,8 @@ MatConstIterator_<_Tp> Mat::end() const |
|
|
|
|
template<typename _Tp> inline |
|
|
|
|
MatIterator_<_Tp> Mat::begin() |
|
|
|
|
{ |
|
|
|
|
if (empty()) |
|
|
|
|
return MatIterator_<_Tp>(); |
|
|
|
|
CV_DbgAssert( elemSize() == sizeof(_Tp) ); |
|
|
|
|
return MatIterator_<_Tp>((Mat_<_Tp>*)this); |
|
|
|
|
} |
|
|
|
@ -1327,6 +1333,8 @@ MatIterator_<_Tp> Mat::begin() |
|
|
|
|
template<typename _Tp> inline |
|
|
|
|
MatIterator_<_Tp> Mat::end() |
|
|
|
|
{ |
|
|
|
|
if (empty()) |
|
|
|
|
return MatIterator_<_Tp>(); |
|
|
|
|
CV_DbgAssert( elemSize() == sizeof(_Tp) ); |
|
|
|
|
MatIterator_<_Tp> it((Mat_<_Tp>*)this); |
|
|
|
|
it += total(); |
|
|
|
@ -2690,6 +2698,7 @@ MatConstIterator::MatConstIterator(const Mat* _m) |
|
|
|
|
{ |
|
|
|
|
if( m && m->isContinuous() ) |
|
|
|
|
{ |
|
|
|
|
CV_Assert(!m->empty()); |
|
|
|
|
sliceStart = m->ptr(); |
|
|
|
|
sliceEnd = sliceStart + m->total()*elemSize; |
|
|
|
|
} |
|
|
|
@ -2703,6 +2712,7 @@ MatConstIterator::MatConstIterator(const Mat* _m, int _row, int _col) |
|
|
|
|
CV_Assert(m && m->dims <= 2); |
|
|
|
|
if( m->isContinuous() ) |
|
|
|
|
{ |
|
|
|
|
CV_Assert(!m->empty()); |
|
|
|
|
sliceStart = m->ptr(); |
|
|
|
|
sliceEnd = sliceStart + m->total()*elemSize; |
|
|
|
|
} |
|
|
|
@ -2717,6 +2727,7 @@ MatConstIterator::MatConstIterator(const Mat* _m, Point _pt) |
|
|
|
|
CV_Assert(m && m->dims <= 2); |
|
|
|
|
if( m->isContinuous() ) |
|
|
|
|
{ |
|
|
|
|
CV_Assert(!m->empty()); |
|
|
|
|
sliceStart = m->ptr(); |
|
|
|
|
sliceEnd = sliceStart + m->total()*elemSize; |
|
|
|
|
} |
|
|
|
|