Main Page | Class Hierarchy | Alphabetical List | Data Structures | File List | Data Fields | Globals | Related Pages | Examples

vetHist Class Reference


Public Member Functions

 vetHist ()
 vetHist (int MinValue, int MaxValue)
 vetHist (vetFrameYUV420 &img, vetFrameYUV420::ChannelYUV channel)
 vetHist (vetFrameRGB24 &img, vetFrameRGB24::ChannelRGB channel)
 ~vetHist ()
VETRESULT reset ()
VETRESULT reset (int MinValue, int MaxValue)
VETRESULT addValue (int value)
VETRESULT addData (int *data, int size)
VETRESULT fromImage (vetFrameYUV420 &img, vetFrameYUV420::ChannelYUV channel)
VETRESULT fromImage (vetFrameRGB24 &img, vetFrameRGB24::ChannelRGB channel)
unsigned int * dumpFrequency ()
float * dumpProbabilities ()
int getValBandWidth ()
unsigned int getMinFrequencyValue ()
unsigned int getMaxFrequencyValue ()
float getMinProbabilityValue ()
float getMaxProbabilityValue ()
VETRESULT extractProbs ()
float extractDifference (vetHist *compareHist)
unsigned int getValCount ()
float getMean () const
float getVariance () const
VETRESULT drawGraph (vetFrameRGB24 &img)
VETRESULT saveToXML (char const *filename)
VETRESULT loadFromXML (char const *filename)

Protected Attributes

int valMax
int valMin
int valBandwidth
unsigned int valCount
double valSum
double valSum2
unsigned int * freqHist
unsigned int freqMax
unsigned int freqMin
float * probHist
float probMax
float probMin

Detailed Description

Definition at line 40 of file vetHist.h.


Member Function Documentation

float vetHist::extractDifference vetHist compareHist  ) 
 

Returns mean absolute difference between histograms. Histograms must have same dimensionality and bands_per_dim.

Parameters:
hist Pointer to Histogram to compare with this object

Definition at line 310 of file vetHist.cpp.

References extractProbs(), probHist, valBandwidth, and VETRET_ILLEGAL_USE.

VETRESULT vetHist::extractProbs  ) 
 

Calculate histogram probabilities (probs) from frequencies (frequency_data)

Definition at line 277 of file vetHist.cpp.

References freqHist, probHist, probMax, probMin, valBandwidth, valCount, VETRET_ILLEGAL_USE, and VETRET_OK.

Referenced by extractDifference(), fromImage(), and saveToXML().

VETRESULT vetHist::loadFromXML char const *  filename  ) 
 

Loads histogram from a (XML format) file.

Definition at line 473 of file vetHist.cpp.

References probHist, reset(), valCount, valMax, valMin, VETRET_OK, and VETRET_PARAM_ERR.

VETRESULT vetHist::saveToXML char const *  filename  ) 
 

Saves histogram data to an (XML format) file.

Definition at line 424 of file vetHist.cpp.

References extractProbs(), probHist, valBandwidth, valCount, valMax, valMin, VETRET_INTERNAL_ERR, VETRET_OK, and VETRET_PARAM_ERR.


The documentation for this class was generated from the following files:
Generated on Tue Jan 24 11:59:39 2006 for VETLib by  doxygen 1.4.4