Skip to content

Commit 15aa0df

Browse files
committed
Merge pull request opencv#9297 from alalek:akaze_remove_rand
2 parents 3166d0c + 8be1ba7 commit 15aa0df

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

modules/features2d/src/kaze/AKAZEFeatures.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2133,7 +2133,7 @@ void generateDescriptorSubsample(Mat& sampleList, Mat& comparisons, int nbits,
21332133
}
21342134
}
21352135

2136-
srand(1024);
2136+
RNG rng(1024);
21372137
Mat_<int> comps = Mat_<int>(nchannels * (int)ceil(nbits / (float)nchannels), 2);
21382138
comps = 1000;
21392139

@@ -2145,7 +2145,7 @@ void generateDescriptorSubsample(Mat& sampleList, Mat& comparisons, int nbits,
21452145
samples = -1;
21462146

21472147
for (int i = 0; i < npicks; i++) {
2148-
int k = rand() % (fullM.rows - i);
2148+
int k = rng(fullM.rows - i);
21492149
if (i < 6) {
21502150
// Force use of the coarser grid values and comparisons
21512151
k = i;

0 commit comments

Comments
 (0)