mirror of
https://github.com/opencv/opencv.git
synced 2025-01-18 06:03:15 +08:00
make the floodfill test parameters more discrete, to avoid weird rounding errors
This commit is contained in:
parent
9801d07a46
commit
1dfcb6fb22
@ -138,12 +138,12 @@ void CV_FloodFillTest::get_test_array_types_and_sizes( int test_case_idx,
|
||||
l_diff = u_diff = cvScalarAll(0.);
|
||||
else
|
||||
{
|
||||
CvMat m = cvMat( 1, 8, CV_64F, buf );
|
||||
cvRandArr( rng, &m, CV_RAND_NORMAL, cvScalarAll(0), cvScalarAll(4) );
|
||||
CvMat m = cvMat( 1, 8, CV_16S, buf );
|
||||
cvRandArr( rng, &m, CV_RAND_NORMAL, cvScalarAll(0), cvScalarAll(32) );
|
||||
for( i = 0; i < 4; i++ )
|
||||
{
|
||||
l_diff.val[i] = fabs(m.data.db[i]);
|
||||
u_diff.val[i] = fabs(m.data.db[i+4]);
|
||||
l_diff.val[i] = fabs(m.data.s[i]/16.);
|
||||
u_diff.val[i] = fabs(m.data.s[i+4]/16.);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user