title: How to draw a polygon using OpenCV?
body: <p>I have 4 coordinates pertaining to pixel of an image. 
  Say (x1,y1), (x2,y2), (x3,y3) and (x4,y4).
  How can I draw the polygon which passes along those 4 coordinates? </p>
  
  <pre><code>void cvFillPoly(CvArr* img, CvPoint** pts, int* npts, int contours, CvScalar color, int lineType=8, int shift=0)
  </code></pre>
  
  <p>Fills a polygon’s interior.</p>
  
  <p>Parameters: 
  img – Image</p>
  
  <p>pts – Array of pointers to polygons</p>
  
  <p>npts – Array of polygon vertex counters</p>
  
  <p>contours – Number of contours that bind the filled region</p>
  
  <p>color – Polygon color</p>
  
  <p>lineType – Type of the polygon boundaries, see Line description</p>
  
  <p>shift – Number of fractional bits in the vertex coordinates</p>
  
  <p>This is the information. How and where can I put my coordinates.?? </p>
  
  <p>Can anyone explain with the code? </p>