title: reading an array of images in c++ (using opencv)
body: <p>I want to read an array of images in c++ and I wrote this sample code:</p>
  
  <pre><code>std::vector&lt;Mat&gt; ReadInputImages()
  {
      Mat tmp1=imread("C:/tmp/im1.jpg");
      Mat tmp2=imread("C:/tmp/im2.jpg");
      Mat tmp3=imread("C:/tmp/im3.jpg");
      Mat tmp4=imread("C:/tmp/im4.jpg");
      std::vector&lt;Mat&gt; images;
      images={tmp1,tmp2,tmp3,tmp4};
      return images;
  }
  </code></pre>
  
  <p>But it doesn't work and I am getting compiler error on </p>
  
  <pre><code>   images={tmp1,tmp2,tmp3,tmp4};
  </code></pre>
  
  <p>What is the best way to return an array of images from a function.</p>