1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-29 23:33:05 +04:00

Merge remote-tracking branch 'upstream/3.4' into merge-3.4

This commit is contained in:
Alexander Alekhin
2021-12-03 12:32:49 +00:00
89 changed files with 1116 additions and 542 deletions
+1 -1
View File
@@ -50,7 +50,7 @@ namespace perf {
void checkDeviceMaxMemoryAllocSize(const Size& size, int type, int factor)
{
assert(factor > 0);
CV_Assert(factor > 0);
if (!cv::ocl::useOpenCL())
return;
+1 -1
View File
@@ -379,7 +379,7 @@ void BaseTest::run( int start_from )
void BaseTest::run_func(void)
{
assert(0);
CV_Assert(0);
}
+3 -3
View File
@@ -268,14 +268,14 @@ void ArrayTest::fill_array( int /*test_case_idx*/, int i, int j, Mat& arr )
double ArrayTest::get_success_error_level( int /*test_case_idx*/, int i, int j )
{
int elem_depth = CV_MAT_DEPTH(cvGetElemType(test_array[i][j]));
assert( i == OUTPUT || i == INPUT_OUTPUT );
CV_Assert( i == OUTPUT || i == INPUT_OUTPUT );
return elem_depth < CV_32F ? 0 : elem_depth == CV_32F ? FLT_EPSILON*100: DBL_EPSILON*5000;
}
void ArrayTest::prepare_to_validation( int /*test_case_idx*/ )
{
assert(0);
CV_Assert(0);
}
@@ -293,7 +293,7 @@ int ArrayTest::validate_test_results( int test_case_idx )
int i1 = i == 0 ? REF_OUTPUT : REF_INPUT_OUTPUT;
size_t sizei = test_array[i0].size();
assert( sizei == test_array[i1].size() );
CV_Assert( sizei == test_array[i1].size() );
for( j = 0; j < sizei; j++ )
{
double err_level;
+4 -4
View File
@@ -2122,7 +2122,7 @@ int cmpEps( const Mat& arr_, const Mat& refarr_, double* _realmaxdiff,
}
break;
default:
assert(0);
CV_Assert(0);
return CMP_EPS_BIG_DIFF;
}
if(_realmaxdiff)
@@ -2733,7 +2733,7 @@ static void calcSobelKernel1D( int order, int _aperture_size, int size, vector<i
if( _aperture_size < 0 )
{
static const int scharr[8] = { 3, 10, 3, -1, 0, 1, 0, 0 }; // extra elements to eliminate "-Warray-bounds" bogus warning
assert( size == 3 );
CV_Assert( size == 3 && order < 2 );
for( i = 0; i < size; i++ )
kernel[i] = scharr[order*3 + i];
return;
@@ -3057,7 +3057,7 @@ void threshold( const Mat& _src, Mat& _dst,
imaxval = cvRound(maxval);
}
assert( depth == CV_8U || depth == CV_16S || depth == CV_32F );
CV_Assert( depth == CV_8U || depth == CV_16S || depth == CV_32F );
switch( thresh_type )
{
@@ -3219,7 +3219,7 @@ void threshold( const Mat& _src, Mat& _dst,
}
break;
default:
assert(0);
CV_Assert(0);
}
}
+4 -4
View File
@@ -1366,7 +1366,7 @@ bool TestBase::next()
bool has_next = false;
do {
assert(currentIter == times.size());
CV_Assert(currentIter == times.size());
if (currentIter == 0)
{
has_next = true;
@@ -1379,7 +1379,7 @@ bool TestBase::next()
}
else
{
assert(getCurrentPerformanceStrategy() == PERF_STRATEGY_SIMPLE);
CV_Assert(getCurrentPerformanceStrategy() == PERF_STRATEGY_SIMPLE);
if (totalTime - lastActivityPrintTime >= cv::getTickFrequency() * 10)
{
std::cout << '.' << std::endl;
@@ -1638,7 +1638,7 @@ performance_metrics& TestBase::calcMetrics()
}
else
{
assert(false);
CV_Assert(false);
}
int offset = static_cast<int>(start - times.begin());
@@ -1714,7 +1714,7 @@ void TestBase::validateMetrics()
}
else
{
assert(false);
CV_Assert(false);
}
}