I want to run the rand function, but I cannot do it.
srand(time(NULL));
Mat mymat = Mat::zeroes(1024,1024,CV_32F);
randn(mymat,0,1);
Should not that give me a random mat with a name mymat, mean = 0which mean = 0, as well variance = 1? However, it gives the same one mymatat every start.
Here is a link for randn that claims srand works.
I tried to give different numbers instead of time (NULL), but everyone has the same output random numbers. I checked the same with another machine, it produces the same result with the first machine. So sowing does not work.
Thanks,
source
share