mirror of
https://github.com/opencv/opencv.git
synced 2025-06-07 09:25:45 +08:00
use cv::theRNG() instead of ::rand() in gpu::solvePnPRansac
This commit is contained in:
parent
b9792fdc14
commit
62bc647731
@ -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…
Reference in New Issue
Block a user