-
Notifications
You must be signed in to change notification settings - Fork 119
Open
Description
def _crop_to_bounding_box(mask, bbox_min, bbox_max):
"""Crops a 2D or 3D mask to the bounding box specified by bbox_{min,max}."""
we need to zeropad the cropped region with 1 voxel at the lower,
the right (and the back on 3D) sides. This is required to obtain the
"full" convolution result with the 2x2 (or 2x2x2 in 3D) kernel.
TODO: This is correct only if the object is interior to the
bounding box.
cropmask = np.zeros((bbox_max - bbox_min) + 2, np.uint8)
TODO ......
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels