![]() Home Page Toolkit Overview Using GML User Input Services Finger Tracker Calibrator Frame Grabber Service protocol Obtaining GML Installing GML Licence Developer Documentation Tcl/Tk API The GML Canvas Image processing Tcl Scripts Library List of Classes List of Files C/C++ API List of Classes List of Files |
gml_TGaussian2 Class Template Reference#include <gml_Gaussian2.h>
Collaboration diagram for gml_TGaussian2: ![]() Detailed Descriptiontemplate<class T>
Compute and maintain a gaussian representation (approximation) of a set of 2-dimensionnal samples.
|
Public Member Functions | |
gml_TGaussian2 () | |
Constructor: zero the fields. | |
gml_TError | Init () |
Setup the structure. | |
void | Reset () |
Zero the structure. | |
void | Dispose () |
Do nothing. | |
void | Clone (gml_TGaussian2< T > *gauss) |
Set this to be the exact copy of gauss. | |
void | Add (gml_TGaussian2< T > *gauss) |
Adds the distribution of gauss in this. | |
void | AddSample (T *s) |
Adds a sample in the set. s must point to an array of two T values. | |
void | AddSample (T x, T y) |
Adds a sample in the set. | |
void | AddSample (T x, T y, T weight) |
Adds a weighted sample in the set. | |
T | Samples () |
Return the total number of samples added. | |
gml_TError | UpdateStats () |
Compute mean, covariance, and inverse covariance. Returns an error if the covariance matrix could not be inverted. | |
T | GetMahaSquared (T x, T y) |
Returns the squared mahalanobis distance from (x, y) to the gaussian. | |
T | Value (T x, T y) |
Return the gaussian's value at (x, y). | |
void | GetMean (T *m) |
Calculates the mean of the gaussian and puts the result in m. m must point to an array of two T values. | |
void | GetVar (T *m) |
Calculates the covariance matrix of the gaussian and puts the result in m. m must point to an array of four T values. | |
Public Attributes | |
T | fCount |
number of samples added to set | |
T | fSum [2] |
sum of samples by components | |
T | fSumSq [2] |
sum of samples squared by components | |
T | fMixSum |
sum of component products | |
T | fMean [2] |
T | fCovariance [4] |
T | fInvCovariance [4] |
T GetMahaSquared | ( | T | x, | |
T | y | |||
) | [inline] |
Returns the squared mahalanobis distance from (x, y) to the gaussian.
T Value | ( | T | x, | |
T | y | |||
) | [inline] |