title: I have mistake "approxPolyDP(ROI_Vertices, ROI_Poly, 1.0, true)" in OpenCV
body: <p>I don't know what I've done wrong.</p>
  
  <pre><code>Mat mask(img.size(), CV_8UC1, Scalar::all(0));
  
  // Create Polygon from vertices
  vector&lt;Point&gt; ROI_Vertices(4);
  ROI_Vertices.push_back(Point(196,40));
  ROI_Vertices.push_back(Point(47,450));
  ROI_Vertices.push_back(Point(204,450));
  ROI_Vertices.push_back(Point(275,40));
  
  vector&lt;Point&gt; ROI_Poly;
  
  approxPolyDP(ROI_Vertices, ROI_Poly, 1.0, true);
  
  // Fill polygon white
  fillConvexPoly(mask, &amp;ROI_Poly[0], ROI_Poly.size(), 255, 8, 0);
  
  // Create new image for result storage
  Mat resImage(480, 640, CV_8UC3);
  
  // Cut out ROI and store it in imageDest
  img.copyTo(resImage, mask);
      imshow("h",img);
      imshow("hh",resImage);
  </code></pre>
  
  <p>I think my program recognize<br>
   ROI_Vertices have Point(0,0)</p>
  
  <p>How can I fix this?</p>