force each histogram dimension to be >= 1

This commit is contained in:
Vadim Pisarevsky 2010-10-21 12:54:52 +00:00
parent c209013da8
commit fe88a55b42

View File

@ -174,7 +174,7 @@ void CV_BaseHistTest::get_hist_params( int /*test_case_idx*/ )
for( i = 0; i < cdims; i++ ) for( i = 0; i < cdims; i++ )
{ {
dims[i] = cvTsRandInt(rng) % (max_dim_size + 1) + 1; dims[i] = cvTsRandInt(rng) % (max_dim_size + 2) + 2;
if( !uniform ) if( !uniform )
dims[i] = MIN(dims[i], max_ni_dim_size); dims[i] = MIN(dims[i], max_ni_dim_size);
total_size *= dims[i]; total_size *= dims[i];