title: Can cv2.polylines return the coordinates of every point that form the line?
body: <p>OpenCV Python API has a method called <a href="https://docs.opencv.org/2.4/modules/core/doc/drawing_functions.html#cv2.polylines" rel="nofollow noreferrer"><code>cv2.polylines</code></a>, just like this.</p>
  
  <p>Some example:</p>
  
  <pre><code>import cv2
  import numpy as np
  im = np.zeros((1000,900), dtype="uint8")
  coords = [[0,0], [0,500],[500,500]]
  coords_array = np.array([coords], dtype=np.int32)
  cv2.polylines(im, coords_array, 1, 255)
  cv2.imshow('image',im)
  cv2.waitKey(0)
  </code></pre>
  
  <p>Can OpenCV return all the points that form the triangle that I draw rather than three vertices? I know an algorithm called <a href="https://en.wikipedia.org/wiki/Bresenham%27s_line_algorithm" rel="nofollow noreferrer">Bresenham's line algorithm</a> is built for this purpose, but I don't know if OpenCV has this algorithm implemented in its <code>cv2.polyline</code> method. And so I don't know the set of points I get from Bresenham's line algorithm is the same as the outline of triangle.</p>