skimage2.measure.inertia_tensor_eigvals#

skimage2.measure.inertia_tensor_eigvals(image, mu=None, T=None, *, spacing=None)[source]#

Compute the eigenvalues of the inertia tensor of the image.

The inertia tensor measures covariance of the image intensity along the image axes. (See inertia_tensor.) The relative magnitude of the eigenvalues of the tensor is thus a measure of the elongation of a (bright) object in the image.

Parameters:
imagearray

The input image.

muarray, optional

The pre-computed central moments of image.

Tarray, shape (image.ndim, image.ndim)

The pre-computed inertia tensor. If T is given, mu and image are ignored.

spacingtuple of float, shape (ndim,)

The pixel spacing along each axis of the image.

Returns:
eigvalslist of float, length image.ndim

The eigenvalues of the inertia tensor of image, in descending order.

Notes

Computing the eigenvalues requires the inertia tensor of the input image. This is much faster if the central moments (mu) are provided, or, alternatively, one can provide the inertia tensor (T) directly.