#include <vifa_image_histogram.h>
Public Member Functions | |
vifa_image_histogram (vil_image_view_base_sptr image, double percentage=100.0) | |
vifa_histogram * | Scale (float scale_factor) |
Transform the value axis of a histogram by a translation, transl, and a scale factor, scale. | |
vifa_histogram * | Cumulative () |
Assuming that "this" is a histogram of population density, construct a new histogram which is the cumulative distribution. | |
vifa_histogram * | NonMaximumSupress (int radius=1, bool cyclic=false) |
Suppress values in the histogram which are not locally. | |
void | RemoveFlatPeaks (int nbins, float *cnts, bool cyclic) |
Prune any sequences of more than one maximum value. | |
float | CompareToHistogram (vifa_histogram *h) |
Compare 'this' histogram to another (passed in). | |
void | UpCount (float newval) |
void | UpCount (float newval, bool useNewIndexMethod) |
int | GetNumSamples () const |
float | GetCount (float uval) const |
float | SetCount (float pixelval, float count) |
float | GetMinVal () const |
float | GetMaxVal () const |
float | GetMaxCount () const |
float | GetMean () const |
Compute the mean of the histogram population. | |
float | GetStandardDev () const |
float | GetMedian () const |
int | GetValIndex (float val) const |
float * | GetVals () const |
float * | GetCounts () const |
int | GetRes () const |
float | GetBucketSize () const |
float * | GetMinValAddr () const |
float * | GetMinCountAddr () const |
char | GetDelimiter () const |
void | SetDelimiter (char d) |
float | ComputeArea (float low, float high) const |
float | ComputeArea () const |
Compute the total area under the histogram. | |
float | LowClipVal (float clip_fraction) |
Finds the lower bound value which eliminates a given fraction of histogram area. | |
float | HighClipVal (float clip_fraction) |
Finds the lower bound value which eliminates a given fraction of histogram area. | |
void | Print () |
Prints histogram counts onto vcl_cout. | |
void | Dump (char *) |
dumps histogram values to file. | |
int | WritePlot (const char *fname) |
Writes histogram in format suitable for plotting tools like Gnuplot. | |
void | touch () |
unsigned long | get_time_stamp () const |
bool | older (vul_timestamp const &t) const |
bool | older (vul_timestamp const *t) const |
void | ref () |
void | unref () |
int | get_references () const |
bool | is_referenced () const |
Protected Member Functions | |
void | init (void) |
void | fill_histogram (vil_image_view_base_sptr src_buf, double percentage=100.0) |
virtual int | GetIndex (float i) const |
Protected Attributes | |
enum vil_pixel_format | form_ |
unsigned int | byte_depth_ |
char | delimiter |
float * | vals |
float * | counts |
int | num |
float | delta |
float | vmax |
float | vmin |
float | mean |
float | standard_dev |
unsigned long | timestamp_ |
Definition at line 24 of file vifa_image_histogram.h.
vifa_image_histogram::vifa_image_histogram | ( | vil_image_view_base_sptr | image, |
double | percentage = 100.0 |
||
) |
Definition at line 9 of file vifa_image_histogram.cxx.
float vifa_histogram::CompareToHistogram | ( | vifa_histogram * | h | ) | [inherited] |
Compare 'this' histogram to another (passed in).
Taken from the old TargetJr class HistEntropy.
Definition at line 1139 of file vifa_histogram.cxx.
float vifa_histogram::ComputeArea | ( | float | low, |
float | high | ||
) | const [inherited] |
Definition at line 923 of file vifa_histogram.cxx.
float vifa_histogram::ComputeArea | ( | ) | const [inherited] |
Compute the total area under the histogram.
Definition at line 972 of file vifa_histogram.cxx.
vifa_histogram * vifa_histogram::Cumulative | ( | ) | [inherited] |
Assuming that "this" is a histogram of population density, construct a new histogram which is the cumulative distribution.
Each bin, xi, in his is assumed to represent a density, i.e., {x | (xi - .5*delta) < x <= (xi + .5*delta)} Each bin, xi, in the result represents a cumulative distribution, i.e., {x | x <= (xi + .5*delta)}
Definition at line 461 of file vifa_histogram.cxx.
void vifa_histogram::Dump | ( | char * | dumpfile | ) | [inherited] |
dumps histogram values to file.
Definition at line 1083 of file vifa_histogram.cxx.
void vifa_image_histogram::fill_histogram | ( | vil_image_view_base_sptr | src_buf, |
double | percentage = 100.0 |
||
) | [protected] |
Definition at line 77 of file vifa_image_histogram.cxx.
float vifa_histogram::GetBucketSize | ( | ) | const [inline, inherited] |
Definition at line 96 of file vifa_histogram.h.
float vifa_histogram::GetCount | ( | float | uval | ) | const [inherited] |
Definition at line 831 of file vifa_histogram.cxx.
float* vifa_histogram::GetCounts | ( | ) | const [inline, inherited] |
Definition at line 88 of file vifa_histogram.h.
char vifa_histogram::GetDelimiter | ( | ) | const [inline, inherited] |
Definition at line 103 of file vifa_histogram.h.
int vifa_histogram::GetIndex | ( | float | i | ) | const [protected, virtual, inherited] |
Definition at line 770 of file vifa_histogram.cxx.
float vifa_histogram::GetMaxCount | ( | ) | const [inherited] |
Definition at line 858 of file vifa_histogram.cxx.
float vifa_histogram::GetMaxVal | ( | ) | const [inherited] |
Definition at line 848 of file vifa_histogram.cxx.
float vifa_histogram::GetMean | ( | ) | const [inherited] |
Compute the mean of the histogram population.
Definition at line 675 of file vifa_histogram.cxx.
float vifa_histogram::GetMedian | ( | ) | const [inherited] |
Definition at line 755 of file vifa_histogram.cxx.
float* vifa_histogram::GetMinCountAddr | ( | ) | const [inline, inherited] |
Definition at line 100 of file vifa_histogram.h.
float vifa_histogram::GetMinVal | ( | ) | const [inherited] |
Definition at line 840 of file vifa_histogram.cxx.
float* vifa_histogram::GetMinValAddr | ( | ) | const [inline, inherited] |
Definition at line 98 of file vifa_histogram.h.
int vifa_histogram::GetNumSamples | ( | ) | const [inherited] |
Definition at line 912 of file vifa_histogram.cxx.
int vifa_histogram::GetRes | ( | ) | const [inline, inherited] |
Definition at line 94 of file vifa_histogram.h.
float vifa_histogram::GetStandardDev | ( | ) | const [inherited] |
Definition at line 715 of file vifa_histogram.cxx.
int vifa_histogram::GetValIndex | ( | float | val | ) | const [inherited] |
Definition at line 811 of file vifa_histogram.cxx.
float* vifa_histogram::GetVals | ( | ) | const [inline, inherited] |
Definition at line 82 of file vifa_histogram.h.
float vifa_histogram::HighClipVal | ( | float | clip_fraction | ) | [inherited] |
Finds the lower bound value which eliminates a given fraction of histogram area.
Definition at line 1023 of file vifa_histogram.cxx.
void vifa_image_histogram::init | ( | void | ) | [protected] |
Definition at line 25 of file vifa_image_histogram.cxx.
float vifa_histogram::LowClipVal | ( | float | clip_fraction | ) | [inherited] |
Finds the lower bound value which eliminates a given fraction of histogram area.
Definition at line 989 of file vifa_histogram.cxx.
vifa_histogram * vifa_histogram::NonMaximumSupress | ( | int | radius = 1 , |
bool | cyclic = false |
||
) | [inherited] |
Suppress values in the histogram which are not locally.
The neighborhood for computing the local maximum a maximum. is [radius X radius], e.g. for radius =1 the neighborhood is [-X-], for radius = 2, the neighborhood is [--X--], etc. If the cyclic flag is true then the index space is assumed to be equivalent to a circle. That is, elements "0" and "n_buckets" are in correspondence.
Definition at line 634 of file vifa_histogram.cxx.
void vifa_histogram::Print | ( | ) | [inherited] |
Prints histogram counts onto vcl_cout.
Definition at line 1056 of file vifa_histogram.cxx.
void vifa_histogram::RemoveFlatPeaks | ( | int | nbins, |
float * | cnts, | ||
bool | cyclic | ||
) | [inherited] |
Prune any sequences of more than one maximum value.
That is, it is possible to have a "flat" top peak with an arbitrarily long sequence of equal, but maximum values. The cyclic flag indicates that the sequence wraps around, i.e. cnts[0] equivalent to cnts[nbins]
Definition at line 518 of file vifa_histogram.cxx.
vifa_histogram * vifa_histogram::Scale | ( | float | scale_factor | ) | [inherited] |
Transform the value axis of a histogram by a translation, transl, and a scale factor, scale.
The new histogram has the same resolution as his.
Definition at line 381 of file vifa_histogram.cxx.
float vifa_histogram::SetCount | ( | float | pixelval, |
float | count | ||
) | [inherited] |
Definition at line 874 of file vifa_histogram.cxx.
void vifa_histogram::SetDelimiter | ( | char | d | ) | [inline, inherited] |
Definition at line 104 of file vifa_histogram.h.
void vifa_histogram::UpCount | ( | float | newval | ) | [inherited] |
Definition at line 902 of file vifa_histogram.cxx.
void vifa_histogram::UpCount | ( | float | newval, |
bool | useNewIndexMethod | ||
) | [inherited] |
Definition at line 889 of file vifa_histogram.cxx.
int vifa_histogram::WritePlot | ( | const char * | fname | ) | [inherited] |
Writes histogram in format suitable for plotting tools like Gnuplot.
Definition at line 1099 of file vifa_histogram.cxx.
unsigned int vifa_image_histogram::byte_depth_ [protected] |
Definition at line 28 of file vifa_image_histogram.h.
float* vifa_histogram::counts [protected, inherited] |
Definition at line 37 of file vifa_histogram.h.
char vifa_histogram::delimiter [protected, inherited] |
Definition at line 35 of file vifa_histogram.h.
float vifa_histogram::delta [protected, inherited] |
Definition at line 40 of file vifa_histogram.h.
enum vil_pixel_format vifa_image_histogram::form_ [protected] |
Definition at line 27 of file vifa_image_histogram.h.
float vifa_histogram::mean [mutable, protected, inherited] |
Definition at line 42 of file vifa_histogram.h.
int vifa_histogram::num [protected, inherited] |
Definition at line 39 of file vifa_histogram.h.
float vifa_histogram::standard_dev [mutable, protected, inherited] |
Definition at line 43 of file vifa_histogram.h.
float* vifa_histogram::vals [protected, inherited] |
Definition at line 36 of file vifa_histogram.h.
float vifa_histogram::vmax [protected, inherited] |
Definition at line 41 of file vifa_histogram.h.
float vifa_histogram::vmin [protected, inherited] |
Definition at line 41 of file vifa_histogram.h.