use cv::theRNG() instead of ::rand() in gpu::solvePnPRansac
(cherry picked from commit 62bc647731cc41d216ad2d96e2572a416ccb6588)
This commit is contained in:
parent
e49e75da06
commit
36924d6dbb
@ -138,14 +138,16 @@ namespace
|
||||
bool was;
|
||||
do
|
||||
{
|
||||
subset[i] = rand() % num_points;
|
||||
subset[i] = cv::theRNG().uniform(0, num_points);
|
||||
was = false;
|
||||
for (int j = 0; j < i; ++j)
|
||||
{
|
||||
if (subset[j] == subset[i])
|
||||
{
|
||||
was = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
} while (was);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user