fix random search

using cv::RNG() for random number generation