Merge branch '2.4'
This commit is contained in:
@@ -45,4 +45,4 @@
|
||||
#error this is a compatibility header which should not be used inside the OpenCV library
|
||||
#endif
|
||||
|
||||
#include "opencv2/core.hpp"
|
||||
#include "opencv2/core.hpp"
|
||||
|
@@ -360,6 +360,8 @@ CV_INLINE int cvRound( double value )
|
||||
fistp t;
|
||||
}
|
||||
return t;
|
||||
#elif defined _MSC_VER && defined _M_ARM && defined HAVE_TEGRA_OPTIMIZATION
|
||||
TEGRA_ROUND(value);
|
||||
#elif defined HAVE_LRINT || defined CV_ICC || defined __GNUC__
|
||||
# ifdef HAVE_TEGRA_OPTIMIZATION
|
||||
TEGRA_ROUND(value);
|
||||
@@ -367,8 +369,12 @@ CV_INLINE int cvRound( double value )
|
||||
return (int)lrint(value);
|
||||
# endif
|
||||
#else
|
||||
// while this is not IEEE754-compliant rounding, it's usually a good enough approximation
|
||||
return (int)(value + (value >= 0 ? 0.5 : -0.5));
|
||||
double intpart, fractpart;
|
||||
fractpart = modf(value, &intpart);
|
||||
if ((fabs(fractpart) != 0.5) || ((((int)intpart) % 2) != 0))
|
||||
return (int)(value + (value >= 0 ? 0.5 : -0.5));
|
||||
else
|
||||
return (int)intpart;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@@ -1704,6 +1704,7 @@ public:
|
||||
SparseMatConstIterator_();
|
||||
//! the full constructor setting the iterator to the first sparse matrix element
|
||||
SparseMatConstIterator_(const SparseMat_<_Tp>* _m);
|
||||
SparseMatConstIterator_(const SparseMat* _m);
|
||||
//! the copy constructor
|
||||
SparseMatConstIterator_(const SparseMatConstIterator_& it);
|
||||
|
||||
@@ -1740,6 +1741,7 @@ public:
|
||||
SparseMatIterator_();
|
||||
//! the full constructor setting the iterator to the first sparse matrix element
|
||||
SparseMatIterator_(SparseMat_<_Tp>* _m);
|
||||
SparseMatIterator_(SparseMat* _m);
|
||||
//! the copy constructor
|
||||
SparseMatIterator_(const SparseMatIterator_& it);
|
||||
|
||||
|
@@ -2587,6 +2587,13 @@ SparseMatConstIterator_<_Tp>::SparseMatConstIterator_(const SparseMat_<_Tp>* _m)
|
||||
: SparseMatConstIterator(_m)
|
||||
{}
|
||||
|
||||
template<typename _Tp> inline
|
||||
SparseMatConstIterator_<_Tp>::SparseMatConstIterator_(const SparseMat* _m)
|
||||
: SparseMatConstIterator(_m)
|
||||
{
|
||||
CV_Assert( _m->type() == DataType<_Tp>::type );
|
||||
}
|
||||
|
||||
template<typename _Tp> inline
|
||||
SparseMatConstIterator_<_Tp>::SparseMatConstIterator_(const SparseMatConstIterator_<_Tp>& it)
|
||||
: SparseMatConstIterator(it)
|
||||
@@ -2634,6 +2641,11 @@ SparseMatIterator_<_Tp>::SparseMatIterator_(SparseMat_<_Tp>* _m)
|
||||
: SparseMatConstIterator_<_Tp>(_m)
|
||||
{}
|
||||
|
||||
template<typename _Tp> inline
|
||||
SparseMatIterator_<_Tp>::SparseMatIterator_(SparseMat* _m)
|
||||
: SparseMatConstIterator_<_Tp>(_m)
|
||||
{}
|
||||
|
||||
template<typename _Tp> inline
|
||||
SparseMatIterator_<_Tp>::SparseMatIterator_(const SparseMatIterator_<_Tp>& it)
|
||||
: SparseMatConstIterator_<_Tp>(it)
|
||||
|
Reference in New Issue
Block a user