java.lang.Object
imagingbook.common.geometry.moments.Moments2D
This class defines methods for statistical moment calculations on 2D point sets. See Sec. 8.5 of [1] for details. This abstract class defines static methods only.
[1] W. Burger, M.J. Burge, Digital Image Processing – An Algorithmic Introduction, 3rd ed, Springer (2022).
- Version:
- 2022/11/17
-
Method Summary
Modifier and TypeMethodDescriptionstatic double
centralMoment
(Iterable<Pnt2d> points, int p, int q) Calculates and returns the central moment of order (p,q) for the specified set of 2D points.static double
normalizedCentralMoment
(Iterable<Pnt2d> points, int p, int q) Calculates and returns the normalized central moment of order (p,q) for the specified set of 2D points.static double
ordinaryMoment
(Iterable<Pnt2d> points, int p, int q) Calculates and returns the ordinary moment of order (p,q) for the specified set of 2D points.
-
Method Details
-
ordinaryMoment
Calculates and returns the ordinary moment of order (p,q) for the specified set of 2D points.- Parameters:
points
- a set of 2D pointsp
- order index pq
- order index q- Returns:
- the moment value
-
centralMoment
Calculates and returns the central moment of order (p,q) for the specified set of 2D points.- Parameters:
points
- a set of 2D pointsp
- order index pq
- order index q- Returns:
- the moment value
-
normalizedCentralMoment
Calculates and returns the normalized central moment of order (p,q) for the specified set of 2D points.- Parameters:
points
- a set of 2D pointsp
- order index pq
- order index q- Returns:
- the moment value
-