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.);
|
l_diff = u_diff = cvScalarAll(0.);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
CvMat m = cvMat( 1, 8, CV_64F, buf );
|
CvMat m = cvMat( 1, 8, CV_16S, buf );
|
||||||
cvRandArr( rng, &m, CV_RAND_NORMAL, cvScalarAll(0), cvScalarAll(4) );
|
cvRandArr( rng, &m, CV_RAND_NORMAL, cvScalarAll(0), cvScalarAll(32) );
|
||||||
for( i = 0; i < 4; i++ )
|
for( i = 0; i < 4; i++ )
|
||||||
{
|
{
|
||||||
l_diff.val[i] = fabs(m.data.db[i]);
|
l_diff.val[i] = fabs(m.data.s[i]/16.);
|
||||||
u_diff.val[i] = fabs(m.data.db[i+4]);
|
u_diff.val[i] = fabs(m.data.s[i+4]/16.);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user