gbvision.utils.drawing package

Submodules

gbvision.utils.drawing.draw_circles module

class gbvision.utils.drawing.draw_circles.DrawCircles(finding_func: Callable[[Optional[numpy.ndarray]], List[Shape]], color: Tuple[int, int, int], *args, **kwargs)[source]

Bases: gbvision.utils.drawing.draw_shapes.DrawShapes

A pipeline that draws all circles according to the given parameters, and returns a copy of the frame after drawing

gbvision.utils.drawing.draw_contours module

class gbvision.utils.drawing.draw_contours.DrawContours(finding_func: Callable[[Optional[numpy.ndarray]], List[Shape]], color: Tuple[int, int, int], *args, **kwargs)[source]

Bases: gbvision.utils.drawing.draw_shapes.DrawShapes

A pipeline that draws all contours according to the given parameters, and returns a copy of the frame after drawing

gbvision.utils.drawing.draw_ellipses module

class gbvision.utils.drawing.draw_ellipses.DrawEllipses(finding_func: Callable[[Optional[numpy.ndarray]], List[Shape]], color: Tuple[int, int, int], *args, **kwargs)[source]

Bases: gbvision.utils.drawing.draw_shapes.DrawShapes

A pipeline that draws all ellipses according to the given parameters, and returns a copy of the frame after drawing

gbvision.utils.drawing.draw_lines module

class gbvision.utils.drawing.draw_lines.DrawLines(finding_func: Callable[[Optional[numpy.ndarray]], List[Shape]], color: Tuple[int, int, int], *args, **kwargs)[source]

Bases: gbvision.utils.drawing.draw_shapes.DrawShapes

A pipeline that draws all lines according to the given parameters, and returns a copy of the frame after drawing

gbvision.utils.drawing.draw_points module

class gbvision.utils.drawing.draw_points.DrawPoints(finding_func: Callable[[Optional[numpy.ndarray]], List[Shape]], color: Tuple[int, int, int], *args, **kwargs)[source]

Bases: gbvision.utils.drawing.draw_shapes.DrawShapes

A pipeline that draws all points according to the given parameters, and returns a copy of the frame after drawing

gbvision.utils.drawing.draw_rects module

class gbvision.utils.drawing.draw_rects.DrawRects(finding_func: Callable[[Optional[numpy.ndarray]], List[Shape]], color: Tuple[int, int, int], *args, **kwargs)[source]

Bases: gbvision.utils.drawing.draw_shapes.DrawShapes

A pipeline that draws all rects according to the given parameters, and returns a copy of the frame after drawing

gbvision.utils.drawing.draw_rotated_rects module

class gbvision.utils.drawing.draw_rotated_rects.DrawRotatedRects(finding_func: Callable[[Optional[numpy.ndarray]], List[Shape]], color: Tuple[int, int, int], *args, **kwargs)[source]

Bases: gbvision.utils.drawing.draw_shapes.DrawShapes

A pipeline that draws all rotated rects according to the given parameters, and returns a copy of the frame after drawing

gbvision.utils.drawing.draw_shapes module

class gbvision.utils.drawing.draw_shapes.DrawShapes(finding_func: Callable[[Optional[numpy.ndarray]], List[Shape]], color: Tuple[int, int, int], *args, **kwargs)[source]

Bases: gbvision.utils.pipeline.PipeLine, abc.ABC

An abstract pipeline class that receives a frame, finds all shapes in a frame using the finding func, draws all shapes on a copy of the frame and returns the copy

Parameters:
  • finding_func – A function that receives a frame and returns a list of the shape, used to find the shapes to draw
  • color – The color to draw with
  • args – Optional additional args to pass to BaseShape.draw_multiple
  • kwargs – Optional additional kwargs to pass to BaseShape.draw_multiple
draw(frame: Optional[numpy.ndarray]) → Optional[numpy.ndarray][source]

Finds the shapes using the finding func and draws them on a copy of the frame

Parameters:frame – The frame to draw on
Returns:A copy of the frame, with all the shapes drawn on it

Module contents