Package boofcv.alg.misc
Class HistogramStatistics
java.lang.Object
boofcv.alg.misc.HistogramStatistics
Operations related to computing statistics from histograms.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic int
count
(int[] histogram, int N) Counts sum of all the bins inside the histogramstatic double
mean
(int[] histogram, int N) Returns the mean value of the histogramstatic 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
-
Constructor Details
-
HistogramStatistics
public HistogramStatistics()
-
-
Method Details
-
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 binsmean
- 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 binsmean
- 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 binsN
- 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 binsN
- 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)
-