Commit 62bc6477 authored by Vladislav Vinogradov's avatar Vladislav Vinogradov

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

parent b9792fdc
...@@ -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