/** * Computes the variance of pixel intensity values for a GrayU8 image represented by the given histogram. * * @param histogram Histogram with N bins * @param mean Mean of the image. * @param N number of bins in the histogram. * @return variance */ public static double variance(int[] histogram, double mean , int N ) { return variance(histogram, mean, count(histogram,N), N); }
public static int percentile(int[] histogram, double fraction , int N) { return percentile(histogram, count(histogram,N),fraction,N); } public static int percentile(int[] histogram, int counts, double fraction , int N) {