cv::magnitude
This commit is contained in:
parent
bf860dbb31
commit
ed1ca00bf6
@ -238,6 +238,12 @@ float cubeRoot( float value )
|
|||||||
|
|
||||||
static void Magnitude_32f(const float* x, const float* y, float* mag, int len)
|
static void Magnitude_32f(const float* x, const float* y, float* mag, int len)
|
||||||
{
|
{
|
||||||
|
#ifdef HAVE_IPP
|
||||||
|
IppStatus status = ippsMagnitude_32f(x, y, mag, len);
|
||||||
|
if (status == ippStsNoErr)
|
||||||
|
return;
|
||||||
|
#endif
|
||||||
|
|
||||||
int i = 0;
|
int i = 0;
|
||||||
|
|
||||||
#if CV_SSE
|
#if CV_SSE
|
||||||
@ -264,6 +270,12 @@ static void Magnitude_32f(const float* x, const float* y, float* mag, int len)
|
|||||||
|
|
||||||
static void Magnitude_64f(const double* x, const double* y, double* mag, int len)
|
static void Magnitude_64f(const double* x, const double* y, double* mag, int len)
|
||||||
{
|
{
|
||||||
|
#ifdef HAVE_IPP
|
||||||
|
IppStatus status = ippsMagnitude_64f(x, y, mag, len);
|
||||||
|
if (status == ippStsNoErr)
|
||||||
|
return;
|
||||||
|
#endif
|
||||||
|
|
||||||
int i = 0;
|
int i = 0;
|
||||||
|
|
||||||
#if CV_SSE2
|
#if CV_SSE2
|
||||||
|
@ -2016,6 +2016,7 @@ double cv::norm( InputArray _src, int normType, InputArray _mask )
|
|||||||
#if defined (HAVE_IPP) && (IPP_VERSION_MAJOR >= 7)
|
#if defined (HAVE_IPP) && (IPP_VERSION_MAJOR >= 7)
|
||||||
size_t total_size = src.total();
|
size_t total_size = src.total();
|
||||||
int rows = src.size[0], cols = (int)(total_size/rows);
|
int rows = src.size[0], cols = (int)(total_size/rows);
|
||||||
|
|
||||||
if( (src.dims == 2 || (src.isContinuous() && mask.isContinuous()))
|
if( (src.dims == 2 || (src.isContinuous() && mask.isContinuous()))
|
||||||
&& cols > 0 && (size_t)rows*cols == total_size
|
&& cols > 0 && (size_t)rows*cols == total_size
|
||||||
&& (normType == NORM_INF || normType == NORM_L1 ||
|
&& (normType == NORM_INF || normType == NORM_L1 ||
|
||||||
|
Loading…
x
Reference in New Issue
Block a user