Commit 36924d6d authored by Vladislav Vinogradov's avatar Vladislav Vinogradov Committed by Alexander Smorkalov

use cv::theRNG() instead of ::rand() in gpu::solvePnPRansac

(cherry picked from commit 62bc6477)
parent e49e75da
...@@ -138,14 +138,16 @@ namespace ...@@ -138,14 +138,16 @@ namespace
bool was; bool was;
do do
{ {
subset[i] = rand() % num_points; subset[i] = cv::theRNG().uniform(0, num_points);
was = false; was = false;
for (int j = 0; j < i; ++j) for (int j = 0; j < i; ++j)
{
if (subset[j] == subset[i]) if (subset[j] == subset[i])
{ {
was = true; was = true;
break; break;
} }
}
} while (was); } while (was);
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment