Add function setRNGSeed and seed setup in python tests

This commit is contained in:
Vladislav Sovrasov
2016-03-25 16:17:58 +03:00
parent 05384f05cc
commit a490b64e9b
3 changed files with 15 additions and 0 deletions

View File

@@ -734,6 +734,12 @@ cv::RNG& cv::theRNG()
return getCoreTlsData().get()->rng;
}
void cv::setRNGSeed(int seed)
{
getCoreTlsData().get()->rng.state = static_cast<uint64>(seed);
}
void cv::randu(InputOutputArray dst, InputArray low, InputArray high)
{
theRNG().fill(dst, RNG::UNIFORM, low, high);