Class Moments2D

java.lang.Object
imagingbook.common.geometry.moments.Moments2D

public abstract class Moments2D extends Object

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 Details

    • ordinaryMoment

      public 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.
      Parameters:
      points - a set of 2D points
      p - order index p
      q - order index q
      Returns:
      the moment value
    • centralMoment

      public static 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.
      Parameters:
      points - a set of 2D points
      p - order index p
      q - order index q
      Returns:
      the moment value
    • normalizedCentralMoment

      public 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.
      Parameters:
      points - a set of 2D points
      p - order index p
      q - order index q
      Returns:
      the moment value