[opencv] 09/33: NearestNeighborTest: use ts->get_rng() instead of (implicit) theRNG()

Mattia Rizzolo mattia at debian.org
Tue Oct 4 17:51:03 UTC 2016


This is an automated email from the git hooks/post-receive script.

mattia pushed a commit to annotated tag 2.4.12.2
in repository opencv.

commit 3231c2f99562eb115296f1432a734fc23b333861
Author: Roman Donchenko <roman.donchenko at itseez.com>
Date:   Thu Jul 30 18:03:48 2015 +0300

    NearestNeighborTest: use ts->get_rng() instead of (implicit) theRNG()
    
    This ensures that test data is not dependent on the order the tests are
    executed in.
    
    (cherry picked from commit 1245cd175283b11800bbbdc52287957cc3d76417)
---
 modules/features2d/test/test_nearestneighbors.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/features2d/test/test_nearestneighbors.cpp b/modules/features2d/test/test_nearestneighbors.cpp
index 2c64e64..b63bc64 100644
--- a/modules/features2d/test/test_nearestneighbors.cpp
+++ b/modules/features2d/test/test_nearestneighbors.cpp
@@ -125,7 +125,7 @@ int NearestNeighborTest::checkFind( const Mat& data )
 void NearestNeighborTest::run( int /*start_from*/ ) {
     int code = cvtest::TS::OK, tempCode;
     Mat desc( featuresCount, dims, CV_32FC1 );
-    randu( desc, Scalar(minValue), Scalar(maxValue) );
+    ts->get_rng().fill( desc, RNG::UNIFORM, minValue, maxValue );
 
     createModel( desc );
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/opencv.git



More information about the debian-science-commits mailing list