IVALab Python Libraries
Collection of code for computer vision and robotics with specific API.
|
Functions | |
def | draw_contour (bm, img=None, color=(0, 255, 0), thick=3) |
def | draw_dots (img, coords, color=[0, 255, 0], radius=20) |
Variables | |
bm = np.zeros((100, 100), dtype=bool) | |
def | contour_map = draw_contour(bm, thick=3) |
def | contour_map_2 = draw_contour(bm, img, thick=3) |
dot_coords | |
img = np.round(np.random.rand(bm.shape[0], bm.shape[1], 3) * 255).astype(np.uint8) | |
def | img_dots = draw_dots(img, dot_coords, radius=5) |
@brief The image/plotting-related utility functions @author: Yiye Chen, yychen2019@gatech.edu @date: 04/20/2022
def Surveillance.utils.imgs.draw_contour | ( | bm, | |
img = None , |
|||
color = (0, 255, 0) , |
|||
thick = 3 |
|||
) |
Draw all the countours of a binary image Args: bm (array, (H, W)): The binary map img (array, (H, W, 3)): The RGB image to plot the contour. If None, then will plot on the binary mask color ((3, )): The RGB color of the contour thick (int): The thickness of the contour in pixel Returns: im (array, (H, W, 3)): An RGB image containing the contour
def Surveillance.utils.imgs.draw_dots | ( | img, | |
coords, | |||
color = [0, 255, 0] , |
|||
radius = 20 |
|||
) |
Draw a set of dots on the image Args: img (array): The image to draw the coordinates. Currently only accept rgb input coords (N, 2): The coordinates of the dots in the OpenCV style color (3,): The rgb color of the dots radius (int): The radius of the dots Returns: img_plot (array): The image with the dots plotted
bm = np.zeros((100, 100), dtype=bool) |
def contour_map = draw_contour(bm, thick=3) |
def contour_map_2 = draw_contour(bm, img, thick=3) |
img = np.round(np.random.rand(bm.shape[0], bm.shape[1], 3) * 255).astype(np.uint8) |
def img_dots = draw_dots(img, dot_coords, radius=5) |