![]() |
Bsoft 2.1.4
Bernard's software package
|
Header file for calculating and fitting histograms. More...
Functions | |
vector< long > | histogram (vector< double > data, long bins, double &scale, double &offset) |
Calculates the histogram froma data array. More... | |
Bplot * | plot_convert_to_histogram (Bplot *plot, long bins, long hiscol) |
vector< double > | histogram_thresholds (vector< long > h, long number) |
Calculates multiple thresholds from a histogram. More... | |
double | histogram_gaussian_R (Bsimplex &simp) |
int | plot_histogram_fit (Bplot *plot, long ngauss) |
Fits a gaussian function to a histogram and plots it. More... | |
Header file for calculating and fitting histograms.
vector< long > histogram | ( | vector< double > | data, |
long | bins, | ||
double & | scale, | ||
double & | offset | ||
) |
Calculates the histogram froma data array.
data | vector of data. |
bins | number of bins in the histogram. |
&scale | scale. |
&offset | offset. |
A histogram of an image is calculated with a given number of bins. Multiple channels are output as successive one-dimensional arrays. The image data is not affected. The statistics for the input image must be correctly calculated.
double histogram_gaussian_R | ( | Bsimplex & | simp | ) |
vector< double > histogram_thresholds | ( | vector< long > | h, |
long | number | ||
) |
Calculates multiple thresholds from a histogram.
h | histogram. |
number | number of clusters (one more than thresholds). |
Reference: PS.Liao, TS.Chen, and PC. Chung, Journal of Information Science and Engineering, vol 17, 713-727 (2001)
int plot_histogram_fit | ( | Bplot * | plot, |
long | ngauss | ||
) |
Fits a gaussian function to a histogram and plots it.
plot | histogram plot. |
ngauss | number of gaussians. |
One or more gaussians are fit to a histogram plot. The gaussian curves are added to columns.