title: How to convert MatOfPoint to MatOfPoint2f in opencv java api
body: <p>I'm trying to implement the example code of the following 
  <a href="https://stackoverflow.com/questions/8667818/opencv-c-obj-c-detecting-a-sheet-of-paper-square-detection/">question</a>
  by using opencv java api. To implement <code>findContours(gray, contours, CV_RETR_LIST, CV_CHAIN_APPROX_SIMPLE);</code> in java i used this syntax <code>Imgproc.findContours(gray, contours, new Mat(), Imgproc.RETR_LIST, Imgproc.CHAIN_APPROX_SIMPLE);</code>. </p>
  
  <p>So now contours should be <code>List&lt;MatOfPoint&gt; contours =   new ArrayList&lt;MatOfPoint&gt;();</code> rather than <code>vector&lt;vector&lt;cv::Point&gt; &gt; contours;</code>. </p>
  
  <p>Then i need implement this <code>approxPolyDP(Mat(contours[i]), approx, arcLength(Mat(contours[i]), true)*0.02, true);</code>. In java api, Imgproc.approxPolyDP accept argument as <code>approxPolyDP(MatOfPoint2f curve, MatOfPoint2f approxCurve, double epsilon, boolean closed)</code>. How i can i convert MatOfPoint to MatOfPoint2f? </p>
  
  <p>Or is there a way to use vectors as same as c++ interface to implement this. Any suggestion or sample code is greatly appreciated.  </p>