public class Sum extends FeatureHistogramStatistic
Calculates the sum of all values in a Histogram.

This sum represents the total of all pixel values multiplied by their respective frequencies in the histogram.

  • Constructor Details

    • Sum

      public Sum()
  • Method Details

    • calculateStatisticFrom

      protected double calculateStatisticFrom(Histogram histogram)
      Description copied from class: FeatureHistogramStatistic
      Calculates the statistic from the histogram, that is subsequently returned as the feature-value.
      Specified by:
      calculateStatisticFrom in class FeatureHistogramStatistic
      Parameters:
      histogram - the histogram to calculate the statistic from.
      Returns:
      the calculated statistic.