From fe88a55b42fb7827e347e27ae27919991e2e8e90 Mon Sep 17 00:00:00 2001 From: Vadim Pisarevsky Date: Thu, 21 Oct 2010 12:54:52 +0000 Subject: [PATCH] force each histogram dimension to be >= 1 --- tests/cv/src/ahistograms.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/cv/src/ahistograms.cpp b/tests/cv/src/ahistograms.cpp index e44ac4a989..0daeb5a95b 100644 --- a/tests/cv/src/ahistograms.cpp +++ b/tests/cv/src/ahistograms.cpp @@ -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];