get_bounding_box¶
tiatoolbox
.utils
.misc
.get_bounding_box
- get_bounding_box(img)[source]¶
Get bounding box coordinate information.
Given an image with zero and non-zero values. This function will return the minimal box that contains all non-zero values.
- Parameters:
img (ndarray) – Image to get the bounding box.
- Returns:
Coordinates of the box in the form of [start_x, start_y, end_x, end_y].
- Return type:
bound (ndarray)