mirror of
https://github.com/opencv/opencv.git
synced 2026-07-29 23:33:05 +04:00
Merge remote-tracking branch 'upstream/3.4' into merge-3.4
This commit is contained in:
@@ -1269,6 +1269,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);
|
||||
}
|
||||
@@ -1276,6 +1278,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();
|
||||
@@ -1285,6 +1289,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);
|
||||
}
|
||||
@@ -1292,6 +1298,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();
|
||||
@@ -2640,6 +2648,7 @@ MatConstIterator::MatConstIterator(const Mat* _m)
|
||||
{
|
||||
if( m && m->isContinuous() )
|
||||
{
|
||||
CV_Assert(!m->empty());
|
||||
sliceStart = m->ptr();
|
||||
sliceEnd = sliceStart + m->total()*elemSize;
|
||||
}
|
||||
@@ -2653,6 +2662,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;
|
||||
}
|
||||
@@ -2667,6 +2677,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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user