Blobs.bbox#

property Blobs.bbox: Any#

Bounding box

Returns:

bounding

Return type:

ndarray(4)

The axis-aligned bounding box is a 1D array [umin, umax, vmin, vmax].

Example:

>>> from machinevisiontoolbox import Image
>>> im = Image.Read('shark2.png')
>>> blobs = im.blobs()
>>> blobs[0].bbox
array([299, 444, 300, 407])
>>> blobs.bbox
[array([299, 444, 300, 407]), array([ 99, 244, 100, 207])]

Note

The bounding box is the smallest box with vertical and horizontal edges that fully encloses the blob.

Seealso:

umin vmin umax umax,