cv3.draw.points
- cv3.draw.points(img: array, pts: List[List], *args, **kwargs) array[source]
Draw multiple points on an image. See
point()for more details.- Parameters:
- Returns:
Image with all points drawn on it.
- Return type:
numpy.ndarray
Note
Each point in the pts list should contain the parameters needed for the point function (x0, y0, r, etc.).
Relative coordinates are in the range [0, 1] where 0 is the top/left and 1 is the bottom/right of the image.
Example
>>> import cv3 >>> img = cv3.zeros(100, 100, 3) >>> # Draw multiple points >>> points = [ ... [10, 10], ... [40, 40], ... [70, 70] ... ] >>> img = cv3.points(img, points, color='red') >>> # Draw multiple points with relative radius based on image width >>> points = [ ... [0.2, 0.2], ... [0.5, 0.5], ... [0.8, 0.8] ... ] >>> img = cv3.points(img, points, r=0.1, rel=True, r_mode='w', color='blue')