Image.blobs#
- Image.blobs(**kwargs) Blobs[source]#
Find and describe blobs in image
- Returns:
blobs in the image
- Return type:
Find all blobs in the image and return an object that contains geometric information about them. The object behaves like a list so it can be indexed and sliced.
Example:
>>> from machinevisiontoolbox import Image >>> im = Image.Read('shark2.png') >>> blobs = im.blobs() >>> type(blobs) <class 'machinevisiontoolbox.ImageBlobs.Blobs'> >>> len(blobs) 2 >>> print(blobs) ┌────┬────────┬──────────────┬──────────┬───────┬───────┬────────┬────────┬────────┐ │ id │ parent │ centroid │ area │ touch │ perim │ circul │ orient │ aspect │ ├────┼────────┼──────────────┼──────────┼───────┼───────┼────────┼────────┼────────┤ │ 0 │ -1 │ 371.2, 355.2 │ 7.59e+03 │ False │ 556.6 │ 0.343 │ 168.3° │ 0.584 │ │ 1 │ -1 │ 171.2, 155.2 │ 7.59e+03 │ False │ 556.6 │ 0.343 │ 168.3° │ 0.584 │ └────┴────────┴──────────────┴──────────┴───────┴───────┴────────┴────────┴────────┘
- References:
P. Corke, Robotics, Vision & Control for Python, Springer, 2023, Section 12.1.2.1.
- Seealso: