vuba.shrink
- vuba.shrink(img, by=50)[source]
Mask an image to a new roi.
- Parameters
img (ndarray) – Grayscale image to reduce the roi for.
by (int) – Number of pixels to reduce roi by, default is 50.
- Returns
img – Image with reduced roi.
- Return type
ndarray
- Raises
ValueError – If the supplied image is not grayscale.
Notes
This function will shrink the roi by a uniform amount on all four sides of an image, and not to a specific region within the image.
See also
Mask
,rect_mask
,circle_mask
,contouer_mask