l5kit.visualization.utils module¶
- l5kit.visualization.utils.draw_arrowed_line(on_image: numpy.ndarray, position: numpy.ndarray, yaw: float, rgb_color: Tuple[int, int, int]) None ¶
Draw a single arrowed line in an RGB image :param on_image: the RGB image to draw onto :type on_image: np.ndarray :param position: the starting position of the arrow :type position: np.ndarray :param yaw: the arrow orientation :type yaw: float :param rgb_color: the arrow color :type rgb_color: Tuple[int, int, int]
Returns: None
- l5kit.visualization.utils.draw_reference_trajectory(on_image: numpy.ndarray, world_to_pixel: numpy.ndarray, positions: numpy.ndarray) None ¶
Draw a trajectory (as points) onto the image :param on_image: the RGB image to draw onto :type on_image: np.ndarray :param world_to_pixel: 3x3 matrix from meters to ego pixel space :type world_to_pixel: np.ndarray :param positions: positions as 2D absolute meters coordinates :type positions: np.ndarray
Returns: None
- l5kit.visualization.utils.draw_trajectory(on_image: numpy.ndarray, positions: numpy.ndarray, rgb_color: Tuple[int, int, int], radius: int = 1, yaws: Optional[numpy.ndarray] = None) None ¶
Draw a trajectory on oriented arrow onto an RGB image :param on_image: the RGB image to draw onto :type on_image: np.ndarray :param positions: pixel coordinates in the image space (not displacements) (Nx2) :type positions: np.ndarray :param rgb_color: the trajectory RGB color :type rgb_color: Tuple[int, int, int] :param radius: radius of the circle :type radius: int :param yaws: yaws in radians (N) or None to disable yaw visualisation :type yaws: Optional[np.ndarray]
Returns: None