Blobs.moments#

property Blobs.moments: Any#

Moments of blobs

Returns:

moments of blobs

Return type:

named tuple or list of named tuples

Compute multiple moments of each blob and return them as a named tuple with attributes

Moment type

attribute name

moments

m00 m10 m01 m20 m11 m02 m30 m21 m12 m03

central moments

mu20 mu11 mu02 mu30 mu21 mu12 mu03 |

normalized central moments

nu20 nu11 nu02 nu30 nu21 nu12 nu03 |

Example:

>>> from machinevisiontoolbox import Image
>>> im = Image.Read('shark2.png')
>>> blobs = im.blobs()
>>> blobs[0].moments.m00
7590.5
>>> blobs[0].moments.m10
2817649.1666666665
Seealso:

centroid humoments