title: OpenCV: RNG generates the same numbers
body: <p>I am using <code>OpenCV</code> and I use <code>cv::RNG</code> to generate pick randomly a percent from the images in the list:</p>
  
  <pre><code>void chooseImages(const StringVector&amp; imagesListIn, StringVector&amp; imagesListPartOut)
  {
    imagesListPartOut.clear();
  
    if (m_perecent == 1)
    {
      imagesListPartOut = imagesListIn;
    }
    else
    {
      // copy the imagesListIn for being able to remove the chosed images
      int percent = static_cast&lt;int&gt;(m_perecent * imagesListIn.size() + .5);
  
      cv::RNG randomChooser;
      StringVector listCpy = imagesListIn;
      int index;
      int listSize = imagesListIn.size();
      std::string name;
  
      for (int i = 0; i &lt; percent; i++)
      {
        index = randomChooser.next() % listSize;
        std::cout &lt;&lt; index &lt;&lt; " ";
        name = listCpy[index];
        listCpy.erase(listCpy.begin() + index);
        imagesListPartOut.push_back(name);
        listSize = listCpy.size();
      }
      std::cout &lt;&lt; std::endl;
    }
  }
  </code></pre>
  
  <p>My problem is that it always pick the same images; it always prints the same numbers (<code>cv::RNG</code> always generate the same numbers). How to make it generate different randomly umbers?</p>