Merge remote-tracking branch 'upstream/3.4' into merge-3.4
Revert "documentation: avoid links to 'master' branch from 3.4 maintenance branch" This reverts commit9ba9358ecb. Revert "documentation: avoid links to 'master' branch from 3.4 maintenance branch (2)" This reverts commitf185802489.
This commit is contained in:
@@ -532,8 +532,9 @@ CV_EXPORTS_W void convertScaleAbs(InputArray src, OutputArray dst,
|
||||
|
||||
/** @brief Converts an array to half precision floating number.
|
||||
|
||||
This function converts FP32 (single precision floating point) from/to FP16 (half precision floating point). The input array has to have type of CV_32F or
|
||||
CV_16S to represent the bit depth. If the input array is neither of them, the function will raise an error.
|
||||
This function converts FP32 (single precision floating point) from/to FP16 (half precision floating point). CV_16S format is used to represent FP16 data.
|
||||
There are two use modes (src -> dst): CV_32F -> CV_16S and CV_16S -> CV_32F. The input array has to have type of CV_32F or
|
||||
CV_16S to represent the bit depth. If the input array is neither of them, the function will raise an error.
|
||||
The format of half precision floating point is defined in IEEE 754-2008.
|
||||
|
||||
@param src input array.
|
||||
|
||||
@@ -77,11 +77,8 @@ inline
|
||||
String::String(const std::string& str)
|
||||
: cstr_(0), len_(0)
|
||||
{
|
||||
if (!str.empty())
|
||||
{
|
||||
size_t len = str.size();
|
||||
if (len) memcpy(allocate(len), str.c_str(), len);
|
||||
}
|
||||
size_t len = str.size();
|
||||
if (len) memcpy(allocate(len), str.c_str(), len);
|
||||
}
|
||||
|
||||
inline
|
||||
@@ -99,11 +96,8 @@ inline
|
||||
String& String::operator = (const std::string& str)
|
||||
{
|
||||
deallocate();
|
||||
if (!str.empty())
|
||||
{
|
||||
size_t len = str.size();
|
||||
if (len) memcpy(allocate(len), str.c_str(), len);
|
||||
}
|
||||
size_t len = str.size();
|
||||
if (len) memcpy(allocate(len), str.c_str(), len);
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
@@ -1649,7 +1649,7 @@ Mat_<_Tp>& Mat_<_Tp>::operator = (const Mat& m)
|
||||
{
|
||||
return (*this = m.reshape(DataType<_Tp>::channels, m.dims, 0));
|
||||
}
|
||||
CV_DbgAssert(DataType<_Tp>::channels == m.channels());
|
||||
CV_Assert(DataType<_Tp>::channels == m.channels() || m.empty());
|
||||
m.convertTo(*this, type());
|
||||
return *this;
|
||||
}
|
||||
|
||||
@@ -1372,6 +1372,20 @@ Point_<_Tp> operator / (const Point_<_Tp>& a, double b)
|
||||
}
|
||||
|
||||
|
||||
template<typename _AccTp> static inline _AccTp normL2Sqr(const Point_<int>& pt);
|
||||
template<typename _AccTp> static inline _AccTp normL2Sqr(const Point_<int64>& pt);
|
||||
template<typename _AccTp> static inline _AccTp normL2Sqr(const Point_<float>& pt);
|
||||
template<typename _AccTp> static inline _AccTp normL2Sqr(const Point_<double>& pt);
|
||||
|
||||
template<> inline int normL2Sqr<int>(const Point_<int>& pt) { return pt.dot(pt); }
|
||||
template<> inline int64 normL2Sqr<int64>(const Point_<int64>& pt) { return pt.dot(pt); }
|
||||
template<> inline float normL2Sqr<float>(const Point_<float>& pt) { return pt.dot(pt); }
|
||||
template<> inline double normL2Sqr<double>(const Point_<int>& pt) { return pt.dot(pt); }
|
||||
|
||||
template<> inline double normL2Sqr<double>(const Point_<float>& pt) { return pt.ddot(pt); }
|
||||
template<> inline double normL2Sqr<double>(const Point_<double>& pt) { return pt.ddot(pt); }
|
||||
|
||||
|
||||
|
||||
//////////////////////////////// 3D Point ///////////////////////////////
|
||||
|
||||
|
||||
Reference in New Issue
Block a user