|
|
|
@ -492,17 +492,9 @@ _AccTp normL2Sqr(const _Tp* a, const _Tp* b, int n) |
|
|
|
|
return s; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
inline float normL2Sqr(const float* a, const float* b, int n) |
|
|
|
|
static inline float normL2Sqr(const float* a, const float* b, int n) |
|
|
|
|
{ |
|
|
|
|
if( n >= 8 ) |
|
|
|
|
return hal::normL2Sqr_(a, b, n); |
|
|
|
|
float s = 0; |
|
|
|
|
for( int i = 0; i < n; i++ ) |
|
|
|
|
{ |
|
|
|
|
float v = a[i] - b[i]; |
|
|
|
|
s += v*v; |
|
|
|
|
} |
|
|
|
|
return s; |
|
|
|
|
return normL2Sqr<float, float>(a, b, n); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
template<typename _Tp, typename _AccTp> static inline |
|
|
|
@ -527,20 +519,12 @@ _AccTp normL1(const _Tp* a, const _Tp* b, int n) |
|
|
|
|
|
|
|
|
|
inline float normL1(const float* a, const float* b, int n) |
|
|
|
|
{ |
|
|
|
|
if( n >= 8 ) |
|
|
|
|
return hal::normL1_(a, b, n); |
|
|
|
|
float s = 0; |
|
|
|
|
for( int i = 0; i < n; i++ ) |
|
|
|
|
{ |
|
|
|
|
float v = a[i] - b[i]; |
|
|
|
|
s += std::abs(v); |
|
|
|
|
} |
|
|
|
|
return s; |
|
|
|
|
return normL1<float, float>(a, b, n); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
inline int normL1(const uchar* a, const uchar* b, int n) |
|
|
|
|
{ |
|
|
|
|
return hal::normL1_(a, b, n); |
|
|
|
|
return normL1<uchar, int>(a, b, n); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
template<typename _Tp, typename _AccTp> static inline |
|
|
|
@ -573,6 +557,15 @@ CV_EXPORTS_W float cubeRoot(float val); |
|
|
|
|
*/ |
|
|
|
|
CV_EXPORTS_W float fastAtan2(float y, float x); |
|
|
|
|
|
|
|
|
|
/** proxy for hal::LU */ |
|
|
|
|
CV_EXPORTS int LU(float* A, size_t astep, int m, float* b, size_t bstep, int n); |
|
|
|
|
/** proxy for hal::LU */ |
|
|
|
|
CV_EXPORTS int LU(double* A, size_t astep, int m, double* b, size_t bstep, int n); |
|
|
|
|
/** proxy for hal::Cholesky */ |
|
|
|
|
CV_EXPORTS bool Cholesky(float* A, size_t astep, int m, float* b, size_t bstep, int n); |
|
|
|
|
/** proxy for hal::Cholesky */ |
|
|
|
|
CV_EXPORTS bool Cholesky(double* A, size_t astep, int m, double* b, size_t bstep, int n); |
|
|
|
|
|
|
|
|
|
////////////////// forward declarations for important OpenCV types //////////////////
|
|
|
|
|
|
|
|
|
|
//! @cond IGNORED
|
|
|
|
|