Exemple #1
0
void ArrayTest::fill_array( int /*test_case_idx*/, int i, int j, Mat& arr )
{
    if( i == REF_INPUT_OUTPUT )
        cvtest::copy( test_mat[INPUT_OUTPUT][j], arr, Mat() );
    else if( i == INPUT || i == INPUT_OUTPUT || i == MASK )
    {
        Scalar low, high;

        get_minmax_bounds( i, j, arr.type(), low, high );
        randUni( ts->get_rng(), arr, low, high );
    }
}
void CvArrTest::fill_array( int /*test_case_idx*/, int i, int j, CvMat* arr )
{
    if( i == REF_INPUT_OUTPUT )
        cvTsCopy( &test_mat[INPUT_OUTPUT][j], arr, 0 );
    else if( i == INPUT || i == INPUT_OUTPUT || i == MASK )
    {
        int type = cvGetElemType( arr );
        CvScalar low, high;

        get_minmax_bounds( i, j, type, &low, &high );
        cvTsRandUni( ts->get_rng(), arr, low, high );
    }
}