fixed RAND test for float values
This commit is contained in:
parent
305b9a25e3
commit
a03c6d9d1f
@ -110,6 +110,10 @@ void Core_RandTest::run( int )
|
||||
int i, k, SZ = N/cn;
|
||||
Scalar A, B;
|
||||
|
||||
double eps = 1.e-4;
|
||||
if (depth == CV_64F)
|
||||
eps = 1.e-7;
|
||||
|
||||
bool do_sphere_test = dist_type == CV_RAND_UNI;
|
||||
Mat arr[2], hist[4];
|
||||
int W[] = {0,0,0,0};
|
||||
@ -170,7 +174,7 @@ void Core_RandTest::run( int )
|
||||
}
|
||||
}
|
||||
|
||||
if( maxk >= 1 && norm(arr[0], arr[1], NORM_INF) != 0 )
|
||||
if( maxk >= 1 && norm(arr[0], arr[1], NORM_INF) > eps)
|
||||
{
|
||||
ts->printf( cvtest::TS::LOG, "RNG output depends on the array lengths (some generated numbers get lost?)" );
|
||||
ts->set_failed_test_info( cvtest::TS::FAIL_INVALID_OUTPUT );
|
||||
|
Loading…
x
Reference in New Issue
Block a user