{ } Raw JSON

bundles / skimage 0.26.1rc0.dev0+git20260530.b607368ff / skimage / measure / _moments / moments_normalized

function

skimage.measure._moments:moments_normalized

source: /dev/scikit-image/src/skimage/measure/_moments.py :280

Signature

def   moments_normalized ( mu order = 3 spacing = None )

Summary

Calculate all normalized central image moments up to a certain order.

Extended Summary

Note that normalized central moments are translation and scale invariant but not rotation invariant.

Parameters

mu : (M[, ...], M) array

Central image moments, where M must be greater than or equal to order.

order : int, optional

Maximum order of moments. Default is 3.

spacing : tuple of float, shape (ndim,)

The pixel spacing along each axis of the image.

Returns

nu : (``order + 1``[, ...], ``order + 1``) array

Normalized central image moments.

Examples

image = np.zeros((20, 20), dtype=np.float64)
image[13:17, 13:17] = 1
m = moments(image)
centroid = (m[0, 1] / m[0, 0], m[1, 0] / m[0, 0])
mu = moments_central(image, centroid)
moments_normalized(mu)

Aliases

  • skimage.measure.moments_normalized