| Inertia2dData = | greyInertiaMsr2d (inImg) |
| Inertia2dData = | greyInertiaMsr2d (inImg,inMaskImg) |
Computes the global inertia based on the grey levels of the input 2D image.
This algorithm computes the second order central moment for the entire image, ponderated by the pixels intensities, thanks to the inertia matrix
.
Whose components are computed as follows :
Where
is the image intensity at the position
,
and
are the grey barycenter coordinates and
is the set of pixel coordinates in the image.
From these composents, three descriptors are extracted : the minimum and maximum eigen values of
(
and
) and the global orientation
.
These features are calculated as follows :
and
are proportional to the squared length of the eigenvector axes, represented by green arrows in the figure below.
Here is an example of result for a grey level image: