#include <Histogram.h>
Public Methods | |
| Histogram (float minimum_data_value, float maximum_data_value, unsigned int bands_per_dimension, unsigned int dimensionality) | |
| Allocate memory for and initialise histogram. More... | |
| Histogram (char const *hstFile) | |
| Constructor to load an existing histogram from a file and allocate appropriate memory. | |
| unsigned int | numBands (void) |
| void | add_new_data_item (int *data) |
| Adds new data to histogram calculation. More... | |
| void | add_new_data_item (float *data) |
| Adds new data to histogram calculation. More... | |
| void | reset_histogram () |
| Resets histogram by setting all frequencys to 0 and no_data_items to zero. More... | |
| void | calculate_probabilities () |
| Calculate histogram probabilities (probs) from frequencies (frequency_data). | |
| void | calculate_histogram () |
| Calculate normalised histogram probabilities (probs) from frequencies (frequency_data). More... | |
| float | get_histogram_value (unsigned int *bin) |
| Returns bin probability value (from probs). More... | |
| float | get_mapped_value (unsigned int *bin) |
| Returns probability associated with bin containing the data 'data'. | |
| float | calculate_difference (Histogram *hist) |
| Returns mean absolute difference between histograms. More... | |
| float | get_maximum_prob (void) |
| Returns maximum probability over all bins. | |
| void | get_best_bin (unsigned int *bin) |
| Returns best bin. | |
| float | calculate_proportion_threshold (float proportion) |
| Calculate the probability threshold above which no more than 'proportion' of the training data lie. More... | |
| void | save_histogram (char const *) |
| Saves histogram data to an (XML format) file. | |
| void | load_histogram (char const *) |
| Loads histogram from a (XML format) file. | |
Protected Attributes | |
| float* | probs |
| Bin relative probabilities. | |
Definition at line 25 of file Histogram.h.
|
|
Allocate memory for and initialise histogram.
Definition at line 31 of file Histogram.cpp. |
|
|
Adds new data to histogram calculation. Dimensionality must match dim.
Definition at line 137 of file Histogram.cpp. |
|
|
Adds new data to histogram calculation. Dimensionality must match dim.
Definition at line 90 of file Histogram.cpp. |
|
|
Returns mean absolute difference between histograms. Histograms must have same dimensionality and bands_per_dim.
Definition at line 339 of file Histogram.cpp. |
|
|
Calculate normalised histogram probabilities (probs) from frequencies (frequency_data). I.e. max probability set to 1. To calculate true probabilities use calculate_probabilities(). Definition at line 249 of file Histogram.cpp. |
|
|
Calculate the probability threshold above which no more than 'proportion' of the training data lie. I.E. if proportion = 1 => threshold = 0 OR if proportion = 0.99999... => threshold = lowest non zero bin prob NOTE: calculate_probabilities() should be called prior to this method. Definition at line 205 of file Histogram.cpp. |
|
|
Returns bin probability value (from probs).
Definition at line 268 of file Histogram.cpp. |
|
|
Resets histogram by setting all frequencys to 0 and no_data_items to zero. N.B. This has no effect on probs - calculate_histogram() should ALWAYS be called befor using the probabilities. Definition at line 72 of file Histogram.cpp. |
1.2.8.1 written by Dimitri van Heesch,
© 1997-2001