Skip to content
Snippets Groups Projects
Commit b4822ee6 authored by mattminder's avatar mattminder
Browse files

bugfix: min/max calculation

parent 9116f721
No related branches found
No related tags found
No related merge requests found
...@@ -146,6 +146,5 @@ def get_bounding_box(im): ...@@ -146,6 +146,5 @@ def get_bounding_box(im):
"""Returns bounding box of object in boolean image""" """Returns bounding box of object in boolean image"""
coords = np.where(im) coords = np.where(im)
min0, min1 = coords.min(axis=0) return np.array([np.min(coords[0]), np.max(coords[0]),
max0, max1 = coords.max(axis=0) np.min(coords[1]), np.max(coords[1])])
return np.array([min0, max0, min1, max1])
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment