1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-30 07:43:03 +04:00

remove some rand functions

* make test more reproducible
This commit is contained in:
Tomoaki Teshima
2017-07-20 22:43:11 +09:00
parent dcb3c4ff1e
commit e63d628677
5 changed files with 11 additions and 23 deletions
+2 -2
View File
@@ -389,11 +389,11 @@ bool Core_EigenTest::check_full(int type)
{
const int MAX_DEGREE = 7;
srand((unsigned int)time(0));
RNG rng = ::theRNG(); // fix the seed
for (int i = 0; i < ntests; ++i)
{
int src_size = (int)(std::pow(2.0, (rand()%MAX_DEGREE)+1.));
int src_size = (int)(std::pow(2.0, (rng.uniform(0, MAX_DEGREE) + 1.)));
cv::Mat src(src_size, src_size, type);