draw¶
drawing utilities.
Functions
Draws lines on an image. |
|
Draws points on an image. |
|
Draws a skeleton pose on an image. |
|
Returns a palette of colours between [0, 1]. |
- draw_lines(image, start_points, end_points, colors=None, thickness=3)[source]¶
Draws lines on an image.
- Parameters:
image (
Image)start_points (
ndarray) – [N, 2]end_points (
ndarray) – [N, 2]colors (
Optional[ndarray]) – [N, C]thickness (
int)
- Return type:
Image- Returns:
- draw_points(image, points, colors=None, radius=2, thickness=1)[source]¶
Draws points on an image.
- Parameters:
image (
Image)points (
ndarray) – [N, 2]colors (
Optional[ndarray]) – [N, C]radius (
int)thickness (int)
- Return type:
Image- Returns:
- draw_pose(image, points, edges, confidences=None, circle_colors=None, circle_radius=2, circle_thickness=1, line_colors=None, line_thickness=3)[source]¶
Draws a skeleton pose on an image.
- Parameters:
image (
Image) – [H, W, C]points (
ndarray) – [N, 2]confidences (
Optional[ndarray]) – [N, 1]edges (
Tuple[Tuple[int,int],...]) – [M, 2]circle_colors (
Optional[ndarray]) – [N, C]circle_radius (
int)circle_thickness (
int)line_colors (
Optional[ndarray]) – [M, C]line_thickness (
int)
- Return type:
Image- Returns:
[H, W, C]