l5kit.geometry.image module¶
- l5kit.geometry.image.crop_rectangle_from_image(image: numpy.ndarray, corners: numpy.ndarray) numpy.ndarray ¶
crop_rectangle_from_image
takes an image and 4 corners in pixel coordinates, it returns the sub-image inside that cropped area, rotated upright.- Parameters
image (np.ndarray) – image to crop from
corners (np.ndarray) – corners, array of shape (4,2)
- Returns
crop from input containing the corners
- Return type
np.ndarray