Class HistogramStatistics


  • public class HistogramStatistics
    extends java.lang.Object
    Operations related to computing statistics from histograms.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static int count​(int[] histogram, int N)
      Counts sum of all the bins inside the histogram
      static double mean​(int[] histogram, int N)
      Returns the mean value of the histogram
      static double mean​(int[] histogram, int counts, int N)  
      static int percentile​(int[] histogram, double fraction, int N)  
      static int percentile​(int[] histogram, int counts, double fraction, int N)  
      static double variance​(int[] histogram, double mean, int N)
      Computes the variance of pixel intensity values for a GrayU8 image represented by the given histogram.
      static double variance​(int[] histogram, double mean, int counts, int N)
      Computes the variance of elements in the histogram
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • HistogramStatistics

        public HistogramStatistics()
    • Method Detail

      • variance

        public static double variance​(int[] histogram,
                                      double mean,
                                      int N)
        Computes the variance of pixel intensity values for a GrayU8 image represented by the given histogram.
        Parameters:
        histogram - Histogram with N bins
        mean - Mean of the image.
        N - number of bins in the histogram.
        Returns:
        variance
      • variance

        public static double variance​(int[] histogram,
                                      double mean,
                                      int counts,
                                      int N)
        Computes the variance of elements in the histogram
        Parameters:
        histogram - Histogram with N bins
        mean - Histogram's mean.
        counts - Sum of all bins in the histogram.
        N - number of bins in the histogram.
        Returns:
        variance of values inside the histogram
      • count

        public static int count​(int[] histogram,
                                int N)
        Counts sum of all the bins inside the histogram
        Parameters:
        histogram - Histogram with N bins
        N - number of bins in the histogram.
        Returns:
        Sum of all values in the histogram array.
      • mean

        public static double mean​(int[] histogram,
                                  int N)
        Returns the mean value of the histogram
        Parameters:
        histogram - Histogram with N bins
        N - number of bins in the histogram.
        Returns:
        Mean pixel intensity value
      • mean

        public static double mean​(int[] histogram,
                                  int counts,
                                  int N)
      • percentile

        public static int percentile​(int[] histogram,
                                     double fraction,
                                     int N)
      • percentile

        public static int percentile​(int[] histogram,
                                     int counts,
                                     double fraction,
                                     int N)