get_crop¶
-
behavenet.plotting.get_crop(im, y_0, y_ext, x_0, x_ext)[source]¶ Get crop of image, filling in borders with zeros.
- Parameters
im (
np.ndarray) – input imagey_0 (
int) – y-pixel center valuey_ext (
int) – y-pixel extent; crop in y-direction will be [y_0 - y_ext, y_0 + y_ext]x_0 (
int) – y-pixel center valuex_ext (
int) – x-pixel extent; crop in x-direction will be [x_0 - x_ext, x_0 + x_ext]
- Returns
cropped image
- Return type
np.ndarray