mirror of
https://github.com/opencv/opencv.git
synced 2026-07-30 15:53:03 +04:00
Imgproc_Hist_MinMaxVal.accuracy fix;
Some code style corrections;
This commit is contained in:
@@ -3120,6 +3120,7 @@ static bool ipp_resize_mt( Mat src, Mat dst,
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
void cv::resize( InputArray _src, OutputArray _dst, Size dsize,
|
||||
double inv_scale_x, double inv_scale_y, int interpolation )
|
||||
{
|
||||
@@ -3482,7 +3483,6 @@ void cv::resize( InputArray _src, OutputArray _dst, Size dsize,
|
||||
}
|
||||
|
||||
|
||||
|
||||
/****************************************************************************************\
|
||||
* General warping (affine, perspective, remap) *
|
||||
\****************************************************************************************/
|
||||
|
||||
@@ -1136,10 +1136,11 @@ private:
|
||||
Scalar borderValue;
|
||||
};
|
||||
|
||||
#if IPP_VERSION_X100 >= 801
|
||||
static bool IPPMorphReplicate(int op, const Mat &src, Mat &dst, const Mat &kernel,
|
||||
#ifdef HAVE_IPP
|
||||
static bool ipp_MorphReplicate(int op, const Mat &src, Mat &dst, const Mat &kernel,
|
||||
const Size& ksize, const Point &anchor, bool rectKernel)
|
||||
{
|
||||
#if IPP_VERSION_X100 >= 801
|
||||
int type = src.type();
|
||||
const Mat* _src = &src;
|
||||
Mat temp;
|
||||
@@ -1257,10 +1258,13 @@ static bool IPPMorphReplicate(int op, const Mat &src, Mat &dst, const Mat &kerne
|
||||
}
|
||||
#undef IPP_MORPH_CASE
|
||||
}
|
||||
#else
|
||||
CV_UNUSED(op); CV_UNUSED(src); CV_UNUSED(dst); CV_UNUSED(kernel); CV_UNUSED(ksize); CV_UNUSED(anchor); CV_UNUSED(rectKernel);
|
||||
#endif
|
||||
return false;
|
||||
}
|
||||
|
||||
static bool IPPMorphOp(int op, InputArray _src, OutputArray _dst,
|
||||
static bool ipp_MorphOp(int op, InputArray _src, OutputArray _dst,
|
||||
const Mat& _kernel, Point anchor, int iterations,
|
||||
int borderType, const Scalar &borderValue)
|
||||
{
|
||||
@@ -1331,7 +1335,7 @@ static bool IPPMorphOp(int op, InputArray _src, OutputArray _dst,
|
||||
if( iterations > 1 )
|
||||
return false;
|
||||
|
||||
return IPPMorphReplicate( op, src, dst, kernel, ksize, anchor, rectKernel );
|
||||
return ipp_MorphReplicate( op, src, dst, kernel, ksize, anchor, rectKernel );
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -1711,9 +1715,7 @@ static void morphOp( int op, InputArray _src, OutputArray _dst,
|
||||
iterations = 1;
|
||||
}
|
||||
|
||||
|
||||
CV_IPP_RUN(IPP_VERSION_X100 >= 801, IPPMorphOp(op, _src, _dst, kernel, anchor, iterations, borderType, borderValue))
|
||||
|
||||
CV_IPP_RUN(IPP_VERSION_X100 >= 801, ipp_MorphOp(op, _src, _dst, kernel, anchor, iterations, borderType, borderValue))
|
||||
|
||||
Mat src = _src.getMat();
|
||||
_dst.create( src.size(), src.type() );
|
||||
|
||||
@@ -907,22 +907,22 @@ thresh_32f( const Mat& _src, Mat& _dst, float thresh, float maxval, int type )
|
||||
#ifdef HAVE_IPP
|
||||
static bool ipp_getThreshVal_Otsu_8u( const unsigned char* _src, int step, Size size, unsigned char &thresh)
|
||||
{
|
||||
#if IPP_VERSION_X100 >= 801 && !HAVE_ICV
|
||||
int ippStatus = -1;
|
||||
#if IPP_VERSION_X100 >= 801 && !defined(HAVE_IPP_ICV_ONLY)
|
||||
IppiSize srcSize = { size.width, size.height };
|
||||
CV_SUPPRESS_DEPRECATED_START
|
||||
ippStatus = ippiComputeThreshold_Otsu_8u_C1R(_src, step, srcSize, &thresh);
|
||||
CV_SUPPRESS_DEPRECATED_END
|
||||
|
||||
if(ippStatus >= 0)
|
||||
return true;
|
||||
#else
|
||||
CV_UNUSED(_src); CV_UNUSED(step); CV_UNUSED(size); CV_UNUSED(thresh);
|
||||
#endif
|
||||
if(ippStatus >= 0)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
static double
|
||||
getThreshVal_Otsu_8u( const Mat& _src )
|
||||
{
|
||||
@@ -937,9 +937,8 @@ getThreshVal_Otsu_8u( const Mat& _src )
|
||||
|
||||
#ifdef HAVE_IPP
|
||||
unsigned char thresh;
|
||||
CV_IPP_RUN(IPP_VERSION_X100 >= 801 && !HAVE_ICV, ipp_getThreshVal_Otsu_8u(_src.ptr(), step, size, thresh), thresh);
|
||||
#endif
|
||||
CV_IPP_RUN(true, ipp_getThreshVal_Otsu_8u(_src.ptr(), step, size, thresh), thresh);
|
||||
|
||||
|
||||
const int N = 256;
|
||||
int i, j, h[N] = {0};
|
||||
|
||||
Reference in New Issue
Block a user