I am a newbie in using OpenCV. I am trying to generate a column vector (say of size 10x1) initialized to zeros and fill five randomly selected elements of this vector with some non-zero values. To choose the five random indices, I have to generate an array of 5 integers, in which, each element ranging between 0-9. Then I can fill some non-zero value at each of these randomly generated positions. Is there some way to generate an array of random integers in which the range of integers can be restricted.?