force each histogram dimension to be >= 1
authorVadim Pisarevsky <no@email>
Thu, 21 Oct 2010 12:54:52 +0000 (12:54 +0000)
committerVadim Pisarevsky <no@email>
Thu, 21 Oct 2010 12:54:52 +0000 (12:54 +0000)
tests/cv/src/ahistograms.cpp

index e44ac4a..0daeb5a 100644 (file)
@@ -174,7 +174,7 @@ void CV_BaseHistTest::get_hist_params( int /*test_case_idx*/ )
     
     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 )
             dims[i] = MIN(dims[i], max_ni_dim_size);    
         total_size *= dims[i];