diplomat.utils.shapes.CV2DotShapeDrawer
- class diplomat.utils.shapes.CV2DotShapeDrawer(img: ndarray, color: Tuple[int, int, int, int], line_thickness: int = 1, line_type: int = 8)[source]
Bases:
DotShapeDrawerA shape dot or marker implementation that utilizes opencv2 for drawing. It can draw to images stored as 2D numpy arrays.
- __init__(img: ndarray, color: Tuple[int, int, int, int], line_thickness: int = 1, line_type: int = 8)[source]
Create a cv2 marker, or shape drawer.
- Parameters:
img – The image to draw results onto, a 2D numpy array, indexed by y coordinate first.
color – The color of the dots to be drawn. Should be a tuple of 4 integers between 0 and 255 being the rgba color.
line_thickness – The thickness of the border of the dots.
line_type – The type of line to ask cv2 to draw.
Methods
__init__(img, color[, line_thickness, line_type])Create a cv2 marker, or shape drawer.
Attributes
SHAPE_TYPES