CVB.Net 14.0
HistogramExtensions Class Reference

extends the long[] class by methods that help analyze a histogram. More...

Static Public Member Functions

static int[] FindPeaks (this IList< int > histogram, int blurSize, int minDiff)
 Find peaks in the histogram identified by the supplied criteria. More...
 
static int[] FindPeaks (this IList< long > histogram, int blurSize, int minDiff)
 Find peaks in the histogram identified by the supplied criteria. More...
 
static double[] Filter (this IList< int > histogram, double[] kernel)
 Filter a histogram array with the given kernel . At the beginning and end of the histogram, the histogram uses constant extension More...
 
static double[] Filter (this IList< long > histogram, double[] kernel)
 Filter a histogram array with the given kernel . At the beginning and end of the histogram, the histogram uses constant extension More...
 
static double[] Filter (this IList< double > histogram, double[] kernel)
 Filter a histogram array with the given kernel . At the beginning and end of the histogram, the histogram uses constant extension More...
 
static int SumBetween (this IList< int > histogram, int lowerLimit, int upperLimit)
 Count the number of pixels that lie between two limits in the histogram. More...
 
static long SumBetween (this IList< long > histogram, int lowerLimit, int upperLimit)
 Count the number of pixels that lie between two limits in the histogram. More...
 

Detailed Description

extends the long[] class by methods that help analyze a histogram.

Member Function Documentation

◆ Filter() [1/3]

static double[] Filter ( this IList< double >  histogram,
double[]  kernel 
)
static

Filter a histogram array with the given kernel . At the beginning and end of the histogram, the histogram uses constant extension

Parameters
histogramHistogram to be filtered.
kernelKernel to be used
Returns
Filter result.

◆ Filter() [2/3]

static double[] Filter ( this IList< int >  histogram,
double[]  kernel 
)
static

Filter a histogram array with the given kernel . At the beginning and end of the histogram, the histogram uses constant extension

Parameters
histogramHistogram to be filtered.
kernelKernel to be used
Returns
Filter result.

◆ Filter() [3/3]

static double[] Filter ( this IList< long >  histogram,
double[]  kernel 
)
static

Filter a histogram array with the given kernel . At the beginning and end of the histogram, the histogram uses constant extension

Parameters
histogramHistogram to be filtered.
kernelKernel to be used
Returns
Filter result.

◆ FindPeaks() [1/2]

static int[] FindPeaks ( this IList< int >  histogram,
int  blurSize,
int  minDiff 
)
static

Find peaks in the histogram identified by the supplied criteria.

Parameters
histogramHistogram to analyze.
blurSizeAveraging window size (must be >= 1).
minDiffMinimum grey value difference between two peaks.
Returns
Peak positions in the histogram.
Exceptions
ArgumentNullExceptionIf histogram is null.
ArgumentOutOfRangeExceptionIf blurSize or minDiff are out of rang.e

◆ FindPeaks() [2/2]

static int[] FindPeaks ( this IList< long >  histogram,
int  blurSize,
int  minDiff 
)
static

Find peaks in the histogram identified by the supplied criteria.

Parameters
histogramHistogram to analyze.
blurSizeAveraging window size (must be >= 1).
minDiffMinimum grey value difference between two peaks.
Returns
Peak positions in the histogram.
Exceptions
ArgumentNullExceptionIf histogram is null.
ArgumentOutOfRangeExceptionIf blurSize or minDiff are out of rang.e

◆ SumBetween() [1/2]

static int SumBetween ( this IList< int >  histogram,
int  lowerLimit,
int  upperLimit 
)
static

Count the number of pixels that lie between two limits in the histogram.

Parameters
histogramThe histogram to calculate the sum on.
lowerLimitLower limit to count from.
upperLimitUpper limit to count to (including).
Returns
Number of pixels with a gray value between lowerLimit and upperLimit .
Exceptions
ArgumentOutOfRangeExceptionIf lowerLimit is smaller than zero or upperLimit is larger or equal to the number of entries in the Histogram.

◆ SumBetween() [2/2]

static long SumBetween ( this IList< long >  histogram,
int  lowerLimit,
int  upperLimit 
)
static

Count the number of pixels that lie between two limits in the histogram.

Parameters
histogramThe histogram to calculate the sum on.
lowerLimitLower limit to count from.
upperLimitUpper limit to count to (including).
Returns
Number of pixels with a gray value between lowerLimit and upperLimit .
Exceptions
ArgumentOutOfRangeExceptionIf lowerLimit is smaller than zero or upperLimit is larger or equal to the number of entries in the Histogram.