ntt.draw package#
Submodules#
ntt.draw.polygone module#
- ntt.draw.polygone.draw_polygones(frame: ndarray, points: Tuple[Tuple] = [[0, 0], [0, 1], [1, 1], [1, 0]], couleur: Tuple[int, int, int] = (0, 0, 255), epaisseur: int = 2) None#
Ajoute a la frame un polygone du degrès de la taille de points, à l’epaisseur et couleur choisit. Les points seront relier dans leurs ordre dans le paramètre points.
- Parameters:
frame (np.ndarray) – _description_
points (Tuple[Tuple], optional) – _description_. Defaults to [[0,0],[0,1],[1,1],[1,0]].
couleur (Tuple[int, int, int], optional) – _description_. Defaults to (0, 0, 255).
epaisseur (int) – epaisseur du tracé
ntt.draw.primitives module#
- ntt.draw.primitives.draw_bright_circle(image: ndarray, center: Tuple, radius: int, brightness_factor=50)#
enhance a given circular region in the image with a brightness factor
- ntt.draw.primitives.draw_crosshair(frame: ndarray, x: int, y: int, size=20, thickness=2, color=(0, 255, 0))#
draw a crosshair on the image
- ntt.draw.primitives.draw_grid(frame, rows: int, cols: int)#
- ntt.draw.primitives.draw_line(frame: ndarray, start_point: Tuple[int, int] = (10, 10), end_point: Tuple[int, int] = (100, 100), color: Tuple[int, int, int] = (0, 0, 255)) None#
draw a line given 2 points
- ntt.draw.primitives.draw_rectangle(frame: ndarray, posXY: Tuple[int, int] = (10, 10, 30, 30), color: Tuple[int, int, int] = (0, 0, 255)) None#
draw a rectangle given 2 points
- ntt.draw.primitives.write_text(frame: ndarray, text: str = 'Text', posXY: Tuple[int, int] = (10, 50), color: Tuple[int, int, int] = (0, 0, 255), thickness: int = 2) None#
write some text at a given position