Primitives¶
Legend¶
-
class
ocvproto.primitives.legend.
Legend
(labels: Sequence[str], pos: Tuple[int, int] = None, width: int = None, gap: int = None)¶ Bases:
object
Represents a color-legend for labels.
Parameters: - labels – Strings to get colors for.
- pos – Position (x, y) to place top left legend corner. Default: (20, 20)
- width – Default: 250
- gap – Base gap (also a height for each color stripe). Default: 25
-
put_on
(frame: ocvproto.frame.Frame, *, pos: Tuple[int, int] = None)¶ Applies the legend to the frame.
Parameters: - frame – Frame to apply the legend to.
- pos – Position (x, y) to place top left legend corner. Default: (20, 20)