tiatoolbox . utils . transforms . pad_bounds
tiatoolbox
utils
transforms
pad_bounds
Add padding to bounds.
bounds (tuple(int)) – Iterable of integer bounds. Must be even in length with the dirst half as starting values and the second half as end values, e.g. (start_x, start_y, stop_x, stop_y).
padding (int) – Padding to add to bounds.
Tuple[int, int, int, int]
Examples
>>> pad_bounds((0, 0, 0, 0), 1)
Tuple of bounds with padding to the edges.
tuple(int)
bounds (Tuple[int, int, int, int]) –
padding (Union[int, Tuple[int, int], Tuple[int, int, int, int]]) –