Blobs.humoments#

Blobs.humoments(**kwargs: Any) Any#

Hu image moment invariants of blobs

Returns:

Hu image moments

Return type:

ndarray(7) or ndarray(N,7)

Computes the seven Hu image moment invariants of the image. These are a robust shape descriptor that is invariant to position, orientation and scale.

Example:

>>> from machinevisiontoolbox import Image
>>> im = Image.Read('shark2.png')
>>> blobs = im.blobs()
>>> blobs[0].humoments()
array([0.2135, 0.011 , 0.0004, 0.0002, 0.    , 0.    , 0.    ])
Seealso:

moments