diff --git a/modules/features2d/src/kaze/AKAZEFeatures.cpp b/modules/features2d/src/kaze/AKAZEFeatures.cpp index 39f3d3607a..14365d3cdd 100644 --- a/modules/features2d/src/kaze/AKAZEFeatures.cpp +++ b/modules/features2d/src/kaze/AKAZEFeatures.cpp @@ -2077,7 +2077,7 @@ void generateDescriptorSubsample(Mat& sampleList, Mat& comparisons, int nbits, } } - srand(1024); + RNG rng(1024); Mat_ comps = Mat_(nchannels * (int)ceil(nbits / (float)nchannels), 2); comps = 1000; @@ -2089,7 +2089,7 @@ void generateDescriptorSubsample(Mat& sampleList, Mat& comparisons, int nbits, samples = -1; for (int i = 0; i < npicks; i++) { - int k = rand() % (fullM.rows - i); + int k = rng(fullM.rows - i); if (i < 6) { // Force use of the coarser grid values and comparisons k = i;