Crops the images according to the crop parameters. Args: images: RGB or depth images, shape (H, W, 3) or (H, W). crop_params: Crop parameters. Returns: Cropped images.
(*images: np.ndarray, crop_params: CropParams)
| 122 | return image[crop_params.top:crop_params.bottom, crop_params.left:crop_params.right] |
| 123 | |
| 124 | def crop_images(*images: np.ndarray, crop_params: CropParams) -> Tuple[np.ndarray]: |
| 125 | """Crops the images according to the crop parameters. |
| 126 | |
| 127 | Args: |
| 128 | images: RGB or depth images, shape (H, W, 3) or (H, W). |
| 129 | crop_params: Crop parameters. |
| 130 | |
| 131 | Returns: |
| 132 | Cropped images. |
| 133 | """ |
| 134 | return tuple(crop_image(image, crop_params) for image in images) |
| 135 | |
| 136 | def crop_black_or_white_border(rgb_image, *other_images: np.ndarray, tolerance=0.1, cut_off=20, level_diff_threshold=5) -> Tuple[np.ndarray]: |
| 137 | """Crops the white and black border of the RGB and depth images. |
no test coverage detected