Draw¶
-
labvision.images.draw.
draw_filled_polygon
(im, points, color=(0, 0, 255))¶ Adds a filled polygon to an image
Parameters: - im – np.ndarrary of dtype np.uint8
- points – N, 2 ndarray of corner points
- color – BGR color tuple or images library color
Returns: im: ndarray
-
labvision.images.draw.
draw_circle
(im, cx, cy, rad, color=(0, 255, 255), thickness=2)¶ Draw Circle NEEDS DOCSTRING
Parameters: - im –
- cx –
- cy –
- rad –
- color –
- thickness –
Returns:
-
labvision.images.draw.
draw_circles
(im, circles, color=(0, 255, 255), thickness=2)¶ NEEDS DOCSTRING
Parameters: - im –
- circles –
- color –
- thickness –
Returns:
-
labvision.images.draw.
draw_circles_with_scale
(im, circles, values, cmap=<sphinx.ext.autodoc.importer._MockObject object>, thickness=2)¶ NEEDS DOCSTRING
Parameters: - im –
- circles –
- values –
- cmap –
- thickness –
Returns:
-
labvision.images.draw.
draw_delaunay_tess
(im, points)¶ Draws the delaunay tesselation for a set of points on an image
Parameters: - im (input image) – Any number of channels
- points (array of N points) – Shape (N, 2). points[:, 0] contains x coordinates points[:, 1] contains y coordinates
Returns: in – Same shape and type as input image
Return type: annotated image
-
labvision.images.draw.
draw_polygon
(im, vertices, color=(0, 0, 255), thickness=1)¶ Draws a polygon on an image from a list of vertices
Parameters: - im (input image) – Any number of channels
- vertices (array of N vertices) –
- Shape (N, 2) where
- vertices[:, 0] contains x coordinates vertices[:, 1] contains y coordinates
- color (BGR tuple) – if input image is grayscale then circles will be black
- thickness (int) – Thickness of the lines
Returns: out – Same shape and type as input image
Return type: output image
-
labvision.images.draw.
draw_polygons
(im, polygons, color=(0, 0, 255))¶ Draws multiple polygons on an image from a list of polygons
Parameters: - im (input image) – Any number of channels
- polygons (array containing coordinates of polygons) – shape is (P, N, 2) where P is the number of polygons, N is the number of vertices in each polygon. [:, :, 0] contains x coordinates, [:, :, 1] contains y coordinates.
- color (BGR tuple) –
Returns: img – Same shape and type as input image
Return type: annotated image
-
labvision.images.draw.
draw_voronoi_cells
(im, points)¶ Draws the voronoi cells for a set of points on an image
Parameters: - im (input image) – Any number of channels
- points (array of N points) – Shape (N, 2). points[:, 0] contains x coordinates points[:, 1] contains y coordinates
Returns: im – Same shape and type as input image
Return type: annotated image
-
labvision.images.draw.
draw_contours
(im, contours, col=(0, 0, 255), thickness=1)¶ NEEDS DOCSTRING
Parameters: - im –
- contours –
- col –
- thickness –
Returns: