#include <mrpt/poses/CPointPDFGaussian.h>
Public Member Functions | |
CPointPDFGaussian () | |
Default constructor. | |
CPointPDFGaussian (const CPoint3D &init_Mean) | |
Constructor. | |
CPointPDFGaussian (const CPoint3D &init_Mean, const CMatrix &init_Cov) | |
Constructor. | |
CPoint3D | getEstimatedPoint () const |
Returns an estimate of the pose, (the mean, or mathematical expectation of the PDF). | |
CMatrixD | getEstimatedCovariance () const |
Returns an estimate of the pose covariance matrix (3x3 cov.matrix for x,y,phi variables). | |
void | copyFrom (const CPointPDF &o) |
Copy operator, translating if necesary (for example, between particles and gaussian representations). | |
void | saveToTextFile (const std::string &file) const |
Save PDF's particles to a text file, containing the 2D pose in the first line, then the covariance matrix in next 3 lines. | |
void | changeCoordinatesReference (const CPose3D &newReferenceBase) |
This can be used to convert a PDF from local coordinates to global, providing the point (newReferenceBase) from which "to project" the current pdf. | |
void | bayesianFusion (CPointPDFGaussian &p1, CPointPDFGaussian &p2) |
Bayesian fusion of two points gauss. | |
double | productIntegralWith (CPointPDFGaussian &p) |
Computes the "correspondence likelihood" of this PDF with another one: This is implemented as the integral from -inf to +inf of the product of both PDF. | |
double | productIntegralNormalizedWith (CPointPDFGaussian *p) |
Computes the "correspondence likelihood" of this PDF with another one: This is implemented as the integral from -inf to +inf of the product of both PDF. | |
double | productIntegralNormalizedWith2D (CPointPDFGaussian *p) |
Computes the "correspondence likelihood" of this PDF with another one: This is implemented as the integral from -inf to +inf of the product of both PDF. | |
void | drawSingleSample (CPoint3D &outSample) const |
Draw a sample from the pdf. | |
void | bayesianFusion (CPointPDF &p1, CPointPDF &p2, const double &minMahalanobisDistToDrop=0) |
Bayesian fusion of two point distributions (product of two distributions->new distribution), then save the result in this object (WARNING: See implementing classes to see classes that can and cannot be mixtured!). | |
Public Attributes | |
CPoint3D | mean |
The mean value. | |
CMatrixD | cov |
The 3x3 covariance matrix. |
Also a method for bayesian fusion is provided.
Definition at line 44 of file CPointPDFGaussian.h.
mrpt::poses::CPointPDFGaussian::CPointPDFGaussian | ( | ) |
Default constructor.
mrpt::poses::CPointPDFGaussian::CPointPDFGaussian | ( | const CPoint3D & | init_Mean | ) |
Constructor.
mrpt::poses::CPointPDFGaussian::CPointPDFGaussian | ( | const CPoint3D & | init_Mean, | |
const CMatrix & | init_Cov | |||
) |
Constructor.
void mrpt::poses::CPointPDFGaussian::bayesianFusion | ( | CPointPDF & | p1, | |
CPointPDF & | p2, | |||
const double & | minMahalanobisDistToDrop = 0 | |||
) | [virtual] |
Bayesian fusion of two point distributions (product of two distributions->new distribution), then save the result in this object (WARNING: See implementing classes to see classes that can and cannot be mixtured!).
p1 | The first distribution to fuse | |
p2 | The second distribution to fuse | |
minMahalanobisDistToDrop | If set to different of 0, the result of very separate Gaussian modes (that will result in negligible components) in SOGs will be dropped to reduce the number of modes in the output. |
Implements mrpt::poses::CPointPDF.
void mrpt::poses::CPointPDFGaussian::bayesianFusion | ( | CPointPDFGaussian & | p1, | |
CPointPDFGaussian & | p2 | |||
) |
Bayesian fusion of two points gauss.
distributions, then save the result in this object. The process is as follows:
S = (S1-1 + S2-1)-1; x = S * ( S1-1*x1 + S2-1*x2 );
void mrpt::poses::CPointPDFGaussian::changeCoordinatesReference | ( | const CPose3D & | newReferenceBase | ) | [virtual] |
This can be used to convert a PDF from local coordinates to global, providing the point (newReferenceBase) from which "to project" the current pdf.
Result PDF substituted the currently stored one in the object. Both the mean value and the covariance matrix are updated correctly.
Implements mrpt::poses::CPointPDF.
void mrpt::poses::CPointPDFGaussian::copyFrom | ( | const CPointPDF & | o | ) | [virtual] |
Copy operator, translating if necesary (for example, between particles and gaussian representations).
Implements mrpt::poses::CPointPDF.
void mrpt::poses::CPointPDFGaussian::drawSingleSample | ( | CPoint3D & | outSample | ) | const [virtual] |
CMatrixD mrpt::poses::CPointPDFGaussian::getEstimatedCovariance | ( | ) | const [virtual] |
Returns an estimate of the pose covariance matrix (3x3 cov.matrix for x,y,phi variables).
Implements mrpt::poses::CPointPDF.
CPoint3D mrpt::poses::CPointPDFGaussian::getEstimatedPoint | ( | ) | const [virtual] |
Returns an estimate of the pose, (the mean, or mathematical expectation of the PDF).
Implements mrpt::poses::CPointPDF.
double mrpt::poses::CPointPDFGaussian::productIntegralNormalizedWith | ( | CPointPDFGaussian * | p | ) |
Computes the "correspondence likelihood" of this PDF with another one: This is implemented as the integral from -inf to +inf of the product of both PDF.
The resulting number is in the range [0,1]
std::exception | On errors like covariance matrix with null determinant, etc... |
double mrpt::poses::CPointPDFGaussian::productIntegralNormalizedWith2D | ( | CPointPDFGaussian * | p | ) |
Computes the "correspondence likelihood" of this PDF with another one: This is implemented as the integral from -inf to +inf of the product of both PDF.
The resulting number is in the range [0,1]. NOTE: This version ignores the "z" coordinates!!
std::exception | On errors like covariance matrix with null determinant, etc... |
double mrpt::poses::CPointPDFGaussian::productIntegralWith | ( | CPointPDFGaussian & | p | ) |
Computes the "correspondence likelihood" of this PDF with another one: This is implemented as the integral from -inf to +inf of the product of both PDF.
The resulting number is >=0.
std::exception | On errors like covariance matrix with null determinant, etc... |
void mrpt::poses::CPointPDFGaussian::saveToTextFile | ( | const std::string & | file | ) | const [virtual] |
Save PDF's particles to a text file, containing the 2D pose in the first line, then the covariance matrix in next 3 lines.
Implements mrpt::poses::CPointPDF.
Page generated by Doxygen 1.5.8 for MRPT 0.6.5 SVN:exported at Mon Jan 12 13:00:16 UTC 2009 |