You can set seed for OpenCV functions using using the following snippet:
cv::theRNG().state = seed;
There is a subtlety for multithreaded programs - OpenCV uses thread-local random number generators so you need (re)set seed from the same thread.