(image: np.ndarray, target_resolution: Tuple[int, int])
| 98 | |
| 99 | |
| 100 | def centered_crop(image: np.ndarray, target_resolution: Tuple[int, int]) -> np.ndarray: |
| 101 | return image[ |
| 102 | (image.shape[0] - target_resolution[0]) |
| 103 | // 2 : (image.shape[0] - target_resolution[0]) |
| 104 | // 2 |
| 105 | + target_resolution[0], |
| 106 | (image.shape[1] - target_resolution[1]) |
| 107 | // 2 : (image.shape[1] - target_resolution[1]) |
| 108 | // 2 |
| 109 | + target_resolution[1], |
| 110 | ] |
| 111 | |
| 112 | |
| 113 | def integrate_vector_field( |
no outgoing calls
no test coverage detected