Normalized Central Moments and 7 Moments of Hu: Moment Based Features, Moment Invariants
Normalized Central Moments and 7 Moments of Hu: Moment Based Features, Moment Invariants
7. Appendix
Introduction to Feature extraction
Feature Extraction
Characterization of Shape
One of the basic problems in the design of any pattern recognition system is the selection of a set
of appropriate features to be extracted from the object of interest/region of interest(ROI).
Describing digit images with moments instead of other more commonly used pattern recognition
features means that global properties of the digit image are used rather than local properties.
Moments functions in image processing are used for invariant pattern recognition, object
classification,etc.. A set of moments represent global characteristics providing information on
geometrical features or the shape descriptors of an image.
In image processing, moment functions can provide information such as total image area,
coordinates of the image centroid and the orientation which can further be used to describe the
feature vectors that are invariant w.r.t transformations like translation,scaling and rotation.
Moment Functions, Moments and order of moments
Moments of different orders are used to characterize and analyze probability distributions and
stochastic processes, offering insights beyond the basic mean and variance. Higher-order
moments provide a more detailed picture of the distribution's shape, symmetry, and behavior.
Moments are helpful for determining summary measures of probability distributions. In the context
of our subject, these distributions refer to the density of pixel intensity values. We will discuss two
types of moments.
Types of Moments
Geometric moments are defined as the projection of the image intensity function f(x, y) onto the
monomial xpyq ,the basis set being {xp,yq} .The (p + q)th order geometric moment Mpq of a gray
level image f(x, y) is defined as
For that of a digital image to select a meaningful subset of the moment values that contain
sufficient information to characterize the image uniquely for a specific application the equation is
replaced by:
Where I(x,y) or f(x,y) denote the intensity at pixel location (x,y) where x,y are monomials of (p+q)th
order of moment and image can be thought of as a 2D density distribution f(x,y.
Types of Moments
While raw moments are not inherently invariant, they can be used to calculate central moments
which are invariant to translation of the object since they are defined about the COM of the object.
Central moments are in turn used to describe and define moment invariants which are used as
features describing the shape or the geometrical aspects of an object.
Since central moments are computed using COM, they are equivalent to mpq whose center is
shifted to centroid of the image, henceforth it is translation invariant.
Why Normalise?
We can obtain scale invariance by normalizing these central moments.
Normalized central moments are denoted by ηpq .
In statistics, normalized central moments are typically central moments divided by a power of the
standard deviation(σ) making them dimensionless, enabling us to compare different distribution
functions regardless of their scale.
Types of Moments/Normalized Central moments and Hu invariants
From these normalized central moments, we can calculate the seven derived quantities attributed
to Hu which are invariant to most of the transformations like scaling, translation and rotation.
Moment Based Features
Mathematically, moments are used to describe quantities at a distance from a reference axis/point.
Moments in statistics are used to characterize the distribution of random variables and similarly, in
mechanics to characterize bodies by their mass in a spatial distribution.
In image processing if we consider a binary or grey level image projected as a 2D DDF by their
intensity values, moments can be used to characterize an image and extract properties that have
analogies in statistics or mechanics. These properties can be said to as moment based features.
2. Orientation(𝜽): Defined as the angle of axis with the least moment of inertia. It also describes
the orientation of the principal axes.
Moment Based Features
3. Best Fit Ellipse is the ellipse whose second order of moment ,i.e. the moment of Inertia is the same
as that of the object.
Given by,
𝑰min=(𝝅/𝟒)ab3
𝑰max=(𝝅/𝟒)a3b
5. Radii of Gyration is another property that can be obtained from second order moment, described
about an axis is the distance from axis to a line where all of the mass may be concentrated without
changing second order along that axis. Mathematically,
Moment Based Features/Radii of Gyration
Where ROG and ROG about the x and y axes respectively defined in terms of moments.
x y
The ROG about the origin ROGCOM)is the radius of circle (h,k)0,0) where all mass may be
concentrated without change in the second order of moment about origin.
This ROG about origin ROGCOM) is invariant to image orientation and is used as a rotational invariant
feature in object representation methods.
Moment Based Features
6. Features obtained from higher order moments are Projection Skewness and Projection Kurtosis
Skewness is the measure of the degree of deviation from symmetry(about mean) of a distribution.
Kurtosis is a measurement of peakedness of a distribution.
Given by,
and
Skx and Sky indicate which side of axis is the projection skewed towards but it fails to identify if an
object is symmetric or not.
kx and ky if zero is called a gaussian distribution. Values 0 indicate flatter, less peaked distribution
while that 0 indicate narrow, more peaked distribution.
Other features might include quantities such as eccentricity, total sum of pixel intensities, orthogonal
moments such as the zernike moments, legendre moments, affine moments, complex moments, etc…
Applications
Moment based features are useful in applications like pattern characterization and recognition,object
identification, 3D object pose estimation, robot sensing, image coding and reconstruction, etc..
independent of position, size and orientation.
Pros:
Cons:
● Requires a very precise segmentation of the object to be described, which is often hard in the
real world.
● Normally only used for simple 2D shapes, as shapes become complex, Hu Moments are not
often used.
● Hu Moment calculations are based on the initial centroid computation — if the initial centroid
cannot be repeated for similar shapes, then Hu Moments will not obtain good matching
accuracy.
Appendix
References
https://cvexplained.wordpress.com/2020/07/21/10-4-hu-moments/
https://iopscience.iop.org/article/10.1088/1742-6596/1962/1/012028/pdf
https://www.semanticscholar.org/paper/Robust-matching-of-fingerprints-using-moments-Kahyaei-Moin/76831b2595b8896
dc8b27822fa1383506c14d566
https://support.ptc.com/help/mathcad/r10.0/en/index.html#page/PTC_Mathcad_Help/moment_invariants.html
https://onlinelibrary.wiley.com/doi/full/10.1155/2016/2796863
https://en.wikipedia.org/wiki/Image_moment
https://davuniversity.org/images/files/study-material/Moment-Based%20Feature.pdf
https://stackoverflow.com/questions/11379947/meaning-of-the-seven-hu-invariant-moments-function-from-opencv
17
Thank You
18