title: Converting point2d to Mat
body: <p>How can I convert vector&lt;Point2d> to Mat. </p>
  
  <pre><code>     Mat newImg = Mat(ImagePoints);
       imwrite("E:/softwares/1.8.0.71/bin/newImg.png", newImg); 
  </code></pre>
  
  <p>This is not working since imWrite() will only accept channel 1 or 3 or 4 and the Image Points are 2 channel.</p>
  
  <p>I am using OpenCV version 3. </p>